:root { 
  --bg1: #f9fafb;
  --bg2: #fefce8;
  --bg3: #e0f2fe;
  --accent-green: #22c55e;
  --accent-yellow: #eab308;
  --accent-orange: #f97316;
  --accent-red: #ef4444;
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-solid: #ffffff;
  --card-border: rgba(15, 23, 42, 0.08);
  --card-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --chip-bg: rgba(255, 255, 255, 0.92);
  --chip-border: rgba(15, 23, 42, 0.09);
  --footer-chip-bg: rgba(255, 255, 255, 0.86);
  --map-overlay: rgba(255, 255, 255, 0.92);
  --sidebar-width: 300px;
  --header-height: 76px;
  --footer-height: 84px;
}

:root[data-theme="dark"] {
  --bg1: #020617;
  --bg2: #07111f;
  --bg3: #081523;
  --card-bg: rgba(15, 23, 42, 0.94);
  --card-solid: #0f172a;
  --card-border: rgba(148, 163, 184, 0.24);
  --card-shadow: 0 26px 70px rgba(0, 0, 0, 0.62);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --chip-bg: rgba(15, 23, 42, 0.96);
  --chip-border: rgba(148, 163, 184, 0.42);
  --footer-chip-bg: rgba(15, 23, 42, 0.92);
  --map-overlay: rgba(15, 23, 42, 0.92);
}

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

html,
body {
  min-height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 15% 10%, rgba(34, 197, 94, 0.16), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(249, 115, 22, 0.18), transparent 28%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 45%, var(--bg3) 100%);
}

body.rider-page {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: var(--header-height) minmax(0, 1fr) var(--footer-height);
  height: 100vh;
}

.app-header,
.sidebar,
.footer-nav,
.map-panel,
.management-sidebar {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.app-header {
  grid-column: 1 / 3;
  grid-row: 1;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 14px 24px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
}

.brand-text {
  min-width: 0;
}

.brand-text strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.brand-text span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-nav {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.top-nav > * {
  flex: 0 0 auto;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.driver-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--text-main);
  background: var(--chip-bg);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.driver-status-pill.is-online {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.14);
}

.driver-status-pill.is-offline {
  border-color: rgba(148, 163, 184, 0.45);
  color: var(--text-muted);
}

.driver-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.16);
}

.driver-status-pill.is-online .driver-status-dot,
.driver-profile-card.is-online .driver-avatar::after {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.nav-link,
.icon-button,
.footer-action,
.primary-button,
.sidebar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.icon-button:hover,
.footer-action:hover,
.primary-button:hover,
.sidebar-link:hover {
  border-color: rgba(249, 115, 22, 0.5);
  transform: translateY(-1px);
}

.nav-link {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text-main);
  font-size: 14px;
  text-decoration: none;
}

.button-link {
  text-decoration: none;
}

.button-link.is-disabled,
.button-link[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.55;
}

.nav-link.active,
.sidebar-link.active {
  border-color: rgba(249, 115, 22, 0.42);
  background: rgba(249, 115, 22, 0.12);
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.theme-controls {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.theme-picker {
  position: relative;
}

.theme-swatch-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  position: relative;
  border: 1px solid var(--chip-border);
  border-radius: 50%;
  color: var(--text-main);
  background: var(--chip-bg);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.theme-swatch-current {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 10px;
  height: 10px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--accent-orange);
  box-shadow: 0 0 0 1px var(--chip-border);
}

.theme-swatch-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.theme-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  display: none;
  width: 210px;
  padding: 8px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

.theme-picker.is-open .theme-menu {
  display: grid;
  gap: 6px;
}

.theme-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text-main);
  background: transparent;
  text-align: left;
}

.theme-menu-item:hover {
  background: var(--footer-chip-bg);
}

.theme-menu-item > span {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.theme-menu-icon {
  display: inline-grid;
  place-items: center;
}

.theme-menu-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.user-menu {
  position: relative;
  flex: 0 0 auto;
}

.top-role-switcher {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 34px;
  align-items: center;
  gap: 3px;
  min-height: 40px;
  padding: 3px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: var(--chip-bg);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.top-role-switcher form {
  margin: 0;
}

.top-role-switcher button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  color: var(--text-main);
  background: transparent;
}

.top-role-switcher button.is-active {
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.top-role-switcher svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.user-menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--chip-border);
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  font-weight: 900;
}

.user-menu-toggle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  display: none;
  width: 230px;
  padding: 8px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

.user-menu.is-open .user-menu-dropdown {
  display: grid;
  gap: 4px;
}

.user-menu-head {
  padding: 10px;
  border-bottom: 1px solid var(--card-border);
}

.user-menu-head strong,
.user-menu-head small {
  display: block;
}

.user-menu-head small {
  margin-top: 2px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.role-switcher {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  gap: 6px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--card-border);
}

.role-switcher form {
  margin: 0;
}

.role-switcher button {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  color: var(--text-main);
  background: var(--chip-bg);
  font-size: 12px;
  font-weight: 900;
}

.role-switcher button.is-active {
  border-color: rgba(245, 158, 11, 0.55);
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.user-menu-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.user-menu-dropdown a:hover {
  background: var(--footer-chip-bg);
}

.user-menu-dropdown svg {
  width: 18px;
  height: 18px;
}

.theme-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

:root[data-theme="light"] .theme-icon.sun,
:root[data-theme="dark"] .theme-icon.moon {
  opacity: 1;
}

.sidebar {
  grid-column: 1;
  grid-row: 2 / 4;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  overflow-y: auto;
  background: var(--card-bg);
  border-right: 1px solid var(--card-border);
  box-shadow: 12px 0 36px rgba(15, 23, 42, 0.08);
}

.panel,
.metric-card,
.table-panel,
.drivers-panel,
.dashboard-hero {
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.panel {
  padding: 16px;
}

.booking-panel {
  background:
    linear-gradient(180deg, rgba(234, 179, 8, 0.12), transparent 70%),
    var(--card-bg);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.section-title span {
  font-size: 15px;
  font-weight: 800;
}

.section-title strong {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ride-field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  text-align: left;
}

.ride-field.with-dot {
  position: relative;
  padding-left: 20px;
}

.ride-field.with-dot::before {
  content: "";
  position: absolute;
  top: 33px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.pickup-dot::before {
  background: var(--accent-green);
}

.dropoff-dot::before {
  background: var(--accent-orange);
}

.ride-field label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ride-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  outline: none;
  padding: 0 12px;
  color: var(--text-main);
  background: var(--chip-bg);
}

.ride-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  outline: none;
  padding: 0 12px;
  color: var(--text-main);
  background: var(--chip-bg);
}

.ride-field textarea {
  width: 100%;
  min-height: 110px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  outline: none;
  padding: 12px;
  resize: vertical;
  color: var(--text-main);
  background: var(--chip-bg);
}

.primary-button {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  color: #111827;
  font-weight: 850;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.compact-button {
  width: auto;
  min-width: 140px;
  padding: 0 16px;
}

.option-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.option-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--footer-chip-bg);
  color: var(--text-muted);
  font-size: 13px;
}

.option-list strong,
.option-list small {
  display: block;
}

.option-list strong {
  color: var(--text-main);
  font-size: 14px;
}

.option-list small {
  margin-top: 2px;
  color: var(--text-muted);
}

.badge,
.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #14532d;
  background: rgba(34, 197, 94, 0.18);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.status-chip.status-success {
  color: #14532d;
  background: rgba(34, 197, 94, 0.18);
}

.status-chip.status-warning {
  color: #854d0e;
  background: rgba(234, 179, 8, 0.2);
}

.status-chip.status-error {
  color: #7f1d1d;
  background: rgba(239, 68, 68, 0.16);
}

.map-stage {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
}

#map,
#map-canvas {
  width: 100%;
  height: 100%;
  background: #dbeafe;
  z-index: 1;
}

.leaflet-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.leaflet-container:active {
  cursor: grabbing;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  display: block;
  max-width: none !important;
  max-height: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  object-fit: fill !important;
  box-sizing: content-box !important;
}

.leaflet-tile {
  width: 257px !important;
  height: 257px !important;
  outline: 1px solid transparent;
  backface-visibility: hidden;
  transform-origin: 0 0;
  user-select: none;
}

.leaflet-tile-pane {
  z-index: 200;
}

.leaflet-overlay-pane {
  z-index: 400;
}

.leaflet-marker-pane {
  z-index: 600;
}

.leaflet-tooltip-pane {
  z-index: 650;
}

.leaflet-popup-pane {
  z-index: 700;
}

.map-panel {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 2;
  width: min(390px, calc(100% - 44px));
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 16px;
  background: var(--map-overlay);
  box-shadow: var(--card-shadow);
}

.map-style-control {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.map-style-control button {
  min-height: 30px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--text-main);
  background: var(--chip-bg);
  font-size: 12px;
  font-weight: 850;
}

