/* ==========================================================================
   ShowBay design system
   Dark, photo-led, one orange accent. Everything below is built from the
   tokens in :root -- no component hard-codes its own colour, radius or
   shadow. Class names that scripts depend on (sidebar, env-card, stage,
   compare-slider, processing-*, status-*, etc.) are kept stable.
   ========================================================================== */

:root {
  /* Neutrals -- a cool, slightly blue-black ramp. */
  --canvas: #0a0b0d;
  --surface: #111316;
  --surface-strong: #171a1e;
  --surface-raised: #1c2025;
  --ink: #f4f4f5;
  --ink-muted: #a3a8b0;
  --ink-faint: #6f757e;
  --border: #23272c;
  --border-strong: #31363c;
  --hairline: rgba(255, 255, 255, 0.06);

  /* Brand accent: active flow, selection and the primary action only. */
  --accent-light: #ff8a33;
  --accent: #ff6a00;
  --accent-strong: #e85f00;
  --accent-soft: rgba(255, 106, 0, 0.12);
  --accent-ring: rgba(255, 106, 0, 0.28);
  --on-accent: #ffffff;

  /* Status -- one hue each, used for nothing else. */
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --success-border: rgba(34, 197, 94, 0.32);
  --danger: #f05252;
  --danger-bg: rgba(240, 82, 82, 0.12);
  --danger-border: rgba(240, 82, 82, 0.32);
  --warning: #e0a846;
  --warning-bg: rgba(224, 168, 70, 0.12);
  --warning-border: rgba(224, 168, 70, 0.32);

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -12px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 24px 56px -20px rgba(0, 0, 0, 0.7);
  --shadow-accent: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 6px 18px -6px rgba(255, 106, 0, 0.45);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sidebar-w: 248px;
  --header-h: 60px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; }
::selection { background: var(--accent-ring); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1 { font-size: clamp(22px, 2.2vw + 12px, 28px); font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 6px; }
h2 { font-size: clamp(17px, 1.2vw + 12px, 20px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; margin: 0 0 6px; }
h3 { font-size: 15px; font-weight: 600; line-height: 1.35; margin: 0; }
p.muted { color: var(--ink-muted); margin: 0 0 16px; font-size: 14px; }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.tabular { font-variant-numeric: tabular-nums; }
/* Read out by screen readers, never shown (e.g. the status words behind a tick icon). */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; width: 100%; }
.app-main { display: flex; min-width: 0; flex: 1; flex-direction: column; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #0d0f12, var(--canvas) 40%);
  overflow-y: auto;
  scrollbar-width: thin;
  transition: transform 0.22s var(--ease);
}
.sidebar-backdrop { display: none; }
@media (max-width: 1024px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-close { display: flex !important; }
  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 45;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity 0.2s var(--ease);
  }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
}

.sidebar-logo { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: var(--header-h); padding: 0 18px; flex-shrink: 0; }
.logo-mark, header.site .logo { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.sidebar-close { display: none; height: 32px; width: 32px; align-items: center; justify-content: center; border: none; border-radius: var(--radius-sm); background: none; color: var(--ink-faint); cursor: pointer; }
.sidebar-close:hover { color: var(--ink); background: var(--surface-strong); }

.sidebar-nav { padding: 6px 12px 16px; display: flex; flex-direction: column; gap: 1px; }
.sidebar-nav-label { margin: 18px 0 6px; padding: 0 10px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.sidebar-nav-label:first-child { margin-top: 6px; }
.sidebar-nav a, .sidebar-nav .nav-disabled {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  height: 36px; padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500;
  color: var(--ink-muted);
  transition: background-color 0.15s, color 0.15s;
}
.sidebar-nav a svg, .sidebar-nav .nav-disabled svg { flex-shrink: 0; color: var(--ink-faint); transition: color 0.15s; }
.sidebar-nav a:hover { background: var(--surface-strong); color: var(--ink); }
.sidebar-nav a:hover svg { color: var(--ink-muted); }
.sidebar-nav a.active { background: var(--surface-raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline); }
.sidebar-nav a.active svg { color: var(--accent); }
.sidebar-nav a.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.sidebar-nav .nav-disabled { color: var(--ink-faint); cursor: default; }
.sidebar-nav .nav-disabled::after { content: "Soon"; margin-left: auto; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-faint); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 1px 7px; }

.sidebar-widgets { margin-top: auto; padding: 8px 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.widget { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); padding: 12px 14px; }
.widget-accent { background: radial-gradient(120% 90% at 100% 0%, rgba(255, 106, 0, 0.16), transparent 60%), var(--surface); }
@media (max-height: 940px) { .widget-accent { display: none; } }
.widget-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.widget-title { margin: 0; font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.widget-eyebrow { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.widget-value { margin: 6px 0 0; font-size: 20px; font-weight: 650; letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.widget-value.muted { font-size: 14px; font-weight: 500; color: var(--ink-muted); }
.widget-title-bold { margin: 8px 0 0; font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.widget-body { margin: 2px 0 0; font-size: 11.5px; color: var(--ink-faint); line-height: 1.45; }
.widget-body.muted { color: var(--ink-muted); margin-top: 4px; }
.widget-btn { margin-top: 10px; width: 100%; height: 30px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-strong); color: var(--ink-muted); font-size: 12px; font-weight: 500; cursor: pointer; transition: color 0.15s, border-color 0.15s, background-color 0.15s; }
.widget-btn:hover { color: var(--ink); background: var(--surface-raised); }
.widget-btn:disabled { opacity: 0.6; cursor: default; }
.widget-link { display: inline-flex; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--accent); }
.widget-link:hover { color: var(--accent-light); }

.sidebar-footer { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding: 12px 14px; flex-shrink: 0; }
.sidebar-avatar { position: relative; display: flex; height: 32px; width: 32px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #b84600); font-size: 13px; font-weight: 600; color: var(--on-accent); text-transform: uppercase; }
.sidebar-avatar-dot { position: absolute; right: -1px; bottom: -1px; height: 10px; width: 10px; border-radius: 50%; border: 2px solid var(--canvas); background: var(--success); }
.sidebar-account-info { flex: 1; min-width: 0; }
.sidebar-account-info .name { margin: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-account-info .role { margin: 0; font-size: 11.5px; color: var(--ink-faint); }
.sidebar-account-menu { display: flex; height: 30px; width: 30px; align-items: center; justify-content: center; border: none; border-radius: var(--radius-sm); background: none; color: var(--ink-faint); cursor: pointer; }
.sidebar-account-menu:hover { color: var(--ink); background: var(--surface-strong); }

/* ---------- Top header ---------- */
header.site {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--header-h); padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 11, 13, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
}
header.site .header-left, header.site .header-right { display: flex; align-items: center; gap: 10px; }
header.site nav { display: flex; align-items: center; gap: 4px; }
header.site nav a { padding: 7px 12px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500; color: var(--ink-muted); transition: color 0.15s, background-color 0.15s; }
header.site nav a:hover { color: var(--ink); background: var(--surface-strong); }
.sidebar-toggle, .site-nav-toggle { display: flex; height: 34px; width: 34px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: none; color: var(--ink-muted); cursor: pointer; transition: color 0.15s, background-color 0.15s; }
.sidebar-toggle:hover, .site-nav-toggle:hover { color: var(--ink); background: var(--surface-strong); }
.site-nav-toggle { display: none; }
@media (max-width: 900px) {
  header.site nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 16px 16px;
    background: var(--canvas); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  header.site nav.show { display: flex; }
  header.site nav a { padding: 11px 12px; }
  .site-nav-toggle { display: flex; }
}
@media (max-width: 480px) { header.site { padding: 0 16px; } }

.login-pill { display: none; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--ink-muted); }
a.login-pill:hover { color: var(--ink); border-color: var(--border-strong); }
@media (min-width: 640px) { .login-pill { display: inline-flex; } }
.status-pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); font-size: 12.5px; font-weight: 500; color: var(--ink-muted); cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.status-pill:hover { color: var(--ink); border-color: var(--border-strong); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); box-shadow: 0 0 0 3px rgba(111, 117, 126, 0.18); }
.status-dot.ok { background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }
.status-dot.bad { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
@media (max-width: 480px) { .header-cta { display: none !important; } }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 640px) { .container { padding: 0 32px; } }
@media (min-width: 1280px) { .container { padding: 0 40px; } }
@media (max-width: 480px) { .container { padding: 0 16px; } }
main.container { padding-top: 32px; padding-bottom: 56px; }
.app-main > main.container.is-public { max-width: none; padding-left: 0; padding-right: 0; padding-top: 0; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.page-head .page-desc { margin: 0; color: var(--ink-muted); font-size: 14px; max-width: 42rem; }
.page-head.center { flex-direction: column; align-items: center; text-align: center; }
.page-head.center .page-desc { margin: 0 auto; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.flow-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface-strong); color: var(--ink);
  font-size: 13.5px; font-weight: 550; line-height: 1; white-space: nowrap;
  cursor: pointer; text-decoration: none;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s, box-shadow 0.15s, transform 0.15s var(--ease);
}
.btn:hover { background: var(--surface-raised); border-color: #3d434a; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-accent); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-primary:disabled:hover { background: var(--accent); }
.btn-ghost { background: none; border-color: transparent; color: var(--ink-muted); }
.btn-ghost:hover { background: var(--surface-strong); border-color: transparent; color: var(--ink); }
.btn-danger { color: var(--danger); border-color: var(--danger-border); background: none; }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger-border); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; height: 34px; padding: 0; }

