/* =====================================================================
   CarBay Console — dark "command centre" UI.
   Deliberately not the default light-card admin look: deep canvas, glass
   panels with gradient hairlines, monospace data type, neon accents and
   restrained motion. Same class API as before so every view keeps working.
   ===================================================================== */

/* ---------------------------------------------------------------------
   Palette: restrained monochrome.
   Premium software reads as expensive because of restraint, not colour.
   So: a neutral grey scale does the structural work, hierarchy comes from
   type weight, spacing and 1px borders, and colour appears only where it
   carries meaning — the active nav item, the primary action, and status.
   No glows, no gradient fills, no coloured shadows.
   --------------------------------------------------------------------- */
:root {
  /* surfaces — neutral, slightly warm greys */
  --bg: #101113;
  --bg-2: #141517;
  --panel: #17181b;
  --panel-solid: #1b1c20;
  --raise: #202226;
  --hair: #26282d;
  --hair-strong: #34373d;

  /* text scale */
  --ink: #ededef;
  --ink-soft: #a8abb3;
  --muted: #71757e;

  /* one accent, used sparingly */
  --brand: #c9cdd4;          /* near-white: primary actions, active state */
  --brand-dark: #ffffff;
  --brand-soft: rgba(255, 255, 255, .06);
  --accent: #8f949c;

  /* status colours — muted, meaning-carrying only */
  --ok: #6ec49b;
  --ok-soft: rgba(110, 196, 155, .1);
  --warn: #d9ab63;
  --warn-soft: rgba(217, 171, 99, .1);
  --danger: #d97b74;
  --danger-soft: rgba(217, 123, 116, .1);

  --line: var(--hair);
  --surface: var(--panel-solid);
  --r: 10px;
  --mono: ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --shadow-sm: none;
  --shadow: 0 8px 24px rgba(0, 0, 0, .3);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .45);
  --glow: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: #ffc98a; text-decoration: none; }

h1 { font-size: clamp(21px, 3.2vw, 28px); font-weight: 700; letter-spacing: -.03em; margin: 0 0 6px; }
h2 { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
     color: var(--muted); font-family: var(--mono); margin: 24px 0 12px; }
.muted { color: var(--muted); }
.mb0 { margin-top: 0; }

/* =====================================================================
   APP SHELL — persistent sidebar rail + main column.
   This is the structural difference from a "page with a nav bar": navigation
   is always present, the content column scrolls independently, and the top
   bar is a slim context strip rather than a hero header.
   ===================================================================== */
.app { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; position: relative; z-index: 1; }

/* ---- Rail ---- */
.rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 18px 12px; gap: 6px; border-right: 1px solid var(--hair);
  background: var(--bg-2);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.rail-brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; color: var(--ink); }
.rail-brand:hover { color: var(--ink); }
.rail-mark { width: 11px; height: 11px; border-radius: 3px; transform: rotate(45deg); flex: 0 0 auto;
  background: var(--brand);  }
.rail-word { font-weight: 700; letter-spacing: -.02em; font-size: 16px; }
.rail-word b { color: var(--brand); font-weight: 700; }

.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-nav a {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 9px; color: var(--ink-soft);
  font-size: 13.5px; font-weight: 500; letter-spacing: -.005em;
}
.rail-nav a svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none;
  stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.rail-nav a:hover { background: rgba(255,255,255,.055); color: #fff; }
.rail-nav a.active { color: #fff; background: var(--brand-soft); }
.rail-nav a.active svg { opacity: 1; color: var(--brand); }
.rail-nav a.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px;
  background: var(--brand); 
}

.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--hair); }
.rail-site { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 9px;
  background: rgba(255,255,255,.04); border: 1px solid var(--hair); color: var(--ink-soft);
  font-family: var(--mono); font-size: 11.5px; }
.rail-site:hover { border-color: var(--hair-strong); color: var(--brand); }
.rail-site .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok);  flex: 0 0 auto; }
.rail-site svg { width: 12px; height: 12px; margin-left: auto; fill: none; stroke: currentColor; stroke-width: 1.8; }
.rail-btn { width: 100%; text-align: left; background: none; border: none; color: var(--muted);
  font-family: inherit; font-size: 12.5px; padding: 7px 11px; border-radius: 8px; cursor: pointer; }