.map-style-control button.is-active {
  border-color: rgba(249, 115, 22, 0.55);
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 7px;
  color: var(--accent-orange);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-panel h1,
.dashboard-hero h1 {
  font-size: 24px;
  line-height: 1.12;
}

.map-panel p,
.dashboard-hero p {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.quick-pills span {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--text-main);
  background: var(--footer-chip-bg);
  font-size: 12px;
  font-weight: 800;
}

.route-summary {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--map-overlay);
  box-shadow: var(--card-shadow);
}

.summary-item {
  min-width: 98px;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--footer-chip-bg);
}

.summary-item span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-item strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
}

.footer-nav {
  grid-column: 2;
  grid-row: 3;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 24px;
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.1);
}

.footer-action {
  min-width: 150px;
  min-height: 52px;
  border-radius: 999px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.footer-action.active {
  border: 0;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.leaflet-control-attribution {
  font-size: 10px;
}

.taxi-marker {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  color: #111827;
  background: var(--accent-orange);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
  font-weight: 900;
}

.taxi-marker.is-unavailable {
  opacity: 0.44;
  color: var(--text-muted);
  background: var(--chip-bg);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.demo-trip-driver-marker {
  box-shadow: 0 0 0 5px rgba(249, 115, 22, 0.22), 0 12px 24px rgba(15, 23, 42, 0.26);
}

.demo-trip-rider-marker {
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.22), 0 12px 24px rgba(15, 23, 42, 0.22);
}

.customer-location-marker {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.22), 0 12px 24px rgba(15, 23, 42, 0.24);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.dropoff-location-marker {
  width: 24px;
  height: 24px;
  border: 4px solid #ffffff;
  border-radius: 50% 50% 50% 4px;
  background: var(--accent-orange);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.28);
  transform: rotate(-45deg);
}

.driver-location-panel {
  display: grid;
  gap: 12px;
}

.driver-status-modal .app-modal-panel {
  width: min(420px, calc(100vw - 32px));
  max-height: min(520px, calc(100dvh - 32px));
}

.driver-status-modal.is-open {
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.driver-location-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.location-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 850;
}

.location-action-primary {
  border: 0;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.location-action-secondary {
  border: 1px solid rgba(239, 68, 68, 0.42);
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.12);
}

.driver-location-note {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.management-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-rows: var(--header-height) minmax(0, 1fr) var(--footer-height);
  min-height: 100vh;
}

.management-header {
  grid-column: 1 / 3;
}

.management-sidebar {
  grid-column: 1;
  grid-row: 2 / 4;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-right: 1px solid var(--card-border);
  background: var(--card-bg);
}

.sidebar-link {
  justify-content: flex-start;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-main);
  font-weight: 800;
  text-decoration: none;
}

.management-main {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
  padding: 22px;
  overflow: auto;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(234, 179, 8, 0.16), transparent 48%),
    var(--card-bg);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 16px;
}

.metric-card span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.table-panel,
.drivers-panel {
  padding: 16px;
  min-width: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 740px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--card-border);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

td small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
}

.driver-list {
  display: grid;
  gap: 12px;
}

.driver-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--footer-chip-bg);
}

.driver-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
  font-weight: 900;
}

.driver-profile-card .driver-avatar::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--card-bg);
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.16);
}

.driver-card strong,
.driver-card small {
  display: block;
}

.driver-card small,
.driver-card > span:not(.status-chip) {
  color: var(--text-muted);
  font-size: 12px;
}

.driver-card > span:not(.status-chip) {
  grid-column: 2 / 4;
}

.driver-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-rows: var(--header-height) minmax(0, 1fr) var(--footer-height);
  min-height: 100vh;
}

.driver-header {
  grid-column: 1 / 3;
}

.driver-header,
.customer-header {
  justify-content: space-between;
}

.driver-sidebar {
  grid-column: 1;
  grid-row: 2 / 4;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-right: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.role-sidebar-brand {
  display: none;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text-main);
  text-decoration: none;
}

.role-sidebar-brand .brand-mark {
  width: 40px;
  height: 40px;
}

.role-sidebar-brand span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.role-sidebar-brand strong {
  font-size: 18px;
  line-height: 1.1;
}

.role-sidebar-brand small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-profile-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 18px 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--footer-chip-bg);
  text-align: center;
}

.driver-profile-card small {
  color: var(--text-muted);
}

.driver-avatar.large {
  width: 58px;
  height: 58px;
  font-size: 22px;
}

.driver-main {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
  padding: 22px;
  overflow: auto;
}

.driver-hero {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.14), transparent 46%),
    linear-gradient(315deg, rgba(249, 115, 22, 0.12), transparent 40%),
    var(--card-bg);
}

.driver-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.driver-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.driver-panel .section-title {
  align-items: flex-start;
  gap: 10px;
}

.history-panel,
.chat-panel {
  grid-column: 1 / 3;
}

.request-list,
.review-list,
.chat-thread-list {
  display: grid;
  gap: 12px;
}

.request-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--footer-chip-bg);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.request-card:hover {
  border-color: rgba(249, 115, 22, 0.28);
  transform: translateY(-1px);
}

.request-card.is-accepted {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.1);
}

.request-card.is-declined {
  opacity: 0.68;
}

.request-topline,
.request-meta,
.request-actions,
.vehicle-card,
.vehicle-list li,
.chat-header,
.chat-reply {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.route-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 750;
}

.route-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-line svg {
  color: var(--accent-orange);
}

.request-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13px;
}

.request-meta span,
.request-meta strong {
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--chip-bg);
}

.request-meta strong {
  color: var(--text-main);
}

.request-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.accept-button,
.decline-button,
.ghost-button,
.secondary-button,
.chat-reply button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 850;
  text-decoration: none;
}

.accept-button {
  border: 0;
  color: #052e16;
  background: var(--accent-green);
}

.decline-button {
  color: #7f1d1d;
  background: rgba(239, 68, 68, 0.12);
}

.ghost-button,
.secondary-button,
.chat-reply button {
  color: var(--text-main);
  background: var(--chip-bg);
}

.vehicle-card {
  justify-content: flex-start;
  padding: 12px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--footer-chip-bg);
}

.vehicle-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.vehicle-card strong,
.vehicle-card small {
  display: block;
}

.vehicle-card small,
.vehicle-list span,
.review-card small,
.chat-header small {
  color: var(--text-muted);
}

.vehicle-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  list-style: none;
}

.vehicle-list li {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--footer-chip-bg);
}

.secondary-button {
  width: 100%;
}

.review-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--footer-chip-bg);
}

.review-card p {
  grid-column: 1 / 3;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.rating-pill {
  align-self: start;
  border-radius: 999px;
  padding: 5px 9px;
  color: #713f12;
  background: rgba(234, 179, 8, 0.18);
  font-size: 12px;
  font-weight: 900;
}

.chat-thread {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--footer-chip-bg);
}

.chat-bubble {
  max-width: 76%;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
}

.from-customer {
  justify-self: start;
  background: var(--chip-bg);
}

.from-driver {
  justify-self: end;
  color: #111827;
  background: rgba(234, 179, 8, 0.72);
}

.chat-reply {
  margin-top: 2px;
}

.chat-reply input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  outline: none;
  padding: 0 12px;
  color: var(--text-main);
  background: var(--chip-bg);
}

.chat-reply button {
  width: 44px;
  padding: 0;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(460px, 100%);
  padding: 24px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.wide-auth-card {
  width: min(720px, 100%);
}

.auth-brand {
  margin-bottom: 22px;
}

.auth-copy {
  margin-bottom: 18px;
}

.auth-copy h1 {
  font-size: 28px;
  line-height: 1.1;
}

.auth-copy p,
.auth-switch {
  margin-top: 8px;
  color: var(--text-muted);
}

.auth-switch {
  text-align: center;
}

.auth-switch a {
  color: var(--accent-orange);
  font-weight: 850;
}

.auth-form {
  display: grid;
  gap: 14px;
}

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

.form-span {
  grid-column: 1 / -1;
}

.form-section-title {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--card-border);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 900;
}

.form-alert {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 750;
}

.error-alert {
  color: #7f1d1d;
  background: rgba(239, 68, 68, 0.14);
}

.success-alert {
  color: #14532d;
  background: rgba(34, 197, 94, 0.16);
}

.account-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: var(--header-height) minmax(0, 1fr);
}

.driver-shell.account-shell,
.customer-shell.account-shell {
  grid-template-rows: var(--header-height) minmax(0, 1fr) var(--footer-height);
}

.single-page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: var(--header-height) minmax(0, 1fr) var(--footer-height);
}

.single-page-shell.driver-shell,
.single-page-shell.customer-shell {
  grid-template-rows: var(--header-height) minmax(0, 1fr) var(--footer-height);
}

.map-page-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}

.trip-locked-shell.single-page-shell,
.trip-locked-shell.single-page-shell.driver-shell,
.trip-locked-shell.single-page-shell.customer-shell {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--header-height) minmax(0, 1fr);
}

.trip-locked-shell .app-header,
.trip-locked-shell .single-page-main {
  grid-column: 1;
}

