/* ── Night (default) ── */
:root, [data-theme="night"] {
  --bg: #0c1a24;
  --surface: #122030;
  --surface2: #0f1c2c;
  --border: #1e3848;
  --accent: #00e5c8;
  --white: #e0f0f8;
  --body: #90c0d8;
  --muted: #3a6880;
  --dim: #2a5060;
  --green: #3dba6f;
  --red: #e85454;
  --black: #0c1a24;
}

/* ── Day ── */
[data-theme="day"] {
  --bg: #edf2f6;
  --surface: #f0f5f8;
  --surface2: #e8eef3;
  --border: #d8e2ec;
  --accent: #00b8a3;
  --white: #1a2b3c;
  --body: #3a5068;
  --muted: #7a94a8;
  --dim: #a0b4c4;
  --green: #2da55e;
  --red: #d44040;
  --black: #0c1a24;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: #0c1a24;
  overflow-x: hidden;
  overscroll-behavior: none;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* ── Logo ── */
.logo {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--white);
}

.logo span {
  color: var(--accent);
}

/* ── Typography ── */
h1, h2, h3 {
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--white);
}

h1 { font-size: clamp(2rem, 8vw, 3.5rem); letter-spacing: -1.5px; line-height: 1.0; }
h2 { font-size: clamp(1.5rem, 5vw, 2.25rem); letter-spacing: -1px; }
h3 { font-size: 1.125rem; }

p { color: var(--body); font-size: 0.9375rem; line-height: 1.65; }

em.accent { color: var(--accent); font-style: normal; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: background 0.3s, border-color 0.3s;
}

.card-sm {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

/* ── Fields inside cards ── */
.field {
  padding: 12px 14px;
  border-bottom: 1px solid var(--bg);
}

.field:last-child { border-bottom: none; }

.field-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dim);
  display: block;
  margin-bottom: 4px;
}

.field-value {
  font-size: 0.875rem;
  color: var(--body);
}

/* ── Inputs ── */
input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
select,
textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 13px 14px;
  font-size: 0.9375rem;
  color: var(--white);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}

input:not([type="radio"]):not([type="checkbox"]):focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}

input::placeholder,
textarea::placeholder {
  color: var(--dim);
}

input[type="radio"], input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

select option {
  background: var(--surface);
  color: var(--white);
}

