@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Barlow+Condensed:wght@600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #0B1220;
  --panel: #0D1628;
  --panel-2: #0F1830;
  --border: #1B2740;
  --border-2: #243250;
  --ink: #E8EDF5;
  --muted: #7C8AA5;
  --muted-2: #546080;
  --primary: #FFB020;
  --accent: #2DD4BF;
  --danger: #FF5A5F;
  --success: #4ADE80;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
}
.font-display { font-family: 'Barlow Condensed', ui-sans-serif; letter-spacing: 0.02em; font-weight: 700; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* header/footer */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .bar { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 8px; }
.logo .mark { width: 30px; height: 30px; border-radius: 4px; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.logo .text { font-size: 20px; }
.site-nav { display: flex; gap: 24px; font-size: 14px; color: var(--muted); align-items: center; }
.site-nav a:hover, .site-nav button:hover { color: #fff; }
.site-nav button { background: none; border: none; color: inherit; font-size: 14px; padding: 0; }

.site-footer { border-top: 1px solid var(--border); margin-top: 64px; }
.site-footer .bar { padding: 28px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-text { font-size: 13px; color: var(--muted); }
.social-row { display: flex; gap: 10px; }
.social-row a { width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border-2); display: flex; align-items: center; justify-content: center; }

/* buttons/forms */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 11px 20px; border-radius: 6px; font-weight: 600; font-size: 14px; border: none; }
.btn-primary { background: var(--primary); color: var(--bg); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--border-2); }
.btn-outline:hover { border-color: var(--accent); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 6px; border: 1px solid var(--border-2); background: transparent; color: var(--ink); }
.btn-icon:hover { border-color: var(--accent); }

.field { display: block; margin-bottom: 16px; }
.field label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 6px;
  padding: 10px 12px; font-size: 14px; color: var(--ink); font-family: inherit;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(45,212,191,0.2); }
.input.mono { font-family: 'JetBrains Mono', monospace; }
.error-text { color: var(--danger); font-size: 12px; margin: -8px 0 12px; }
.hint-text { color: var(--muted-2); font-size: 12px; }

.card { border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.section-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 24px 0 12px; }
.section-label:first-child { margin-top: 0; }

/* status pill */
.pill { font-family: 'JetBrains Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; border-radius: 999px; border: 1px solid; display: inline-block; }
.pill-quote_pending { color: #C9A7FF; border-color: #C9A7FF55; }
.pill-draft { color: var(--muted); border-color: #7C8AA555; }
.pill-pending { color: var(--muted); border-color: #7C8AA555; }
.pill-in_transit { color: var(--accent); border-color: #2DD4BF55; }
.pill-paused { color: var(--primary); border-color: #FFB02055; }
.pill-delivered { color: var(--success); border-color: #4ADE8055; }
.pill-cancelled { color: var(--danger); border-color: #FF5A5F55; }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead { background: var(--panel-2); color: var(--muted); font-size: 11px; text-transform: uppercase; }
th, td { text-align: left; padding: 12px 16px; }
tbody tr { border-top: 1px solid var(--border); }

/* map */
.live-map { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--panel); }
.live-map .canvas-wrap { position: relative; height: 640px; }
.live-map.compact .canvas-wrap { height: 380px; }
.live-map canvas { width: 100%; height: 100%; display: block; }
.live-map .badge { position: absolute; top: 8px; background: rgba(11,18,32,0.85); backdrop-filter: blur(4px); padding: 4px 8px; border-radius: 4px; font-size: 10px; z-index: 5; }
.live-map .badge.left { left: 8px; color: var(--muted); font-family: 'JetBrains Mono', monospace; display: flex; align-items: center; gap: 4px; }
.live-map .badge.right { right: 8px; }
.live-map .footer-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-top: 1px solid var(--border); font-size: 12px; }
.live-map .footer-row .eta { color: var(--muted); display: flex; align-items: center; gap: 4px; }
.live-map .footer-row .pct { font-family: 'JetBrains Mono', monospace; color: var(--accent); }
.gmap-frame { width: 100%; height: 460px; border: 0; }
.live-map.compact .gmap-frame { height: 380px; }

/* stars */
.star-display { color: var(--primary); letter-spacing: 2px; }
.star-picker { display: inline-flex; gap: 4px; cursor: pointer; font-size: 22px; }
.star-picker-star { color: var(--border-2); transition: color 0.1s, transform 0.1s; }
.star-picker-star.filled { color: var(--primary); transform: scale(1.08); }
.review-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: var(--panel); }
.review-card .stars { color: var(--primary); margin-bottom: 6px; }
.review-card img { max-width: 100%; border-radius: 6px; margin-top: 10px; }

/* announcement banner */
#announcement-banner { background: linear-gradient(90deg, rgba(255,176,32,0.12), rgba(45,212,191,0.08)); border-bottom: 1px solid var(--border); font-size: 13px; }

/* FAQ accordion */
.faq-item { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
.faq-q { padding: 14px 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 500; font-size: 14px; }
.faq-a { padding: 0 16px 16px; color: var(--muted); font-size: 13px; display: none; }
.faq-item.open .faq-a { display: block; }

/* messages */
.msg-bubble { max-width: 75%; padding: 10px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 8px; }
.msg-bubble.from-client { background: var(--panel-2); align-self: flex-start; }
.msg-bubble.from-admin { background: #16324a; align-self: flex-end; margin-left: auto; }
.msg-bubble img { max-width: 200px; border-radius: 6px; margin-top: 6px; display: block; }
.msg-thread { display: flex; flex-direction: column; padding: 12px; max-height: 420px; overflow-y: auto; }
.notif-item { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.notif-item.unread { background: rgba(255,176,32,0.06); }
.badge-dot { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; text-align: center; line-height: 18px; font-family: 'JetBrains Mono'; }

.upload-drop { border: 1px dashed var(--border-2); border-radius: 8px; padding: 16px; text-align: center; font-size: 13px; color: var(--muted); cursor: pointer; }
.upload-drop:hover { border-color: var(--accent); }
.thumb-preview { max-width: 140px; border-radius: 6px; margin-top: 10px; display: block; }


/* layout helpers */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* vehicle picker */
.vehicle-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.vehicle-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 6px; border: 1px solid var(--border-2); font-size: 10px; color: var(--muted); background: transparent; }
.vehicle-opt .emoji { font-size: 18px; }
.vehicle-opt.active { border-color: var(--accent); color: var(--accent); }

/* admin shell */
.admin-shell { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--panel); border-right: 1px solid var(--border); flex-shrink: 0; }
.sidebar .logo-box { height: 64px; display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--border); }
.sidebar nav { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.sidebar nav button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; border: none; background: none; color: var(--muted); font-size: 14px; text-align: left; }
.sidebar nav button.active { background: #182644; color: #fff; }
.sidebar nav button:hover { background: #141F38; }
.main-area { flex: 1; min-width: 0; }
.topbar { height: 64px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; }
.content { padding: 32px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal-box { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; width: 100%; max-width: 640px; max-height: 85vh; overflow-y: auto; padding: 24px; }

.stat-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: var(--panel); }
.stat-card .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 11px; text-transform: uppercase; color: var(--muted); }
.stat-card .value { font-size: 26px; font-weight: 700; font-family: 'Barlow Condensed'; }

.auth-shell { min-height: 100vh; display: flex; flex-direction: column; }
.auth-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-box { width: 100%; max-width: 380px; }