.trip-locked-shell .single-page-main {
  grid-row: 2;
}

.trip-locked-shell .app-header {
  justify-content: space-between;
}

.single-page-main {
  display: grid;
  gap: 16px;
  align-content: start;
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  padding: 18px;
  overflow: auto;
}

.driver-shell .single-page-main,
.customer-shell .single-page-main {
  grid-column: 2;
}

.trip-locked-shell.driver-shell .single-page-main,
.trip-locked-shell.customer-shell .single-page-main {
  grid-column: 1;
}

.map-page-main {
  gap: 0;
  align-content: stretch;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.section-page .customer-panel,
.section-page .driver-panel {
  width: min(980px, 100%);
}

.muted-copy {
  color: var(--text-muted);
  line-height: 1.5;
}

.account-header {
  grid-column: 1;
}

.driver-shell .account-header,
.customer-shell .account-header {
  grid-column: 1 / 3;
}

.account-main {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 22px;
  overflow: auto;
}

.driver-shell .account-main,
.customer-shell .account-main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

.account-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-section-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--text-main);
  background: var(--chip-bg);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.account-section-nav a.is-active {
  border-color: rgba(249, 115, 22, 0.48);
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.account-page-panel {
  width: min(920px, 100%);
}

.account-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.verifier-driver-list {
  display: grid;
  gap: 16px;
}

.verifier-driver-card {
  display: grid;
  gap: 16px;
}

.verifier-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.verifier-card-top h2 {
  font-size: 22px;
}

.verifier-card-top p {
  margin-top: 4px;
  color: var(--text-muted);
}

.verification-progress,
.verifier-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

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

.verification-progress > div {
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 12px;
  background: var(--footer-chip-bg);
}

.verification-progress span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.verification-progress strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
}

.verifier-admin-actions,
.verifier-doc-links,
.verifier-decision-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.verifier-decision-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
}

.verification-history {
  display: grid;
  gap: 10px;
}

.privacy-rule-list {
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  line-height: 1.45;
  padding-left: 18px;
}

.privacy-ack {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
}

.verifier-tag-group {
  display: grid;
  gap: 8px;
}

.verifier-tag-group > strong {
  font-size: 13px;
}

.verifier-tag-options,
.verification-tag-history {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.verifier-tag-options label,
.verification-tag-history b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--text-main);
  background: var(--chip-bg);
  font-size: 12px;
  font-weight: 850;
}

.verification-tag-history {
  margin-top: 7px;
}

.verification-tag-history b {
  font-style: normal;
}

.verification-tag-history b.positive {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
}

.verification-tag-history b.negative {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
}

.verifier-request-review-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.verifier-request-review-form input[type="text"] {
  min-height: 38px;
  min-width: min(220px, 100%);
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text-main);
  background: var(--chip-bg);
}

.verifier-user-actions {
  align-items: center;
  gap: 8px;
}

.driver-lock-fieldset {
  display: contents;
  border: 0;
  margin: 0;
  padding: 0;
}

.account-submit-verification {
  margin-top: 14px;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.media-upload-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  margin-bottom: 18px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.media-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--footer-chip-bg);
}

.media-picker-card {
  width: 100%;
  border: 1px solid var(--chip-border);
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
}

.media-picker-card:hover {
  border-color: rgba(249, 115, 22, 0.5);
}

.media-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--text-muted);
  font-weight: 900;
  text-decoration: none;
}

.media-preview img,
.media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card strong,
.media-card small {
  display: block;
}

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

.media-card .decline-button {
  width: 100%;
}

.profile-photo-preview {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 3px solid var(--chip-bg);
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  font-size: 34px;
  font-weight: 900;
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-picker-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 6px;
  background: var(--chip-bg);
}

.media-picker-control span {
  overflow: hidden;
  padding-left: 8px;
  color: var(--text-main);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-picker-control .secondary-button {
  width: auto;
  min-height: 34px;
}

.media-library-modal-panel {
  width: min(980px, 100%);
}

.media-picker-grid {
  max-height: 50vh;
  overflow: auto;
  padding-right: 2px;
}

.media-library-grid .media-card {
  align-content: start;
}

.admin-filter-form {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.admin-filter-form select {
  min-width: min(340px, 100%);
  min-height: 42px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text-main);
  background: var(--chip-bg);
}

.admin-media-owner {
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 10px;
  background: var(--chip-bg);
}

.admin-media-owner strong,
.admin-media-owner small {
  display: block;
}

.admin-media-owner small {
  margin-top: 3px;
  color: var(--text-muted);
}

.media-rename-form {
  display: grid;
  gap: 8px;
}

.media-rename-form .ride-field {
  margin-bottom: 0;
}

.media-rename-form .secondary-button {
  width: 100%;
}

.empty-state {
  border: 1px dashed var(--chip-border);
  border-radius: 8px;
  padding: 18px;
  color: var(--text-muted);
  background: var(--chip-bg);
  font-weight: 800;
}

.theme-editor-section {
  display: grid;
  gap: 18px;
}

.theme-create-card,
.theme-edit-card {
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 16px;
  background: var(--footer-chip-bg);
}

.theme-editor-list {
  display: grid;
  gap: 16px;
}

.theme-edit-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.theme-edit-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.theme-edit-heading small {
  color: var(--text-muted);
}

.theme-dot {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.theme-enable-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-weight: 800;
}

.theme-mode-editor {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
}

.theme-mode-editor h3 {
  font-size: 14px;
}

.theme-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
}

.theme-color-grid label {
  display: grid;
  gap: 5px;
}

.theme-color-grid span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.theme-color-grid input {
  min-height: 38px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--text-main);
  background: var(--chip-bg);
}

.theme-live-preview {
  margin-top: 12px;
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(135deg, var(--preview-bg1, var(--bg1)), var(--preview-bg2, var(--bg2)), var(--preview-bg3, var(--bg3)));
}

.theme-live-preview > div {
  max-width: 360px;
  border: 1px solid var(--preview-card-border, var(--card-border));
  border-radius: 8px;
  padding: 14px;
  color: var(--preview-text-main, var(--text-main));
  background: var(--preview-card-bg, var(--card-bg));
}

.theme-live-preview p {
  margin: 6px 0 12px;
  color: var(--preview-text-muted, var(--text-muted));
}

.theme-live-preview button,
.theme-live-preview span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  font-weight: 850;
}

.theme-live-preview button {
  color: #111827;
  background: var(--preview-accent-orange, var(--accent-orange));
}

.theme-live-preview span {
  margin-left: 8px;
  color: var(--preview-text-main, var(--text-main));
  background: var(--preview-chip-bg, var(--chip-bg));
}

.theme-actions {
  margin-top: 12px;
}

.admin-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-shortcut-card {
  display: grid;
  gap: 6px;
  min-height: 112px;
  align-content: center;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 16px;
  color: var(--text-main);
  background: var(--card-bg);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.admin-shortcut-card:hover {
  border-color: rgba(249, 115, 22, 0.45);
  transform: translateY(-1px);
}

.admin-shortcut-card strong {
  font-size: 16px;
}

.admin-shortcut-card span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.35;
}

.wp-admin-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar-backdrop,
.admin-sidebar-close {
  display: none;
}

.wp-admin-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 240px;
  height: 100dvh;
  max-height: 100dvh;
  padding: 16px;
  overflow: hidden;
  color: #f8fafc;
  background: #111827;
}

.admin-topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-menu-button {
  display: none;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  color: var(--text-main);
  background: var(--chip-bg);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.wp-admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f8fafc;
  text-decoration: none;
}

.wp-admin-brand .brand-mark {
  width: 38px;
  height: 38px;
}

.wp-admin-sidebar nav {
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 4px 14px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(203, 213, 225, 0.45) rgba(15, 23, 42, 0.4);
}

.wp-admin-sidebar nav::-webkit-scrollbar {
  width: 8px;
}

.wp-admin-sidebar nav::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 999px;
}

.wp-admin-sidebar nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.45);
}

.wp-admin-sidebar nav::-webkit-scrollbar-thumb:hover {
  background: rgba(203, 213, 225, 0.7);
}

.wp-admin-sidebar .sidebar-link {
  border-color: rgba(255,255,255,0.08);
  color: #e5e7eb;
  background: transparent;
  box-shadow: none;
}

.wp-admin-sidebar .sidebar-link:hover,
.wp-admin-sidebar .sidebar-link.active {
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.wp-admin-sidebar .sidebar-group {
  display: grid;
  gap: 4px;
}

.wp-admin-sidebar .sidebar-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 12px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.wp-admin-sidebar .sidebar-group-label svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wp-admin-sidebar .sidebar-submenu {
  display: grid;
  gap: 4px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.1);
}

.wp-admin-sidebar .sidebar-sublink {
  min-height: 38px;
  justify-content: flex-start;
  padding-inline: 12px;
  font-size: 13px;
}

.wp-admin-content {
  grid-column: 2;
  min-width: 0;
  background: linear-gradient(180deg, var(--bg1), var(--bg2), var(--bg3));
}

