/* ── APP SHARED ── */
.app-wrap { min-height: 100vh; padding-top: 64px; background: var(--bg-primary); }
.app-inner { max-width: 680px; margin: 0 auto; padding: 48px 24px; }
.app-header { text-align: center; margin-bottom: 40px; }
.app-header h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.app-header p { color: var(--text-secondary); font-size: 16px; }

/* ── BOOKING FORM ── */
.booking-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
}
.form-row { margin-bottom: 20px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; letter-spacing: 0.3px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--accent); }
.form-row textarea { resize: vertical; min-height: 80px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: white; width: 100%; }
.btn-primary:hover { background: #e55a2b; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); }

.price-display {
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.price-display .label { font-size: 13px; color: var(--text-secondary); }
.price-display .amount { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--accent); }

.success-panel {
  background: var(--bg-card);
  border: 1px solid rgba(74,222,128,0.3);
  border-radius: 20px;
  padding: 36px;
  text-align: center;
}
.success-panel .big-icon { font-size: 48px; margin-bottom: 16px; }
.success-panel h2 { font-size: 24px; margin-bottom: 12px; }
.success-panel p { color: var(--text-secondary); margin-bottom: 24px; }

.error-msg { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); border-radius: 8px; padding: 12px 16px; color: #f87171; font-size: 14px; margin-bottom: 16px; }

/* ── DASHBOARD ── */
.status-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
}
.tradesman-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.tradesman-avatar {
  width: 56px; height: 56px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 22px; font-weight: 700; color: white;
  flex-shrink: 0;
}
.tradesman-meta { flex: 1; }
.tradesman-meta h3 { font-size: 20px; font-weight: 700; margin-bottom: 2px; }
.tradesman-meta span { font-size: 13px; color: var(--text-secondary); }
.tradesman-score { font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800; color: #fbbf24; }

.status-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
}
.step-item::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 55%;
  width: 90%;
  height: 2px;
  background: var(--text-muted);
}
.step-item:last-child::after { display: none; }
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--bg-primary);
  position: relative; z-index: 1;
}
.step-item.done .step-dot { background: #4ade80; }
.step-item.active .step-dot { background: var(--accent); box-shadow: 0 0 12px rgba(255,107,53,0.5); }
.step-label { font-size: 10px; color: var(--text-muted); text-align: center; }
.step-item.done .step-label, .step-item.active .step-label { color: var(--text-secondary); }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.3);
  color: #4ade80;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.live-badge .dot {
  width: 6px; height: 6px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

.history-log { display: flex; flex-direction: column; gap: 12px; }
.history-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.history-time { font-size: 11px; color: var(--text-muted); min-width: 48px; font-family: monospace; }
.history-text { font-size: 13px; color: var(--text-secondary); }

/* ── RATING ── */
.rating-section { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--border); }
.star-row { display: flex; gap: 8px; margin-bottom: 16px; }
.star-btn {
  font-size: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s;
  padding: 0;
  line-height: 1;
}
.star-btn:hover, .star-btn.active { color: #fbbf24; }

/* ── TRADESMAN PANEL ── */
.tradesman-panel { max-width: 800px; margin: 0 auto; padding: 32px 24px; }
.job-queue { display: flex; flex-direction: column; gap: 16px; }
.job-card-tradesman {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
}
.job-card-tradesman.assigned { border-color: var(--accent); }
.job-meta { flex: 1; }
.job-meta h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.job-meta p { font-size: 13px; color: var(--text-secondary); }
.job-actions { display: flex; gap: 8px; }

/* ── PRICING PAGE ── */
.pricing-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.pricing-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.pricing-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.pricing-card-header h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.pricing-card-header p { font-size: 13px; color: var(--text-secondary); }
.pricing-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.pricing-amount { font-family: 'Syne', sans-serif; font-size: 36px; font-weight: 800; color: var(--accent); }
.pricing-note {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 20px 24px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
}

/* ── MAP PLACEHOLDER ── */
.map-embed {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ── GLOBAL POLISH ── */
::selection { background: var(--accent-dim); color: var(--accent); }

input::placeholder, textarea::placeholder, select::placeholder { color: var(--text-muted); }

select option { background: var(--bg-primary); color: var(--text-primary); }

button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.status-pill.status-pending    { background: rgba(251,191,36,0.15); color: #fbbf24; }
.status-pill.status-assigned   { background: var(--accent-dim); color: var(--accent); }
.status-pill.status-confirmed  { background: rgba(74,222,128,0.15); color: #4ade80; }
.status-pill.status-en_route  { background: rgba(96,165,250,0.15); color: #60a5fa; }
.status-pill.status-in_progress { background: rgba(96,165,250,0.15); color: #60a5fa; }
.status-pill.status-completed { background: rgba(74,222,128,0.15); color: #4ade80; }
.status-pill.status-declined  { background: rgba(248,113,113,0.15); color: #f87171; }
.status-pill.status-cancelled { background: rgba(248,113,113,0.15); color: #f87171; }

.flag-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.flag-further {
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
}

a { cursor: pointer; }