/* ============================================================
   Prestige AutoBid — shared styles
   Steel-blue scheme
   Primary #2F5379  |  Deep #1E3447  |  Accent #5A93D0  |  modern sans-serif
   ============================================================ */

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

:root {
  --navy:        #2F5379;
  --navy-900:    #1E3447;
  --navy-700:    #26455F;
  --navy-600:    #3A6392;
  --navy-500:    #4B79AC;
  --cyan:        #5A93D0;
  --cyan-600:    #3676B4;
  --cyan-100:    #e9f1fb;
  --ink:         #0c1b33;
  --slate:       #5a6b85;
  --slate-300:   #8a99b2;
  --line:        #e4e9f1;
  --line-2:      #eef2f8;
  --bg:          #f4f7fb;
  --panel:       #ffffff;
  --white:       #ffffff;
  --green:       #10a86b;
  --green-100:   #e3f7ee;
  --amber:       #e8912a;
  --amber-100:   #fdf1df;
  --red:         #dc3b4b;
  --red-100:     #fde6e8;
  --radius:      14px;
  --radius-sm:   9px;
  --shadow:      0 1px 2px rgba(10,30,70,.05), 0 8px 24px rgba(10,30,70,.06);
  --shadow-lg:   0 18px 48px rgba(10,30,70,.16);
  --head:        'Schibsted Grotesk', 'Inter', Helvetica, Arial, sans-serif;
  --body:        'Inter', Helvetica, Arial, sans-serif;
}

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

/* default inline-SVG sizing so icons never balloon */
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-lg svg { width: 18px; height: 18px; }
.stat .lbl svg { width: 15px; height: 15px; flex: none; }
.pill svg { width: 13px; height: 13px; }
.card-head svg, .topbar svg { width: 17px; height: 17px; }
.x svg { width: 18px; height: 18px; }

/* Official VW roundel (pulled from prestigevolkswagen.com), recolored via mask:
   white on the dark app chrome, VW blue on the printed invoice. */
.vwmark { display:inline-block; width:44px; height:30px; flex:none; background:#fff;
  -webkit-mask:url(vw-logo-white.png) center/contain no-repeat;
          mask:url(vw-logo-white.png) center/contain no-repeat;
  -webkit-print-color-adjust:exact; print-color-adjust:exact; }