.wp-admin-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-height);
  padding: 12px 22px;
  border-bottom: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.wp-admin-topbar h1 {
  font-size: 24px;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.admin-stat-grid article {
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 14px;
  background: var(--card-solid);
  box-shadow: var(--card-shadow);
}

.admin-stat-grid span,
.admin-stat-grid strong {
  display: block;
}

.admin-stat-grid span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-stat-grid strong {
  margin-top: 5px;
  color: var(--text-main);
  font-size: 24px;
}

.wp-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.wp-list-heading h2 {
  font-size: 20px;
}

.wp-list-heading p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 14px;
}

.wp-list-panel {
  overflow: hidden;
}

.wp-table-filters,
.wp-table-actions,
.wp-table-pagination,
.quick-edit-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wp-table-filters {
  display: grid;
  grid-template-columns: minmax(220px, 280px) repeat(2, minmax(130px, max-content)) auto;
  justify-content: start;
  margin-bottom: 12px;
}

.wp-table-actions {
  justify-content: flex-start;
  margin-bottom: 10px;
}

.wp-table-actions-bottom {
  justify-content: flex-end;
  margin: 12px 0 0;
}

.wp-table-filters input,
.wp-table-filters select,
.wp-table-actions select,
.admin-filter-form select,
.quick-edit-form input,
.quick-edit-form select {
  min-height: 38px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text-main);
  background: var(--chip-bg);
}

.wp-table-filters input[type="search"] {
  min-width: min(280px, 100%);
}

.wp-table-filters .compact-button,
.wp-table-actions .compact-button,
.admin-filter-form .compact-button {
  width: auto;
  min-width: 96px;
}

.wp-table-actions .wp-table-pagination {
  margin-left: auto;
}

.wp-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.wp-list-table th,
.wp-list-table td {
  border-bottom: 1px solid var(--chip-border);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.wp-list-table th {
  color: var(--text-muted);
  background: var(--chip-bg);
  font-size: 12px;
  text-transform: uppercase;
}

.wp-list-table small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
}

.wp-list-table .check-column {
  width: 38px;
  text-align: center;
}

.wp-list-table .check-column input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent-orange);
  cursor: pointer;
}

.wp-list-table .check-column span {
  color: var(--text-muted);
}

.wp-table-actions .table-count {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.ad-placement-list {
  display: grid;
  gap: 12px;
}

.ad-placement-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 14px;
  background: var(--footer-chip-bg);
}

.ad-placement-row .privacy-ack {
  margin: 0;
}

.ad-placement-row strong,
.ad-placement-row small {
  display: block;
}

.ad-placement-row small {
  margin-top: 4px;
  color: var(--text-muted);
  line-height: 1.4;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.plugin-row-action-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.row-actions a,
.row-actions button {
  border: 0;
  padding: 0;
  color: var(--accent-orange);
  background: transparent;
  font-weight: 800;
  text-decoration: none;
}

.row-actions button {
  color: var(--accent-red);
}

.quick-edit-row {
  display: none;
}

.quick-edit-row.is-open {
  display: table-row;
}

.quick-edit-row td {
  background: rgba(15, 23, 42, 0.03);
}

.quick-edit-form label {
  display: grid;
  gap: 4px;
}

.quick-edit-form label span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.plugin-scan-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.plugin-scan-panel h3 {
  margin-bottom: 8px;
  color: var(--text-main);
  font-size: 14px;
}

.plugin-hook-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plugin-hook-list li {
  display: grid;
  gap: 3px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--card-bg);
}

.plugin-hook-list code {
  width: fit-content;
}

.plugin-hook-list small {
  margin: 0;
  overflow-wrap: anywhere;
}

.plugin-hook-badge {
  width: fit-content;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  padding: 1px 7px;
  color: var(--text-muted);
  background: var(--chip-bg);
  font-size: 11px;
  font-weight: 800;
}

.wp-table-pagination {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
}

.wp-page-buttons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wp-page-buttons a,
.wp-page-buttons span {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  min-height: 32px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--text-main);
  background: var(--chip-bg);
  text-decoration: none;
}

.wp-page-buttons a.is-disabled {
  pointer-events: none;
  opacity: 0.42;
}

.media-table-file {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.media-table-thumb {
  display: grid;
  place-items: center;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  color: var(--text-muted);
  background: var(--chip-bg);
  font-weight: 900;
  text-decoration: none;
}

.media-table-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-edit-panel {
  max-width: 980px;
}

.admin-media-edit-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
}

.admin-media-edit-preview {
  min-height: 260px;
}

.plugin-template-badge {
  position: fixed;
  right: 14px;
  bottom: 96px;
  z-index: 50;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text-main);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  font-size: 12px;
  font-weight: 850;
}

.theme-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.52);
}

.app-modal.is-open {
  display: grid;
}

.app-modal-panel {
  position: relative;
  width: min(540px, 100%);
  max-height: min(720px, 86vh);
  overflow: auto;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 22px;
  color: var(--text-main);
  background: var(--card-solid);
  box-shadow: var(--card-shadow);
}

.app-modal-panel h2 {
  margin: 0 44px 14px 0;
  font-size: 22px;
}

.plugin-modal-panel {
  width: min(920px, 100%);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.plugin-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.plugin-confirm-actions .primary-button,
.plugin-confirm-actions .secondary-button {
  min-height: 48px;
  width: 100%;
  border-radius: 8px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 900;
  box-shadow: none;
}

.plugin-confirm-actions .primary-button {
  border-color: transparent;
  color: #1f1300;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.plugin-confirm-actions .secondary-button {
  border-color: var(--chip-border);
  color: var(--text-main);
  background: var(--chip-bg);
}

.plugin-confirm-actions .primary-button:hover,
.plugin-confirm-actions .secondary-button:hover {
  transform: translateY(-1px);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--chip-border);
  border-radius: 50%;
  color: var(--text-main);
  background: var(--chip-bg);
  font-size: 24px;
  line-height: 1;
}

.customer-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-rows: var(--header-height) minmax(0, 1fr) var(--footer-height);
  height: 100vh;
}

.customer-header {
  grid-column: 1 / 3;
}

.customer-sidebar {
  grid-column: 1;
  grid-row: 2 / 4;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  overflow-y: auto;
  border-right: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.customer-profile-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px 12px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--footer-chip-bg);
  text-align: center;
}

.customer-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
  font-size: 22px;
  font-weight: 900;
}

.customer-profile-card span,
.customer-profile-card small {
  color: var(--text-muted);
}

.withdrawal-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.withdrawal-action-row form {
  margin: 0;
}

.pricing-list-panel {
  overflow: visible;
}

.pricing-heading {
  align-items: flex-start;
}

.pricing-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.pricing-heading-actions .admin-filter-form select {
  min-width: min(320px, 100%);
}

.pricing-summary-table td {
  vertical-align: middle;
}

.pricing-summary-table td:first-child {
  min-width: 150px;
}

.pricing-cell-stack {
  display: grid;
  gap: 5px;
  min-width: 130px;
}

.pricing-cell-stack span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.pricing-cell-stack strong {
  color: var(--text-main);
  font-size: 12px;
  white-space: nowrap;
}

.pricing-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pricing-row-actions form {
  margin: 0;
}

.pricing-form-panel {
  max-width: 920px;
}

.pricing-form-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
}

.pricing-form-header h2 {
  font-size: 22px;
}

.pricing-form-header p {
  max-width: 560px;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.pricing-form-header .secondary-button {
  width: auto;
  min-width: 150px;
}

.pricing-rule-form {
  max-width: 760px;
}

.pricing-rule-form .form-section-title {
  margin-top: 12px;
  padding: 18px 0 0;
  border-top: 1px solid var(--card-border);
  color: var(--text-main);
  font-size: 15px;
}

.pricing-rule-form .ride-field {
  gap: 7px;
}

.pricing-rule-form .ride-field label,
.pricing-rule-form .privacy-ack {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pricing-rule-form input,
.pricing-rule-form select {
  min-height: 44px;
}

.pricing-rule-form input[readonly] {
  opacity: 0.78;
  cursor: not-allowed;
}

.pricing-rule-form .primary-button {
  width: fit-content;
  min-width: 190px;
  margin-top: 4px;
}

.system-wallet-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}

.system-wallet-hero h2 {
  margin-top: 4px;
  color: var(--text-main);
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1;
}

.system-wallet-hero p {
  max-width: 760px;
  margin-top: 10px;
  color: var(--text-muted);
  line-height: 1.45;
}

.system-wallet-meta {
  display: grid;
  gap: 8px;
}

.system-wallet-meta span {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-muted);
  background: var(--chip-bg);
  font-size: 12px;
  font-weight: 800;
}

.system-wallet-meta strong {
  color: var(--text-main);
}

.system-earnings-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: 14px;
  margin-bottom: 14px;
}

.system-breakdown-list {
  display: grid;
  gap: 8px;
}

.system-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--footer-chip-bg);
}