.rail-btn:hover { background: rgba(255,255,255,.05); color: var(--ink); }
.rail form { margin: 0; }

/* ---- Slim context bar ---- */
.bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 clamp(16px, 2.6vw, 30px); border-bottom: 1px solid var(--hair);
  background: rgba(13,15,18,.78); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.bar-ctx { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.bar-spacer { flex: 1 1 auto; }
.bar-who { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.rail-toggle { display: none; background: rgba(255,255,255,.05); border: 1px solid var(--hair);
  color: var(--ink); width: 36px; height: 34px; border-radius: 9px; cursor: pointer; align-items: center; justify-content: center; }
.rail-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.app-main { min-width: 0; display: flex; flex-direction: column; }
.pay-banner { position: relative; z-index: 1; padding: 11px clamp(16px,2.6vw,30px); font-size: 13px;
  background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid rgba(255,197,90,.25); }
.pay-banner.is-overdue { background: var(--danger-soft); color: var(--danger); border-color: rgba(242,104,95,.3); }
.pay-banner a { margin-left: 6px; }

/* On narrower screens the rail becomes a horizontal, always-visible tab strip.
   Deliberately NOT a hidden drawer: navigation you can't see is navigation
   people don't find. Icons stay, labels stay, it just scrolls sideways. */
@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; }
  .rail {
    position: sticky; top: 0; z-index: 50; height: auto; width: 100%;
    flex-direction: row; align-items: center; gap: 10px;
    padding: 8px clamp(12px, 3vw, 20px);
    border-right: none; border-bottom: 1px solid var(--hair);
    background: rgba(13,15,18,.92);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    transform: none;
  }
  .rail-brand { padding: 0 6px 0 0; flex: 0 0 auto; }
  .rail-word { display: none; }
  .rail-nav {
    flex-direction: row; gap: 4px; overflow-x: auto; flex: 1 1 auto;
    scrollbar-width: none; -ms-overflow-style: none;
    scroll-snap-type: x proximity; padding-bottom: 2px;
  }
  .rail-nav::-webkit-scrollbar { display: none; }
  .rail-nav a { flex: 0 0 auto; padding: 8px 12px; scroll-snap-align: center; white-space: nowrap; }
  .rail-nav a.active::before { left: 10px; right: 10px; top: auto; bottom: 0; width: auto; height: 2px; }
  .rail-foot { margin: 0; padding: 0; border: none; flex: 0 0 auto; flex-direction: row; gap: 6px; }
  .rail-foot .rail-site span:not(.dot) { display: none; }
  .rail-btn { width: auto; white-space: nowrap; font-size: 12px; }
  .rail-toggle { display: none; }   /* nothing to toggle — nav is always visible */
  .bar { display: none; }           /* the strip already shows context */
}
@media (max-width: 560px) {
  .rail-nav a span { display: none; }  /* icons only on very small screens */
  .rail-nav a { padding: 9px 11px; }
  .rail-nav a svg { width: 19px; height: 19px; }
}

/* ---------- Layout ---------- */
.container { position: relative; z-index: 1; width: 100%; max-width: 1180px;
  padding: clamp(20px, 2.6vw, 32px) clamp(16px, 2.6vw, 30px) 72px; }
.container.narrow { max-width: 560px; }

/* ---------- Panels ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--hair); border-radius: var(--r);
  padding: clamp(16px, 2.2vw, 22px); margin-bottom: 16px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card::before { /* top gradient hairline */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; border-radius: var(--r) var(--r) 0 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
}
.card:hover { border-color: var(--hair-strong); }
a.card.hub:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--hair-strong); }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* ---------- Metric tiles ---------- */
.stat { text-align: left; overflow: hidden; }
.stat .num {
  font-family: var(--mono); font-size: clamp(23px, 3.4vw, 30px); font-weight: 600;
  letter-spacing: -.02em; line-height: 1.1; color: #fff;
}
.stat .label {
  color: var(--muted); font-size: 10.5px; font-weight: 600; margin-top: 4px;
  font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase;
}

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: 11.5px; margin: 16px 0 7px;
  color: var(--muted); font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; }