/* ---------- Surfaces ---------- */
.card { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); padding: 24px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card-flush { padding: 0; overflow: hidden; }
.divider-line { height: 1px; background: var(--border); border: none; margin: 20px 0; }

.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--radius-pill); font-size: 10.5px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
.badge-premium { background: var(--accent-soft); color: var(--accent-light); }
.badge-standard { background: var(--surface-raised); color: var(--ink-muted); }
.badge-neutral { background: var(--surface-raised); color: var(--ink-muted); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

.flash-error, .flash-message { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.5; }
.flash-error { border: 1px solid var(--danger-border); background: var(--danger-bg); color: #ffb3b3; }
.flash-message { border: 1px solid var(--success-border); background: var(--success-bg); color: #9ff0bd; }

.callout { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border: 1px solid rgba(255, 106, 0, 0.25); border-radius: var(--radius-sm); background: var(--accent-soft); font-size: 12.5px; color: var(--ink-muted); }
.callout svg { flex-shrink: 0; margin-top: 1px; color: var(--accent); }
.callout strong { color: var(--ink); font-weight: 600; }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 56px 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface); text-align: center; }
.empty-state .empty-icon { display: flex; height: 44px; width: 44px; align-items: center; justify-content: center; margin: 0 auto 8px; border-radius: 50%; background: var(--surface-raised); color: var(--ink-muted); }
.empty-state .empty-title { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.empty-state .empty-desc { margin: 0 auto 14px; max-width: 26rem; font-size: 13.5px; color: var(--ink-muted); }
.empty-state.compact { padding: 28px 20px; border-style: dashed; background: none; }

/* ---------- Forms ---------- */
label { display: block; margin-bottom: 7px; font-size: 12.5px; font-weight: 550; color: var(--ink-muted); }
.field { margin-bottom: 18px; }
.field-hint { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-faint); }
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.field-label-row label { margin: 0; }
.field-value { font-size: 12px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; min-height: 38px; padding: 9px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--canvas); color: var(--ink);
  font: inherit; font-size: 13.5px;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:hover, textarea:hover, select:hover { border-color: #3d434a; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
textarea { resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23a3a8b0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; background-size: 14px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
input[type="range"] { width: 100%; accent-color: var(--accent); margin: 4px 0 0; }
input[type="file"] { width: 100%; font-size: 12.5px; color: var(--ink-faint); }
input[type="file"]::file-selector-button {
  margin-right: 10px; height: 32px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface-strong); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 550; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--surface-raised); }

.check-row { display: inline-flex; align-items: center; gap: 9px; margin: 0; font-size: 13.5px; font-weight: 500; color: var(--ink); cursor: pointer; }

/* Segmented control: real radio inputs, styled as one grouped control. */
.segmented { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--canvas); }
.segmented label { position: relative; flex: 1; margin: 0; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: flex; align-items: center; justify-content: center; height: 30px; padding: 0 8px; border-radius: var(--radius-xs); font-size: 12.5px; font-weight: 550; color: var(--ink-muted); white-space: nowrap; transition: background-color 0.15s, color 0.15s; }
.segmented label:hover span { color: var(--ink); }
.segmented input:checked + span { background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--hairline); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

.search-input-wrap { position: relative; }
.search-input-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); pointer-events: none; }
.search-input-wrap input { width: 220px; max-width: 100%; height: 36px; min-height: 36px; padding: 0 12px 0 34px; border-radius: var(--radius-pill); background: var(--surface); font-size: 13px; }