.system-breakdown-row strong,
.system-breakdown-row small {
  display: block;
}

.system-breakdown-row small {
  margin-top: 3px;
  color: var(--text-muted);
}

.system-breakdown-row b {
  white-space: nowrap;
}

.compact-finance-form textarea {
  min-height: 78px;
}

.system-earnings-filters {
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, 1fr)) repeat(4, minmax(120px, 1fr)) auto;
}

.role-sidebar-nav {
  display: grid;
  gap: 6px;
}

.wallet-panel {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.12), transparent 58%),
    var(--card-bg);
}

.wallet-amount {
  margin-bottom: 12px;
  font-size: 28px;
  font-weight: 900;
}

.customer-main {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
  padding: 22px;
  overflow: auto;
}

.customer-hero {
  background:
    linear-gradient(135deg, rgba(234, 179, 8, 0.16), transparent 44%),
    linear-gradient(315deg, rgba(34, 197, 94, 0.12), transparent 42%),
    var(--card-bg);
}

.customer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(310px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.customer-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.booking-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.booking-form .ride-field {
  margin-bottom: 0;
}

.booking-form .primary-button {
  width: auto;
  min-width: 130px;
}

.booking-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
  align-items: start;
  width: min(1120px, 100%);
}

.ride-flow {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
  align-items: start;
  width: min(1180px, 100%);
}

.ride-flow-main {
  display: grid;
  gap: 14px;
}

.ride-flow-panel {
  display: grid;
  gap: 14px;
}

.ride-flow .customer-panel,
.ride-flow-panel,
.ride-flow-map {
  border-radius: 8px;
}

.ride-flow-map {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  min-height: 690px;
  overflow: hidden;
  padding: 0;
  background: var(--card-bg);
}

.ride-flow-real-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  min-height: 470px;
  background: var(--footer-chip-bg);
}

.ride-flow-map-card {
  position: absolute;
  z-index: 5;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 14px;
  background: var(--map-overlay);
  box-shadow: var(--card-shadow);
  pointer-events: auto;
  transition: left 0.18s ease, right 0.18s ease, padding 0.18s ease, background 0.18s ease;
}

.route-preview-content {
  display: grid;
  gap: 5px;
}

.route-preview-content[hidden],
.map-driver-list-card[hidden],
.map-selected-driver-card[hidden],
.ride-modal[hidden],
.ride-modal-backdrop[hidden] {
  display: none !important;
}

.ride-flow-map-card strong,
.ride-flow-map-card small {
  display: block;
}

.ride-flow-map-card small {
  color: var(--text-muted);
}

.ride-flow-map-card [data-route-map-hint] {
  color: var(--accent-lime);
  font-weight: 900;
}

.route-map-select-button {
  width: fit-content;
  min-width: 180px;
  margin-top: 6px;
  border-radius: 8px;
}

.route-map-select-button.is-active {
  border-color: var(--accent-orange);
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.ride-flow-map-card.is-picking-dropoff {
  right: 16px;
  left: auto;
  bottom: 16px;
  width: auto;
  min-width: 0;
  padding: 8px;
  background: rgba(15, 23, 42, 0.82);
}

.route-map-pick-actions {
  display: grid;
  grid-template-columns: repeat(2, 42px);
  gap: 8px;
}

.route-map-pick-actions[hidden] {
  display: none;
}

.route-pick-action {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.24);
}

.route-pick-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-pick-action.confirm {
  background: #16a34a;
}

.route-pick-action.cancel {
  background: #dc2626;
}

.ride-flow-steps {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}

.ride-flow-steps span {
  min-width: 0;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  padding: 6px 8px;
  color: var(--text-muted);
  background: var(--chip-bg);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  line-height: 1.1;
}

.ride-flow-steps span.is-done,
.ride-flow-steps span.is-active {
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.ride-flow-section {
  display: grid;
  gap: 12px;
}

.location-input-row,
.promo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.location-input-row button,
.promo-row button {
  min-width: 110px;
  min-height: 44px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  margin: 0;
  color: var(--text-main);
  background: var(--chip-bg);
  font-weight: 900;
}

.dropoff-search-wrap {
  position: relative;
}

.dropoff-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  display: grid;
  max-height: 252px;
  overflow: auto;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 6px;
  background: var(--map-overlay);
  box-shadow: var(--card-shadow);
}

.dropoff-suggestions[hidden] {
  display: none;
}

.dropoff-suggestion-option {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text-main);
  background: transparent;
  text-align: left;
}

.dropoff-suggestion-option:hover,
.dropoff-suggestion-option:focus {
  outline: none;
  background: var(--chip-bg);
}

.dropoff-suggestion-option strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.dropoff-suggestion-option small,
.dropoff-suggestions-empty {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
}

.dropoff-suggestions-empty {
  padding: 9px 10px;
}

.saved-place-empty {
  align-self: center;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
}

.ride-flow-next {
  width: fit-content;
  min-width: 170px;
}

.ride-flow-vehicles .ride-type-row {
  grid-template-columns: 48px minmax(0, 1fr) minmax(96px, auto);
}

.payment-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.payment-review-grid > div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--footer-chip-bg);
}

.payment-review-grid small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ride-wallet-warning {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.ride-wallet-warning[hidden],
.ride-tracking-panel[hidden],
.ride-rating-panel[hidden] {
  display: none;
}

.ride-summary-list strong {
  text-align: right;
}

.rating-picker,
.tip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rating-picker button,
.tip-row button {
  min-width: 44px;
  min-height: 38px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text-main);
  background: var(--chip-bg);
  font-weight: 900;
}

.rating-picker button.is-selected,
.tip-row button.is-selected {
  border-color: rgba(249, 115, 22, 0.6);
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.ride-feedback-box {
  width: 100%;
  min-height: 84px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
  color: var(--text-main);
  background: var(--chip-bg);
}

.booking-search-panel,
.booking-options-panel {
  display: grid;
  gap: 14px;
}

.refined-booking-form {
  grid-template-columns: 1fr;
  margin-bottom: 0;
}

.refined-booking-form .primary-button {
  width: 100%;
}

.saved-place-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.saved-place-row button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--text-main);
  background: var(--chip-bg);
  font-size: 13px;
  font-weight: 850;
}

.booking-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.booking-progress-step {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.booking-progress-step span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--chip-border);
  border-radius: 50%;
  background: var(--chip-bg);
}

.booking-progress-step strong {
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-progress-step.is-done,
.booking-progress-step.is-active {
  color: var(--text-main);
}

.booking-progress-step.is-done span,
.booking-progress-step.is-active span {
  border: 0;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.booking-map-panel {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.booking-map-canvas {
  width: 100%;
  height: clamp(340px, 52vh, 560px);
  max-height: calc(100vh - var(--header-height) - var(--footer-height) - 56px);
  min-height: 320px;
  background: #dbeafe;
}

.booking-map-preview {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  min-height: 520px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px),
    linear-gradient(0deg, rgba(148, 163, 184, 0.16) 1px, transparent 1px),
    linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(249, 115, 22, 0.08)),
    var(--card-bg);
  background-size: 72px 72px, 72px 72px, auto, auto;
}

.booking-map-preview::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.14);
}

.booking-map-route {
  position: absolute;
  inset: 48px 44px;
}

.route-pin {
  position: absolute;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 6px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

.pickup-pin {
  top: 18%;
  left: 26%;
  background: var(--accent-green);
}

.dropoff-pin {
  right: 18%;
  bottom: 20%;
  background: var(--accent-red);
}

.route-bend {
  position: absolute;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  transform-origin: left center;
}

.route-bend-one {
  top: 31%;
  left: 33%;
  width: 42%;
  transform: rotate(48deg);
}

.route-bend-two {
  top: 58%;
  left: 48%;
  width: 32%;
  transform: rotate(-34deg);
}

.booking-location-button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.18);
}

.booking-sheet {
  display: grid;
  gap: 14px;
}

.sheet-handle {
  justify-self: center;
  width: 70px;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.72);
}

.route-input-stack {
  position: relative;
  display: grid;
  gap: 10px;
}

.route-input-stack::before {
  content: "";
  position: absolute;
  top: 42px;
  bottom: 42px;
  left: 12px;
  border-left: 2px dashed rgba(148, 163, 184, 0.55);
}

.dedicated-map-panel {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.dedicated-map-canvas {
  width: 100%;
  height: 100%;
  background: #dbeafe;
}

.booking-map-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: grid;
  gap: 2px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--map-overlay);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.booking-map-overlay .eyebrow {
  margin-bottom: 0;
}

.dedicated-map-status {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text-main);
  background: var(--map-overlay);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  font-size: 13px;
  font-weight: 900;
}

