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

/* Brand palette taken from the ASH Luxury Ride logo: deep navy, steel blue, brushed silver.
   (--gold is the accent token; the name is kept for compatibility, its value follows the brand accent.) */
:root {
  --gold: #3A8DDB;
  --gold-strong: color-mix(in srgb, var(--gold) 78%, #0b1430);
  --gold-soft: color-mix(in srgb, var(--gold) 14%, transparent);
  --on-accent: #FFFFFF;
  --navy: #1B2340;
  --navy-deep: #121830;
  --silver: #D9DDE4;
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --surface-2: #F7F9FC;
  --border: #DFE4EC;
  --text: #141A2C;
  --muted: #646C7E;
  --side-bg: #141B33;
  --side-text: #C9CFDA;
  --side-muted: #7C869B;
  --side-active: #1F2847;
  --danger: #C2412D;
  --success: #2F8F5B;
  --info: #3B6FB6;
  --shadow: 0 1px 2px rgba(15, 22, 45, .05), 0 6px 20px rgba(15, 22, 45, .06);
  --radius: 14px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1326; --surface: #161D35; --surface-2: #1B2340; --border: #29324F;
    --text: #EEF1F6; --muted: #9AA3B8; --side-bg: #0A0F20; --side-active: #1A2240;
    --gold-soft: color-mix(in srgb, var(--gold) 18%, transparent); color-scheme: dark;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  --bg: #0E1326; --surface: #161D35; --surface-2: #1B2340; --border: #29324F;
  --text: #EEF1F6; --muted: #9AA3B8; --side-bg: #0A0F20; --side-active: #1A2240;
  --gold-soft: color-mix(in srgb, var(--gold) 18%, transparent); color-scheme: dark;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--gold-strong); }