/* ---------- Data table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { padding: 11px 16px; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); background: var(--surface-strong); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.015); }
.table .cell-strong { font-weight: 600; color: var(--ink); }
.table .cell-muted { color: var(--ink-muted); }
.table .cell-actions { white-space: nowrap; text-align: right; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell .avatar { display: flex; height: 28px; width: 28px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-raised); font-size: 12px; font-weight: 600; color: var(--ink-muted); text-transform: uppercase; }
.inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; vertical-align: middle; }
.inline-form + .inline-form { margin-left: 6px; }
.inline-form input[type="number"] { width: 92px; min-height: 28px; height: 28px; padding: 0 8px; font-size: 12.5px; border-radius: var(--radius-xs); }

/* ---------- Overlays ---------- */
.lightbox-overlay, .zoom-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 32px; background: rgba(5, 6, 8, 0.92); backdrop-filter: blur(6px); }
.zoom-overlay img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-sm); }
.lightbox-overlay .lb-content { width: 100%; max-width: 64rem; }
.lightbox-overlay .lb-caption { margin: 14px 0 0; text-align: center; font-size: 13px; color: rgba(255, 255, 255, 0.72); }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; display: flex; height: 40px; width: 40px; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: #fff; cursor: pointer; transition: background-color 0.15s; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255, 255, 255, 0.14); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-download { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--radius-pill); background: #fff; color: #0a0b0d; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg); }
.lightbox-download:hover { background: #e9e9ea; }

.modal-card { width: 100%; max-width: 30rem; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); padding: 24px; box-shadow: var(--shadow-lg); text-align: left; }
.modal-card h2, .modal-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.modal-card .modal-desc { margin: 0 0 20px; font-size: 13px; line-height: 1.55; color: var(--ink-muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.modal-icon { display: flex; height: 40px; width: 40px; align-items: center; justify-content: center; margin-bottom: 14px; border-radius: 50%; }
.modal-icon.warn { background: var(--warning-bg); color: var(--warning); }
.modal-icon.accent { background: var(--accent-soft); color: var(--accent); }
.modal-icon.success { background: var(--success-bg); color: var(--success); }
.modal-icon.danger { background: var(--danger-bg); color: var(--danger); }
.modal-icon .spinner { height: 18px; width: 18px; }
.loading-card { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.loading-card p { margin: 0; max-width: 22rem; font-size: 14px; font-weight: 550; color: #fff; }
.spinner.lg { width: 34px; height: 34px; border-width: 3px; }

/* ---------- Step indicator ---------- */
.step-indicator-caption { margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.step-indicator-caption span { color: var(--accent); }
.step-indicator-list { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.step-indicator-item { display: flex; align-items: center; min-width: 0; }
.step-indicator-item > a, .step-indicator-item > .step-inner { display: flex; align-items: center; gap: 8px; }
.step-indicator-item > a:hover .step-indicator-label { color: var(--ink); }
.step-circle { display: flex; height: 26px; width: 26px; flex-shrink: 0; align-items: center; justify-content: center; border: 1px solid var(--border-strong); border-radius: 50%; font-size: 11.5px; font-weight: 600; color: var(--ink-faint); background: var(--surface); }
.step-indicator-item.is-done .step-circle { border-color: rgba(255, 106, 0, 0.45); color: var(--accent); background: var(--accent-soft); }
.step-indicator-item.is-active .step-circle { border-color: var(--accent); background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.step-indicator-label { display: none; font-size: 13px; font-weight: 500; color: var(--ink-faint); transition: color 0.15s; }
.step-indicator-item.is-done .step-indicator-label { color: var(--ink-muted); }
.step-indicator-item.is-active .step-indicator-label { color: var(--ink); font-weight: 600; }
.step-indicator-connector { display: inline-block; flex-shrink: 0; height: 1px; width: 14px; margin: 0 6px; background: var(--border-strong); }
.step-indicator-item.is-done .step-indicator-connector { background: rgba(255, 106, 0, 0.45); }
@media (min-width: 520px) {
  .step-indicator-label { display: inline; }
  .step-indicator-connector { width: 36px; margin: 0 12px; }
}

/* ---------- Public: footer ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: #0c0d10; }
.footer-grid { display: grid; gap: 32px 24px; grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 40px; }
@media (min-width: 480px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } .footer-brand { grid-column: 1 / -1; } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); } .footer-brand { grid-column: auto; } }
.footer-brand p { margin: 14px 0 0; max-width: 22rem; font-size: 13.5px; line-height: 1.65; color: var(--ink-muted); }
.footer-social { display: flex; gap: 8px; margin-top: 20px; }
.footer-social span { display: flex; height: 34px; width: 34px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--ink-muted); }
.footer-col-title { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.footer-links { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.footer-links a { font-size: 13.5px; color: var(--ink-muted); transition: color 0.15s; }
.footer-links a:hover { color: var(--ink); }
.footer-links.faint li { font-size: 13.5px; color: var(--ink-faint); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 24px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--ink-faint); }
.footer-bottom p { margin: 0; }

/* ---------- Public: home ---------- */
.hero { position: relative; margin: 16px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
@media (min-width: 640px) { .hero { margin: 24px 32px 0; } }
.hero-inner { position: relative; height: 480px; background: #0d0b09; }
@media (min-width: 640px) { .hero-inner { height: 580px; } }
.hero-inner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 9, 11, 0.94) 0%, rgba(8, 9, 11, 0.7) 45%, rgba(8, 9, 11, 0.1) 100%), linear-gradient(0deg, rgba(8, 9, 11, 0.6), transparent 40%); }
.hero-content { position: absolute; inset: 0; display: flex; align-items: center; padding: 28px; }
@media (min-width: 640px) { .hero-content { padding: 56px; } }
.hero-content .inner { max-width: 34rem; }
.hero-content h1 { margin: 0; font-size: clamp(34px, 4.4vw + 12px, 58px); font-weight: 700; line-height: 1.04; letter-spacing: -0.035em; color: #fff; }
/* :not(.eyebrow) -- these context p rules (0,1,1) would otherwise out-rank .eyebrow (0,1,0). */
.hero-content p:not(.eyebrow) { margin: 20px 0 0; max-width: 30rem; font-size: clamp(15px, 0.6vw + 12px, 17px); line-height: 1.6; color: rgba(255, 255, 255, 0.72); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-actions .btn:not(.btn-primary) { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); backdrop-filter: blur(6px); }
.hero-actions .btn:not(.btn-primary):hover { background: rgba(255, 255, 255, 0.14); }

.section { margin: 0 16px; padding: 64px 0; }
@media (min-width: 640px) { .section { margin: 0 32px; padding: 96px 0; } }
.section.bordered { border-top: 1px solid var(--border); }
.section-head { max-width: 40rem; margin: 0 auto; text-align: center; }
.section-head h2 { margin: 0; font-size: clamp(26px, 2.4vw + 14px, 38px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.section-head p:not(.eyebrow) { margin: 14px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-muted); }
.section-cta { margin-top: 44px; text-align: center; }

.steps-grid, .features-grid { display: grid; gap: 16px; max-width: 72rem; margin: 48px auto 0; grid-template-columns: 1fr; }
@media (min-width: 640px) { .steps-grid, .features-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .steps-grid { grid-template-columns: repeat(4, 1fr); } .features-grid { grid-template-columns: repeat(3, 1fr); } }
.step-card, .feature-card { position: relative; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s; }
.feature-card:hover, .step-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.step-head { display: flex; align-items: center; justify-content: space-between; }
.step-num { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); font-variant-numeric: tabular-nums; }
.step-icon, .feature-icon { display: flex; height: 40px; width: 40px; align-items: center; justify-content: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-strong); color: var(--accent); }
.step-card h3, .feature-card h3 { margin: 18px 0 0; font-size: 15.5px; font-weight: 600; }
.step-card p, .feature-card p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.65; color: var(--ink-muted); }
.step-chevron { position: absolute; right: -15px; top: 50%; z-index: 2; display: none; height: 28px; width: 28px; transform: translateY(-50%); align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 50%; background: var(--canvas); color: var(--ink-faint); }
@media (min-width: 1024px) { .step-chevron { display: flex; } }

.final-cta { position: relative; overflow: hidden; margin: 0 16px 48px; padding: 56px 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: radial-gradient(80% 120% at 50% 0%, rgba(255, 106, 0, 0.16), transparent 60%), var(--surface); text-align: center; }
@media (min-width: 640px) { .final-cta { margin: 0 32px 56px; padding: 80px 24px; } }
.final-cta h2 { margin: 0; font-size: clamp(24px, 2vw + 14px, 34px); font-weight: 700; letter-spacing: -0.025em; }
.final-cta p { margin: 12px auto 0; max-width: 30rem; font-size: 15px; line-height: 1.6; color: var(--ink-muted); }
.final-cta .actions { margin-top: 28px; }

/* Public content pages share one centred reading column. */
.public-page { padding: 56px 0 72px; }
@media (min-width: 640px) { .public-page { padding: 72px 0 96px; } }
.public-page .page-head.center h1 { font-size: clamp(28px, 2.6vw + 14px, 42px); font-weight: 700; letter-spacing: -0.03em; }
.public-page .page-head.center .page-desc { font-size: 16px; }

/* ---------- Public: pricing ---------- */
.pricing-grid { display: grid; gap: 16px; max-width: 64rem; margin: 48px auto 0; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 820px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }
.tier-card { position: relative; display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); transition: border-color 0.2s, box-shadow 0.2s; }
.tier-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.tier-card.highlighted { border-color: rgba(255, 106, 0, 0.55); background: radial-gradient(120% 60% at 50% 0%, rgba(255, 106, 0, 0.1), transparent 70%), var(--surface); box-shadow: 0 0 0 1px rgba(255, 106, 0, 0.25), var(--shadow-lg); }
.tier-badge { position: absolute; top: -11px; left: 28px; display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tier-card h2 { margin: 0; font-size: 16px; font-weight: 600; }
.tier-card .tagline { margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-muted); }
.tier-price { display: flex; align-items: baseline; gap: 4px; margin: 22px 0 0; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.tier-price .amount { font-size: 38px; font-weight: 700; letter-spacing: -0.03em; }
.tier-price .period { font-size: 13.5px; color: var(--ink-faint); }
.tier-features { flex: 1; display: flex; flex-direction: column; gap: 11px; margin: 22px 0 26px; padding: 0; list-style: none; }
.tier-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--ink-muted); }
.tier-features li svg { flex-shrink: 0; margin-top: 3px; color: var(--accent); }
.compare-table-wrap { max-width: 64rem; margin: 72px auto 0; }
.compare-table-wrap h2 { margin: 0 0 16px; font-size: 20px; font-weight: 650; }
.compare-table { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.compare-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13.5px; text-align: left; }
.compare-table th, .compare-table td { padding: 13px 18px; }
.compare-table thead th { font-size: 12px; font-weight: 600; color: var(--ink); background: var(--surface-strong); border-bottom: 1px solid var(--border); }
.compare-table thead th:first-child { color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
.compare-table tbody tr + tr td { border-top: 1px solid var(--border); }
.compare-table td { color: var(--ink-muted); }
.compare-table td:first-child { color: var(--ink); font-weight: 500; }
.pricing-disclaimer { max-width: 42rem; margin: 40px auto 0; text-align: center; font-size: 12.5px; line-height: 1.6; color: var(--ink-faint); }

/* ---------- Public: FAQ ---------- */
.faq-sections { display: flex; flex-direction: column; gap: 40px; max-width: 48rem; margin: 48px auto 0; }
.faq-section-heading { margin: 0 0 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.faq-list { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-item button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border: none; background: none; text-align: left; cursor: pointer; transition: background-color 0.15s; }
.faq-item button:hover { background: rgba(255, 255, 255, 0.02); }
.faq-item button .q { font-size: 14px; font-weight: 550; color: var(--ink); }
.faq-item button svg { flex-shrink: 0; color: var(--ink-faint); transition: transform 0.2s var(--ease); }
.faq-item.open button svg { transform: rotate(180deg); color: var(--accent); }
.faq-item .a { display: none; margin: 0; padding: 0 20px 18px; font-size: 13.5px; line-height: 1.7; color: var(--ink-muted); }
.faq-item.open .a { display: block; }
.faq-cta { max-width: 48rem; margin: 64px auto 0; padding: 40px 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: radial-gradient(80% 120% at 50% 0%, rgba(255, 106, 0, 0.12), transparent 60%), var(--surface); text-align: center; }
.faq-cta h2 { margin: 0; font-size: 20px; font-weight: 650; }
.faq-cta p { margin: 8px auto 0; max-width: 28rem; font-size: 14px; color: var(--ink-muted); }
.faq-cta .actions { margin-top: 22px; }

/* ---------- Auth ---------- */
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: 1fr; }
@media (min-width: 960px) { .auth-shell { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 32px 20px; }
@media (min-width: 640px) { .auth-panel { padding: 48px; } }
.auth-card { width: 100%; max-width: 380px; margin: 0 auto; }
.auth-card .logo-mark { margin-bottom: 36px; }
.auth-card h1 { font-size: 24px; margin: 0 0 6px; }
.auth-card .auth-sub { margin: 0 0 28px; font-size: 14px; color: var(--ink-muted); }
.auth-card .btn-primary { margin-top: 6px; }
.auth-switch { margin: 24px 0 0; font-size: 13.5px; color: var(--ink-muted); text-align: center; }
.auth-switch a { color: var(--accent); font-weight: 550; }
.auth-switch a:hover { color: var(--accent-light); }
.auth-visual { position: relative; display: none; overflow: hidden; margin: 16px 16px 16px 0; border: 1px solid var(--border); border-radius: var(--radius-lg); }
@media (min-width: 960px) { .auth-visual { display: block; } }
.auth-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 9, 11, 0.92), rgba(8, 9, 11, 0.1) 55%); }
.auth-visual-caption { position: absolute; left: 40px; right: 40px; bottom: 40px; z-index: 1; }
.auth-visual-caption p { margin: 0; max-width: 26rem; font-size: 22px; font-weight: 650; line-height: 1.3; letter-spacing: -0.015em; color: #fff; }
.auth-visual-caption span { display: block; margin-top: 10px; font-size: 13.5px; color: rgba(255, 255, 255, 0.65); }
.demo-accounts { margin-bottom: 24px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface); }
.demo-accounts-title { margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.demo-account { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-strong); color: var(--ink); text-align: left; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.demo-account + .demo-account { margin-top: 6px; }
.demo-account:hover { border-color: rgba(255, 106, 0, 0.45); background: var(--surface-raised); }
.demo-account .role { flex-shrink: 0; min-width: 52px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); }
.demo-account .cred { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--ink-muted); }

/* ---------- Dashboard ---------- */
.dash-greeting { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.dash-greeting h1 { margin: 0; }
.dash-greeting p { margin: 4px 0 0; color: var(--ink-muted); }

.dash-empty, .dash-hero { position: relative; overflow: hidden; display: flex; align-items: center; margin-bottom: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.dash-empty { min-height: 380px; justify-content: center; }
.dash-empty img, .dash-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dash-hero-bg { object-position: right center; }
.dash-empty-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 11, 13, 0.7), rgba(10, 11, 13, 0.94)); }
.dash-empty-content { position: relative; max-width: 30rem; padding: 32px 24px; text-align: center; }
.dash-empty-content h2 { margin: 0 0 10px; font-size: clamp(20px, 1.5vw + 14px, 26px); font-weight: 700; letter-spacing: -0.02em; }
.dash-empty-content p { margin: 0 0 24px; font-size: 14.5px; line-height: 1.6; color: var(--ink-muted); }
.dash-hero { min-height: 340px; }
@media (min-width: 1024px) { .dash-hero { min-height: 380px; } }
.dash-hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 11, 13, 0.97) 0%, rgba(10, 11, 13, 0.86) 42%, rgba(10, 11, 13, 0.2) 100%); }
.dash-hero-content { position: relative; max-width: 36rem; padding: 28px 24px; }
@media (min-width: 640px) { .dash-hero-content { padding: 44px 48px; } }
.dash-hero-content h2 { margin: 0 0 10px; font-size: clamp(22px, 2vw + 12px, 32px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.dash-hero-content p:not(.eyebrow) { margin: 0 0 24px; font-size: 15px; color: var(--ink-muted); }
.dash-hero-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 32px; font-size: 12.5px; color: var(--ink-muted); }
.dash-hero-step { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.dash-hero-step-icon { display: inline-flex; height: 26px; width: 26px; align-items: center; justify-content: center; border: 1px solid var(--border-strong); border-radius: 50%; background: rgba(255, 255, 255, 0.03); color: var(--ink-muted); }
.dash-hero-arrow { flex-shrink: 0; color: var(--ink-faint); }
@media (max-width: 520px) { .dash-hero-arrow { display: none; } .dash-hero-steps { display: grid; grid-template-columns: 1fr 1fr; } }

.dash-continue { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 24px; padding: 16px 18px; border: 1px solid rgba(255, 106, 0, 0.3); border-radius: var(--radius-md); background: linear-gradient(90deg, var(--accent-soft), transparent 60%), var(--surface); }
.dash-continue-thumb { width: 72px; height: 52px; flex-shrink: 0; object-fit: cover; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.dash-continue-body { flex: 1; min-width: 200px; }
.dash-continue-label { margin: 0 0 3px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.dash-continue-name { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.dash-continue-checklist { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-faint); }
.dash-continue-checklist .ok { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-muted); }
.dash-continue-checklist .ok svg { flex-shrink: 0; color: var(--success); }

.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 36px; }
@media (max-width: 760px) { .dash-stats { grid-template-columns: 1fr 1fr; } .dash-stats > :last-child { grid-column: 1 / -1; } }
.dash-stat { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.dash-stat-label { margin: 0 0 10px; font-size: 12.5px; font-weight: 500; color: var(--ink-muted); }
.dash-stat-value { margin: 0; font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.dash-stat-sub { margin: 8px 0 0; font-size: 12px; color: var(--ink-faint); }
.dash-stat-icon { display: flex; height: 36px; width: 36px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); }

.dash-section { margin-bottom: 40px; }
.dash-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dash-section-head h2 { margin: 0; font-size: 17px; font-weight: 650; }
.dash-section-head p { margin: 2px 0 0; font-size: 13px; color: var(--ink-faint); }
.dash-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 550; color: var(--ink-muted); white-space: nowrap; transition: color 0.15s; }
.dash-link:hover { color: var(--accent); }

.dash-work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 760px) { .dash-work-grid { grid-template-columns: repeat(4, 1fr); } }
.dash-work-grid > *, .project-grid > *, .gallery-grid > *, .results-tab-grid > *, .dash-showroom-row > * { min-width: 0; }
@media (max-width: 640px) { .dash-hero-overlay { background: linear-gradient(90deg, rgba(10, 11, 13, 0.95), rgba(10, 11, 13, 0.82)); } }
.dash-work-card { display: block; width: 100%; padding: 0; border: none; background: none; color: inherit; text-align: left; cursor: pointer; }
.dash-work-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.dash-work-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s var(--ease); }
.dash-work-card:hover .dash-work-thumb img { transform: scale(1.04); }
.dash-work-overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-start; padding: 12px; background: linear-gradient(0deg, rgba(10, 11, 13, 0.75), transparent 55%); color: #fff; font-size: 12px; font-weight: 600; opacity: 0; transition: opacity 0.2s; }
.dash-work-card:hover .dash-work-overlay, .dash-work-card:focus-visible .dash-work-overlay { opacity: 1; }
.dash-work-name { margin: 10px 0 0; font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-work-sub { margin: 2px 0 0; font-size: 12px; color: var(--ink-faint); }

.dash-showroom-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .dash-showroom-row { grid-template-columns: 1fr 1fr; gap: 12px; } .dash-showroom-add { min-height: 0; } }
.dash-showroom-card { display: block; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); transition: border-color 0.15s, transform 0.2s var(--ease), box-shadow 0.2s; }
.dash-showroom-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.dash-showroom-card img { display: block; width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; }
.dash-showroom-card-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px; }
.dash-showroom-card-body .name { margin: 0; min-width: 0; font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-showroom-add { display: flex; min-height: 160px; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); color: var(--ink-muted); font-size: 13px; font-weight: 550; transition: border-color 0.15s, color 0.15s, background-color 0.15s; }
.dash-showroom-add:hover { border-color: rgba(255, 106, 0, 0.55); color: var(--accent); background: var(--accent-soft); }
.dash-showroom-add .icon-circle { display: flex; height: 34px; width: 34px; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-raised); font-size: 18px; line-height: 1; }

