@font-face {
  font-family: "Satoshi";
  src: url("/fonts/Satoshi-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-primary: #1a1240;
  --brand-cta: #223dff;
  --brand-cta-hover: #1a32d9;
  --surface-page: #0a0a12;
  --surface-muted: #12121e;
  --surface-card: #161622;
  --surface-elevated: #1c1c2a;
  --surface-banner: linear-gradient(135deg, #1a1240 0%, #223dff 120%);
  --text-primary: #f0f0f5;
  --text-body: #b0b0c0;
  --text-muted: #7a7a90;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 16px;
  --radius-pill: 999px;
  --sidebar-w: 0px;
  --sidebar-w-open: 248px;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Satoshi", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  background: var(--surface-page);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.portal {
  display: block;
  min-height: 100vh;
}

.portal .main {
  margin-left: 0;
  transition: margin-left 0.22s ease;
}

.portal.sidebar-open .main {
  margin-left: var(--sidebar-w-open);
}

/* ——— Sidebar ——— */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-w-open);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 0.85rem;
  background: var(--surface-muted);
  border-right: 1px solid var(--border);
  z-index: 50;
  transform: translateX(-105%);
  transition: transform 0.22s ease;
  overflow: hidden;
}

.portal.sidebar-open .sidebar {
  transform: translateX(0);
}

.sidebar-backdrop {
  display: none;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  height: 44px;
  border-radius: 12px;
  color: #f4f1ea;
  text-decoration: none;
}

.sidebar-brand .mark {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(34, 61, 255, 0.22);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

.sidebar-brand .brand-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-body);
  cursor: pointer;
}

.sidebar-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-close svg {
  width: 16px;
  height: 16px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.nav-item {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  color: var(--text-muted);
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  color: #fff;
  background: rgba(34, 61, 255, 0.28);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.nav-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

.portal.sidebar-open .menu-toggle {
  opacity: 0.55;
}

/* ——— Main ——— */
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid transparent;
}

.topbar-user {
  position: relative;
}

.user-btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--radius-pill);
  padding: 0.65rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.user-btn {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.user-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-primary {
  background: var(--brand-cta);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-cta-hover);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(34, 61, 255, 0.55);
  color: #c5ceff;
}

.btn-outline:hover {
  background: rgba(34, 61, 255, 0.12);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-pill {
  background: rgba(10, 10, 18, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  white-space: nowrap;
}

.btn-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 200px;
  padding: 0.4rem;
  border-radius: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 50;
}

.user-menu[hidden] {
  display: none !important;
}

.user-menu a,
.user-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}

.user-menu a:hover,
.user-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.content {
  flex: 1;
  padding: 0.5rem 1.5rem 2.5rem;
  width: min(100%, 1120px);
  margin: 0 auto;
}

.page[hidden] {
  display: none !important;
}

/* ——— Dashboard ——— */
.welcome-banner {
  background: var(--surface-banner);
  border-radius: 20px;
  padding: 1.75rem 1.75rem 1.5rem;
  color: #fff;
  margin-bottom: 2rem;
}

.welcome-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.welcome-mode-badge {
  margin: 0 0 0.45rem;
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.welcome-banner h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: -0.01em;
  color: #fff;
}

.welcome-hint {
  margin: 0.45rem 0 0;
  max-width: 36rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

.welcome-date {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
  padding-top: 0.45rem;
  white-space: nowrap;
}

html[data-portal-mode="agency"] .sidebar-brand .mark {
  background: linear-gradient(145deg, #0f766e, #134e4a);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  color: var(--text-primary);
}

.section-head-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.export-menu {
  position: relative;
}

.export-menu-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 12.5rem;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-elevated, #1c1c2a);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  z-index: 30;
  display: grid;
  gap: 0.15rem;
}

.export-menu-panel[hidden] {
  display: none !important;
}

.export-menu-panel button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.export-menu-panel button:hover {
  background: rgba(34, 61, 255, 0.14);
}

.panel {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem 2.5rem;
}

.empty-state .icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(34, 61, 255, 0.15);
  color: #9db0ff;
}

.empty-state h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.55rem;
  color: var(--text-primary);
  font-weight: 600;
}

