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

:root {
  --bg: #070a0d;
  --surface: #0c1318;
  --surface1: #0e161c;
  --surface2: #111d25;
  --border: #1a2c3a;
  --accent: #3585b5;
  --accent2: #4a9fd4;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #f1f5f9;
  --muted: #4d6a7a;
  --radius: 16px;
}

html, body, #root { height: 100%; }
body {
  background:
    radial-gradient(ellipse 140% 55% at 50% 0%, rgba(22,60,85,.85) 0%, rgba(7,12,18,.65) 45%, transparent 70%),
    #070a0d;
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Screens ── */
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; transition: opacity .3s, transform .3s; }
.screen.hidden { opacity: 0; pointer-events: none; visibility: hidden; transform: translateY(20px); }

/* ── Buttons ── */
.btn-primary { background: #fff; color: #070a0d; border: none; border-radius: 6px; padding: 15px 40px; font-size: 14px; font-weight: 700; cursor: pointer; width: 100%; max-width: 320px; letter-spacing: .07em; text-transform: uppercase; transition: background .2s, transform .1s; }
.btn-primary:active { transform: scale(.97); }
.btn-primary:hover { background: #c8e0ed; }
.btn-primary:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.btn-secondary { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid rgba(255,255,255,.12); border-radius: 6px; padding: 14px 32px; font-size: 14px; font-weight: 600; cursor: pointer; width: 100%; max-width: 320px; letter-spacing: .06em; text-transform: uppercase; transition: background .2s; }
.btn-secondary:hover { background: rgba(255,255,255,.1); }
.btn-back { background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; padding: 8px; margin-top: 4px; }

/* ── Landing ── */
.landing {
  gap: 0; text-align: center; z-index: 10; justify-content: flex-start;
  padding: 0; overflow: hidden;
  background:
    radial-gradient(ellipse 140% 65% at 50% -5%, rgba(25,65,90,.95) 0%, rgba(10,20,32,.7) 45%, transparent 72%),
    radial-gradient(ellipse 70% 45% at 50% 30%, rgba(18,50,70,.5) 0%, transparent 60%),
    #070a0d;
}
.landing-nav {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; flex-shrink: 0;
}
.landing-logo-img { height: 22px; width: auto; display: block; }
.landing-settings-btn {
  background: none; border: none; color: rgba(255,255,255,.35); cursor: pointer;
  padding: 6px; display: flex; align-items: center; transition: color .2s;
}
.landing-settings-btn:hover { color: rgba(255,255,255,.7); }
.landing-body {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 24px 60px;
}
.landing-headline {
  font-size: clamp(34px, 10vw, 52px); font-weight: 800; color: #fff;
  line-height: 1.1; letter-spacing: -.8px; max-width: 340px; margin: 0 auto 20px;
}
.landing-headline-accent { color: #7fb8d4; }
.landing-sub {
  font-size: 15px; color: rgba(255,255,255,.5); line-height: 1.65;
  max-width: 290px; margin: 0 auto 44px;
}
.landing-actions { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.btn-landing-primary {
  background: #fff; color: #070a0d; border: none; border-radius: 6px;
  padding: 14px 28px; font-size: 13px; font-weight: 700; cursor: pointer;
  letter-spacing: .08em; text-transform: uppercase; transition: background .2s, transform .1s;
  white-space: nowrap;
}
.btn-landing-primary:hover { background: #e2eaf0; }
.btn-landing-primary:active { transform: scale(.97); }
.btn-landing-secondary {
  background: none; color: rgba(255,255,255,.75); border: none;
  padding: 14px 10px; font-size: 13px; font-weight: 600; cursor: pointer;
  letter-spacing: .08em; text-transform: uppercase; transition: color .2s;
  white-space: nowrap;
}
.btn-landing-secondary:hover { color: #fff; }
.landing-footer {
  padding: 0 0 40px; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.admin-link { color: rgba(255,255,255,.3); font-size: 12px; text-decoration: none; letter-spacing: .04em; }
.admin-link:hover { color: rgba(255,255,255,.6); }

/* ── IMEI ── */
.screen-title { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.screen-sub { color: var(--muted); font-size: 14px; text-align: center; max-width: 300px; line-height: 1.6; }
.field { width: 100%; max-width: 360px; }
.field label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 8px; letter-spacing: .08em; text-transform: uppercase; }
.input-wrap { position: relative; }
.field input { width: 100%; background: rgba(255,255,255,.04); border: 1.5px solid rgba(255,255,255,.1); border-radius: 8px; padding: 14px 52px 14px 16px; font-size: 18px; color: var(--text); letter-spacing: 2px; font-family: monospace; outline: none; transition: border-color .2s; }
.field input:focus { border-color: var(--accent2); }
.field input::placeholder { letter-spacing: 1px; color: var(--muted); font-size: 14px; }
.btn-barcode { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: var(--accent); border: none; cursor: pointer; color: #fff; padding: 8px; border-radius: 8px; display: flex; align-items: center; transition: opacity .2s; animation: barcode-pulse 2s ease-in-out infinite; }
.btn-barcode:hover { opacity: .85; }
@keyframes barcode-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(53,133,181,.5); } 50% { box-shadow: 0 0 0 7px rgba(53,133,181,0); } }
.imei-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.imei-hint.valid { color: var(--success); }
.imei-hint.invalid { color: var(--danger); }

/* ── Camera ── */
.camera-screen { padding: 0; background: #000; }
.camera-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.camera-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; pointer-events: none; }
.camera-top { background: linear-gradient(to bottom, rgba(0,0,0,.85) 0%, transparent 100%); padding: 52px 20px 32px; pointer-events: auto; }
.camera-bottom { margin-top: auto; background: linear-gradient(to top, rgba(0,0,0,.9) 0%, transparent 100%); padding: 24px 20px 52px; pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.step-dots { display: flex; gap: 6px; justify-content: center; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.3); transition: all .3s; }
.step-dot.active { background: #fff; width: 24px; border-radius: 4px; }
.step-dot.done { background: var(--success); }
.step-label { font-size: 20px; font-weight: 700; color: #fff; text-align: center; }
.step-hint { font-size: 14px; color: rgba(255,255,255,.75); text-align: center; max-width: 280px; line-height: 1.5; }
.capture-row { display: flex; align-items: center; gap: 32px; }
.btn-capture { width: 76px; height: 76px; border-radius: 50%; background: #fff; border: 4px solid rgba(255,255,255,.4); cursor: pointer; transition: transform .1s; display: flex; align-items: center; justify-content: center; }
.btn-capture:active { transform: scale(.92); }
.capture-inner { width: 58px; height: 58px; border-radius: 50%; background: #fff; border: 3px solid #000; }
.btn-skip { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 20px; padding: 8px 18px; font-size: 13px; cursor: pointer; }
.btn-qr { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.camera-frame { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90%; height: 90%; border: 2px solid rgba(255,255,255,.3); border-radius: 24px; pointer-events: none; }
.camera-frame::before, .camera-frame::after { content: ''; position: absolute; width: 20px; height: 20px; border-color: #fff; border-style: solid; }
.camera-frame::before { top: -2px; left: -2px; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.camera-frame::after { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .1s; }
.flash.show { opacity: .6; }
.thumb-row { display: flex; gap: 8px; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 2px solid var(--success); }
.thumb-empty { width: 44px; height: 44px; border-radius: 8px; background: rgba(255,255,255,.1); border: 1.5px dashed rgba(255,255,255,.3); }

/* ── Processing ── */
.processing-screen { gap: 24px; text-align: center; }
.spinner { width: 48px; height: 48px; border: 3px solid rgba(255,255,255,.08); border-top-color: var(--accent2); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }
.pipeline { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 8px; }
.pipeline-item { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: 8px; padding: 12px 16px; font-size: 14px; }
.pipeline-icon { font-size: 16px; width: 22px; text-align: center; }
.pipeline-label { flex: 1; }
.pipeline-status { font-size: 12px; color: var(--muted); }
.pipeline-status.done { color: var(--success); }
.pipeline-status.active { color: var(--accent2); }

/* ── Grade badge colors ── */
.grade-A { background: rgba(34,197,94,.2);  color: #22c55e; border: 3px solid #22c55e; }
.grade-B { background: rgba(132,204,22,.2); color: #84cc16; border: 3px solid #84cc16; }
.grade-C { background: rgba(245,158,11,.2); color: #f59e0b; border: 3px solid #f59e0b; }
.grade-D { background: rgba(249,115,22,.2); color: #f97316; border: 3px solid #f97316; }
.grade-F { background: rgba(239,68,68,.2);  color: #ef4444; border: 3px solid #ef4444; }

/* ── Results ── */
.results-screen { justify-content: flex-start; padding: 0; overflow-y: auto; }
.results-header { width: 100%; background: radial-gradient(ellipse 120% 100% at 50% 0%, rgba(22,60,85,.7) 0%, transparent 70%); padding: 52px 24px 32px; text-align: center; }
.grade-badge { display: inline-flex; align-items: center; justify-content: center; width: 80px; height: 80px; border-radius: 50%; font-size: 36px; font-weight: 800; margin-bottom: 12px; }
.results-body { width: 100%; padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 16px; }
.card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 16px; }
.card-title { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.info-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.info-row:last-child { border-bottom: none; }
.info-key { color: var(--muted); }
.comp-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.comp-row:last-child { border-bottom: none; }
.comp-name { font-size: 14px; text-transform: capitalize; }
.grade-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.defect-item { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.defect-item:last-child { border-bottom: none; }
.defect-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.defect-name { font-size: 14px; font-weight: 600; text-transform: capitalize; }
.sev-pill { font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.sev-minor { background: rgba(245,158,11,.2); color: #f59e0b; }
.sev-moderate { background: rgba(249,115,22,.2); color: #f97316; }
.sev-severe { background: rgba(239,68,68,.2); color: #ef4444; }
.defect-comp { font-size: 12px; color: var(--muted); }
.defect-notes { font-size: 12px; color: var(--muted); margin-top: 3px; }
.no-defects { color: var(--success); font-size: 14px; text-align: center; padding: 12px 0; }
.btn-full { display: flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 12px; padding: 14px; font-size: 15px; font-weight: 600; cursor: pointer; width: 100%; }
.btn-full.accent { background: var(--accent); color: #fff; }
.btn-full.accent:hover { background: var(--accent2); }
.btn-full.muted { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid rgba(255,255,255,.1); }

/* ── Barcode Scanner ── */
.scanner-modal { position: fixed; inset: 0; background: #000; z-index: 200; display: flex; flex-direction: column; }
.scanner-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner-ui { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.scanner-box { width: 280px; height: 120px; border: 2px solid rgba(255,255,255,.5); border-radius: 12px; position: relative; overflow: hidden; }
.scanner-box::before, .scanner-box::after { content: ''; position: absolute; width: 16px; height: 16px; border-color: #fff; border-style: solid; }
.scanner-box::before { top: -2px; left: -2px; border-width: 3px 0 0 3px; border-radius: 3px 0 0 0; }
.scanner-box::after { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-radius: 0 0 3px 0; }
.scanner-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent2); box-shadow: 0 0 8px var(--accent2); animation: sweep 2s ease-in-out infinite; }
@keyframes sweep { 0%,100% { top: 0; } 50% { top: calc(100% - 2px); } }
.scanner-hint { color: rgba(255,255,255,.8); font-size: 14px; text-align: center; }
.scanner-status { color: var(--accent2); font-size: 13px; font-weight: 600; }
.btn-cancel-scanner { position: absolute; bottom: 52px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 20px; padding: 12px 32px; font-size: 15px; cursor: pointer; }

/* ── Toast ── */
.toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%); background: var(--danger); color: #fff; padding: 12px 24px; border-radius: 30px; font-size: 14px; font-weight: 600; z-index: 300; opacity: 0; transition: opacity .3s; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; }
.toast.success { background: var(--success); }

/* ── Admin ── */
.admin-root { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.admin-header { display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: rgba(255,255,255,.03); border-bottom: 1px solid rgba(255,255,255,.07); flex-shrink: 0; }
.admin-brand { font-size: 16px; font-weight: 700; }
.admin-brand span { color: var(--accent2); }
.btn-new-insp { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; letter-spacing: .04em; transition: background .15s; }
.btn-new-insp:hover { background: rgba(255,255,255,.14); }
.admin-layout { display: flex; flex: 1; overflow: hidden; }
.sidebar { width: 380px; flex-shrink: 0; border-right: 1px solid rgba(255,255,255,.07); display: flex; flex-direction: column; overflow: hidden; }
.sidebar-top { padding: 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.search-input { width: 100%; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 10px 14px; font-size: 14px; color: var(--text); outline: none; }
.search-input:focus { border-color: var(--accent2); }
.filter-row { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.filter-btn { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); color: var(--muted); border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; transition: all .15s; }
.filter-btn.active, .filter-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.stats-row { display: flex; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.07); flex-shrink: 0; overflow-x: auto; scrollbar-width: none; }
.stats-row::-webkit-scrollbar { display: none; }
.stat { flex: 0 0 auto; min-width: 64px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: 8px; padding: 10px 8px; text-align: center; }
.stat-val { font-size: 20px; font-weight: 800; }
.stat-lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.session-list { flex: 1; overflow-y: auto; }
.session-item { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.06); cursor: pointer; transition: background .15s; display: flex; align-items: center; gap: 12px; }
.session-item:hover { background: rgba(255,255,255,.04); }
.session-item.active { background: rgba(53,133,181,.1); border-left: 3px solid var(--accent); }
.s-grade { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; flex-shrink: 0; }
.s-imei { font-size: 13px; font-weight: 600; font-family: monospace; letter-spacing: 1px; }
.s-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.s-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.s-dot.pending, .s-dot.processing { background: var(--warning); animation: pulse 1.5s infinite; }
.s-dot.graded { background: var(--success); }
.s-dot.error { background: var(--danger); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.empty-msg { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.detail-panel { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.detail-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 48px; }
.grades-row { display: flex; align-items: center; gap: 16px; }
.grade-box { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.grade-label { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.detail-header { display: flex; align-items: flex-start; gap: 16px; }
.d-grade { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; flex-shrink: 0; }
.d-title { font-size: 20px; font-weight: 700; }
.d-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.d-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.btn-sm { padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; }
.btn-sm.primary { background: var(--accent); color: #fff; }
.btn-sm.secondary { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid rgba(255,255,255,.1); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-item .key { font-size: 11px; color: var(--muted); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .3px; }
.info-item .val { font-size: 14px; font-weight: 500; }
.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.photo-thumb { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; cursor: pointer; transition: transform .15s; border: 2px solid var(--border); display: block; }
.photo-thumb:hover { transform: scale(1.04); border-color: var(--accent); }
.photo-meta { font-size: 10px; color: var(--muted); text-align: center; margin-top: 4px; }
.photo-meta.clear { color: var(--success); }
.photo-meta.blurry { color: var(--warning); }
.grades-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.grades-table th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; text-align: left; padding: 6px 0; border-bottom: 1px solid var(--border); }
.grades-table td { padding: 10px 0; border-bottom: 1px solid var(--border); }
.grades-table tr:last-child td { border-bottom: none; }
.defect-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
.defect-row:last-child { border-bottom: none; }
.defect-row-top { display: flex; justify-content: space-between; align-items: center; }
.defect-row-name { font-size: 13px; font-weight: 600; text-transform: capitalize; }
.defect-row-comp { font-size: 11px; color: var(--muted); margin-top: 2px; }
.defect-row-note { font-size: 12px; color: var(--muted); margin-top: 4px; font-style: italic; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; z-index: 500; cursor: pointer; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; object-fit: contain; }
::-webkit-scrollbar { width: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }

/* ── Review modal ── */
.review-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); z-index: 600; display: flex; align-items: center; justify-content: center; padding: 20px; }
.review-modal { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 24px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.5); }

/* ── Mobile responsive ── */
.mobile-only { display: none; }

@media (max-width: 767px) {
  .mobile-only { display: flex; }
  .mobile-hidden { display: none !important; }

  /* Admin layout stacks vertically */
  .admin-layout { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: 100dvh; }
  .detail-panel { padding: 16px; min-height: 0; flex: 1; }

  /* Admin header compact */
  .admin-header { padding: 10px 14px; gap: 8px; }
  .admin-brand { font-size: 14px; }
  .btn-new-insp { padding: 6px 10px; font-size: 12px; }

  /* Home results scroll */
  .results-body { padding: 16px 12px 32px; }

  /* Sidebar full width on mobile when showing detail */
  .sidebar.mobile-hidden { display: none !important; }
  .detail-panel.mobile-hidden { display: none !important; }
}

/* ── Demo page ── */
.demo-root { min-height: 100dvh; background: transparent; }

@keyframes demo-fadein {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: scale(1); }
}

.demo-pulse {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); animation: demo-pulse-anim 1s ease-in-out infinite;
}
@keyframes demo-pulse-anim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}

.demo-dots { animation: demo-dots-anim 1.2s steps(3, end) infinite; }
@keyframes demo-dots-anim {
  0%   { opacity: .2; }
  50%  { opacity: 1; }
  100% { opacity: .2; }
}