.dash-projects { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.dash-project-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; transition: background-color 0.15s; }
.dash-project-row + .dash-project-row { border-top: 1px solid var(--border); }
.dash-project-row:hover { background: rgba(255, 255, 255, 0.015); }
.dash-project-thumb { width: 56px; height: 40px; flex-shrink: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface-strong); }
.dash-project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dash-project-info { flex: 1; min-width: 0; }
.dash-project-info .name { margin: 0; font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-project-info .sub { margin: 2px 0 0; font-size: 12px; color: var(--ink-faint); }
.dash-project-status { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; height: 22px; padding: 0 9px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 600; text-transform: capitalize; }
.dash-project-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dash-project-status.draft { background: var(--surface-raised); color: var(--ink-muted); }
.dash-project-status.processing { background: var(--accent-soft); color: var(--accent-light); }
.dash-project-status.complete { background: var(--success-bg); color: var(--success); }
.dash-project-status.failed { background: var(--danger-bg); color: var(--danger); }
@media (max-width: 520px) { .dash-project-status { display: none; } }

/* ---------- Projects ("My Photos") ---------- */
.project-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.project-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); transition: border-color 0.15s, box-shadow 0.2s; }
.project-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.project-card-media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-strong); }
.project-card-media img { width: 100%; height: 100%; object-fit: cover; }
.project-card-media .dash-project-status { position: absolute; top: 10px; left: 10px; backdrop-filter: blur(6px); }
.project-card-media .dash-project-status.draft { background: rgba(10, 11, 13, 0.7); }
.project-card-body { flex: 1; padding: 14px 16px; }
.project-card-title { margin: 0; font-size: 14px; font-weight: 600; }
.project-card-meta { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-faint); }
.project-progress { height: 4px; margin-top: 12px; overflow: hidden; border-radius: var(--radius-pill); background: var(--surface-raised); }
.project-progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.project-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px 16px; }