/* ── Buttons ── */
.btn {
  border: none;
  border-radius: 11px;
  padding: 13px 18px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover { opacity: 0.9; }

.btn-full {
  width: 100%;
  padding: 14px;
  font-size: 0.9375rem;
  font-weight: 800;
}

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-danger {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-accept {
  background: var(--green);
  color: #fff;
}

/* ── Service tabs ── */
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex-shrink: 0;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.tab.active,
.tab:focus {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 700;
}

/* ── Pills and badges ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  height: 28px;
  box-sizing: border-box;
  font-size: 0.6875rem;
  color: var(--muted);
}

.pill.accent {
  background: rgba(0,229,200,0.08);
  border-color: rgba(0,229,200,0.25);
  color: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
}

.badge.accent { background: rgba(0,229,200,0.1); color: var(--accent); }
.badge.green { background: rgba(61,186,111,0.12); color: var(--green); }
.badge.red { background: rgba(232,84,84,0.12); color: var(--red); }

/* ── Status dot ── */
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot.online {
  background: var(--accent);
  box-shadow: 0 0 5px var(--accent);
  animation: pulse 2s ease infinite;
}

.dot.green {
  background: var(--green);
  box-shadow: 0 0 5px var(--green);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* ── Fare box ── */
.fare-box {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 12px 14px;
}

.fare-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 3px;
}

.fare-amount {
  font-size: 1.625rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.fare-basis {
  font-size: 0.625rem;
  color: var(--dim);
  margin-top: 2px;
}

/* ── Negotiation rule strip ── */
.neg-rule {
  background: var(--bg);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 0.6875rem;
  color: var(--muted);
  line-height: 1.5;
}

.neg-rule strong,
.neg-rule span.hi {
  color: var(--accent);
  font-weight: 700;
}

/* ── Route display ── */
.route {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.route-point {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8125rem;
  color: var(--body);
}

.route-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.route-dot.pickup { background: var(--green); }
.route-dot.dropoff { background: var(--red); }

.route-line {
  width: 1px;
  height: 12px;
  background: var(--border);
  margin-left: 4px;
}

/* ── Chips row ── */
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 0.6875rem;
  color: var(--muted);
}

.chip strong { color: var(--white); }

/* ── Stats strip ── */
.stats-strip {
  background: var(--accent);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat { text-align: center; }
.stat-num { font-size: 1.375rem; font-weight: 900; color: #0c1a24; line-height: 1; letter-spacing: -0.3px; }
.stat-label { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: rgba(12,26,36,0.78); margin-top: 4px; }
.stat-divider { width: 1px; height: 34px; background: rgba(12,26,36,0.25); }

/* ── Progress bar ── */
.progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* ── Section labels ── */
.section-tag {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.section-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 14px 0 8px;
}

/* ── Dividers ── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

/* ── Bottom nav ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 10px 0 max(18px, env(safe-area-inset-bottom, 18px));
  backdrop-filter: blur(10px);
  z-index: 200;
  max-width: 540px;
  margin: 0 auto;
  transition: background 0.3s, border-color 0.3s;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.625rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s;
  text-align: center;
  min-width: 0;
}

.nav-item svg { display: block; margin: 0 auto; }

.nav-item.active { color: var(--accent); }
.nav-icon { font-size: 1.1875rem; display: block; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp 0.5s ease both; }
.fade-up-1 { animation: fadeUp 0.5s 0.08s ease both; }
.fade-up-2 { animation: fadeUp 0.5s 0.16s ease both; }
.fade-up-3 { animation: fadeUp 0.5s 0.24s ease both; }
.fade-up-4 { animation: fadeUp 0.5s 0.32s ease both; }

/* ── Utility ── */
.spacer-80 { height: 80px; }
.spacer-40 { height: 40px; }
.spacer-20 { height: 20px; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--muted); }
.text-body { color: var(--body); }
.text-white { color: var(--white); }
.font-black { font-weight: 900; }
.font-bold { font-weight: 700; }

/* ── Pixel circle photo border ── */
.pixel-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
  image-rendering: pixelated;
  -ms-interpolation-mode: nearest-neighbor;
}
.pixel-circle::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--green)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.pixel-circle img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; image-rendering: pixelated; }

/* 8-bit lightning bolt inline SVG helper */
.bolt-icon { display: inline-block; vertical-align: -2px; margin-left: 2px; }
[data-theme="day"] .bolt-icon polygon { fill: var(--white); }

/* Logo theme swap — dark logo hidden at night, light logo hidden during day */
.logo-day { display: none; }
.logo-night { display: block; }
[data-theme="day"] .logo-day { display: block; }
[data-theme="day"] .logo-night { display: none; }

/* ── App shell ── */
.app { max-width: 520px; margin: 0 auto; padding: env(safe-area-inset-top, 0px) 16px 90px; min-height: 100vh; position: relative; z-index: 6; }
.view { display: none; }
.view.active { display: block; }
.header { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; position: sticky; top: 0; z-index: 20; background: transparent; transition: background 0.25s, backdrop-filter 0.25s; }
.header.scrolled { background: rgba(12,26,36,0.75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); margin: 0 -16px; padding: 14px 16px; }
[data-theme="day"] .header.scrolled { background: rgba(240,244,248,0.8); }

/* Desktop: wider container, centered with subtle edge treatment */
@media (min-width: 600px) {
  .app { max-width: 540px; padding: 0 24px 90px; }
}

/* ── Auth ── */
.auth-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-form { width: 100%; max-width: 360px; }
.auth-form .form-group { margin-bottom: 14px; }
.auth-form label { display: block; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 5px; }
.auth-toggle { text-align: center; margin-top: 18px; font-size: 0.8125rem; color: var(--muted); }
.auth-toggle a { color: var(--accent); cursor: pointer; font-weight: 700; }

/* ── Form groups ── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }

/* Custom offer field — highlighted when active */
#custom-fare-group {
  animation: customFareReveal 0.28s ease-out;
}
#custom-fare {
  border: 2px solid var(--accent);
  background: rgba(0,229,200,0.08);
  color: var(--accent);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  box-shadow: 0 0 0 4px rgba(0,229,200,0.12), 0 0 14px rgba(0,229,200,0.22);
  animation: customFarePulse 2.2s ease-in-out infinite;
}
#custom-fare::placeholder {
  color: var(--accent);
  opacity: 0.55;
  font-weight: 600;
}
#custom-fare:focus {
  border-color: var(--accent);
  background: rgba(0,229,200,0.12);
  box-shadow: 0 0 0 4px rgba(0,229,200,0.22), 0 0 18px rgba(0,229,200,0.35);
  animation: none;
}
@keyframes customFareReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes customFarePulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(0,229,200,0.10), 0 0 10px rgba(0,229,200,0.18); }
  50%      { box-shadow: 0 0 0 4px rgba(0,229,200,0.20), 0 0 18px rgba(0,229,200,0.35); }
}