.vwmark.vw-blue { background: var(--navy); }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--head); color: var(--navy); line-height: 1.15; letter-spacing: -.01em; }
a { color: var(--navy-600); text-decoration: none; }
a:hover { color: var(--cyan-600); }
button { font-family: var(--body); cursor: pointer; }
.muted { color: var(--slate); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 14px; line-height: 1; transition: .15s ease;
  background: var(--navy); color: #fff; white-space: nowrap;
}
.btn:hover { background: var(--navy-600); color:#fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-cyan { background: var(--cyan); color: #fff; }
.btn-cyan:hover { background: var(--cyan-600); color:#fff; }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--line-2); color: var(--navy); box-shadow: none; transform: none; }
.btn-outline { background: transparent; color:#fff; border-color: rgba(255,255,255,.4); }
.btn-outline:hover { background: rgba(255,255,255,.12); color:#fff; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #c22f3e; }
.btn-sm { padding: 8px 13px; font-size: 13px; }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { padding: 9px; }

/* ---------- Public top bar ---------- */
.pub-head { background: var(--navy); color:#fff; position: sticky; top:0; z-index: 40; }
.pub-head-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; height: 70px;
  display:flex; align-items:center; justify-content:space-between; gap: 24px; }
.brand { display:flex; align-items:center; gap: 12px; }
.brand .logo { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg,var(--cyan),#2bd4ff);
  display:grid; place-items:center; color: var(--navy); font-family:var(--head); font-weight:800; font-size:19px; flex:none; }
.brand .bname { font-family: var(--head); font-weight: 800; font-size: 19px; color:#fff; letter-spacing:-.02em; }
.brand .bname span { color: var(--cyan); }
.brand small { display:block; font-size: 11px; color: rgba(255,255,255,.65); font-weight:500; letter-spacing:.02em; margin-top:1px; }
.pub-nav { display:flex; align-items:center; gap: 4px; }
.pub-nav a { color: rgba(255,255,255,.85); font-weight:500; font-size:14px; padding: 9px 13px; border-radius: 8px; }
.pub-nav a:hover { background: rgba(255,255,255,.1); color:#fff; }
.pub-nav a.active { background: rgba(255,255,255,.14); color:#fff; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.grid { display:grid; gap: 20px; }
.cols-2 { grid-template-columns: repeat(2,1fr); }
.cols-3 { grid-template-columns: repeat(3,1fr); }
.cols-4 { grid-template-columns: repeat(4,1fr); }
.stack { display:flex; flex-direction:column; gap: 16px; }
.row { display:flex; align-items:center; gap: 12px; }
.spread { display:flex; align-items:center; justify-content:space-between; gap: 16px; flex-wrap:wrap; }
.flex-1 { flex: 1; }

/* ---------- Cards ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.card-head h3 { font-size: 16px; }
.card-body { padding: 22px; }

/* ---------- Pills / badges ---------- */
.pill { display:inline-flex; align-items:center; gap:6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-live { background: var(--green-100); color: var(--green); }
.pill-soon { background: var(--amber-100); color: var(--amber); }
.pill-closed{ background: var(--line-2); color: var(--slate); }
.pill-cyan { background: var(--cyan-100); color: var(--cyan-600); }
.pill-navy { background: #e7edf8; color: var(--navy-600); }
.dot { width:8px; height:8px; border-radius:50%; background: currentColor; }
.dot-pulse { box-shadow: 0 0 0 0 rgba(16,168,107,.5); animation: pulse 1.8s infinite; }
@keyframes pulse { 70%{ box-shadow:0 0 0 7px rgba(16,168,107,0);} 100%{ box-shadow:0 0 0 0 rgba(16,168,107,0);} }

/* ---------- Tables ---------- */
.tbl { width:100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align:left; font-size: 11.5px; text-transform: uppercase; letter-spacing:.05em; color: var(--slate); font-weight:700;
  padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--line-2); white-space:nowrap; }
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:hover { background: #fafcff; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .num { text-align:right; font-variant-numeric: tabular-nums; }

/* ---------- Forms ---------- */
label.fld { display:block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--body); color: var(--ink); background: #fff; transition: .15s;
}
.input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-100); }
.input::placeholder { color: var(--slate-300); }
.field { margin-bottom: 16px; }
.hint { font-size: 12px; color: var(--slate); margin-top: 6px; }

/* ---------- App shell (dealer + admin) ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { background: var(--navy-900); color:#fff; display:flex; flex-direction:column; position: sticky; top:0; height:100vh; }
.side-brand { padding: 20px 20px 16px; display:flex; align-items:center; gap:11px; border-bottom:1px solid rgba(255,255,255,.08); }
.side-brand .logo { width:36px; height:36px; font-size:17px; }
.side-brand .bname { font-size:17px; }
.side-nav { padding: 14px 12px; flex:1; overflow-y:auto; }
.side-group { font-size:11px; text-transform:uppercase; letter-spacing:.06em; color: rgba(255,255,255,.4); font-weight:700; padding: 14px 12px 7px; }
.side-nav a { display:flex; align-items:center; gap:11px; padding: 10px 12px; border-radius: 9px; color: rgba(255,255,255,.8);
  font-size: 14px; font-weight:500; margin-bottom:2px; }
.side-nav a:hover { background: rgba(255,255,255,.09); color:#fff; }
.side-nav a.active { background: #fff; color: var(--navy); font-weight:600; }
.side-nav a.active svg { color: var(--navy); }
.side-nav svg { width:18px; height:18px; flex:none; opacity:.9; }
.side-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.side-user { display:flex; align-items:center; gap:10px; padding: 8px; border-radius:9px; }
.side-user .av { width:34px; height:34px; border-radius:50%; background: var(--cyan); color: var(--navy); display:grid; place-items:center; font-weight:700; font-size:14px; flex:none; }
.side-user .nm { font-size:13px; font-weight:600; color:#fff; }
.side-user .rl { font-size:11px; color: rgba(255,255,255,.55); }

.main { display:flex; flex-direction:column; min-width:0; }
.topbar { height: 66px; background:#fff; border-bottom:1px solid var(--line); display:flex; align-items:center;
  justify-content:space-between; padding: 0 28px; position: sticky; top:0; z-index:30; }
.topbar h1 { font-size: 19px; }
.topbar .crumb { font-size:12px; color:var(--slate); font-weight:500; margin-bottom:2px; }
.content { padding: 28px; flex:1; }

.page-head { margin-bottom: 22px; }
.page-head h2 { font-size: 23px; margin-bottom:4px; }
.page-head p { color: var(--slate); font-size:14px; }

/* ---------- Stat tiles ---------- */
.stat { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat .lbl { font-size:12.5px; color:var(--slate); font-weight:600; display:flex; align-items:center; gap:8px; }
.stat .val { font-family:var(--head); font-size:28px; font-weight:800; color:var(--navy); margin-top:8px; letter-spacing:-.02em; }
.stat .sub { font-size:12px; margin-top:4px; font-weight:600; }
.stat .ic { width:30px; height:30px; border-radius:8px; display:grid; place-items:center; margin-left:auto; }
.up { color: var(--green); } .down { color: var(--red); }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset:0; background: rgba(6,16,38,.55); backdrop-filter: blur(3px);
  display:none; align-items:center; justify-content:center; z-index: 100; padding: 24px; }
.modal-back.open { display:flex; animation: fade .18s ease; }
.modal { background:#fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px;
  max-height: 90vh; overflow:auto; animation: pop .2s ease; }
.modal.wide { max-width: 760px; }
.modal-head { padding: 20px 24px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; }
.modal-head h3 { font-size:18px; }
.modal-body { padding: 24px; }
.modal-foot { padding: 16px 24px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px; }
.x { background:none; border:none; font-size:22px; color:var(--slate); line-height:1; padding:4px; border-radius:6px; }
.x:hover { background: var(--line-2); color:var(--ink); }
@keyframes fade { from{opacity:0} to{opacity:1} }
@keyframes pop { from{opacity:0; transform: translateY(8px) scale(.98)} to{opacity:1; transform:none} }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 200; display:flex; flex-direction:column; gap:10px; }
.toast { background: var(--navy); color:#fff; padding: 13px 18px; border-radius: 11px; box-shadow: var(--shadow-lg);
  font-size:14px; font-weight:500; display:flex; align-items:center; gap:10px; animation: slidein .25s ease; max-width: 360px; }
.toast .tdot { width:8px;height:8px;border-radius:50%; background: var(--cyan); flex:none; }
.toast.ok .tdot { background: var(--green); }
.toast.warn .tdot { background: var(--amber); }
@keyframes slidein { from{opacity:0; transform: translateX(20px)} to{opacity:1; transform:none} }

/* ---------- Misc ---------- */
.divider { height:1px; background: var(--line); margin: 0; border:none; }
.tag { font-size:12px; font-weight:600; padding:3px 8px; border-radius:6px; background: var(--line-2); color: var(--slate); }
.kv { display:flex; justify-content:space-between; padding: 9px 0; border-bottom:1px solid var(--line-2); font-size:14px; }
.kv:last-child { border-bottom:none; }
.kv .k { color: var(--slate); }
.kv .v { font-weight:600; }
.price { font-family:var(--head); font-weight:800; color:var(--navy); font-variant-numeric: tabular-nums; }
.empty { text-align:center; padding: 48px 20px; color: var(--slate); }

/* ---------- Photos: listing covers, galleries, guided shot tiles ---------- */
.vcover { position:relative; overflow:hidden; background:linear-gradient(135deg,#e9eff8,#dce6f2); }
.vcover img { width:100%; height:100%; object-fit:cover; display:block; }
.vcover .nophoto { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:6px; color:#8ea3bd; font-size:12px; font-weight:600; }
.vcover .nophoto svg { width:30px; height:30px; }
.vcount { position:absolute; right:10px; bottom:10px; display:inline-flex; align-items:center; gap:5px; background:rgba(15,28,45,.72);
  color:#fff; font-size:12px; font-weight:700; padding:4px 9px; border-radius:999px; backdrop-filter:blur(4px); }
.vcount svg { width:14px; height:14px; }
.vbadges { position:absolute; top:12px; left:12px; right:12px; display:flex; justify-content:space-between; gap:8px; z-index:2; }
.gallery { display:flex; gap:10px; overflow-x:auto; scroll-snap-type:x mandatory; margin:0 0 18px; padding-bottom:6px;
  -webkit-overflow-scrolling:touch; }
.gallery figure { flex:none; width:82%; max-width:420px; scroll-snap-align:start; position:relative; margin:0; }
.gallery img { width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:12px; display:block; }
.gallery figcaption { position:absolute; left:8px; bottom:8px; background:rgba(15,28,45,.72); color:#fff; font-size:11px;
  font-weight:600; padding:3px 8px; border-radius:6px; }

.shots { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px,1fr)); gap:12px; }
.shot { position:relative; aspect-ratio:4/3; border-radius:14px; overflow:hidden; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:7px; cursor:pointer; -webkit-tap-highlight-color:transparent;
  transition: transform .12s ease, border-color .15s; }
.shot input { display:none; }
.shot.empty { border:2px dashed #b9c8da; background:#f5f8fc; color:var(--slate); font-size:12.5px; font-weight:600; text-align:center; padding:6px; }
.shot.empty svg { width:28px; height:28px; color:var(--navy); }
.shot.empty:hover { border-color:var(--cyan); background:var(--cyan-100); }
.shot.empty:active { transform:scale(.96); }
.shot.extra { border-style:dashed; background:#fff; }
.shot.filled { animation: pop .3s ease; box-shadow: var(--shadow); }
.shot.filled img { width:100%; height:100%; object-fit:cover; }
.shot-tag { position:absolute; left:7px; bottom:7px; background:rgba(15,28,45,.74); color:#fff; font-size:11px; font-weight:600;
  padding:3px 8px; border-radius:6px; }
.shot-x { position:absolute; top:7px; right:7px; width:28px; height:28px; border-radius:50%; border:none; background:rgba(15,28,45,.72);
  color:#fff; font-size:18px; line-height:1; display:grid; place-items:center; }
.busy { opacity:.55; pointer-events:none; }
.progress { height:8px; border-radius:99px; background:var(--line-2); overflow:hidden; }
.progress > span { display:block; height:100%; background:linear-gradient(90deg,var(--cyan),var(--green)); border-radius:99px; transition:width .35s ease; }

/* ---------- Import dropzone ---------- */
.dropzone { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; text-align:center;
  border:2px dashed #b9c8da; background:#f5f8fc; border-radius:14px; padding:30px 18px; cursor:pointer; transition:.15s; }
.dropzone:hover { border-color:var(--cyan); background:var(--cyan-100); }
.dropzone input { display:none; }
.dropzone .dz-ic { width:46px; height:46px; border-radius:12px; background:var(--navy); color:#fff; display:grid; place-items:center; margin-bottom:4px; }
.dropzone .dz-ic svg { width:24px; height:24px; }

select.input { max-width:100%; min-width:0; text-overflow:ellipsis; }
.tag svg, .pill svg { width:13px; height:13px; vertical-align:-2px; flex:none; }

/* filter bar: search + select */
.filterbar { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.filterbar .fsearch { position:relative; flex:1 1 260px; max-width:440px; }
.filterbar select.input { width:auto; flex:0 0 auto; }

/* hero stats */
.hero-stats { display:flex; gap:28px; margin-top:34px; flex-wrap:wrap; }
.hero-stats b { display:block; font-family:var(--head); font-size:26px; font-weight:800; }
.hero-stats span { font-size:13px; color:rgba(255,255,255,.6); }
h1, h2 { text-wrap: balance; }

/* search-field icons */
span[style*="position:absolute"] > svg { width:18px; height:18px; display:block; }

/* ---------- Print (list pages) ---------- */
@media print {
  .side, .topbar, .tabbar, .side-backdrop, .toast-wrap, .modal-back, .page-head .row, .btn { display:none !important; }
  .app { display:block; }
  .content { padding:0; }
  .card, .stat { box-shadow:none; }
  body { background:#fff; }
}

/* ---------- App tab bar + mobile top bar ---------- */
.tabbar { display:none; }
.top-logo { display:none; }

/* ---------- Login split ---------- */
.login-split { display:grid; grid-template-columns:1.05fr .95fr; }
.login-mini { display:none; align-items:center; gap:11px; }
@media (max-width: 820px){
  .login-split { grid-template-columns:1fr; }
  .login-aside { display:none !important; }
  .login-mini { display:flex; }
}

/* ---------- Card auto-grid (vehicles, feature cards) ---------- */
.card-grid { display:grid; gap:20px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* ---------- Mobile nav plumbing ---------- */
.menu-btn { display:none; }
.side-backdrop { display:none; position:fixed; inset:0; background:rgba(12,24,48,.5); backdrop-filter:blur(2px); z-index:55; }
.side-backdrop.show { display:block; animation:fade .2s ease; }
.pub-burger { display:none; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.18); color:#fff;
  width:42px; height:42px; border-radius:10px; align-items:center; justify-content:center; }
.pub-burger svg { width:22px; height:22px; }

/* ===================== Tablet ===================== */
@media (max-width: 920px){
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left:-280px; top:0; width:272px; z-index:60; transition: left .26s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .side.open { left:0; }
  .menu-btn { display:inline-flex !important; }
  .cols-4 { grid-template-columns: repeat(2,1fr); }
  .cols-3 { grid-template-columns: 1fr; }
  .cols-2 { grid-template-columns: 1fr; }
  /* any inline 2-col dashboard split collapses */
  .content .grid[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .cols-3 > [style*="grid-column"], .cols-2 > [style*="grid-column"] { grid-column: 1 / -1 !important; }
}

/* ===================== Phone ===================== */
@media (max-width: 680px){
  .wrap { padding: 0 16px; }
  .content { padding: 16px; }
  .topbar { height:60px; padding: 0 16px; }
  .topbar h1 { font-size:17px; max-width:48vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .topbar .crumb { display:none; }
  .page-head h2 { font-size:21px; }

  /* stat tiles: 2-up, tighter */
  .stat { padding:15px 16px; }
  .stat .val { font-size:24px; }

  /* desktop top nav hidden, burger shown */
  .pub-nav { display:none; position:absolute; top:70px; left:0; right:0; flex-direction:column; align-items:stretch;
    background: var(--navy-900); padding:10px 14px 16px; gap:4px; box-shadow: var(--shadow-lg); z-index:39; }
  .pub-nav.open { display:flex; animation: fade .2s ease; }
  .pub-nav a { padding:13px 14px; font-size:15px; border-radius:10px; }
  .pub-nav a.btn-cyan, .pub-nav a.btn-outline { margin:4px 0 0; justify-content:center; }
  .pub-burger { display:inline-flex; }

  /* iOS: 16px inputs prevent focus-zoom; bigger tap targets */
  .input, select.input, textarea.input { font-size:16px; padding:13px 14px; }
  .btn { padding:12px 18px; }
  .btn-sm { padding:10px 14px; font-size:13px; }

  /* ---- tables reflow into labeled cards ---- */
  table.tbl { display:block; }
  table.tbl thead { display:none; }
  table.tbl tbody, table.tbl tr, table.tbl td { display:block; width:100%; }
  table.tbl tr { background:#fff; border:1px solid var(--line); border-radius:14px; margin-bottom:12px;
    box-shadow:var(--shadow); overflow:hidden; }
  table.tbl td { display:flex; justify-content:space-between; align-items:center; gap:14px;
    padding:11px 16px; border:none; border-bottom:1px solid var(--line-2); text-align:right; min-height:46px; }
  table.tbl td:last-child { border-bottom:none; }
  table.tbl td::before { content:attr(data-label); font-size:11px; font-weight:700; text-transform:uppercase;
    letter-spacing:.04em; color:var(--slate); text-align:left; flex:none; }
  table.tbl td:first-child { display:block; text-align:left; background:var(--line-2);
    font-size:15px; font-weight:700; padding:13px 16px; }
  table.tbl td:first-child::before { display:none; }
  table.tbl td .cv { display:block; text-align:right; min-width:0; }
  table.tbl td:first-child .cv { text-align:left; }
  table.tbl td .cv .btn + .btn, table.tbl td .cv .btn + a.btn, table.tbl td .cv a.btn + .btn { margin-left:6px; }
  .page-head h2.dup-title { display:none; }
  .page-head h2.dup-title + p { margin-top:0; }
  table.tbl td.num { font-variant-numeric: tabular-nums; }
  table.tbl td:empty { display:none; }

  /* modals become bottom sheets */
  .modal-back { padding:0; align-items:flex-end; }
  .modal, .modal.wide { max-width:100%; width:100%; max-height:92vh; border-radius:20px 20px 0 0;
    animation: sheetup .26s cubic-bezier(.4,0,.2,1); }
  .modal-foot { position:sticky; bottom:0; background:#fff; }
  .modal-foot .btn { flex:1; }

  /* toasts span width at bottom */
  .toast-wrap { left:12px; right:12px; bottom:12px; }
  .toast { max-width:none; }

  /* card heads that hold a search/control wrap */
  .card-head { flex-wrap:wrap; }

  /* ---- dark, app-like top bar with the white VW logo ---- */
  .topbar { background: var(--navy-900); border-bottom:none; padding-top: env(safe-area-inset-top); height: calc(60px + env(safe-area-inset-top)); }
  .topbar h1 { color:#fff; }
  .topbar .pill { display:none; }
  .topbar .btn-ghost { background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.16); color:#fff; }
  .topbar .row { gap:10px; }
  .top-logo { display:inline-block; width:34px; height:23px; }

  /* ---- bottom tab bar ---- */
  .tabbar { display:grid; grid-template-columns:repeat(5,1fr); position:fixed; left:0; right:0; bottom:0; z-index:50;
    background:rgba(255,255,255,.96); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
    border-top:1px solid var(--line); padding:6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:3px; font-size:10.5px;
    font-weight:600; color:var(--slate-300); padding:5px 0 3px; -webkit-tap-highlight-color:transparent; }
  .tabbar a svg { width:23px; height:23px; }
  .tabbar a.active { color:var(--navy); }
  .tabbar a.cam { color:var(--navy); }
  .tabbar .cam-btn { width:56px; height:56px; border-radius:50%; background:linear-gradient(145deg,var(--navy-600),var(--navy-900));
    color:#fff; display:grid; place-items:center; margin-top:-28px; border:4px solid #fff; box-shadow:0 8px 22px rgba(30,52,71,.38); }
  .tabbar .cam-btn svg { width:25px; height:25px; }
  .has-shell .content { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .has-shell .toast-wrap { bottom: calc(88px + env(safe-area-inset-bottom)); }

  /* stat tiles 2-up: tighter type so labels fit */
  .stat .lbl { font-size:12px; gap:6px; }
  .stat .sub { font-size:11.5px; }
  .filterbar .fsearch { flex-basis:100%; max-width:none; }
  .filterbar select.input { flex:1 1 100%; width:100%; }
  .hero-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:28px; }
  .hero-stats b { font-size:23px; }
  .hero-stats span { font-size:12px; line-height:1.3; display:block; }
  .page-head.spread > .row, .page-head.spread > a.btn, .page-head.spread > .btn { width:100%; }
  .page-head.spread > .row { display:grid; grid-template-columns:repeat(auto-fit, minmax(130px,1fr)); }

  /* shot tiles: 2-up on phones, big thumb targets */
  .shots { grid-template-columns:repeat(2,1fr); gap:10px; }
  .gallery figure { width:88%; }
}

@keyframes sheetup { from{ transform: translateY(100%);} to{ transform:none; } }

@media (max-width: 340px){
  .cols-4 { grid-template-columns: 1fr; }
  .brand .bname, .side-brand .bname { font-size:16px; }
}