h1, h2, h3 { margin: 0; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px; }
.brand { display: block; padding: 0 2px 14px; text-decoration: none; }
/* The logo artwork sits in the middle band of a square navy image: a wide crop shows it large. */
.brand-logo { display: block; width: 100%; aspect-ratio: 1.75; object-fit: cover; object-position: center 49%; border-radius: 12px; background: var(--navy); }
/* On navy pages, fade the logo's square edges into the background. */
.brand-logo.blend { border-radius: 0; -webkit-mask-image: radial-gradient(ellipse 50% 50% at center, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at center, #000 62%, transparent 100%); }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--gold); display: grid; place-items: center; color: var(--gold); font-family: var(--serif); font-weight: 700; font-size: 18px; letter-spacing: .5px; overflow: hidden; flex: none; background: var(--navy); }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-family: var(--serif); font-size: 21px; font-weight: 600; color: #EEF1F6; line-height: 1.05; }
.brand-name small { display: block; font-family: var(--font); font-size: 10px; letter-spacing: 2.4px; color: var(--gold); text-transform: uppercase; font-weight: 500; margin-top: 3px; }
.nav-group { font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--side-muted); margin: 18px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border-radius: 9px; background: none; border: 0; color: var(--side-text); cursor: pointer; text-align: left; text-decoration: none; font-size: 14px; }
.nav-item:hover { background: var(--side-active); color: #fff; }
.nav-item.active { background: var(--side-active); color: #fff; box-shadow: inset 2px 0 0 var(--gold); }
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav-item .badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; padding: 16px 10px 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.lang-switch { display: inline-flex; border: 1px solid #2B3558; border-radius: 8px; overflow: hidden; }
.lang-switch button { background: none; border: 0; color: var(--side-muted); padding: 4px 9px; cursor: pointer; font-size: 12px; font-weight: 600; }
.lang-switch button.on { background: var(--gold); color: var(--on-accent); }
.status-dot { display: inline-flex; align-items: center; gap: 7px; color: var(--side-muted); }
.status-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #3fbf7f; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); padding: 14px 28px; display: flex; align-items: center; gap: 14px; }
.topbar .eyebrow { font-size: 10.5px; letter-spacing: 1.8px; color: var(--muted); text-transform: uppercase; }
.topbar h1 { font-size: 20px; }
.btn.menu-btn { display: none; }
[hidden] { display: none !important; }
.content { padding: 24px 28px 60px; max-width: 1120px; width: 100%; }

/* ---------- components ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card, .stack > * + * { margin-top: 16px; }
.card h2 { font-size: 16px; }
.card .hint, .hint { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); padding: 9px 15px; cursor: pointer; font-weight: 500; text-decoration: none; color: var(--text); white-space: nowrap; }
.btn:hover { border-color: var(--gold); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--on-accent); font-weight: 600; }
.btn-primary:hover { background: var(--gold-strong); border-color: var(--gold-strong); }
.btn-dark { background: var(--navy); color: #EEF1F6; border-color: var(--navy); }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-ghost { background: none; border-color: transparent; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.badge.gold { background: var(--gold-soft); color: var(--gold-strong); border-color: transparent; }
.badge.requested { background: rgba(214,152,40,.15); color: #A2670F; border-color: transparent; }
.badge.upcoming { background: rgba(59,111,182,.12); color: var(--info); border-color: transparent; }
.badge.active { background: rgba(47,143,91,.13); color: var(--success); border-color: transparent; }
.badge.completed { background: var(--surface-2); color: var(--muted); }
.badge.cancelled { background: rgba(194,65,45,.1); color: var(--danger); border-color: transparent; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; }
.field label .opt { color: var(--muted); font-weight: 400; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 9px 12px; outline: none; }
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::before { transform: translateX(18px); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row strong { display: block; font-weight: 600; }

.tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 4px; overflow-x: auto; }
.tab { flex: 1; border: 0; background: none; padding: 8px 12px; border-radius: 9px; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.tab.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tab .count { font-size: 11.5px; color: var(--gold-strong); font-weight: 600; }

.stat { display: flex; gap: 12px; align-items: center; }
.stat-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--gold-soft); color: var(--gold-strong); display: grid; place-items: center; flex: none; }
.stat-icon svg { width: 19px; height: 19px; }
.stat .label { color: var(--muted); font-size: 12.5px; }
.stat .value { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }

.hero { background: radial-gradient(700px 260px at 20% 50%, #26305A 0%, var(--navy) 55%, var(--navy-deep) 100%); color: #EEF1F6; border-color: #27305A; padding: 0; overflow: hidden; }
.hero-body { padding: 18px 22px; display: flex; gap: 18px; align-items: center; }
.hero .brand-logo { width: 170px; flex: none; border-radius: 10px; }
.hero h2 { font-family: var(--serif); font-size: 28px; font-weight: 600; }
.hero .muted { color: #A9B2C6; }
.hero-foot { border-top: 1px solid #28315A; padding: 12px 22px; display: flex; justify-content: space-between; color: #8EC1F0; font-size: 13px; }
@media (max-width: 600px) { .hero-body { flex-wrap: wrap; } .hero .brand-logo { width: 140px; } }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty svg { width: 42px; height: 42px; color: var(--border); margin-bottom: 8px; }
.empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.trip-card { padding: 16px 18px; }
.trip-route { display: grid; grid-template-columns: 14px 1fr; gap: 2px 10px; margin: 10px 0; }
.trip-route .dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--gold); margin-top: 6px; }
.trip-route .dot.end { background: var(--gold); }
.trip-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.price { font-size: 19px; font-weight: 700; }
.trip-meta svg, .hero-foot svg, .card h2 svg, .book-hero .small svg, .settings-list > a > svg { width: 15px; height: 15px; vertical-align: -2px; }
.card h2 svg { color: var(--gold); }
.empty svg { display: block; margin: 0 auto 8px; }
.empty p { margin: 6px 0 0; }

table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.settings-list .list-item { cursor: pointer; padding: 14px 4px; }
.settings-list .list-item:hover { background: var(--surface-2); }
.section-label { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin: 20px 0 6px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; }

.quote-lines { font-size: 13px; }
.quote-lines div { display: flex; justify-content: space-between; padding: 3px 0; color: var(--muted); }
.quote-lines div.total { color: var(--text); font-weight: 700; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; font-size: 15px; }

.places { position: relative; }
.places-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 22, 45, .18); max-height: 280px; overflow-y: auto; }
.places-list li { padding: 8px 10px; border-radius: 8px; cursor: pointer; line-height: 1.3; }
.places-list li strong { display: block; font-weight: 600; font-size: 13.5px; }
.places-list li span { display: block; color: var(--muted); font-size: 12.5px; }
.places-list li:hover, .places-list li.on { background: var(--gold-soft); }

.copy-box { display: flex; gap: 8px; }
.copy-box .input { font-family: ui-monospace, monospace; font-size: 12.5px; }

/* ---------- modal & toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 8, 10, .55); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); border: 1px solid var(--border); }
.modal-head { padding: 18px 22px 10px; display: flex; justify-content: space-between; gap: 12px; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 8px 22px 18px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #EEF1F6; padding: 10px 18px; border-radius: 10px; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 13.5px; animation: fade .2s; border-left: 3px solid var(--gold); }
.toast.error { border-left-color: var(--danger); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .layout.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
  .btn.menu-btn { display: inline-flex; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .content { padding: 16px 16px 60px; }
  .topbar { padding: 12px 16px; }
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .hero h2 { font-size: 23px; }
  .tab { padding: 8px 9px; font-size: 13px; }
}

@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; padding: 0; }
  body { background: #fff; color: #000; }
}