label.q-remember, .rev-display label, .mode .t, .mode .d { font-family: inherit; text-transform: none; letter-spacing: normal; }
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=url], input[type=date], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--hair); border-radius: 10px;
  font-size: 14.5px; font-family: inherit; background: rgba(255,255,255,.04); color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #7a7268; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--hair-strong); background: var(--raise);
  box-shadow: 0 0 0 3px rgba(255,255,255,.07);
}
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
input[type=color] { width: 54px; height: 40px; padding: 3px; background: rgba(255,255,255,.05); border: 1px solid var(--hair); border-radius: 10px; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); }
select { appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%238b8378' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
option { background: var(--panel-solid); color: var(--ink); }
details summary { color: var(--brand); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  cursor: pointer; font-size: 14px; font-weight: 600; font-family: inherit;
  padding: 10px 17px; border-radius: 10px; min-height: 42px; text-decoration: none;
  color: #16171a; border: 1px solid transparent;
  background: var(--brand);
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--brand-dark); color: #101113; }
.btn:active { transform: none; }
.btn.secondary {
  background: rgba(255,255,255,.05); color: var(--ink); border-color: var(--hair); box-shadow: none;
}
.btn.secondary:hover { background: rgba(255,255,255,.1); border-color: var(--hair-strong); color: #fff; filter: none; }
.btn.danger { background: linear-gradient(135deg, #ff6b7a, #ff9166); color: #2a0508;
  box-shadow: 0 6px 22px rgba(242,104,95,.24); }
.btn.small { padding: 6px 12px; font-size: 12.5px; min-height: 34px; border-radius: 8px; }
.btn.lg { padding: 13px 24px; font-size: 15px; min-height: 48px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--hair); font-size: 13.5px; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 10.5px; text-transform: uppercase;
     letter-spacing: .14em; font-family: var(--mono); background: rgba(255,255,255,.025); }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--raise); }
tfoot th { background: transparent; font-size: 12.5px; text-transform: none; color: var(--ink); font-family: inherit; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 10.5px;
  font-weight: 700; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.badge.green { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(70,201,160,.28); }
.badge.red { background: var(--danger-soft); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(242,104,95,.28); }
.badge.gray { background: rgba(255,255,255,.06); color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--hair); }