/* ---------- Gallery ---------- */
.gallery-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.view-toggle { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); }
.view-toggle button { height: 28px; padding: 0 14px; border: none; border-radius: var(--radius-pill); background: none; color: var(--ink-muted); font-size: 12.5px; font-weight: 550; cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.view-toggle button:hover { color: var(--ink); }
.view-toggle button.active { background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-sm); }
.gallery-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.gallery-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s var(--ease); }
.gallery-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.gallery-card .thumb { position: relative; aspect-ratio: 4 / 3; background: var(--surface-strong); }
.gallery-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-card .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 14px; }
.gallery-card .row .name, .gallery-list-row .info .name { margin: 0; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-card .row .sub, .gallery-list-row .info .sub { margin: 2px 0 0; font-size: 12px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-list { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.gallery-list-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 12px 16px; }
.gallery-list-row + .gallery-list-row { border-top: 1px solid var(--border); }
.gallery-list-row .thumb { height: 56px; width: 80px; flex-shrink: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.gallery-list-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-list-row .info { flex: 1; min-width: 120px; }
.gallery-actions { display: flex; flex-shrink: 0; align-items: center; gap: 6px; }
.gallery-actions .gallery-view-btn, .gallery-actions a { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-xs); background: var(--surface-strong); color: var(--ink-muted); font-size: 12px; font-weight: 550; cursor: pointer; transition: color 0.15s, border-color 0.15s, background-color 0.15s; }
.gallery-actions a:hover { color: var(--ink); background: var(--surface-raised); }
.gallery-actions .gallery-view-btn { border-color: rgba(255, 106, 0, 0.4); background: var(--accent-soft); color: var(--accent-light); }
.gallery-actions .gallery-view-btn:hover { background: rgba(255, 106, 0, 0.2); }
.gallery-sources { display: flex; gap: 10px; padding: 12px 14px 0; }
.gallery-list-row .gallery-sources { flex-shrink: 0; padding: 0; }
.gallery-sources .src { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gallery-sources .box { display: flex; height: 30px; width: 30px; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--canvas); font-size: 10px; color: var(--ink-faint); }
.gallery-sources .box img { width: 100%; height: 100%; object-fit: cover; }
.gallery-sources .lbl { font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); }
.gallery-empty { margin-top: 0; }

/* ---------- Showroom setup ---------- */
.setup-layout { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1100px) { .setup-layout { grid-template-columns: minmax(0, 1fr) 320px; } }
.setup-config { min-width: 0; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
@media (max-width: 480px) { .setup-config { padding: 18px; } }
@media (min-width: 1100px) { .setup-preview-col { position: sticky; top: calc(var(--header-h) + 20px); } }
.setup-section { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--border); }

.section-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-heading .left { display: flex; align-items: flex-start; gap: 12px; }
.section-num { display: flex; height: 26px; width: 26px; flex-shrink: 0; align-items: center; justify-content: center; border: 1px solid var(--border-strong); border-radius: 50%; font-size: 11.5px; font-weight: 600; color: var(--ink-muted); background: var(--surface-strong); transition: all 0.2s; }
.section-num.done { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.section-heading h2 { margin: 2px 0 0; font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
.section-heading .hint { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-faint); }

.filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-tabs button { height: 32px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface-strong); color: var(--ink-muted); font-size: 12.5px; font-weight: 550; cursor: pointer; transition: all 0.15s; }
.filter-tabs button:hover { color: var(--ink); border-color: var(--border-strong); }
.filter-tabs button.active { border-color: var(--accent); background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-accent); }

.env-row-wrap { position: relative; margin-top: 18px; }
.env-row { display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.env-row > * { scroll-snap-align: start; }
.env-row-scroll-btn { position: absolute; right: -14px; top: calc(50% - 5px); z-index: 5; display: none; height: 34px; width: 34px; transform: translateY(-50%); align-items: center; justify-content: center; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-md); cursor: pointer; }
@media (min-width: 640px) { .env-row-scroll-btn.show { display: flex; } }
#preset-empty-state, #custom-empty-state { flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 28px 16px; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); margin-top: 4px; }
#preset-empty-state p, #custom-empty-state p { margin: 0; }
.empty-inline-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.empty-inline-desc { font-size: 12.5px; color: var(--ink-muted); }

.upload-env-tile { display: flex; aspect-ratio: 4 / 3; width: 216px; flex-shrink: 0; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); color: var(--ink); text-align: center; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
@media (min-width: 640px) { .upload-env-tile { width: 240px; } }
.upload-env-tile:hover { border-color: rgba(255, 106, 0, 0.6); background: var(--surface-raised); }
.upload-env-tile .icon-circle { display: flex; height: 38px; width: 38px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: 2px; }
.upload-env-tile .title { font-size: 13px; font-weight: 600; }
.upload-env-tile .sub { font-size: 11.5px; line-height: 1.45; color: var(--ink-faint); }