.map-zoom-pill {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transform: translateX(-50%);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 4px;
  background: var(--map-overlay);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.map-zoom-pill button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  color: var(--text-main);
  background: transparent;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.map-zoom-pill button:hover {
  background: var(--chip-bg);
}

.map-trip-card,
.map-driver-list-card,
.map-selected-driver-card {
  position: absolute;
  z-index: 6;
  display: grid;
  gap: 10px;
  width: min(430px, calc(100% - 32px));
  max-height: min(620px, calc(100% - 32px));
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 14px;
  background: var(--map-overlay);
  box-shadow: var(--card-shadow);
  scrollbar-width: thin;
}

.map-trip-card {
  left: 16px;
  bottom: 16px;
}

.map-driver-list-card {
  top: 64px;
  right: 16px;
  max-height: min(560px, calc(100% - 88px));
}

.map-selected-driver-card {
  right: 16px;
  bottom: 16px;
}

.map-trip-card.is-minimized,
.map-driver-list-card.is-minimized,
.map-selected-driver-card.is-minimized {
  width: auto;
  min-width: 190px;
  max-height: none;
  overflow: visible;
}

.map-driver-list-card.is-minimized {
  max-height: none;
  overflow: visible;
}

.map-card-actions {
  display: flex;
  gap: 6px;
}

.map-card-actions .icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-selected-driver-card.is-confirmed {
  border-color: rgba(22, 163, 74, 0.7);
}

.map-trip-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.map-trip-card-head > div {
  min-width: 0;
}

.map-trip-card-head strong {
  display: block;
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.map-trip-card-body,
[data-selected-driver-body] {
  display: grid;
  gap: 10px;
}

.map-trip-card-body[hidden],
[data-selected-driver-body][hidden],
.map-driver-list[hidden],
.map-trip-card.is-minimized .map-trip-card-body,
.map-selected-driver-card.is-minimized [data-selected-driver-body],
.map-driver-list-card.is-minimized .map-driver-list {
  display: none !important;
}

.map-driver-list {
  display: grid;
  gap: 8px;
}

.map-driver-list-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 10px;
  color: var(--text-main);
  background: var(--footer-chip-bg);
  text-align: left;
}

.map-driver-list-row.is-unavailable {
  opacity: 0.58;
  cursor: not-allowed;
}

.map-driver-list-row.is-unavailable .driver-avatar {
  background: var(--chip-bg);
  color: var(--text-muted);
}

.map-driver-list-row small,
.driver-review-list small {
  display: block;
  color: var(--text-muted);
}

.driver-detail-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.driver-detail-tabs button {
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 8px 6px;
  color: var(--text-muted);
  background: var(--chip-bg);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.driver-detail-tabs button.is-active {
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.driver-more-details {
  margin-top: 10px;
  color: var(--text-muted);
}

.driver-more-details summary {
  cursor: pointer;
  color: var(--text-main);
  font-weight: 900;
}

.driver-review-list,
.driver-verified-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.driver-review-list li,
.driver-verified-list li {
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 10px;
  background: var(--footer-chip-bg);
}

.driver-verified-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.ride-live-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
}

.ride-live-actions[hidden] {
  display: none !important;
}

.ride-live-actions .section-title {
  margin-bottom: 0;
}

.ride-live-actions textarea {
  min-height: 74px;
  resize: vertical;
}

.driver-trip-stage,
.customer-trip-stage {
  min-height: calc(100dvh - var(--header-height) - 28px);
}

.driver-trip-card {
  width: min(460px, calc(100% - 32px));
}

.trip-review-main {
  align-content: center;
  justify-items: center;
}

.trip-review-card {
  width: min(620px, 100%);
}

.trip-review-form {
  display: grid;
  gap: 14px;
}

.star-rating-field {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  border: 0;
  padding: 0;
}

.star-rating-field legend {
  width: 100%;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.star-rating-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.star-rating-field label,
.star-rating-field button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  color: var(--text-muted);
  background: var(--chip-bg);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.star-rating-field button {
  appearance: none;
  padding: 0;
}

.star-rating-field input:checked ~ label,
.star-rating-field label:hover,
.star-rating-field label:hover ~ label,
.star-rating-field button.is-selected {
  border-color: rgba(249, 115, 22, 0.58);
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.star-rating-field input:focus-visible + label {
  outline: 3px solid rgba(249, 115, 22, 0.35);
  outline-offset: 2px;
}

.compact-star-rating {
  margin: 0;
}

.trip-step-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  list-style: none;
}

.trip-step-list li {
  min-height: 38px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 8px;
  color: var(--text-muted);
  background: var(--chip-bg);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.trip-step-list li.is-active {
  border-color: rgba(34, 197, 94, 0.55);
  color: var(--text-main);
  background: rgba(34, 197, 94, 0.16);
}

.ride-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(15, 23, 42, 0.58);
}

.ride-modal {
  position: fixed;
  z-index: 115;
  top: 50%;
  left: 50%;
  display: grid;
  gap: 14px;
  width: min(520px, calc(100vw - 28px));
  max-height: min(720px, calc(100dvh - 28px));
  overflow: auto;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 18px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  transform: translate(-50%, -50%);
}

.chat-thread {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 12px;
  background: var(--footer-chip-bg);
}

.chat-bubble {
  max-width: 82%;
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--text-main);
  background: var(--chip-bg);
  font-size: 13px;
  font-weight: 800;
}

.chat-bubble.outgoing {
  justify-self: end;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
}

.map-type-picker {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
}

.map-type-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--chip-border);
  border-radius: 50%;
  background: var(--map-overlay);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.map-type-swatch {
  width: 22px;
  height: 22px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--accent-orange);
  box-shadow: 0 0 0 1px var(--chip-border);
}

.map-type-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  width: 190px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

.map-type-picker.is-open .map-type-menu {
  display: grid;
  gap: 6px;
}

.map-type-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text-main);
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.map-type-menu-item:hover,
.map-type-menu-item.is-active {
  background: var(--footer-chip-bg);
}

.map-type-menu-item span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.booking-options-panel {
  grid-column: 1 / 3;
}

.ride-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ride-type-list {
  display: grid;
  gap: 8px;
}

.ride-type-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 12px;
  color: var(--text-main);
  background: var(--footer-chip-bg);
  text-align: left;
}

.ride-type-row.is-selected {
  border-color: rgba(34, 197, 94, 0.52);
  color: #111827;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.92), rgba(16, 185, 129, 0.84));
}

.ride-type-row strong,
.ride-type-row small,
.ride-type-row b {
  display: block;
}

.ride-type-row small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.ride-type-row.is-selected small {
  color: rgba(17, 24, 39, 0.72);
}

.ride-type-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: var(--text-main);
  background: var(--chip-bg);
}

.ride-type-row.is-selected .ride-type-icon {
  color: #111827;
  background: rgba(255, 255, 255, 0.72);
}

.booking-payment-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.booking-payment-row button {
  display: grid;
  gap: 3px;
  min-height: 58px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-main);
  background: var(--chip-bg);
  text-align: left;
}

.booking-payment-row span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.ride-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 12px;
  color: var(--text-main);
  background: var(--footer-chip-bg);
  text-align: left;
}

.ride-option-card.is-selected {
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(249, 115, 22, 0.12);
}

.ride-option-card strong,
.ride-option-card small {
  display: block;
}

.ride-option-card small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.ride-option-card b {
  white-space: nowrap;
}

.booking-checkout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--card-border);
  padding-top: 14px;
  color: var(--text-muted);
  font-size: 14px;
}

.booking-checkout strong {
  color: var(--text-main);
}

.map-booking-sheet {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 3;
  display: grid;
  gap: 12px;
  max-width: 620px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 14px;
  background: var(--map-overlay);
  box-shadow: var(--card-shadow);
}

.taxi-detail-popup .leaflet-popup-content-wrapper {
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0;
  background: var(--map-overlay);
  box-shadow: var(--card-shadow);
}

.taxi-detail-popup .leaflet-popup-content {
  width: min(520px, calc(100vw - 44px)) !important;
  margin: 0;
}

.taxi-detail-popup .leaflet-popup-tip {
  background: var(--map-overlay);
  box-shadow: var(--card-shadow);
}

.taxi-map-popup-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px;
  color: var(--text-main);
}

.taxi-map-popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--chip-border);
  border-radius: 50%;
  color: var(--text-main);
  background: var(--chip-bg);
  font-size: 22px;
  line-height: 1;
}

.taxi-map-popup-card .active-driver-summary {
  padding-right: 34px;
}

.active-driver-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.active-driver-summary strong,
.active-driver-summary small {
  display: block;
}

.active-driver-summary small {
  color: var(--text-muted);
  font-size: 12px;
}

.ride-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid var(--card-border);
  padding-top: 10px;
}

.ride-rate-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 0;
  padding-top: 0;
}

.ride-stat-grid span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ride-stat-grid strong {
  overflow-wrap: anywhere;
  line-height: 1.15;
}

.ride-stat-grid small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.wallet-layout,
.invite-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 16px;
  align-items: start;
}

.wallet-stack-card {
  position: relative;
  min-height: 260px;
}

.wallet-stack-back,
.wallet-stack-front {
  position: absolute;
  right: 0;
  left: 0;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

.wallet-stack-back {
  top: 20px;
  height: 190px;
  opacity: 0.56;
  transform: scale(0.92);
}

.wallet-stack-front {
  top: 48px;
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.22), transparent 55%),
    var(--card-bg);
}