/* ── Toggle (payment, fare option) ── */
.toggle-row { display: flex; gap: 3px; background: var(--bg); border-radius: 11px; padding: 3px; border: 1px solid var(--border); }
.toggle-opt { flex: 1; padding: 10px; text-align: center; border-radius: 8px; font-size: 0.8125rem; font-weight: 600; cursor: pointer; color: var(--muted); transition: all 0.15s; }
.toggle-opt.active { background: var(--accent); color: var(--bg); }

/* ── Spinner ── */
.spinner { width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Countdown ── */
.countdown { font-size: 1.25rem; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state .icon { font-size: 2.5rem; margin-bottom: 10px; opacity: 0.5; }
.empty-state .msg { font-size: 0.875rem; }

/* ── Messages ── */
.error-msg { color: var(--red); font-size: 0.8125rem; margin-top: 8px; text-align: center; }
.success-msg { color: var(--green); font-size: 0.8125rem; margin-top: 8px; text-align: center; }

/* ── Breathe animation ── */
.breathe { animation: breathe 2s ease-in-out infinite; border: 2px solid var(--accent) !important; }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,229,200,0); transform: scale(1); }
  50% { box-shadow: 0 0 20px 3px rgba(0,229,200,0.2); transform: scale(1.005); }
}
.breathe-green { animation: breatheG 2s ease-in-out infinite; border: 2px solid var(--green) !important; }
@keyframes breatheG {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61,186,111,0); }
  50% { box-shadow: 0 0 20px 3px rgba(61,186,111,0.2); }
}

/* ── Progress tracker: current-step animation (customer + driver) ── */
.step-dot-current { position: relative; }
.step-dot-current::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: stepDotRing 1.8s ease-out infinite;
  pointer-events: none;
}
@keyframes stepDotRing {
  0%   { transform: scale(0.6); opacity: 0.9; }
  80%  { transform: scale(1.8); opacity: 0;   }
  100% { transform: scale(1.8); opacity: 0;   }
}
.step-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  background: rgba(0,229,200,0.12);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  vertical-align: middle;
  margin-right: 8px;
}
.step-live-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: stepLiveBlink 1.2s ease-in-out infinite;
}
@keyframes stepLiveBlink {
  0%, 100% { opacity: 1;   transform: scale(1);    }
  50%      { opacity: 0.35; transform: scale(0.75); }
}
.step-label-current { animation: stepLabelBreathe 2.6s ease-in-out infinite; }
@keyframes stepLabelBreathe {
  0%, 100% { opacity: 1;    }
  50%      { opacity: 0.72; }
}

/* ── Entice button ── */
.btn-entice { animation: entice 1.5s ease-in-out infinite; background: var(--green) !important; color: #fff !important; position: relative; overflow: hidden; }
.btn-entice::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent); animation: shimmer 2s ease-in-out infinite; }
@keyframes entice { 0%,100% { box-shadow: 0 0 0 0 rgba(61,186,111,0); transform: scale(1); } 50% { box-shadow: 0 0 10px 2px rgba(61,186,111,0.3); transform: scale(1.02); } }
@keyframes shimmer { 0% { left: -100%; } 100% { left: 100%; } }