/* ---------- Alerts ---------- */
.alert { padding: 13px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.alert.success { background: var(--ok-soft); color: #9de8cd; border-color: rgba(70,201,160,.3); }
.alert.error { background: var(--danger-soft); color: #ffb5ae; border-color: rgba(242,104,95,.3); }
.alert.info { background: var(--brand-soft); color: #ffd9a3; border-color: var(--hair); }

/* ---------- Credentials ---------- */
.creds {
  background: #0c0d0f; color: var(--ink);
  padding: 18px; border-radius: 10px; font-family: var(--mono); font-size: 13px; line-height: 1.9;
  overflow-x: auto; border: 1px solid var(--hair);
}
.creds strong { color: #fff; }

/* ---------- Helpers ---------- */
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline { display: inline; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px;
  flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--hair); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft);
  color: var(--brand); border-radius: 999px; padding: 4px 11px; font-size: 11.5px; font-weight: 600;
  font-family: var(--mono); letter-spacing: .05em; box-shadow: inset 0 0 0 1px var(--hair); }
.pay-banner { position: relative; z-index: 1; padding: 12px clamp(14px,3vw,28px); font-size: 13.5px;
  text-align: center; border-bottom: 1px solid var(--hair); }

/* ---------- Wireframe thumbnails ---------- */
.wf { border-radius: 10px; overflow: hidden; height: 168px; display: flex; flex-direction: column; border: 1px solid var(--hair); }
.wf-nav { height: 22px; display: flex; align-items: center; padding: 0 8px; border-bottom: 1px solid; }
.wf-logo { width: 26px; height: 8px; border-radius: 3px; display: block; }
.wf-links { display: flex; gap: 4px; }
.wf-links i { width: 10px; height: 5px; border-radius: 2px; display: block; }
.wf-hero { flex: 1; padding: 10px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.wf-h1 { display: block; width: 58%; height: 9px; border-radius: 3px; }
.wf-h2 { display: block; width: 38%; height: 6px; border-radius: 3px; }
.wf-search { display: block; width: 82%; height: 12px; border-radius: 3px; margin-top: 8px; }
.wf-shot { position: absolute; right: 8px; top: 12px; bottom: 12px; width: 36%; border-radius: 5px; }
.wf-cars { padding: 8px; }
.wf-grid { display: grid; gap: 5px; }
.wf-grid span { height: 26px; border-radius: 4px; display: block; }
.wf-row { display: flex; align-items: center; gap: 6px; height: 20px; border: 1px solid; border-radius: 4px; margin-bottom: 5px; padding: 0 5px; }
.wf-row b { width: 34px; height: 14px; border-radius: 3px; display: block; }

/* =====================  RESPONSIVE  ===================== */
/* rail scrim on mobile */
.rail-scrim { position: fixed; inset: 0; background: rgba(8,9,11,.6); z-index: 65;
  opacity: 0; pointer-events: none; transition: opacity .26s; }
.rail-scrim.show { opacity: 1; pointer-events: auto; }
@media (max-width: 640px) {
  .card { border-radius: 12px; }
  .grid.cols-2, .grid.cols-3, .grid[style] { grid-template-columns: 1fr !important; }
  .page-head { align-items: flex-start; }
  .page-head .btn { width: 100%; }
  .row-actions { width: 100%; }
  .row-actions .btn { flex: 1 1 auto; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .btn, a.card.hub, tbody tr { transition: none !important; }
}


/* =====================================================================
   COMPONENTS — Google connect, auto-reply studio, audits, reply queue,
   uploads. All restyled for the dark console.
   ===================================================================== */

/* ---- Google Business Profile connect ---- */
.gconnect { text-align: center; padding: clamp(26px,5vw,48px) clamp(18px,4vw,40px);
  background: var(--panel);
  border: 1px solid var(--hair); border-radius: 18px; box-shadow: var(--shadow); }
.gconnect .glogo { font-family: Arial, sans-serif; font-weight: 700; font-size: 28px; letter-spacing: -1px; margin-bottom: 10px; }
.gconnect h2 { margin: 0 0 8px; font-size: clamp(18px,3vw,23px); font-family: inherit;
  text-transform: none; letter-spacing: -.02em; color: var(--ink); }
.gconnect p.lead { color: var(--muted); max-width: 52ch; margin: 0 auto 22px; }
.gbtn { display: inline-flex; align-items: center; gap: 12px; background: #fff; color: #3c4043;
  border: 1px solid #dadce0; border-radius: 10px; padding: 0 20px 0 4px; min-height: 50px;
  font-weight: 600; font-size: 15px; cursor: pointer; font-family: inherit;
  box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.gbtn:hover { background: #f4f6f8; color: #3c4043; }
.gbtn .gmark { width: 42px; height: 42px; background: #fff; border-radius: 8px; display: grid; place-items: center;
  font-family: Arial, sans-serif; font-weight: 700; font-size: 20px; color: #4285F4; }
.gperms { display: grid; gap: 8px; max-width: 420px; margin: 22px auto 0; text-align: left; }
.gperms div { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-soft); }
.gperms div::before { content: "✓"; color: var(--ok); font-weight: 800; }

/* ---- Connected status strip ---- */
.gstatus { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--hair); border-radius: 14px; margin-bottom: 16px; }
.gstatus .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 4px rgba(70,201,160,.16); flex: 0 0 auto; }
.gstatus .loc { font-weight: 650; }
.gstatus .spacer { flex: 1 1 auto; }

/* ---- Rating summary ---- */
.grating { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.grating .big { font-family: var(--mono); font-size: 40px; font-weight: 600; letter-spacing: -.03em;
  line-height: 1; color: #fff; }
.grating .stars { color: #ffc55a; font-size: 18px; letter-spacing: 2px; }

/* ---- Auto-reply mode cards ---- */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 12px; }
.mode { position: relative; border: 1px solid var(--hair); border-radius: 13px; padding: 15px 15px 15px 42px;
  cursor: pointer; background: rgba(255,255,255,.03); transition: border-color .15s, background .15s, box-shadow .2s; }
.mode:hover { border-color: var(--hair-strong); }
.mode input { position: absolute; left: 15px; top: 17px; margin: 0; }
.mode .t { font-weight: 650; font-size: 14.5px; display: block; color: var(--ink); }
.mode .d { color: var(--muted); font-size: 12.5px; display: block; margin-top: 2px; }
.mode:has(input:checked) { border-color: var(--hair-strong); background: var(--brand-soft); box-shadow: var(--glow); }

/* ---- Template variable chips ---- */
.vars { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.vars code { background: rgba(255,255,255,.05); border: 1px solid var(--hair); color: var(--ink-soft);
  padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-family: var(--mono); cursor: pointer; }
.vars code:hover { background: var(--brand-soft); border-color: var(--hair-strong); color: var(--brand); }

/* ---- Quota meter ---- */
.quota .bar { height: 7px; background: rgba(255,255,255,.07); border-radius: 99px; overflow: hidden; }
.quota .bar i { display: block; height: 100%; border-radius: 99px;
  background: var(--brand);  }
.quota .t { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted);
  margin-bottom: 5px; font-family: var(--mono); }

/* ---- Review items ---- */
.rev-item { border: 1px solid var(--hair); border-radius: 14px; padding: 16px; margin-bottom: 14px;
  background: rgba(255,255,255,.025); }
.rev-item:hover { border-color: var(--hair-strong); }
.rev-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rev-top .avatar, .q-card .avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #16171a; font-weight: 800; font-size: 15px; flex: 0 0 auto; }
.rev-top .who { font-weight: 650; line-height: 1.25; }
.rev-top .stars, .q-card .stars { color: #ffc55a; letter-spacing: 1.5px; font-size: 14px; }
.rev-top .spacer { flex: 1 1 auto; }
.rev-body, .q-card .rtext { color: var(--ink-soft); font-size: 14px; margin: 0 0 12px; }
.rev-reply, .q-reply { background: var(--bg-2); border: 1px solid var(--hair);
  border-left: 2px solid var(--brand); border-radius: 10px; padding: 12px; }
.rev-reply .lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); margin-bottom: 6px; font-family: var(--mono); }
.rev-actions, .q-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.rev-meta { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.rev-display { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px;
  border-top: 1px dashed var(--hair); margin-top: 12px; padding-top: 10px; }
.rev-display label { margin: 0; display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); }
.rev-display input[type=number] { width: 72px; padding: 6px 8px; }

/* ---- Audit score dial ---- */
.score-wrap { display: flex; align-items: center; gap: clamp(16px,3vw,30px); flex-wrap: wrap; }
.dial { --v: 0; width: 132px; height: 132px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--dial, var(--brand)) calc(var(--v) * 1%), rgba(255,255,255,.07) 0);
  position: relative;  }
.dial::before { content: ""; position: absolute; inset: 11px; background: #191d23; border-radius: 50%; }
.dial b { position: relative; font-family: var(--mono); font-size: 30px; font-weight: 600; line-height: 1; color: #fff; }
.dial b small { display: block; font-size: 10px; font-weight: 600; color: var(--muted);
  letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }
.score-copy { flex: 1 1 240px; min-width: 220px; }
.score-copy h2 { margin: 0 0 4px; font-size: 17px; font-family: inherit; text-transform: none;
  letter-spacing: -.02em; color: var(--ink); }
.grade { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 11px; font-weight: 700;
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.grade.good { background: var(--ok-soft); color: var(--ok); }
.grade.mid { background: var(--warn-soft); color: var(--warn); }
.grade.bad { background: var(--danger-soft); color: var(--danger); }

/* ---- Action list / checklist ---- */
.actions { display: grid; gap: 10px; }
.action { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px;
  border: 1px solid var(--hair); border-radius: 12px; background: rgba(255,255,255,.025); }
.action:hover { border-color: var(--hair-strong); }
.action .imp { flex: 0 0 auto; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; margin-top: 2px; font-family: var(--mono); }
.action .imp.high { background: var(--danger-soft); color: var(--danger); }
.action .imp.medium { background: var(--warn-soft); color: var(--warn); }
.action .imp.low { background: rgba(255,255,255,.06); color: var(--ink-soft); }
.action .t { font-weight: 650; font-size: 14px; }
.action .d { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.checks { display: grid; gap: 2px; }
.chk { display: flex; gap: 11px; align-items: flex-start; padding: 9px 4px;
  border-bottom: 1px solid var(--hair); font-size: 13.5px; }
.chk:last-child { border-bottom: none; }
.chk .m { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; }
.chk.ok .m { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(70,201,160,.35); }
.chk.no .m { background: rgba(255,255,255,.06); color: var(--muted); box-shadow: inset 0 0 0 1px var(--hair); }
.chk.no .lbl { color: var(--muted); }

/* ---- Local landing pages list / posts ---- */
.lp { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--hair); flex-wrap: wrap; }
.lp:last-child { border-bottom: none; }
.lp code { background: rgba(255,255,255,.05); border: 1px solid var(--hair); color: var(--brand);
  padding: 2px 8px; border-radius: 6px; font-size: 12px; font-family: var(--mono); }
.lp .spacer { flex: 1 1 auto; }
.post { border: 1px solid var(--hair); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: rgba(255,255,255,.025); }
.post .head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.post .body { color: var(--ink-soft); font-size: 13.5px; }

/* ---- Reply queue ---- */
.q-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.q-progress { flex: 1 1 160px; height: 8px; background: rgba(255,255,255,.07); border-radius: 99px; overflow: hidden; min-width: 120px; }
.q-progress i { display: block; height: 100%; border-radius: 99px;
  background: var(--brand);  }
.q-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px 0 14px; scroll-behavior: smooth; }
.q-track::-webkit-scrollbar { display: none; }
.q-card { scroll-snap-align: center; flex: 0 0 100%; max-width: 100%; padding: 20px; border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--hair); box-shadow: var(--shadow); }
@media (min-width: 760px) { .q-card { flex-basis: calc(50% - 8px); } }
.q-reply textarea { min-height: 88px; }
.q-actions .btn { flex: 1 1 auto; }
.q-fix { margin-top: 12px; border-top: 1px dashed var(--hair); padding-top: 12px; }
.q-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.q-chips button { background: rgba(255,255,255,.05); border: 1px solid var(--hair); color: var(--ink-soft);
  padding: 5px 11px; border-radius: 99px; font-size: 12px; cursor: pointer; font-family: inherit; }
.q-chips button:hover { background: var(--brand-soft); border-color: var(--hair-strong); color: var(--brand); }
.q-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 550; margin-top: 8px; color: var(--ink-soft); }
.q-rules { background: var(--brand-soft); border: 1px solid var(--hair); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 16px; }
.q-rules ul { margin: 8px 0 0; padding-left: 20px; }
.q-rules li { font-size: 13px; color: #ffd9a3; }
.q-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; }
.q-empty { text-align: center; padding: 40px 20px; }

/* ---- Uploads + photo gallery ---- */
.upload { border: 1px dashed var(--hair-strong); border-radius: 12px; padding: 14px; background: rgba(255,255,255,.02); }
.upload-preview { width: 100%; max-width: 320px; border-radius: 10px; display: block; margin-bottom: 10px;
  aspect-ratio: 16/10; object-fit: cover; background: rgba(255,255,255,.05); }
.upload-preview.logo { max-width: 160px; aspect-ratio: auto; object-fit: contain; background: #fff; padding: 6px; }
.upload-preview.empty { display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.upload-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo-item { position: relative; border: 1px solid var(--hair); border-radius: 10px; overflow: hidden;
  background: rgba(255,255,255,.04); }
.photo-item.is-cover { border-color: var(--hair-strong); box-shadow: var(--glow); }
.photo-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.cover-tag { position: absolute; top: 6px; left: 6px; background: var(--brand); color: #16171a; font-size: 10px;
  font-weight: 800; padding: 2px 7px; border-radius: 999px; font-family: var(--mono); }
.photo-btns { display: flex; gap: 4px; padding: 6px; }
.photo-btns .btn { flex: 1; padding: 5px 6px; font-size: 11px; min-height: 0; }

/* ---- Anchored rows (return-to-item after an action) ---- */
.rev-item, .q-card, tr[id], [id^="t"], [id^="v"] { scroll-margin-top: 84px; }
@keyframes anchorFlash { from { background: var(--brand-soft); } to { background: transparent; } }
.rev-item:target, .q-card:target, tr:target, div:target { animation: anchorFlash 1.8s ease-out; }

@media (max-width: 640px) {
  .dial { width: 108px; height: 108px; }
  .dial b { font-size: 25px; }
  .grating .big { font-size: 32px; }
  .gbtn { width: 100%; justify-content: center; }
}







