/* ---------- Card ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.card--soft { background: linear-gradient(180deg, #FFFDF6 0%, #FFFBF2 100%); }
.card--outline { box-shadow: none; }
.card__title { font-size: 15px; font-weight: 800; margin: 0 0 14px; letter-spacing: -.01em; }
.card__sub { font-size: 12px; color: var(--text-mute); margin-top: -8px; margin-bottom: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700; font-size: 13.5px;
  border: 1px solid transparent;
  background: var(--bg-card); color: var(--text);
  transition: transform .04s ease, background .15s, border-color .15s, box-shadow .15s, color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--primary {
  color: #1B160E;
  background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
  box-shadow: 0 6px 18px rgba(245,158,11,.30);
}
.btn--primary:hover { filter: brightness(1.03); }
.btn--accent {
  color: #fff; background: var(--accent);
  box-shadow: 0 6px 18px rgba(79,70,229,.25);
}
.btn--ghost { background: transparent; color: var(--text-soft); }
.btn--ghost:hover { background: rgba(31,26,18,.05); }
.btn--outline { background: var(--bg-card); border-color: var(--line-strong); color: var(--text); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary-strong); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--block { width: 100%; }
.btn--lg { padding: 13px 18px; font-size: 14.5px; border-radius: 12px; }
.btn--sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }

/* ---------- Tabs ---------- */
.tabs { display: inline-flex; padding: 4px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; }
.tab {
  padding: 8px 14px; font-weight: 700; font-size: 13px; color: var(--text-mute);
  border-radius: 9px; background: transparent; border: none;
}
.tab.is-active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th, .table td { padding: 12px 14px; text-align: left; }
.table thead th {
  font-size: 11.5px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--line);
  background: rgba(255,251,242,.6);
}
.table tbody tr { border-bottom: 1px solid var(--line); }
.table tbody tr:hover { background: rgba(245,158,11,.04); }
.table td { font-size: 13.5px; vertical-align: middle; }

/* ---------- Toast ---------- */
#toast-root {
  position: fixed; right: 24px; bottom: 24px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--text); color: #FFF6E5;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease-out;
  max-width: 360px;
}
.toast--success { background: #166534; }
.toast--error   { background: #B91C1C; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none; } }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(20,15,8,.45);
  display: grid; place-items: center;
  padding: 24px;
}
.modal {
  background: #fff; border-radius: var(--radius-xl);
  padding: 28px; max-width: 480px; width: 100%;
  box-shadow: var(--shadow-lg);
}
.modal__title { font-size: 17px; font-weight: 800; margin: 0 0 8px; }
.modal__body { font-size: 13.5px; color: var(--text-soft); margin-bottom: 18px; line-height: 1.6; }
.modal__actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- Phone verification ---------- */
.pv-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.pv-row > input { min-width: 0; }
.pv-status { margin-top: 6px; font-size: 12px; }
.pv-status--ok { color: var(--success); }
.pv-status--err { color: var(--danger); }

/* ---------- Place autocomplete ---------- */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
  background: #fff; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  max-height: 280px; overflow: auto;
}
.ac-item { padding: 10px 12px; font-size: 13px; cursor: pointer; }
.ac-item:hover, .ac-item.is-active { background: var(--primary-soft); }
.ac-item__name { font-weight: 600; }
.ac-item__addr { font-size: 12px; color: var(--text-mute); }

/* ---------- Hero ---------- */
.hero {
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  background:
    radial-gradient(900px 200px at 0% 0%, rgba(245,158,11,.18), transparent 60%),
    radial-gradient(700px 200px at 100% 100%, rgba(79,70,229,.14), transparent 60%),
    linear-gradient(180deg, #FFFDF6 0%, #FFF6E5 100%);
  border: 1px solid var(--line);
  margin-bottom: 18px;
}
.hero__eyebrow { color: var(--primary-strong); font-weight: 800; letter-spacing: .04em; font-size: 12px; text-transform: uppercase; }
.hero__title { font-size: 28px; font-weight: 900; letter-spacing: -.02em; margin: 6px 0; }
.hero__sub { color: var(--text-soft); font-size: 14px; }

/* ---------- Quick links ---------- */
.quicklink {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: transform .1s, box-shadow .15s, border-color .15s;
}
.quicklink:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.quicklink__icon {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-strong); font-weight: 800;
}
.quicklink__title { font-weight: 700; font-size: 14px; }
.quicklink__desc { font-size: 12px; color: var(--text-mute); }

/* ---------- Stop list ---------- */
.stops { display: flex; flex-direction: column; gap: 8px; }
.stop-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }

/* ---------- Trip type toggle ---------- */
.seg { display: inline-flex; padding: 4px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; }
.seg__btn { padding: 7px 14px; font-weight: 700; font-size: 13px; color: var(--text-mute); border: none; border-radius: 7px; background: transparent; }
.seg__btn.is-active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- KPI ---------- */
.kpi { padding: 18px; border-radius: var(--radius-md); background: #fff; border: 1px solid var(--line); }
.kpi__label { font-size: 12px; color: var(--text-mute); font-weight: 600; }
.kpi__value { font-size: 22px; font-weight: 800; margin-top: 4px; letter-spacing: -.01em; }

/* ---------- Chat ---------- */
.chat-wrap { display: grid; grid-template-columns: 280px 1fr; gap: 16px; height: calc(100vh - 200px); }
.chat-side { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; overflow: auto; }
.chat-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex; flex-direction: column; overflow: hidden; }
.chat-msgs { flex: 1; padding: 18px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-bubble { max-width: 70%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; }
.chat-bubble--me { align-self: flex-end; background: linear-gradient(135deg, #FCD34D, #F59E0B); color: #1B160E; }
.chat-bubble--them { align-self: flex-start; background: var(--bg-soft); color: var(--text); border: 1px solid var(--line); }
.chat-input { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #FFFDF6; }

/* ---------- Driver Profile Card ---------- */
.driver-card { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 16px; border-radius: var(--radius-md); border: 1px solid var(--line); background: #fff; align-items: center; }
.driver-card + .driver-card { margin-top: 10px; }
.driver-avatar { width: 64px; height: 64px; border-radius: 12px; background: var(--bg-soft); display: grid; place-items: center; color: var(--text-mute); font-weight: 800; font-size: 22px; overflow: hidden; }
.driver-avatar img { width: 100%; height: 100%; object-fit: cover; }
.driver-name { font-weight: 800; font-size: 15px; }
.driver-meta { font-size: 12.5px; color: var(--text-mute); }
.driver-price { font-weight: 800; font-size: 16px; color: var(--primary-strong); }

/* ---------- Skeleton ---------- */
.skeleton { background: linear-gradient(90deg, #F3EEDF 0%, #FAF3E1 50%, #F3EEDF 100%); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: 8px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Calendar ---------- */
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell { aspect-ratio: 1.4 / 1; padding: 6px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; color: var(--text-soft); background: #FFFDF6; }
.cal-cell.is-today { border-color: var(--primary); background: var(--primary-soft); color: var(--text); font-weight: 700; }
.cal-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 4px; }