/* ── Online toggle (driver) ── */
.online-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch { width: 44px; height: 26px; border-radius: 13px; background: var(--border); position: relative; transition: background 0.2s; }
.switch.on { background: var(--accent); }
.switch::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform 0.2s; }
.switch.on::after { transform: translateX(18px); }

/* ── Grocery list ── */
.grocery-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.grocery-item input { flex: 1; }
.remove-btn { background: none; border: none; color: var(--red); cursor: pointer; font-size: 1.125rem; padding: 4px 8px; }
.add-item-btn { background: none; border: 1px dashed var(--border); color: var(--muted); padding: 10px; border-radius: 11px; width: 100%; cursor: pointer; font-size: 0.8125rem; margin-top: 8px; }
.add-item-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Counter input ── */
.counter-input-group { display: flex; gap: 8px; align-items: center; }
.counter-input-group input { width: 100px; text-align: center; font-weight: 700; }

/* ── Spend alert ── */
@keyframes spendPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }
.spend-pulse { animation: spendPulse 0.6s ease-in-out 3; }

/* Job card pulse on arrival */
@keyframes job-pulse {
  0%   { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,229,200,0.2); }
  100% { border-color: var(--border); box-shadow: none; }
}

/* ── Text size control ── */
.size-control {
  flex: 0.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.size-control .size-btns {
  display: flex;
  gap: 2px;
}
.size-control .size-btn {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.15s;
}
.size-control .size-btn:active { background: var(--accent); color: var(--bg); }
.size-control .size-label { font-size: 0.5rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Theme toggle in nav ── */
.theme-toggle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.625rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}
.theme-toggle svg { display: block; margin: 0 auto; }
.theme-toggle .nav-icon { display: block; transition: transform 0.3s; }
.theme-toggle:active .nav-icon { transform: rotate(180deg); }

/* ── Day mode overrides ── */
[data-theme="day"] .stats-strip { background: var(--accent); }
[data-theme="day"] .stat-num { color: #fff; }
[data-theme="day"] .stat-label { color: rgba(255,255,255,0.88); }
[data-theme="day"] .stat-divider { background: rgba(255,255,255,0.3); }
[data-theme="day"] input, [data-theme="day"] select, [data-theme="day"] textarea { background: #e8eef3; border-color: var(--border); }
[data-theme="day"] .spinner { border-color: var(--border); border-top-color: var(--accent); }

/* ═══ Step Tracker ═══ */
.step-track{margin-top:6px}
.step-track-label{font-size:11px;text-transform:uppercase;letter-spacing:1px;color:var(--dim);margin-bottom:10px}
.stp{position:relative;padding-left:36px;padding-bottom:18px}
.stp:last-child{padding-bottom:0}
.stp::before{content:'';position:absolute;left:13px;top:24px;bottom:0;width:2px;background:var(--border)}
.stp:last-child::before{display:none}
.stp-num{position:absolute;left:0;top:0;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;z-index:1}
.stp-label{font-size:14px;color:var(--body);line-height:28px}
.stp-summary{font-size:12px;font-weight:600;margin-top:2px}
.stp-body{margin-top:10px;padding:14px;background:var(--bg);border:1px solid var(--accent);border-radius:10px}
.stp-sublabel{font-size:12px;font-weight:600;margin-top:2px}

/* Step states */
.stp.done .stp-num{background:var(--green);color:var(--bg)}
.stp.done::before{background:var(--green)}
.stp.done .stp-label{color:var(--muted)}
.stp.done .stp-summary{color:var(--green)}

.stp.current .stp-num{background:var(--accent);color:var(--bg);box-shadow:0 0 12px rgba(0,229,200,0.4)}
.stp.current .stp-label{color:var(--white);font-weight:700}

.stp.upcoming .stp-num{background:var(--border);color:var(--muted)}
.stp.upcoming .stp-label{color:var(--dim)}
.stp.upcoming .stp-hint{font-size:11px;color:var(--accent);font-weight:600;margin-top:3px}

/* E-transfer banner (always visible) */
.et-banner{
  padding:14px;background:rgba(0,229,200,0.08);border:2px solid var(--accent);
  border-radius:12px;margin-bottom:14px;text-align:center;
  animation:etBreathe 2s ease-in-out infinite;
}
.et-banner .et-title{font-size:15px;font-weight:800;color:var(--accent)}
.et-banner .et-sub{font-size:12px;color:var(--muted);margin-top:4px}
@keyframes etBreathe{0%,100%{border-color:var(--accent)}50%{border-color:rgba(0,229,200,0.4)}}

/* ═══ CHAT ═══ */
.chat-modal {
  position: fixed; inset: 0; z-index: 1200;
  background: var(--bg);
  display: none;
  flex-direction: column;
}
.chat-modal.open { display: flex; }
.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top, 14px));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-header .photo {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface2); border: 2px solid var(--accent);
  flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.chat-header .photo img { width: 100%; height: 100%; object-fit: cover; }
.chat-header .photo svg { display: block; }
.chat-header .back {
  background: none; border: none; color: var(--accent);
  font-size: 22px; font-weight: 900; cursor: pointer;
  padding: 4px 8px; font-family: inherit;
}
.chat-header .who {
  flex: 1; min-width: 0;
}
.chat-header .name { font-size: 15px; font-weight: 800; color: var(--white); }
.chat-header .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.chat-header .call {
  background: var(--accent); color: var(--bg);
  border: none; border-radius: 50%; width: 38px; height: 38px;
  font-size: 16px; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; flex-shrink: 0;
}
.chat-body {
  flex: 1; overflow-y: auto;
  padding: 16px 14px; display: flex; flex-direction: column; gap: 8px;
  -webkit-overflow-scrolling: touch;
}
.chat-empty {
  text-align: center; color: var(--muted);
  font-size: 14px; padding: 32px 16px;
}
.chat-msg-wrap { display: flex; flex-direction: column; gap: 2px; }
.chat-msg {
  padding: 10px 14px; border-radius: 16px;
  font-size: 16px; line-height: 1.4;
  max-width: 80%; word-wrap: break-word;
}
.chat-msg.mine {
  background: var(--accent); color: var(--bg);
  align-self: flex-end; border-bottom-right-radius: 4px;
  font-weight: 600;
}
.chat-msg.theirs {
  background: var(--surface); color: var(--white);
  border: 1px solid var(--border);
  align-self: flex-start; border-bottom-left-radius: 4px;
}
.chat-msg-time {
  font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 0 6px;
}
.chat-msg-time.mine { align-self: flex-end; }
.chat-msg-time.theirs { align-self: flex-start; }
.chat-input-bar {
  display: flex; gap: 8px; padding: 10px 12px;
  padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-input-bar input {
  flex: 1; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 22px;
  padding: 10px 16px; font-size: 16px; color: var(--white);
  font-family: inherit; outline: none;
}
.chat-input-bar input:focus { border-color: var(--accent); }
.chat-input-bar .send {
  background: var(--accent); color: var(--bg);
  border: none; border-radius: 50%; width: 44px; height: 44px;
  font-size: 18px; font-weight: 900; cursor: pointer; font-family: inherit;
  flex-shrink: 0;
}
.chat-input-bar .send:disabled {
  background: var(--border); color: var(--muted); cursor: default;
}

/* Chat trigger button (floating in active job view) */
.chat-trigger {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
  cursor: pointer; font-family: inherit; width: 100%;
  margin-bottom: 12px; transition: border-color 0.15s;
}
.chat-trigger:hover { border-color: var(--accent); }
.chat-trigger .icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,229,200,0.12); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.chat-trigger .text {
  flex: 1; text-align: left; min-width: 0;
}
.chat-trigger .label { font-size: 13px; font-weight: 700; color: var(--white); }
.chat-trigger .preview {
  font-size: 11px; color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-trigger .badge {
  background: var(--red); color: #fff;
  border-radius: 12px; padding: 4px 10px;
  font-size: 12px; font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(232,84,84,0.6);
  animation: chatBadgePulse 1.6s ease-in-out infinite;
}
.chat-trigger .badge.zero { display: none; animation: none; }
.chat-trigger.has-unread {
  border-color: var(--red);
  background: rgba(232,84,84,0.14);
  box-shadow: 0 0 0 2px rgba(232,84,84,0.25), 0 0 18px rgba(232,84,84,0.25);
  animation: chatTriggerGlow 1.6s ease-in-out infinite;
}
.chat-trigger.has-unread .icon {
  background: rgba(232,84,84,0.22); color: #fff;
}
.chat-trigger.has-unread .label { color: var(--red); font-weight: 900; }
.chat-trigger.has-unread .preview {
  color: var(--red);
  font-weight: 800;
  font-size: 12px;
  text-shadow: 0 0 8px rgba(232,84,84,0.5);
}
@keyframes chatBadgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,84,84,0.7); }
  50% { box-shadow: 0 0 0 8px rgba(232,84,84,0); }
}
@keyframes chatTriggerGlow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(232,84,84,0.25), 0 0 14px rgba(232,84,84,0.2); }
  50% { box-shadow: 0 0 0 2px rgba(232,84,84,0.45), 0 0 22px rgba(232,84,84,0.45); }
}