.wallet-stack-front strong {
  color: var(--accent-red);
  font-size: 42px;
  line-height: 1;
}

.wallet-stack-front small {
  color: var(--text-muted);
  font-weight: 800;
}

.wallet-chip {
  justify-self: start;
  border-radius: 999px;
  padding: 7px 10px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
  font-size: 12px;
  font-weight: 900;
}

.wallet-action-panel,
.notification-list,
.history-card-list {
  display: grid;
  gap: 12px;
}

.wallet-method-list {
  display: grid;
  gap: 8px;
  list-style: none;
}

.wallet-method-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 12px;
  background: var(--footer-chip-bg);
}

.wallet-method-list strong,
.wallet-method-list small {
  display: block;
}

.wallet-method-list small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.wallet-deposit-panel {
  display: grid;
  gap: 14px;
}

.deposit-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.deposit-method-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 14px;
  color: var(--text-main);
  background: var(--footer-chip-bg);
}

.deposit-method-card header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.deposit-method-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--deposit-provider-bg, #0f172a);
  font-weight: 950;
}

.deposit-method-card strong,
.deposit-method-card small {
  display: block;
}

.deposit-method-card small,
.deposit-method-card p {
  color: var(--text-muted);
}

.deposit-method-card p {
  line-height: 1.45;
}

.deposit-method-status {
  border-radius: 999px;
  padding: 6px 9px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.deposit-method-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.deposit-method-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.deposit-method-form label {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 850;
}

.deposit-method-form input {
  min-height: 42px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text-main);
  background: var(--chip-bg);
}

.history-trip-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.history-trip-card h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

.history-trip-card p {
  color: var(--text-muted);
  font-size: 13px;
}

.history-route-markers {
  display: grid;
  justify-items: center;
}

.history-route-markers span,
.history-route-markers b {
  width: 18px;
  height: 18px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--chip-border);
}

.history-route-markers span {
  background: var(--accent-green);
}

.history-route-markers b {
  background: var(--accent-red);
}

.history-route-markers i {
  width: 2px;
  height: 42px;
  border-left: 2px dashed rgba(148, 163, 184, 0.58);
}

.notification-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.notification-row p {
  margin: 3px 0;
  color: var(--text-muted);
}

.notification-row small {
  color: var(--text-muted);
  font-size: 12px;
}

.notification-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--chip-bg);
}

.notification-row.is-success .notification-icon {
  background: radial-gradient(circle, #ffffff 0 28%, var(--accent-green) 30% 100%);
}

.notification-row.is-promo .notification-icon {
  background: radial-gradient(circle, #ffffff 0 25%, var(--accent-yellow) 27% 100%);
}

.notification-row.is-danger .notification-icon {
  background: radial-gradient(circle, #ffffff 0 25%, var(--accent-red) 27% 100%);
}

.notification-row.is-wallet .notification-icon {
  background: radial-gradient(circle, #ffffff 0 25%, #3b82f6 27% 100%);
}

.invite-hero-panel {
  display: grid;
  gap: 12px;
  justify-items: start;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.18), transparent 52%),
    var(--card-bg);
}

.invite-gift {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 8px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
  font-size: 24px;
  font-weight: 950;
}

.invite-hero-panel h2 {
  font-size: 24px;
}

.invite-hero-panel p {
  color: var(--text-muted);
  line-height: 1.5;
}

.invite-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  align-items: center;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 10px;
  background: var(--chip-bg);
}

.invite-code-row > strong {
  font-size: 18px;
  letter-spacing: 0;
}

.step-list {
  display: grid;
  gap: 10px;
}

.step-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--footer-chip-bg);
}

.step-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #111827;
  background: var(--accent-yellow);
  font-weight: 900;
}

.step-card p {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.active-ride-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--footer-chip-bg);
}

.active-ride-card small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
}

.stacked-route {
  margin: 14px 0;
}

.full-button {
  width: 100%;
  margin-top: 12px;
}

.map-dashboard-panel {
  position: relative;
  order: -1;
  grid-column: 1 / -1;
  height: clamp(260px, 34vh, 340px);
  min-height: 260px;
  overflow: hidden;
  padding: 0;
}

#map-canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #dbeafe;
}

.customer-map-panel {
  top: 14px;
  left: 14px;
  width: min(360px, calc(100% - 28px));
  padding: 14px;
}

.customer-map-panel h2 {
  font-size: 22px;
  line-height: 1.1;
}

.history-panel,
.chat-panel,
.map-dashboard-panel {
  grid-column: 1 / 3;
}

.ride-options-panel {
  align-self: stretch;
}

@media (max-width: 1000px) {
  .metric-grid,
  .admin-shortcut-grid,
  .management-grid,
  .driver-grid,
  .customer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drivers-panel,
  .history-panel,
  .chat-panel {
    grid-column: 1 / 3;
  }

  .booking-form {
    grid-template-columns: 1fr;
  }

  .booking-form .primary-button {
    width: 100%;
  }

  .booking-workspace,
  .ride-flow {
    grid-template-columns: 1fr;
  }

  .booking-map-panel,
  .booking-map-preview,
  .booking-options-panel {
    grid-column: auto;
  }

  .booking-map-panel,
  .booking-map-preview,
  .ride-flow-map {
    position: relative;
    top: auto;
  }

  .ride-flow-map {
    min-height: 410px;
  }

  .booking-map-canvas {
    height: clamp(300px, 44vh, 440px);
    max-height: 460px;
  }

}

@media (max-width: 900px) {
  .wp-admin-shell,
  .driver-shell,
  .customer-shell,
  .single-page-shell.driver-shell,
  .single-page-shell.customer-shell {
    grid-template-columns: 1fr;
  }

  .wp-admin-content {
    grid-column: 1;
  }

  .wp-admin-sidebar,
  .driver-sidebar,
  .customer-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 85;
    width: min(300px, 86vw);
    height: 100dvh;
    max-height: 100dvh;
    transform: translateX(-104%);
    transition: transform 0.22s ease;
  }

  .wp-admin-shell.is-admin-menu-open .wp-admin-sidebar,
  .driver-shell.is-admin-menu-open .driver-sidebar,
  .customer-shell.is-admin-menu-open .customer-sidebar {
    transform: translateX(0);
  }

  .admin-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    background: rgba(15, 23, 42, 0.52);
  }

  .wp-admin-shell.is-admin-menu-open .admin-sidebar-backdrop,
  .driver-shell.is-admin-menu-open .admin-sidebar-backdrop,
  .customer-shell.is-admin-menu-open .admin-sidebar-backdrop {
    display: block;
  }

  .admin-sidebar-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 50%;
    color: #f8fafc;
    background: rgba(255,255,255,0.08);
    font-size: 24px;
    line-height: 1;
  }

  .admin-menu-button {
    display: grid;
  }

  .wp-admin-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
  }

  .wp-admin-topbar .top-nav {
    grid-column: 1 / -1;
    justify-self: start;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0;
  }

  .admin-topbar-title {
    min-width: 0;
  }

  .admin-topbar-title > div {
    min-width: 0;
  }

  .wp-admin-topbar h1 {
    overflow: hidden;
    font-size: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 68px minmax(0, 1fr) 78px;
  }

  .app-header {
    grid-column: 1;
    grid-template-columns: auto minmax(0, 1fr);
    justify-content: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .app-header .top-nav {
    justify-self: end;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0;
  }

  .driver-header .brand,
  .customer-header .brand {
    display: none;
  }

  .role-sidebar-brand {
    display: flex;
  }

  .top-nav .nav-link {
    display: none;
  }

  .sidebar {
    display: none;
  }

  .map-stage {
    grid-column: 1;
    grid-row: 2;
  }

  .map-panel {
    top: 12px;
    left: 12px;
    width: calc(100% - 24px);
  }

  .map-dashboard-panel {
    grid-column: 1 / -1;
    height: min(300px, 34vh);
    min-height: 240px;
  }

  .route-summary {
    right: 12px;
    bottom: 12px;
    left: 12px;
    justify-content: space-between;
  }

  .summary-item {
    flex: 1;
    min-width: 0;
  }

  .footer-nav {
    grid-column: 1;
    grid-row: 3;
    gap: 8px;
    padding: 10px;
  }

  .footer-action {
    flex: 1;
    min-width: 0;
    min-height: 56px;
    flex-direction: column;
    gap: 4px;
    border-radius: 8px;
    font-size: 12px;
  }

  .management-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 68px minmax(0, 1fr) 78px;
  }

  .driver-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 68px minmax(0, 1fr) 78px;
  }

  .customer-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 68px minmax(0, 1fr) 78px;
  }

  .management-header,
  .management-main,
  .management-shell .footer-nav,
  .driver-header,
  .driver-main,
  .driver-shell .account-header,
  .driver-shell .account-main,
  .driver-shell .footer-nav,
  .customer-header,
  .customer-main,
  .customer-shell .account-header,
  .customer-shell .account-main,
  .customer-shell .footer-nav {
    grid-column: 1;
  }

  .management-sidebar {
    display: none;
  }

  .management-main,
  .driver-main,
  .customer-main,
  .driver-shell .account-main,
  .customer-shell .account-main {
    grid-row: 2;
    padding: 14px;
    padding-bottom: 20px;
  }

  .single-page-main,
  .driver-shell .single-page-main,
  .customer-shell .single-page-main {
    grid-column: 1;
    grid-row: 2;
  }

  .management-shell .footer-nav,
  .driver-shell .footer-nav,
  .customer-shell .footer-nav,
  .single-page-shell .footer-nav {
    grid-row: 3;
    position: sticky;
    bottom: 0;
  }

  .map-page-shell .footer-nav {
    position: static;
  }

  .map-trip-card,
  .map-selected-driver-card {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: min(52dvh, 390px);
  }

  .map-driver-list-card {
    top: 64px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: min(420px, calc(100% - 90px));
  }
}