.empty-state p {
  margin: 0.5rem auto 1.35rem;
  max-width: 28rem;
  color: var(--text-muted);
}

/* ——— Booking success (Opal consumer style) ——— */
.success-page {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 2rem;
}

.success-card {
  width: 100%;
  max-width: 40rem;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 2rem 1.5rem 1.75rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: success-fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@media (min-width: 720px) {
  .success-card {
    padding: 2.75rem 2.5rem 2.25rem;
    border-radius: 34px;
  }
}

@keyframes success-fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-check {
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto 1.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.22);
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.15);
}

.success-check svg {
  width: 2.75rem;
  height: 2.75rem;
}

.success-title {
  margin: 0 0 0.75rem;
  text-align: center;
  font-family: var(--font-sans);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--text-primary);
}

.success-title span {
  color: #34d399;
}

.success-lead {
  margin: 0 auto 1.75rem;
  max-width: 28rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.success-id-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.success-id-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.success-id-check {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #34d399;
  flex-shrink: 0;
}

.success-id-check svg {
  width: 1.1rem;
  height: 1.1rem;
}

.success-id-value {
  margin: 0.1rem 0 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.success-status-pill {
  flex-shrink: 0;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.22);
}

.success-alert {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.success-alert--err {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.22);
}

.success-loading {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.success-panel {
  margin-bottom: 1rem;
  padding: 0.35rem 1.15rem 0.5rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.success-panel-title {
  margin: 0;
  padding: 0.95rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.success-row {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.success-row:last-child {
  border-bottom: 0;
}

.success-row-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.success-row-icon svg {
  width: 1rem;
  height: 1rem;
}

.success-row-body {
  min-width: 0;
}

.success-row-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.success-row-value {
  margin: 0.2rem 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  word-break: break-word;
}

.success-panel--pay {
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.success-pay-rows {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem 0 0.2rem;
}

.success-pay-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  color: var(--text-body);
}

.success-pay-row strong {
  color: var(--text-primary);
  font-weight: 700;
}

.success-pay-row--discount,
.success-pay-row--discount strong {
  color: #34d399;
}

.success-pay-row--total {
  padding-top: 0.85rem;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  align-items: center;
}

.success-pay-row--total span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.success-pay-row--total strong {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.success-pay-row--commission {
  color: #34d399;
}

.success-pay-row--commission strong {
  color: #34d399;
}

.success-pay-via {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.success-pay-via--warn {
  color: #fbbf24;
}

.success-actions {
  display: grid;
  gap: 0.7rem;
}

.success-btn-primary,
.success-btn-secondary {
  width: 100%;
  justify-content: center;
  border-radius: 16px;
  padding: 0.95rem 1.25rem;
  font-weight: 700;
}

.success-btn-primary {
  background: #fff;
  color: #0a0a12;
  border: none;
}

.success-btn-primary:hover {
  background: #34d399;
  color: #0a0a12;
}

.success-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.success-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.stats-row--agency {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .stats-row--agency {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

button.stat-card--link {
  display: block;
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

button.stat-card--link:hover {
  border-color: rgba(16, 185, 129, 0.35);
}

.commission-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 0.85rem;
  align-items: end;
  margin-bottom: 1rem;
}

.commission-filters-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.commission-payout-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.25rem;
}

.commission-payout-box h3 {
  margin: 0 0 0.25rem;
  color: var(--text-primary);
  font-size: 1rem;
}

.commission-payout-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.commission-payout-form input {
  min-width: 140px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  padding: 0.7rem 0.85rem;
}

@media (max-width: 800px) {
  .commission-filters {
    grid-template-columns: 1fr;
  }
}

.stat-card .label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stat-card .value {
  margin-top: 0.35rem;
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
}

/* ——— Ride cards ——— */
.ride-list {
  display: grid;
  gap: 0.85rem;
}

.ride-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.ride-card:hover {
  border-color: rgba(34, 61, 255, 0.45);
  background: #1f1f30;
}

.ride-card img {
  width: 64px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.ride-meta {
  min-width: 0;
}

.ride-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: capitalize;
  margin-bottom: 0.35rem;
}

.ride-status.upcoming,
.ride-status.accepted,
.ride-status.confirmed {
  background: rgba(34, 61, 255, 0.18);
  color: #a9b7ff;
}

.ride-status.completed {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}

.ride-status.cancelled,
.ride-status.canceled {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
}

.ride-status.on_way,
.ride-status.arrived,
.ride-status.start,
.ride-status.in_progress {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
}

.ride-when {
  font-size: 0.92rem;
  color: var(--text-primary);
  font-weight: 600;
}

.ride-route {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ride-price {
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

/* ——— Tabs / toolbar ——— */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.65rem;
}

.tab {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tab.active {
  color: #fff;
  background: rgba(34, 61, 255, 0.28);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1rem;
}

.toolbar .grow {
  flex: 1;
  min-width: 180px;
}

.search {
  width: 100%;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: #fff;
  padding: 0.7rem 1rem;
  outline: none;
}

.search:focus {
  border-color: rgba(34, 61, 255, 0.55);
}

.search::placeholder {
  color: var(--text-muted);
}

/* ——— Contacts table ——— */
.table-wrap {
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

table.data th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.data td {
  color: var(--text-primary);
}

.muted {
  color: var(--text-muted);
}

.count-line {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.actions-inline {
  display: flex;
  gap: 0.4rem;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-body);
  cursor: pointer;
}

.icon-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.icon-btn.danger:hover {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.45);
}

/* ——— Modal ——— */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 80;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal {
  width: min(100%, 440px);
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.35rem 1.35rem 1.2rem;
}

.modal h3 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: #fff;
}

.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.field label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 560;
}

.field input,
.field select {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  padding: 0.75rem 0.9rem;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: rgba(34, 61, 255, 0.55);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: #fff;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  z-index: 90;
  max-width: 320px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.toast[hidden] {
  display: none !important;
}

.toast.err {
  border-color: rgba(248, 113, 113, 0.45);
}

.loading {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.profile-card .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 820px) {
  .portal.sidebar-open .main {
    margin-left: 0;
  }

  .sidebar {
    width: min(86vw, var(--sidebar-w-open));
    box-shadow: 16px 0 40px rgba(0, 0, 0, 0.35);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 45;
  }

  .sidebar-backdrop[hidden] {
    display: none !important;
  }

  .portal.sidebar-open .menu-toggle {
    opacity: 1;
  }

  .main {
    padding-bottom: 1.5rem;
  }

  .stats-row,
  .profile-card .row {
    grid-template-columns: 1fr;
  }

  .ride-card {
    grid-template-columns: 1fr;
  }

  .content {
    padding-inline: 1rem;
  }
}

/* ——— Book a ride (Stitch layout, Opal palette) ——— */
.book-content {
  width: min(100%, 1080px);
  padding-top: 0.15rem;
  padding-bottom: 3rem;
}

.book-shell {
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(34, 61, 255, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(26, 18, 64, 0.45), transparent 50%),
    var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(1.25rem, 2.5vw, 2.25rem);
}

.book-hero {
  margin-bottom: 1.75rem;
  max-width: 40rem;
}

.book-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(34, 61, 255, 0.35);
  background: rgba(34, 61, 255, 0.12);
  color: #aeb8ff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.book-hero h1 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #fff;
}

.book-hero h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: #dce1ff;
}

.book-lede {
  margin: 0.7rem 0 0;
  color: var(--text-body);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 36rem;
}

.book-stepper {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0.65rem;
  display: grid;
  gap: 0.45rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(10, 10, 18, 0.35);
}

.book-stepper--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.book-stepper li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  color: var(--text-muted);
  border: 1px solid transparent;
  min-width: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.book-stepper .step-num {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  color: inherit;
  line-height: 1.4;
  flex-shrink: 0;
}

.book-stepper .step-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.book-stepper .step-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: inherit;
}

.book-stepper .step-hint {
  font-size: 0.72rem;
  color: inherit;
  opacity: 0.78;
}

.book-stepper li.active {
  color: #fff;
  background: rgba(34, 61, 255, 0.18);
  border-color: rgba(34, 61, 255, 0.55);
}

.book-stepper li.active .step-num {
  color: #aeb8ff;
}

.book-stepper li.done {
  color: #c5ceff;
}

.book-step[hidden] {
  display: none !important;
}

.book-stage {
  display: grid;
  gap: 1.15rem;
}

.book-stage-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 600;
  color: #fff;
}

.book-stage-head p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.who-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.who-grid--pay {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.who-card {
  position: relative;
  display: grid;
  gap: 0.15rem;
  align-content: start;
  padding: 0.7rem 0.75rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-card);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.who-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--surface-elevated);
}

.who-card.active {
  border-color: var(--brand-cta);
  background: rgba(34, 61, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(34, 61, 255, 0.35);
}

.who-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.who-check {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  color: transparent;
  background: transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.who-check svg {
  width: 0.65rem;
  height: 0.65rem;
}

.who-card.active .who-check {
  background: var(--brand-cta);
  border-color: var(--brand-cta);
  color: #fff;
}

.who-icon {
  width: 1.55rem;
  height: 1.55rem;
  margin-bottom: 0.15rem;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  color: #aeb8ff;
}

.who-icon svg {
  width: 0.9rem;
  height: 0.9rem;
}

.who-kicker {
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.who-card.active .who-kicker {
  color: #aeb8ff;
}

.who-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  padding-right: 1.1rem;
}

.who-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.creds-block {
  display: grid;
  gap: 0.75rem;
}

.creds-block[hidden] {
  display: none !important;
}

.creds-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-sm {
  min-width: 0;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  border-radius: 999px;
}

.picker-field {
  position: relative;
}

.picker-results {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0.35rem;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 0.15rem);
  z-index: 30;
  max-height: 220px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}

.picker-results[hidden] {
  display: none !important;
}

.picker-results li {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-primary);
}

.picker-results li:hover,
.picker-results li[aria-selected="true"] {
  background: rgba(34, 61, 255, 0.16);
}

.picker-results .picker-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.picker-results .picker-empty {
  cursor: default;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.picker-results .picker-empty:hover {
  background: transparent;
}

.selected-person {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(34, 61, 255, 0.35);
  background: rgba(34, 61, 255, 0.1);
}

.selected-person[hidden] {
  display: none !important;
}

.selected-person strong {
  color: #fff;
  font-size: 0.95rem;
}

.selected-person span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.creds-title,
.book-section-title {
  margin: 0.35rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.book-panel {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.book-panel.stack {
  display: grid;
  gap: 1rem;
  padding: 1.2rem 1.2rem 1.25rem;
}

.book-panel + .book-panel,
.segmented + .book-panel,
.book-section-title + .who-grid,
.book-section-title + .book-panel {
  margin-top: 0;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.segmented .seg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-card);
  color: var(--text-body);
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.segmented .seg input {
  accent-color: var(--brand-cta);
}

.segmented .seg.active {
  border-color: var(--brand-cta);
  background: rgba(34, 61, 255, 0.16);
  color: #fff;
}

.book-shell .field {
  display: grid;
  gap: 0.4rem;
  margin: 0;
}

.book-shell .field label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.book-shell .field .optional {
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.book-shell .field input,
.book-shell .field select,
.book-shell .field textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(10, 10, 18, 0.55);
  color: #fff;
  padding: 0.9rem 0.95rem;
  outline: none;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.book-shell .field input[readonly] {
  color: rgba(255, 255, 255, 0.88);
  cursor: default;
}

.book-shell .field input::placeholder,
.book-shell .field textarea::placeholder {
  color: var(--text-muted);
}

.book-shell .field input:focus,
.book-shell .field select:focus,
.book-shell .field textarea:focus {
  border-color: rgba(34, 61, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(34, 61, 255, 0.18);
}

.book-shell .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%7a7a90' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
}

.book-shell .field select option {
  background: #161622;
  color: #fff;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0.35rem 0 0;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-body);
}

.role-pill--admin {
  border-color: rgba(34, 61, 255, 0.45);
  background: rgba(34, 61, 255, 0.12);
  color: #c5ceff;
}

.role-pill--agent {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 8.75rem) 1fr;
  gap: 0.55rem;
  align-items: stretch;
}

.phone-row .phone-cc,
.phone-row select.phone-cc {
  min-width: 0;
  width: 100%;
  padding-inline: 0.65rem;
}

.phone-row input {
  min-width: 0;
}

.book-nav {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}

.book-nav-spacer {
  flex: 1;
}

.book-nav .btn-primary,
.book-nav .btn-ghost {
  min-width: 10rem;
  border-radius: var(--radius-pill);
  padding: 0.9rem 1.35rem;
}

.vehicle-grid {
  display: grid;
  gap: 0.75rem;
}

.vehicle-card {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.05rem 1.1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-card);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.vehicle-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.vehicle-card.active {
  border-color: var(--brand-cta);
  background: rgba(34, 61, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(34, 61, 255, 0.35);
}

.vehicle-card img {
  width: 96px;
  height: 56px;
  object-fit: contain;
}

.vehicle-card h3 {
  margin: 0;
  color: #fff;
  font-size: 1.02rem;
}

.vehicle-card p {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.vehicle-card .price {
  font-weight: 750;
  color: #fff;
  font-size: 1.15rem;
  white-space: nowrap;
}

.pac-container {
  z-index: 10000 !important;
  background: #161622 !important;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  font-family: var(--font-sans);
  color: #f0f0f5;
}

.pac-item {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f0f0f5 !important;
  padding: 0.55rem 0.75rem !important;
}

.pac-item:hover,
.pac-item-selected {
  background: rgba(34, 61, 255, 0.2) !important;
}

.pac-item-query,
.pac-matched {
  color: #fff !important;
}

@media (max-width: 900px) {
  .who-grid {
    grid-template-columns: 1fr;
  }

  .who-grid--pay {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .book-shell {
    border-radius: 18px;
    padding: 1.1rem;
  }

  .book-stepper--two {
    grid-template-columns: 1fr;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-card {
    grid-template-columns: 1fr;
  }

  .book-nav {
    flex-direction: column-reverse;
  }

  .book-nav .btn-primary,
  .book-nav .btn-ghost {
    width: 100%;
  }
}

/* ——— Booking detail (Stitch layout, Opal theme) ——— */
.detail-page {
  display: grid;
  gap: 1rem;
  padding-bottom: 2.5rem;
  max-width: 760px;
}

.bd-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
}

.bd-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-body);
  font-weight: 650;
  justify-self: start;
}

.bd-back svg {
  width: 18px;
  height: 18px;
}

.bd-back:hover {
  color: #fff;
}

.bd-toolbar-title {
  justify-self: center;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  white-space: nowrap;
}

.bd-toolbar-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.bd-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.bd-status-chip.pending {
  background: rgba(250, 204, 21, 0.12);
  color: #fde68a;
  border-color: rgba(250, 204, 21, 0.28);
}

.bd-status-chip.cancelled,
.bd-status-chip.canceled {
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.28);
}

.bd-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-body);
}

.bd-icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.bd-icon-btn svg {
  width: 18px;
  height: 18px;
}

.bd-hero {
  border-radius: 22px;
  padding: 1.25rem 1.3rem 1.1rem;
  background: linear-gradient(135deg, #1a1240 0%, #223dff 78%, #4f6bff 120%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(26, 18, 64, 0.35);
}

.bd-hero-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.bd-hero-kicker {
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.bd-hero h1 {
  margin: 0.35rem 0 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.bd-hero-price {
  font-size: 1.2rem;
  font-weight: 750;
  white-space: nowrap;
}

.bd-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.bd-hero-when {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.bd-hero-when svg {
  width: 16px;
  height: 16px;
  opacity: 0.9;
}

.bd-vehicle-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(10, 10, 18, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.75rem;
  font-weight: 700;
}

.bd-hero-status {
  margin-top: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 999px;
  background: rgba(10, 10, 18, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.bd-hero-status-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.86rem;
  font-weight: 600;
  min-width: 0;
}

.bd-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
  flex: 0 0 auto;
}

.bd-ready {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #93c5fd;
}

.bd-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.15rem 1.2rem 1.2rem;
}

.bd-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bd-card-head.compact {
  margin-bottom: 0.75rem;
}

.bd-card-head h2,
.bd-card-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text-primary);
}

.bd-card-head h2 {
  font-size: 1.35rem;
}

.bd-card-head h3 {
  font-size: 1.05rem;
}

.bd-tag {
  display: inline-flex;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(34, 61, 255, 0.16);
  border: 1px solid rgba(34, 61, 255, 0.35);
  color: #c7d2fe;
  font-size: 0.72rem;
  font-weight: 750;
  white-space: nowrap;
}

.bd-muted {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bd-timeline {
  display: grid;
  gap: 0.15rem;
}

.bd-timeline.compact {
  margin-top: 0.25rem;
}

.bd-stop {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.85rem;
}

.bd-stop-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.2rem;
}

.bd-stop-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid transparent;
}

.bd-stop-dot.pickup {
  background: #223dff;
  box-shadow: 0 0 0 4px rgba(34, 61, 255, 0.18);
}

.bd-stop-dot.drop {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

.bd-stop-line {
  flex: 1;
  width: 0;
  min-height: 28px;
  margin: 0.35rem 0;
  border-left: 2px dashed rgba(255, 255, 255, 0.18);
}

.bd-stop-label {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.bd-stop-body p {
  margin: 0;
  color: var(--text-primary);
  line-height: 1.45;
  font-size: 0.95rem;
}

.bd-return {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bd-stats {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bd-stats > div {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.bd-stats span {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.bd-stats strong {
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 700;
}

.bd-passenger {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: center;
}

.bd-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(34, 61, 255, 0.22);
  border: 1px solid rgba(34, 61, 255, 0.35);
  color: #fff;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.bd-passenger-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.bd-passenger-copy strong {
  color: #fff;
  font-size: 1.02rem;
}

.bd-passenger-copy a {
  color: var(--text-body);
  font-size: 0.9rem;
  word-break: break-word;
}

.bd-passenger-copy a:hover {
  color: #fff;
}

.bd-passenger-actions {
  display: inline-flex;
  gap: 0.4rem;
}

.bd-sign {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-body);
  font-size: 0.88rem;
}

.bd-verified {
  color: #86efac;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bd-verified.soft {
  color: var(--text-muted);
}

.bd-fare {
  display: grid;
  gap: 0.7rem;
}

.bd-fare > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
}

.bd-fare strong {
  color: var(--text-primary);
}

.bd-fare .total {
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.02rem;
}

.bd-commission {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.35rem;
  color: #34d399;
}

.bd-commission strong {
  color: #34d399;
}

.bd-pay-via {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.bd-pay-via--warn {
  color: #fbbf24;
}

.bd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

@media (max-width: 800px) {
  .bd-toolbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "back actions"
      "title title";
  }

  .bd-back {
    grid-area: back;
  }

  .bd-toolbar-actions {
    grid-area: actions;
  }

  .bd-toolbar-title {
    grid-area: title;
    justify-self: start;
    margin-top: 0.15rem;
  }

  .bd-stats {
    grid-template-columns: 1fr 1fr;
  }

  .bd-hero-status {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 16px;
  }

  .bd-passenger {
    grid-template-columns: auto 1fr;
  }

  .bd-passenger-actions {
    grid-column: 1 / -1;
  }
}

.pay-link-card{margin-top:1rem;padding:1rem;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:rgba(255,255,255,.03)}
.pay-link-card h2{margin:0 0 .5rem;font-size:1.1rem}
.pay-link-status{color:#c8b27a;margin:0 0 .75rem}
.pay-link-facts{display:grid;gap:.4rem;margin:0 0 .75rem}
.pay-link-facts div{display:flex;justify-content:space-between;gap:1rem}
.pay-link-facts dt{color:#aaa}
.pay-link-facts dd{margin:0}
.pay-link-input{width:100%;box-sizing:border-box;margin:.35rem 0 .75rem;padding:.7rem;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:#0e0e16;color:#fff}
.pay-link-actions{display:flex;flex-wrap:wrap;gap:.5rem}
.pay-link-error{color:#ffb4b4}
.pay-link-copied{color:#b7f0c2}

.modal.modal--payout {
  width: min(100%, 520px);
  max-height: min(92vh, 760px);
  overflow: auto;
}

.payout-lead {
  margin: -0.4rem 0 1rem;
}

.payout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.modal--payout textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  padding: 0.75rem 0.9rem;
  resize: vertical;
  font: inherit;
}

@media (max-width: 560px) {
  .payout-grid {
    grid-template-columns: 1fr;
  }
}