/* Quick reply chips row above chat input */
.chat-quick-replies {
  display: flex; gap: 6px; padding: 8px 10px 0;
  background: var(--surface);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 0;
}
.chat-quick-replies::-webkit-scrollbar { display: none; }
.chat-quick-replies button {
  background: var(--surface2);
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s;
}
.chat-quick-replies button:hover,
.chat-quick-replies button:active {
  background: rgba(0,229,200,0.14);
  border-color: var(--accent);
  color: var(--accent);
}
.chat-quick-replies button.call {
  background: rgba(0,229,200,0.14);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Broadcast banner (top of account page) ── */
.broadcast-banner {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, rgba(0,229,200,0.15), rgba(0,229,200,0.06));
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 12px;
  color: var(--accent);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 0 0 2px rgba(0,229,200,0.08), 0 0 14px rgba(0,229,200,0.18);
  animation: bcBannerPulse 2.4s ease-in-out infinite;
}
.broadcast-banner .bc-icon { font-size: 18px; }
.broadcast-banner .bc-text { flex: 1; }
.broadcast-banner .bc-chev { font-size: 20px; opacity: 0.7; }
@keyframes bcBannerPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(0,229,200,0.08), 0 0 10px rgba(0,229,200,0.15); }
  50%      { box-shadow: 0 0 0 2px rgba(0,229,200,0.18), 0 0 18px rgba(0,229,200,0.32); }
}