.env-card { position: relative; width: 216px; flex-shrink: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-strong); cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease); }
@media (min-width: 640px) { .env-card { width: 240px; } }
.env-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.env-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 28px -12px rgba(255, 106, 0, 0.55); }
.env-card .photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.env-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.env-card .scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.05) 55%, rgba(0, 0, 0, 0.25)); }
.env-card .check { position: absolute; right: 10px; top: 10px; display: none; height: 24px; width: 24px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.env-card.selected .check { display: flex !important; }
.env-card .view-btn, .env-card .fav-btn, .env-card .remove-btn { position: absolute; top: 10px; display: flex; height: 26px; width: 26px; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 50%; background: rgba(10, 11, 13, 0.5); color: #fff; cursor: pointer; backdrop-filter: blur(6px); transition: background-color 0.15s; }
.env-card .view-btn { right: 42px; display: none; }
.env-card.selected .view-btn { display: flex; }
.env-card .fav-btn, .env-card .remove-btn { left: 10px; }
.env-card .view-btn:hover, .env-card .fav-btn:hover, .env-card .remove-btn:hover { background: rgba(10, 11, 13, 0.75); }
.env-card .fav-btn.active { color: var(--accent); }
.env-card .fav-btn.active svg path { fill: currentColor; }
.env-card .remove-btn:hover { color: #ffb3b3; }
.env-card .caption { position: absolute; inset-inline: 0; bottom: 0; padding: 12px; }
.env-card .caption .name { margin: 0; font-size: 13.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.env-card .caption .blurb { margin: 2px 0 0; font-size: 11.5px; color: rgba(255, 255, 255, 0.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.env-card .footer-row { display: flex; align-items: center; gap: 6px; padding: 9px 12px; }
.env-card .footer-row .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint); }
.env-card .footer-row .dot.premium { background: var(--accent); }
.env-card .footer-row .label { margin: 0; font-size: 11.5px; font-weight: 550; color: var(--ink-faint); }
.env-card .footer-row .label.premium { color: var(--accent-light); }

.env-selected-line { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 8px 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-strong); font-size: 12.5px; color: var(--ink-muted); width: fit-content; max-width: 100%; }
.env-selected-line p { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.env-selected-line .name { font-weight: 600; color: var(--ink); }
.env-selected-line button#clear-selection { border: none; background: none; padding: 4px 6px; border-radius: var(--radius-xs); color: var(--ink-faint); font-size: 12px; font-weight: 550; cursor: pointer; }
.env-selected-line button#clear-selection:hover { color: var(--ink); background: var(--surface-raised); }

.eye { display: flex; height: 28px; width: 28px; flex-shrink: 0; align-items: center; justify-content: center; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--ink-muted); cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.eye:hover { color: var(--ink); border-color: #3d434a; }

.vehicle-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .vehicle-grid { grid-template-columns: minmax(0, 1fr) 220px; } }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 48px 16px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-strong); text-align: center; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.dropzone:hover, .dropzone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.dropzone-icon { display: flex; height: 46px; width: 46px; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-raised); color: var(--ink-muted); }
.dropzone.dragging .dropzone-icon { background: var(--accent); color: var(--on-accent); }
.dropzone-title { margin: 4px 0 0; font-size: 14px; font-weight: 600; }
.dropzone-or { margin: 0; font-size: 12px; color: var(--ink-faint); }
.dropzone .btn { pointer-events: none; }
.dropzone-formats { margin: 2px 0 0; font-size: 11.5px; color: var(--ink-faint); }

.thumb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.thumb-grid:not(:empty) { margin-top: 4px; }
@media (min-width: 640px) { .thumb-grid { grid-template-columns: repeat(4, 1fr); } }
.vehicle-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: grab; transition: border-color 0.15s, opacity 0.15s; }
.vehicle-thumb.drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-ring); }
.vehicle-thumb.dragging { opacity: 0.45; }
.vehicle-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-thumb .remove-btn { position: absolute; right: 6px; top: 6px; display: flex; height: 24px; width: 24px; align-items: center; justify-content: center; border: none; border-radius: 50%; background: rgba(10, 11, 13, 0.7); color: #fff; cursor: pointer; opacity: 0; transition: opacity 0.15s, background-color 0.15s; }
.vehicle-thumb:hover .remove-btn, .vehicle-thumb .remove-btn:focus-visible { opacity: 1; }
.vehicle-thumb .remove-btn:hover { background: var(--danger); }
@media (hover: none) { .vehicle-thumb .remove-btn { opacity: 1; } }
.vehicle-thumb .name-tag { position: absolute; inset-inline: 0; bottom: 0; padding: 14px 8px 6px; font-size: 11px; color: #fff; background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vehicle-thumb .primary-tag { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 700; letter-spacing: 0.03em; }
.add-more-tile { display: flex; aspect-ratio: 4 / 3; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: none; color: var(--ink-faint); cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.add-more-tile:hover { border-color: var(--accent); color: var(--accent); }
.add-more-tile span { font-size: 11px; font-weight: 600; }
.photo-count { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-faint); }
.photo-count strong { color: var(--ink); font-weight: 600; }
.upload-warning { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--warning-bg); font-size: 12.5px; color: var(--warning); }
.upload-warning svg { flex-shrink: 0; margin-top: 2px; }

.tips-card { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-strong); }
.tips-card .label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.tips-card ul { display: flex; flex-direction: column; gap: 9px; margin: 12px 0 0; padding: 0; list-style: none; }
.tips-card li { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.45; color: var(--ink-muted); }
.tips-card li svg { flex-shrink: 0; margin-top: 3px; color: var(--success); }

.logo-upload-full { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-strong); }
.logo-upload-full:empty { display: none; }
.logo-upload-full .frame { display: flex; height: 56px; width: 56px; flex-shrink: 0; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--canvas); }
.logo-upload-full .frame img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-upload-full .info { flex: 1; min-width: 150px; }
.logo-upload-full .info .title { margin: 0; font-size: 13.5px; font-weight: 600; }
.logo-upload-full .info .meta { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-muted); }
.logo-upload-full .info .note { margin: 2px 0 0; font-size: 11.5px; color: var(--ink-faint); }
.logo-upload-full .actions { display: flex; flex-shrink: 0; gap: 8px; }
.logo-upload-full .actions button { height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 550; cursor: pointer; transition: background-color 0.15s; }
.logo-upload-full .actions button:hover { background: var(--surface-raised); }
.logo-upload-full .actions button.remove { border-color: var(--danger-border); color: var(--danger); background: none; }
.logo-upload-full .actions button.remove:hover { background: var(--danger-bg); }

.preview-panel { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.preview-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 0; }
.preview-panel-head .label, .preview-panel-body .label { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.preview-panel-body .label { color: var(--ink-faint); margin-bottom: 4px; }
.preview-panel-head .sub { margin: 2px 0 0; font-size: 12px; color: var(--ink-faint); }
.preview-panel-img { position: relative; margin: 12px 16px 0; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: repeating-linear-gradient(45deg, var(--surface-strong) 0 10px, #15181c 10px 20px); }
.preview-panel-img.has-photo { cursor: zoom-in !important; }
.preview-panel-img > img { width: 100%; height: 100%; object-fit: cover; }
#preview-img { position: absolute; inset: 0; }
.preview-panel-img .scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 55%); }
.preview-panel-img .caption-row { position: absolute; inset-inline: 0; bottom: 0; display: flex; align-items: center; gap: 7px; padding: 12px; }
.preview-panel-img .caption-row .dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--ink-faint); }
.preview-panel-img .caption-row .dot.premium { background: var(--accent); }
.preview-panel-img .caption-row .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; color: #fff; }
.preview-panel-img .caption-row .tier { margin-left: auto; flex-shrink: 0; padding: 2px 8px; border-radius: var(--radius-pill); background: rgba(0, 0, 0, 0.5); font-size: 10.5px; font-weight: 600; color: rgba(255, 255, 255, 0.85); backdrop-filter: blur(6px); }
.preview-panel-empty { display: flex; height: 100%; width: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; }
.preview-panel-empty p { max-width: 75%; margin: 0; font-size: 12.5px; color: var(--ink-faint); }
.preview-panel-body { padding: 16px; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.status-row + .status-row { border-top: 1px solid var(--border); }
.status-row .name { margin: 0; font-size: 13px; font-weight: 550; }
.status-row .sub { margin: 1px 0 0; font-size: 12px; color: var(--ink-faint); }
.status-row .dot { display: flex; height: 22px; width: 22px; flex-shrink: 0; align-items: center; justify-content: center; border: 1.5px dashed var(--border-strong); border-radius: 50%; transition: all 0.2s; }
.status-row .dot.done { border: none; background: var(--success); color: #fff; }
.warn-line { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-strong); font-size: 12px; line-height: 1.5; color: var(--ink-muted); }
.warn-line svg { flex-shrink: 0; margin-top: 2px; color: var(--warning); }

.setup-footer { position: sticky; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-top: 24px; padding: 14px 0; border-top: 1px solid var(--border); background: linear-gradient(0deg, var(--canvas) 70%, rgba(10, 11, 13, 0.85)); backdrop-filter: blur(8px); }
.setup-footer p { margin: 0; font-size: 12.5px; color: var(--ink-faint); }
.setup-footer a { color: var(--accent); font-weight: 550; }
.setup-footer a:hover { color: var(--accent-light); }
#footer-warn { display: flex; align-items: center; gap: 6px; color: var(--warning); font-weight: 550; }

/* Photo check (Continue to Preview): one line per check and per photo with
   a small status mark, and the report in the summary under the title when
   the photos and the showroom can't match. Kept deliberately plain -- no
   badges, tinted boxes or cards inside cards; colour only on the marks.
   The card is the usual .modal-card, wider, with only the body
   scrolling so the heading and the buttons stay in view. It hangs from the
   top rather than being centred: results arriving grow it, and a centred
   card would jump up under the pointer as they do. */
.zoom-overlay.photo-check-overlay { align-items: flex-start; padding: max(32px, 8vh) 32px 32px; }
.modal-card.photo-check-card { display: flex; flex-direction: column; max-width: 36rem; max-height: 100%; padding: 0; overflow: hidden; }
.photo-check-card:focus { outline: none; }
.photo-check-card [hidden] { display: none !important; }
.photo-check-head { display: flex; align-items: flex-start; gap: 16px; padding: 20px 24px 18px; }
.photo-check-heading { flex: 1; min-width: 0; }
.modal-card .photo-check-heading h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.photo-check-heading p { margin: 6px 0 0; max-width: 62ch; font-size: 13px; line-height: 1.55; color: var(--ink-muted); }
.photo-check-heading p:empty { display: none; }
.photo-check-close { display: flex; height: 30px; width: 30px; flex-shrink: 0; align-items: center; justify-content: center; margin: -4px -8px 0 0; border: none; border-radius: var(--radius-sm); background: none; color: var(--ink-faint); cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.photo-check-close:hover { background: var(--surface-strong); color: var(--ink); }
.photo-check-body { flex: 1 1 auto; min-height: 0; max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain; padding: 0 24px; border-top: 1px solid var(--border); scrollbar-width: thin; }
.modal-actions.photo-check-actions { flex-wrap: wrap; margin: 0; padding: 14px 24px 18px; border-top: 1px solid var(--border); }
.photo-check-actions .is-aside { margin-right: auto; }

/* Each check reads like a line on a spec sheet: mark, name, result. */
.check-list { margin: 0; padding: 0; list-style: none; }
.check-item { padding: 14px 0; }
.check-item + .check-item { border-top: 1px solid var(--border); }
.check-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; font-size: 13.5px; line-height: 1.4; }
.check-name { font-weight: 500; color: var(--ink); }
.check-result { text-align: right; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.check-note { margin: 6px 0 0 26px; max-width: 62ch; font-size: 12.5px; line-height: 1.55; color: var(--ink-muted); }

/* A plain glyph in the status colour -- no filled badge. */
.check-mark { display: inline-flex; height: 16px; width: 16px; align-items: center; justify-content: center; color: var(--ink-faint); }
.check-mark[data-status="pass"] { color: var(--success); }
.check-mark[data-status="warn"] { color: var(--warning); }
.check-mark[data-status="fail"] { color: var(--danger); }
.check-mark .spinner { height: 12px; width: 12px; border-width: 1.5px; }

.check-photos { margin: 8px 0 0 26px; padding: 0; list-style: none; }
.check-photos:empty { display: none; }
.check-photo { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; padding: 10px 0; }
.check-photo + .check-photo { border-top: 1px solid var(--border); }
/* Outranks .zoom-overlay img, which would letterbox the thumbnail. */
.photo-check-card .check-photo-thumb { width: 36px; height: 36px; max-width: none; max-height: none; object-fit: cover; border-radius: 4px; background: var(--surface-strong); }
.check-photo-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 12px; row-gap: 2px; min-height: 20px; }
.check-photo-name { flex: 1 1 8rem; min-width: 0; overflow: hidden; font-size: 13px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); }
.check-photo-verdict { display: inline-flex; flex-shrink: 0; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-muted); }
.check-photo-verdict .check-mark { height: 14px; width: 14px; }
.check-photo-notes p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.photo-check-card .check-photo-line { font-weight: 400; color: var(--ink); }
.check-photo-fix { color: var(--ink-muted); }
.check-photo-more { margin-top: 4px; font-size: 12px; }
.check-photo-more summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; color: var(--ink-faint); border-radius: 3px; }
.check-photo-more summary::-webkit-details-marker { display: none; }
.check-photo-more summary::after { content: ""; height: 5px; width: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.15s; }
.check-photo-more[open] summary::after { transform: translateY(1px) rotate(225deg); }
.check-photo-more summary:hover { color: var(--ink-muted); }
.check-photo-more summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check-photo-more p { color: var(--ink-muted); }