@media (max-width: 640px) {
  .dashboard-hero {
    display: grid;
  }

  .compact-button {
    width: 100%;
  }

  .metric-grid,
  .admin-shortcut-grid,
  .management-grid,
  .driver-grid,
  .customer-grid,
  .account-grid,
  .wallet-layout,
  .invite-layout,
  .drivers-panel,
  .history-panel,
  .chat-panel,
  .map-dashboard-panel {
    grid-template-columns: 1fr;
  }

  .map-dashboard-panel {
    grid-column: 1 / -1;
  }

  .map-trip-card,
  .map-driver-list-card,
  .map-selected-driver-card {
    gap: 9px;
    border-radius: 8px;
    padding: 10px;
  }

  .map-page-main {
    min-height: calc(100dvh - 146px);
  }

  .map-page-main .dedicated-map-panel {
    min-height: calc(100dvh - 146px);
  }

  .dedicated-map-status {
    top: 10px;
    left: 10px;
    padding: 7px 10px;
  }

  .map-zoom-pill {
    top: 10px;
  }

  .map-zoom-pill button {
    width: 28px;
    height: 26px;
    font-size: 16px;
  }

  .map-type-picker {
    top: 10px;
    right: 10px;
  }

  .map-trip-card-head {
    gap: 8px;
  }

  .map-trip-card-head strong {
    font-size: 14px;
  }

  .map-driver-list-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .map-driver-list-row > span:last-child {
    grid-column: 2;
  }

  .payment-review-grid {
    grid-template-columns: 1fr;
  }

  .ride-modal {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    padding: 14px;
  }

  .chat-thread {
    min-height: 160px;
    max-height: 42dvh;
  }

  .two-column-form {
    grid-template-columns: 1fr;
  }

  .pricing-form-header {
    grid-template-columns: 1fr;
  }

  .pricing-form-header .secondary-button,
  .pricing-rule-form .primary-button {
    width: 100%;
  }

  .media-upload-form {
    grid-template-columns: 1fr;
  }

  .wp-admin-topbar,
  .wp-list-heading {
    display: grid;
  }

  .ad-placement-row {
    grid-template-columns: 1fr;
  }

  .step-card,
  .active-ride-card {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .step-card .status-chip,
  .active-ride-card .status-chip {
    grid-column: 1 / 3;
    justify-self: start;
  }

  .route-line {
    grid-template-columns: 1fr;
  }

  .route-line svg {
    transform: rotate(90deg);
  }

  .single-page-main {
    padding: 12px;
  }

  .booking-workspace,
  .ride-flow {
    gap: 12px;
  }

  .booking-progress,
  .payment-review-grid,
  .ride-option-grid,
  .deposit-method-grid,
  .booking-payment-row {
    grid-template-columns: 1fr;
  }

  .ride-flow-steps {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .ride-flow-steps span {
    flex: 0 0 auto;
    min-width: 74px;
    padding: 7px 10px;
  }

  .booking-map-preview {
    min-height: 300px;
  }

  .ride-flow-map {
    min-height: 370px;
  }

  .ride-flow-map-card {
    right: 10px;
    bottom: 10px;
    left: 10px;
    padding: 12px;
  }

  .ride-flow-map-card strong {
    font-size: 14px;
  }

  .ride-flow-map-card small {
    font-size: 11px;
  }

  .route-map-select-button {
    width: 100%;
    min-width: 0;
  }

  .ride-flow-map-card.is-picking-dropoff {
    right: 10px;
    bottom: 10px;
    left: auto;
    width: auto;
    min-width: 0;
    padding: 7px;
  }

  .location-input-row,
  .promo-row,
  .ride-wallet-warning {
    grid-template-columns: 1fr;
  }

  .location-input-row button,
  .promo-row button {
    width: 100%;
  }

  .ride-type-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .ride-type-row > span:last-child {
    grid-column: 2;
  }

  .map-booking-sheet {
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-width: none;
  }

  .history-trip-card,
  .active-driver-summary {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .history-trip-card .secondary-button,
  .active-driver-summary .icon-button {
    grid-column: 1 / 3;
    width: 100%;
  }

  .ride-stat-grid,
  .invite-code-row {
    grid-template-columns: 1fr;
  }

  .map-trip-card .ride-stat-grid,
  .map-selected-driver-card .ride-stat-grid,
  .taxi-map-popup-card .ride-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .map-selected-driver-card .ride-rate-grid,
  .taxi-map-popup-card .ride-rate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-selected-driver-card .active-driver-summary {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .map-selected-driver-card .active-driver-summary .compact-button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 34px;
  }

  .trip-step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-section-nav a {
    flex: 1 1 120px;
  }

  .verification-progress,
  .verifier-detail-grid,
  .verifier-decision-form {
    grid-template-columns: 1fr;
  }

  .verifier-card-top {
    display: grid;
  }

  .booking-progress-step {
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
  }

  .booking-map-canvas {
    height: min(360px, 42vh);
    min-height: 280px;
  }

  .map-dashboard-panel {
    height: min(260px, 32vh);
    min-height: 220px;
  }

  .customer-map-panel {
    width: min(270px, calc(100% - 20px));
    top: 10px;
    left: 10px;
    padding: 10px;
  }

  .customer-map-panel .eyebrow {
    display: none;
  }

  .customer-map-panel h2 {
    font-size: 17px;
  }

  .customer-map-panel p {
    display: none;
  }

  .map-style-control {
    gap: 5px;
  }

  .map-style-control button {
    min-height: 28px;
    padding: 0 8px;
  }

  .booking-checkout {
    display: grid;
  }

  .booking-checkout .compact-button {
    width: 100%;
  }

  .app-modal {
    align-items: end;
    padding: 10px;
  }

  .app-modal-panel {
    width: 100%;
    max-height: 88vh;
  }

  .plugin-scan-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .app-header,
  .customer-header,
  .driver-header {
    gap: 6px;
    padding: 9px 10px;
  }

  .brand {
    flex: 0 1 auto;
    gap: 8px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-text {
    display: none;
  }

  .top-nav {
    gap: 5px;
    min-width: 0;
  }

  .driver-status-pill {
    min-height: 34px;
    padding: 0 9px;
    font-size: 11px;
  }

  .driver-location-actions {
    grid-template-columns: 1fr;
  }

  .theme-controls {
    gap: 5px;
  }

  .theme-menu-item {
    min-height: 32px;
    padding: 4px 6px;
  }

  .theme-menu-icon svg {
    width: 16px;
    height: 16px;
  }

  .theme-swatch-button,
  .admin-menu-button,
  .user-menu-toggle {
    width: 34px;
    height: 34px;
  }

  .admin-menu-button svg {
    width: 17px;
    height: 17px;
  }

  .icon-button {
    display: none;
  }

  .map-panel {
    padding: 12px;
  }

  .map-panel h1,
  .dashboard-hero h1 {
    font-size: 20px;
  }

  .quick-pills {
    display: none;
  }

  .route-summary {
    padding: 8px;
  }

  .summary-item {
    padding: 7px 8px;
  }

  .summary-item strong {
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .app-header,
  .customer-header,
  .driver-header {
    padding-inline: 8px;
  }

  .top-nav {
    gap: 4px;
  }

  .theme-menu {
    right: -8px;
    width: min(210px, calc(100vw - 16px));
  }
}

@media (max-width: 760px) {
  .wp-table-actions,
  .wp-table-filters,
  .wp-table-pagination {
    align-items: center;
  }

  .wp-table-filters {
    grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  }

  .wp-table-filters input[type="search"] {
    grid-column: 1 / -1;
    width: 100%;
  }

  .wp-table-filters .compact-button,
  .wp-table-actions .compact-button {
    width: auto;
  }

  .wp-table-actions .wp-table-pagination {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .system-wallet-hero,
  .system-earnings-grid {
    grid-template-columns: 1fr;
  }

  .system-earnings-filters {
    grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  }

  .admin-media-edit-layout {
    grid-template-columns: 1fr;
  }

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