/* ── Broadcast splash modal ── */
.broadcast-modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 2000;
  align-items: center; justify-content: center;
  padding: 24px;
  animation: bcOverlayIn 0.2s ease-out;
}
.broadcast-modal.open { display: flex; }
.broadcast-card {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 28px 24px 22px;
  max-width: 420px; width: 100%;
  text-align: center;
  box-shadow: 0 0 0 6px rgba(0,229,200,0.12), 0 24px 60px rgba(0,0,0,0.45);
  animation: bcCardIn 0.28s cubic-bezier(.2,.9,.3,1.2);
}
.broadcast-card .bc-hero { font-size: 44px; margin-bottom: 6px; }
.broadcast-card .bc-tag {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--accent); font-weight: 800; margin-bottom: 10px;
}
.broadcast-card .bc-title {
  font-size: 20px; font-weight: 900; color: var(--white); line-height: 1.25; margin-bottom: 10px;
}
.broadcast-card .bc-body {
  font-size: 15px; color: var(--body); line-height: 1.5; white-space: pre-wrap; margin-bottom: 14px;
}
.broadcast-card .bc-meta {
  font-size: 11px; color: var(--muted); margin-bottom: 18px;
}
.broadcast-card .bc-btn {
  width: 100%; background: var(--accent); color: var(--bg);
  border: none; border-radius: 11px; padding: 14px;
  font-size: 15px; font-weight: 900; cursor: pointer; font-family: inherit;
}
@keyframes bcOverlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bcCardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