@media (max-width: 640px) {
  .zoom-overlay.photo-check-overlay { padding: 16px; }
}
@media (max-width: 480px) {
  .photo-check-head { padding: 18px 16px 14px; }
  .photo-check-body { padding: 0 16px; }
  .modal-actions.photo-check-actions { flex-direction: column; align-items: stretch; padding: 14px 16px 16px; }
  .photo-check-actions .btn { width: 100%; }
  .photo-check-actions .is-aside { margin-right: 0; }
  .check-photos { margin-left: 0; }
}

/* ---------- Preview ---------- */
.preview-layout { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1100px) { .preview-layout { grid-template-columns: 300px minmax(0, 1fr); } }
.preview-controls { padding: 0; overflow: visible; }
.control-group { padding: 18px 20px; }
.control-group + .control-group { border-top: 1px solid var(--border); }
.control-group-title { margin: 0 0 14px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.control-group .field:last-child { margin-bottom: 0; }
.control-actions { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; border-top: 1px solid var(--border); }
@media (min-width: 1100px) { .preview-controls { position: sticky; top: calc(var(--header-h) + 20px); } }

.bg-picker { position: relative; }
.bg-picker-toggle { display: flex; width: 100%; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--canvas); color: var(--ink); text-align: left; cursor: pointer; transition: border-color 0.15s; }
.bg-picker-toggle:hover { border-color: #3d434a; }
.bg-picker-toggle img, .bg-picker-option img { width: 44px; height: 30px; flex-shrink: 0; object-fit: cover; border-radius: var(--radius-xs); }
.bg-picker-toggle .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 550; }
.bg-picker-toggle svg { flex-shrink: 0; color: var(--ink-faint); }
.bg-picker-menu { position: absolute; left: 0; right: 0; z-index: 30; margin-top: 6px; max-height: 320px; overflow-y: auto; padding: 4px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-raised); box-shadow: var(--shadow-lg); }
.bg-picker-option { display: flex; width: 100%; align-items: center; gap: 10px; padding: 6px; border: none; border-radius: var(--radius-sm); background: none; color: var(--ink); text-align: left; cursor: pointer; font-size: 12.5px; }
.bg-picker-option:hover { background: rgba(255, 255, 255, 0.05); }
.bg-picker-option.is-current { color: var(--accent-light); }
.bg-picker-option.is-current::after { content: "Current"; margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--accent); }
.bg-picker-manage { display: block; margin-top: 4px; padding: 9px 8px; border-top: 1px solid var(--border); font-size: 12.5px; font-weight: 550; color: var(--accent); }

.stage-column { min-width: 0; }
.stage-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.stage-topbar .callout { flex: 1; min-width: 240px; }
.stage { position: relative; aspect-ratio: 16 / 10; max-height: 70vh; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-md); }
.stage img.bg { width: 100%; height: 100%; object-fit: cover; }
.stage:fullscreen { border-radius: 0; border: none; }
.drag-frame { position: absolute; display: flex; align-items: center; justify-content: center; border: 2px solid var(--accent); border-radius: 4px; background: #fff; cursor: grab; touch-action: none; }
.drag-frame img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none; pointer-events: none; }
.drag-frame.dragging { cursor: grabbing; }
/* The vehicle frame shows the real transparent cutout, anchored at its bottom
   centre (the floor contact line) via translate(-50%,-100%), so it has no
   card background -- just an outline so it's obviously draggable. An outline,
   not a border (like the logo frame below): a border sits inside the frame's
   width, so the car was drawn 3px narrower and 1.5px higher than the vehicle
   size and ground point the compositor uses. */
.drag-frame.vehicle { display: block; background: none; border: none; outline: 1.5px dashed rgba(255, 106, 0, 0.6); }
.drag-frame.vehicle:hover, .drag-frame.vehicle.dragging { outline-style: solid; outline-color: var(--accent); }
.drag-frame.vehicle img { display: block; width: 100%; height: auto; max-width: none; max-height: none; }
.drag-frame.vehicle.pending img { opacity: 0.55; }
.vehicle-frame-status { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 6px; padding: 3px 9px; border-radius: var(--radius-pill); background: rgba(10, 11, 13, 0.82); color: #fff; font-size: 11.5px; font-weight: 500; white-space: nowrap; pointer-events: none; backdrop-filter: blur(6px); }
.vehicle-frame-status:empty { display: none; }
/* The logo frame IS the box ImageCompositor fits the logo into on the finished
   picture (its size is set inline from LOGO_MAX_*_FRACTION as a % of the
   stage), and the logo is contain-fitted inside it the same way, up or down.
   No card background, since the output has none, and an outline instead of a
   border so the logo gets the whole box, exactly as in the output. */
.drag-frame.logo { background: none; border: none; outline: 1.5px dashed rgba(255, 106, 0, 0.6); }
.drag-frame.logo:hover, .drag-frame.logo.dragging { outline-style: solid; outline-color: var(--accent); }
.drag-frame.logo img { display: block; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; }
/* The room's open floor (RoomAnalysis), outlined only while the car is being
   dragged, so the dealer can see where its wheels belong without a permanent
   box over the photo. */
.floor-guide { position: absolute; border: 1px dashed rgba(255, 255, 255, 0.9); border-radius: 2px; opacity: 0; pointer-events: none; transition: opacity 0.15s var(--ease); }
.stage.is-placing .floor-guide { opacity: 0.45; }
.auto-place-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.auto-place-row span { font-size: 12px; line-height: 1.4; color: var(--ink-faint); text-wrap: balance; }
.stage-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.stage-footer p { margin: 0; font-size: 12.5px; color: var(--ink-faint); }
.stage-notes { min-width: 0; }
.stage-footer .placement-hint { margin-top: 3px; color: var(--warning); }
.placement-hint button { padding: 0; border: 0; background: none; font: inherit; font-weight: 550; color: var(--ink); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; cursor: pointer; }
.placement-hint button:hover { text-decoration-color: currentColor; }
.stage-toolbar { display: flex; align-items: center; gap: 6px; }
.stage-icon-btn { display: flex; height: 34px; width: 34px; flex-shrink: 0; align-items: center; justify-content: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-strong); color: var(--ink-muted); cursor: pointer; transition: color 0.15s, background-color 0.15s; }
.stage-icon-btn:hover { color: var(--ink); background: var(--surface-raised); }
.stage-icon-btn.primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-accent); }
.stage-icon-btn.primary:hover { background: var(--accent-strong); }
.thumb-nav-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.thumb-nav-strip { display: flex; flex: 1; gap: 8px; overflow-x: auto; padding: 2px; }
.thumb-nav { position: relative; height: 60px; width: 90px; flex-shrink: 0; overflow: hidden; padding: 0; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; transition: border-color 0.15s; }
.thumb-nav img { width: 100%; height: 100%; object-fit: cover; }
.thumb-counter { flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

.confirm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.confirm-left { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.confirm-status { display: flex; align-items: center; gap: 10px; }
.confirm-status .title { margin: 0; font-size: 14px; font-weight: 600; }
.confirm-status .sub { margin: 0; font-size: 12px; color: var(--ink-faint); }
.confirm-check { display: flex; height: 32px; width: 32px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 50%; background: var(--success-bg); color: var(--success); }
.confirm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.confirm-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface-strong); font-size: 12px; }
.confirm-chip svg { flex-shrink: 0; color: var(--success); }
.confirm-chip .chip-label { color: var(--ink-faint); }
.confirm-chip .chip-value { font-weight: 600; color: var(--ink); }
.confirm-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.confirm-right p { margin: 0; font-size: 11.5px; color: var(--ink-faint); }
@media (max-width: 640px) { .confirm-right { align-items: stretch; width: 100%; } .confirm-right p { text-align: center; } }

/* ---------- Processing ---------- */
.processing-wrap { max-width: 720px; }
.processing-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.processing-card #items { padding: 4px 20px; }
.processing-item { padding: 14px 0; }
.processing-item + .processing-item { border-top: 1px solid var(--border); }
.processing-row { display: flex; align-items: center; gap: 14px; }
.processing-thumb { width: 60px; height: 44px; flex-shrink: 0; object-fit: cover; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.processing-info { flex: 1; min-width: 0; }
.processing-name { margin: 0; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.processing-stage { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-muted); }
.processing-stage.is-error { color: var(--danger); }
.processing-status { display: inline-flex; flex-shrink: 0; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; white-space: nowrap; }
.processing-status.waiting { background: var(--surface-raised); color: var(--ink-faint); }
.processing-status.processing { background: var(--accent-soft); color: var(--accent-light); }
.processing-status.complete { background: var(--success-bg); color: var(--success); }
.processing-status.error { background: var(--danger-bg); color: var(--danger); }
.status-ring { display: inline-block; height: 12px; width: 12px; border: 1.5px dashed currentColor; border-radius: 50%; }
.status-check { display: inline-flex; height: 15px; width: 15px; align-items: center; justify-content: center; border-radius: 50%; background: var(--success); color: #fff; }
.spinner { display: inline-block; height: 13px; width: 13px; border: 2px solid rgba(255, 106, 0, 0.25); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.item-bar-track { height: 3px; margin: 10px 0 0 74px; overflow: hidden; border-radius: var(--radius-pill); background: var(--surface-raised); }
.item-bar-fill { width: 0%; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.3s var(--ease); }
.processing-progress { padding: 18px 20px 20px; border-top: 1px solid var(--border); background: var(--surface-strong); }
.processing-progress-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 13.5px; font-weight: 600; }
.processing-progress-head #progress-count { font-variant-numeric: tabular-nums; color: var(--accent-light); }
.processing-bar-track { height: 6px; margin-top: 10px; overflow: hidden; border-radius: var(--radius-pill); background: var(--surface-raised); }
.processing-bar-fill { width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-strong), var(--accent-light)); transition: width 0.3s var(--ease); }
.processing-eta-line { margin: 10px 0 0; font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.processing-failed-banner { display: flex; gap: 12px; margin: 0 0 20px; padding: 16px; border: 1px solid var(--danger-border); border-radius: var(--radius-md); background: var(--danger-bg); }
.processing-failed-banner svg { flex-shrink: 0; margin-top: 1px; color: var(--danger); }
.processing-failed-banner h3 { margin: 0; font-size: 14px; font-weight: 600; }
.processing-failed-banner p { margin: 4px 0 12px; font-size: 13px; line-height: 1.55; color: var(--ink-muted); }

/* ---------- Results ---------- */
.tabs { display: flex; gap: 2px; width: fit-content; margin: 0 0 20px; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.tabs button { height: 32px; padding: 0 16px; border: none; border-radius: var(--radius-xs); background: none; color: var(--ink-muted); font-size: 13px; font-weight: 550; cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.tabs button:hover:not(.active) { color: var(--ink); }
.tabs button.active { background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--hairline); }

.compare-slider { position: relative; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); cursor: ew-resize; touch-action: none; user-select: none; }
.lightbox-overlay .compare-slider { max-width: 64rem; margin: 0 auto; border-radius: var(--radius-md); }
.compare-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare-slider .before-wrap { position: absolute; inset: 0; overflow: hidden; }
.compare-slider .tag { position: absolute; top: 14px; padding: 4px 10px; border-radius: var(--radius-pill); background: rgba(10, 11, 13, 0.62); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; backdrop-filter: blur(6px); }
.compare-slider .tag.before { left: 14px; }
.compare-slider .tag.after { right: 14px; }
.compare-slider .divider { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, 0.4); }
.compare-slider .handle { position: absolute; top: 50%; left: 50%; display: flex; height: 40px; width: 40px; transform: translate(-50%, -50%); align-items: center; justify-content: center; border-radius: 50%; background: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }
.compare-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.compare-foot p { margin: 0; font-size: 12.5px; color: var(--ink-faint); }

.thumb-strip { display: flex; gap: 10px; margin-top: 20px; padding: 2px; overflow-x: auto; }
.thumb-strip button { position: relative; height: 64px; width: 96px; flex-shrink: 0; overflow: hidden; padding: 0; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; opacity: 0.7; transition: opacity 0.15s, border-color 0.15s; }
.thumb-strip button:hover { opacity: 1; }
.thumb-strip button.active { border-color: var(--accent); opacity: 1; }
.thumb-strip img { width: 100%; height: 100%; object-fit: cover; }

.results-tab-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 640px) { .results-tab-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .results-tab-grid { grid-template-columns: repeat(4, 1fr); } }
.result-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); transition: border-color 0.15s, box-shadow 0.2s; }
.result-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.result-card .thumb { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: none; background: var(--surface-strong); cursor: zoom-in; }
.result-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.result-card .actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.result-card .actions button, .result-card .actions a { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-xs); background: var(--surface-strong); color: var(--ink-muted); font-size: 12px; font-weight: 550; cursor: pointer; transition: color 0.15s, background-color 0.15s; }
.result-card .actions button:hover { color: var(--ink); background: var(--surface-raised); }
.result-card .actions a.download { border-color: rgba(255, 106, 0, 0.4); background: var(--accent-soft); color: var(--accent-light); }
.result-card .actions a.download:hover { background: rgba(255, 106, 0, 0.2); }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  main.container { padding-top: 22px; padding-bottom: 40px; }
  .page-head, .flow-head { margin-bottom: 20px; }
  .flow-head { padding-bottom: 16px; }
  .card { padding: 18px; }
  .lightbox-overlay, .zoom-overlay { padding: 56px 12px 80px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 22px; transform: none; }
  .modal-card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
