/* ============================================================================
   BHAI-LOK · Component layer — extends bhai-lok-system.css
   Link AFTER the system: <link rel="stylesheet" href="assets/bhai-lok-system.css">
                         <link rel="stylesheet" href="assets/bhai-lok-components.css">
   ========================================================================== */

/* ── state color: positive (verified/online) per theme ── */
:root,[data-theme="image-warm"]{ --positive: oklch(0.74 0.13 150); }
[data-theme="image-dark"]{ --positive: oklch(0.76 0.09 150); }
[data-theme="image-cool"]{ --positive: oklch(0.78 0.11 160); }
[data-theme="noir"]{ --positive: oklch(0.74 0.10 150); }
[data-theme="light"]{ --positive: oklch(0.52 0.15 150); }

/* ───────── Page header (universal) ───────── */
.page-head{ display:flex; flex-direction:column; gap:var(--gap-sm); margin-bottom:var(--gap-lg); }
.page-head-row{ display:flex; align-items:flex-end; justify-content:space-between; gap:var(--gap-md); flex-wrap:wrap; }
.breadcrumb{ display:flex; align-items:center; gap:6px; font-family:var(--font-mono); font-size:12px; color:var(--muted-2); flex-wrap:wrap; }
.breadcrumb a:hover{ color:var(--fg); }
.breadcrumb svg{ width:13px; height:13px; opacity:.6; }
.page-title{ font-size:var(--fs-h1); font-weight:600; line-height:1.15; letter-spacing:-0.02em; }
.page-sub{ font-size:var(--fs-meta); color:var(--muted); font-family:var(--font-mono); }
.page-actions{ display:flex; align-items:center; gap:var(--gap-sm); flex-wrap:wrap; }

/* ───────── Toolbar / filter bar ───────── */
.toolbar{ display:flex; align-items:center; gap:var(--gap-sm); flex-wrap:wrap; padding:var(--gap-sm) var(--gap-md); background:var(--glass-surface); border:1px solid var(--border); border-radius:var(--radius); -webkit-backdrop-filter:blur(16px) saturate(120%); backdrop-filter:blur(16px) saturate(120%); }
.toolbar .search-mini{ flex:1; min-width:160px; display:flex; align-items:center; gap:8px; height:36px; padding-inline:12px; background:color-mix(in oklch, var(--surface) 50%, transparent); border:1px solid var(--border); border-radius:8px; color:var(--muted); }
.toolbar .search-mini svg{ width:16px; height:16px; }
.toolbar .search-mini input{ flex:1; background:none; border:0; color:var(--fg); font-size:13px; min-width:0; }
.toolbar .search-mini input:focus{ outline:none; }
.toolbar .toolbar-end{ margin-left:auto; display:flex; align-items:center; gap:var(--gap-sm); }

/* segmented control */
.segmented{ display:inline-flex; padding:3px; background:color-mix(in oklch, var(--surface) 56%, transparent); border:1px solid var(--border); border-radius:10px; gap:2px; }
.segmented button{ padding:6px 12px; border-radius:7px; font-size:13px; font-weight:500; color:var(--muted); min-height:32px; }
.segmented button:hover{ color:var(--fg); }
.segmented button.active{ background:var(--glass-elevated); color:var(--fg); }

/* chip (dismissible) */
.chip{ display:inline-flex; align-items:center; gap:6px; padding:4px 6px 4px 12px; background:color-mix(in oklch, var(--fg) 8%, transparent); border:1px solid var(--border); border-radius:999px; font-size:12px; color:var(--fg); }
.chip > .chip-x{ width:18px; height:18px; border-radius:50%; display:grid; place-items:center; color:var(--muted); }
.chip > .chip-x:hover{ color:var(--fg); background:color-mix(in oklch, var(--fg) 8%, transparent); }
.chip > .chip-x svg{ width:12px; height:12px; }

/* status badge */
.badge{ display:inline-flex; align-items:center; gap:6px; padding:2px 9px; border-radius:6px; font-family:var(--font-mono); font-size:11px; letter-spacing:.02em; font-weight:500; }
.badge::before{ content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.badge-positive{ color:var(--positive); background:color-mix(in oklch, var(--positive) 16%, transparent); }
.badge-warn{ color:var(--alert); background:color-mix(in oklch, var(--alert) 14%, transparent); }
.badge-accent{ color:var(--accent); background:var(--accent-soft); }
.badge-muted{ color:var(--muted); background:color-mix(in oklch, var(--fg) 8%, transparent); }

/* ───────── Stat / KPI card ───────── */
.stat-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:var(--gap-md); }
.stat-card{ background:var(--glass-surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:var(--gap-md); -webkit-backdrop-filter:blur(16px) saturate(120%); backdrop-filter:blur(16px) saturate(120%); }
.stat-card .stat-label{ font-family:var(--font-mono); font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted-2); }
.stat-card .stat-value{ font-family:var(--font-display); font-size:30px; font-weight:600; line-height:1.1; letter-spacing:-0.02em; margin-top:6px; }
.stat-card .stat-delta{ font-family:var(--font-mono); font-size:12px; color:var(--muted); margin-top:4px; }
.stat-card .stat-delta.up{ color:var(--positive); }
.stat-card .stat-delta.down{ color:var(--alert); }
.stat-card .stat-spark{ height:28px; margin-top:var(--gap-sm); display:flex; align-items:flex-end; gap:3px; }
.stat-card .stat-spark span{ flex:1; background:color-mix(in oklch, var(--fg) 18%, transparent); border-radius:2px; }
.stat-card .stat-spark span.peak{ background:var(--accent); }
@media (max-width:1079px){ .stat-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .stat-grid{ grid-template-columns:1fr; } }

/* ───────── Progress / spinner ───────── */
.progress{ height:6px; border-radius:6px; background:color-mix(in oklch, var(--fg) 10%, transparent); overflow:hidden; }
.progress > span{ display:block; height:100%; background:var(--fg); border-radius:6px; }
.progress-accent > span{ background:var(--accent); }
.spinner{ width:18px; height:18px; border-radius:50%; border:2px solid var(--border-2); border-top-color:var(--fg); animation:spin .8s linear infinite; display:inline-block; }
@keyframes spin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce){ .spinner{ animation:none; border-top-color:var(--border-2); } }

/* ───────── Switch / toggle ───────── */
.switch{ display:inline-flex; align-items:center; gap:10px; cursor:pointer; user-select:none; }
.switch input{ position:absolute; opacity:0; width:0; height:0; }
.switch .track{ width:38px; height:22px; border-radius:999px; background:color-mix(in oklch, var(--fg) 14%, transparent); position:relative; transition:background .15s; border:1px solid var(--border); }
.switch .track::after{ content:""; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:var(--fg); transition:transform .15s; }
.switch input:checked + .track{ background:var(--accent); border-color:var(--accent); }
.switch input:checked + .track::after{ transform:translateX(16px); background:var(--on-primary); }
.switch input:focus-visible + .track{ outline:2px solid var(--accent); outline-offset:2px; }

/* ───────── Option cards (radio/checkbox) ───────── */
.opt-card{ position:relative; display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid var(--border); border-radius:12px; background:color-mix(in oklch, var(--surface) 50%, transparent); cursor:pointer; transition:border-color .14s, background .14s; }
.opt-card:hover{ border-color:var(--border-2); }
.opt-card input{ position:absolute; opacity:0; }
.opt-card input:focus-visible ~ .opt-body{ outline:2px solid var(--accent); outline-offset:2px; border-radius:8px; }
.opt-card.checked{ border-color:var(--accent); background:var(--accent-soft); }
.opt-body{ flex:1; }
.opt-title{ font-size:14px; font-weight:600; color:var(--fg); }
.opt-sub{ font-size:12px; color:var(--muted); margin-top:2px; }
.opt-mark{ width:20px; height:20px; border-radius:50%; border:1.5px solid var(--border-2); flex-shrink:0; display:grid; place-items:center; color:transparent; }
.opt-card.checked .opt-mark{ background:var(--accent); border-color:var(--accent); color:var(--on-primary); }
.opt-mark svg{ width:13px; height:13px; }

/* ───────── Checkbox ───────── */
.check-wrap{ display:inline-flex; position:relative; }
.check-wrap input{ position:absolute; opacity:0; width:0; height:0; }
.check{ width:18px; height:18px; border-radius:5px; border:1.5px solid var(--border-2); background:var(--glass-elevated); display:grid; place-items:center; color:transparent; transition:all .12s; }
.check svg{ width:13px; height:13px; }
.check-wrap input:checked + .check{ background:var(--accent); border-color:var(--accent); color:var(--on-primary); }
.check-wrap input:focus-visible + .check{ outline:2px solid var(--accent); outline-offset:2px; }

/* ───────── Data table (admin) ───────── */
.data-table-wrap{ background:var(--glass-surface); border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; -webkit-backdrop-filter:blur(16px) saturate(120%); backdrop-filter:blur(16px) saturate(120%); }
.data-table{ width:100%; border-collapse:collapse; font-size:14px; }
.data-table thead th{ padding:10px 14px; text-align:left; font-family:var(--font-mono); font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted-2); font-weight:500; border-bottom:1px solid var(--border); background:color-mix(in oklch, var(--surface) 40%, transparent); white-space:nowrap; }
.data-table tbody td{ padding:12px 14px; border-bottom:1px solid var(--border); vertical-align:middle; }
.data-table tbody tr:last-child td{ border-bottom:0; }
.data-table tbody tr{ transition:background .12s; }
.data-table tbody tr:hover{ background:color-mix(in oklch, var(--fg) 4%, transparent); }
.data-table .cell-strong{ color:var(--fg); font-weight:600; }
.data-table .cell-muted{ color:var(--muted); font-family:var(--font-mono); font-size:13px; }
.data-table .cell-meta{ color:var(--muted-2); font-family:var(--font-mono); font-size:12px; }
.data-table .checkbox-cell{ width:36px; }
.data-table .row-actions{ display:flex; gap:4px; justify-content:flex-end; }
.data-table .row-actions .icon-btn{ width:34px; height:34px; }
.table-foot{ display:flex; align-items:center; justify-content:space-between; gap:var(--gap-md); padding:10px 14px; border-top:1px solid var(--border); background:color-mix(in oklch, var(--surface) 40%, transparent); font-size:13px; color:var(--muted); flex-wrap:wrap; }
.bulk-bar{ display:flex; align-items:center; gap:var(--gap-sm); padding:10px 14px; background:var(--accent-soft); border-bottom:1px solid var(--border); font-size:13px; color:var(--fg); }

/* ───────── Pagination ───────── */
.pagination{ display:flex; align-items:center; gap:4px; }
.pagination button{ min-width:34px; height:34px; padding:0 10px; border-radius:8px; font-family:var(--font-mono); font-size:13px; color:var(--muted); border:1px solid transparent; }
.pagination button:hover{ background:color-mix(in oklch, var(--fg) 6%, transparent); color:var(--fg); }
.pagination button.active{ background:color-mix(in oklch, var(--fg) 10%, transparent); color:var(--fg); }
.pagination button[disabled]{ opacity:.4; cursor:not-allowed; }

/* ───────── Avatar stack ───────── */
.avatar-stack{ display:flex; align-items:center; }
.avatar-stack .avatar{ margin-left:-8px; border:2px solid var(--bg); width:26px; height:26px; font-size:10px; }
.avatar-stack .avatar:first-child{ margin-left:0; }
.avatar-stack .more{ margin-left:-8px; width:26px; height:26px; border-radius:50%; border:2px solid var(--bg); background:var(--glass-elevated); display:grid; place-items:center; font-family:var(--font-mono); font-size:10px; color:var(--muted); }

/* ───────── Tabs (underline + pill) ───────── */
.tabs-underline{ display:flex; gap:2px; border-bottom:1px solid var(--border); overflow-x:auto; }
.tabs-underline .tab{ padding:10px 14px; font-size:14px; font-weight:500; color:var(--muted); border-bottom:2px solid transparent; margin-bottom:-1px; background:none; cursor:pointer; min-height:40px; white-space:nowrap; }
.tabs-underline .tab:hover{ color:var(--fg); }
.tabs-underline .tab.active{ color:var(--fg); border-bottom-color:var(--fg); }
.tabs-pill{ display:flex; gap:6px; flex-wrap:wrap; }
.tabs-pill .tab{ padding:7px 14px; border-radius:999px; font-size:13px; font-weight:500; color:var(--muted); background:transparent; border:1px solid var(--border); cursor:pointer; }
.tabs-pill .tab:hover{ color:var(--fg); border-color:var(--border-2); }
.tabs-pill .tab.active{ color:var(--fg); background:color-mix(in oklch, var(--fg) 9%, transparent); border-color:var(--border-2); }
.tab-panel{ display:none; }
.tab-panel.active{ display:block; }

/* ───────── Media grid (discovery/movies/songs) ───────── */
.media-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:var(--gap-md); }
.media-grid.cols-3{ grid-template-columns:repeat(3,1fr); }
.media-card{ background:var(--glass-surface); border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; -webkit-backdrop-filter:blur(16px) saturate(120%); backdrop-filter:blur(16px) saturate(120%); transition:border-color .14s; display:flex; flex-direction:column; }
.media-card:hover{ border-color:var(--border-2); }
.media-thumb{ aspect-ratio:16/10; background:linear-gradient(135deg, color-mix(in oklch, var(--accent) 18%, transparent), color-mix(in oklch, var(--fg) 8%, transparent)), var(--glass-elevated); display:grid; place-items:center; color:var(--muted); position:relative; }
.media-thumb .media-rank{ position:absolute; top:8px; left:10px; font-family:var(--font-mono); font-size:12px; color:var(--fg); background:color-mix(in oklch, var(--bg) 60%, transparent); padding:2px 8px; border-radius:6px; }
.media-thumb .media-tag{ position:absolute; top:8px; right:10px; }
.media-thumb .media-play{ position:absolute; right:10px; bottom:10px; width:34px; height:34px; border-radius:50%; background:color-mix(in oklch, var(--fg) 92%, transparent); color:var(--on-primary); display:grid; place-items:center; }
.media-thumb .media-play svg{ width:15px; height:15px; margin-left:2px; }
.media-body{ padding:12px 14px; flex:1; display:flex; flex-direction:column; gap:4px; }
.media-title{ font-size:14px; font-weight:600; color:var(--fg); line-height:1.3; }
.media-meta{ font-family:var(--font-mono); font-size:12px; color:var(--muted-2); }
.media-foot{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:auto; padding-top:8px; }
@media (max-width:1079px){ .media-grid{ grid-template-columns:repeat(3,1fr); } .media-grid.cols-3{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:768px){ .media-grid, .media-grid.cols-3{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:480px){ .media-grid, .media-grid.cols-3{ grid-template-columns:1fr; } }

/* ───────── Dialog / modal / overlay ───────── */
.overlay{ position:fixed; inset:0; z-index:var(--z-modal); background:oklch(0.04 0.01 60 / 0.72); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); display:grid; place-items:center; padding:var(--gap-md); }
.overlay[hidden]{ display:none; }
.dialog{ width:100%; max-width:560px; max-height:calc(100vh - 48px); overflow:auto; background:var(--glass-solid); border:1px solid var(--border-2); border-radius:var(--radius-lg); box-shadow:0 24px 60px oklch(0 0 0 / 0.5); }
.dialog-lg{ max-width:760px; }
.dialog-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:var(--gap-md); padding:var(--gap-md); border-bottom:1px solid var(--border); }
.dialog-head h2{ font-size:18px; font-weight:600; line-height:1.3; letter-spacing:-0.01em; }
.dialog-head .dialog-sub{ font-size:13px; color:var(--muted); margin-top:2px; font-family:var(--font-mono); }
.dialog-body{ padding:var(--gap-md); }
.dialog-body p{ color:var(--muted); line-height:1.6; }
.dialog-foot{ display:flex; align-items:center; justify-content:flex-end; gap:var(--gap-sm); padding:var(--gap-md); border-top:1px solid var(--border); }
.dialog-foot .dialog-foot-meta{ margin-right:auto; font-size:13px; color:var(--muted); font-family:var(--font-mono); }
@media (max-width:767px){ .overlay{ align-items:flex-end; padding:0; } .dialog{ max-width:100%; border-radius:16px 16px 0 0; max-height:88vh; } }

/* ───────── Sheet (right drawer) ───────── */
.sheet-scrim{ position:fixed; inset:0; z-index:var(--z-drawer); background:oklch(0.04 0.01 60 / 0.6); }
.sheet-scrim[hidden]{ display:none; }
.sheet{ position:fixed; z-index:var(--z-modal); top:0; right:0; bottom:0; width:420px; max-width:92vw; background:var(--glass-solid); border-left:1px solid var(--border-2); box-shadow:-12px 0 40px oklch(0 0 0 / 0.4); display:flex; flex-direction:column; transform:translateX(100%); transition:transform .26s ease; }
.sheet.open{ transform:translateX(0); }
.sheet-head{ display:flex; align-items:center; justify-content:space-between; gap:var(--gap-md); padding:var(--gap-md); border-bottom:1px solid var(--border); }
.sheet-head h2{ font-size:16px; font-weight:600; }
.sheet-body{ flex:1; overflow:auto; padding:var(--gap-md); }
.sheet-foot{ padding:var(--gap-md); border-top:1px solid var(--border); display:flex; gap:var(--gap-sm); }
@media (max-width:767px){ .sheet{ width:100%; border-left:0; } }

/* ───────── Toast ───────── */
.toast-stack{ position:fixed; bottom:20px; right:20px; z-index:var(--z-critical); display:flex; flex-direction:column; gap:8px; max-width:360px; }
.toast{ display:flex; align-items:flex-start; gap:10px; padding:12px 14px; background:var(--glass-solid); border:1px solid var(--border-2); border-radius:12px; box-shadow:0 12px 30px oklch(0 0 0 / 0.4); transition:opacity .2s, transform .2s; }
.toast .toast-icon{ width:20px; height:20px; flex-shrink:0; color:var(--fg); margin-top:1px; }
.toast .toast-title{ font-size:13px; font-weight:600; color:var(--fg); }
.toast .toast-sub{ color:var(--muted); font-family:var(--font-mono); font-size:12px; margin-top:1px; }
.toast.positive .toast-icon{ color:var(--positive); }
.toast.warn .toast-icon{ color:var(--alert); }

/* ───────── Command palette ───────── */
.cmdk{ position:fixed; inset:0; z-index:var(--z-critical); display:grid; align-items:flex-start; justify-items:center; padding-top:12vh; background:oklch(0.04 0.01 60 / 0.6); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); }
.cmdk[hidden]{ display:none; }
.cmdk-panel{ width:100%; max-width:560px; background:var(--glass-solid); border:1px solid var(--border-2); border-radius:14px; box-shadow:0 24px 60px oklch(0 0 0 / 0.5); overflow:hidden; }
.cmdk-input{ display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--border); }
.cmdk-input svg{ width:18px; height:18px; color:var(--muted); }
.cmdk-input input{ flex:1; background:none; border:0; color:var(--fg); font-size:15px; }
.cmdk-input input:focus{ outline:none; }
.cmdk-list{ max-height:50vh; overflow:auto; padding:6px; }
.cmdk-group{ font-family:var(--font-mono); font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted-2); padding:8px 10px 4px; }
.cmdk-item{ display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:8px; color:var(--muted); cursor:pointer; }
.cmdk-item svg{ width:16px; height:16px; }
.cmdk-item .cmdk-title{ font-size:14px; color:var(--fg); flex:1; }
.cmdk-item .cmdk-kbd{ font-family:var(--font-mono); font-size:11px; color:var(--muted-2); }
.cmdk-item:hover, .cmdk-item.active{ background:color-mix(in oklch, var(--fg) 7%, transparent); }
.cmdk-foot{ display:flex; justify-content:space-between; padding:8px 12px; border-top:1px solid var(--border); font-family:var(--font-mono); font-size:11px; color:var(--muted-2); }

/* ───────── Empty / loading (skeleton) / error ───────── */
.skeleton{ background:linear-gradient(90deg, color-mix(in oklch, var(--fg) 5%, transparent), color-mix(in oklch, var(--fg) 12%, transparent), color-mix(in oklch, var(--fg) 5%, transparent)); background-size:200% 100%; animation:shimmer 1.4s ease-in-out infinite; border-radius:6px; }
.skeleton-line{ height:12px; margin-bottom:8px; }
.skeleton-block{ height:80px; }
@keyframes shimmer{ 0%{ background-position:200% 0; } 100%{ background-position:-200% 0; } }
@media (prefers-reduced-motion:reduce){ .skeleton{ animation:none; } }
.empty-state{ text-align:center; padding:var(--gap-xl) var(--gap-md); border:1px dashed var(--border-2); border-radius:var(--radius-lg); color:var(--muted); }
.empty-state .empty-icon{ width:44px; height:44px; margin:0 auto var(--gap-sm); border-radius:12px; background:var(--glass-elevated); border:1px solid var(--border-2); display:grid; place-items:center; color:var(--muted); }
.empty-state .empty-icon svg{ width:22px; height:22px; }
.empty-state .empty-title{ font-size:15px; font-weight:600; color:var(--fg); margin-bottom:4px; }
.empty-state .empty-sub{ font-size:13px; color:var(--muted-2); margin-bottom:var(--gap-sm); }
.error-state{ text-align:center; padding:var(--gap-xl) var(--gap-md); border:1px solid color-mix(in oklch, var(--alert) 40%, transparent); border-radius:var(--radius-lg); color:var(--muted); }
.error-state .empty-title{ color:var(--alert); }

/* ───────── Tooltip (light) ───────── */
[data-tooltip]{ position:relative; }
[data-tooltip]:hover::after{ content:attr(data-tooltip); position:absolute; bottom:calc(100% + 6px); left:50%; transform:translateX(-50%); padding:5px 9px; background:var(--glass-solid); border:1px solid var(--border-2); border-radius:6px; font-size:12px; color:var(--fg); white-space:nowrap; box-shadow:0 6px 16px oklch(0 0 0 / 0.3); pointer-events:none; z-index:var(--z-popover); }

/* ───────── Form layout ───────── */
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:var(--gap-md); }
.form-grid .field-full{ grid-column:1/-1; }
@media (max-width:560px){ .form-grid{ grid-template-columns:1fr; } }
.help-text{ font-size:12px; color:var(--muted-2); font-family:var(--font-mono); margin-top:4px; }
.error-text{ font-size:12px; color:var(--alert); font-family:var(--font-mono); margin-top:4px; }
.input-group{ display:flex; align-items:stretch; }
.input-group .input{ border-radius:0; }
.input-group .input:first-child{ border-radius:var(--radius) 0 0 var(--radius); }
.input-group .input:last-child{ border-radius:0 var(--radius) var(--radius) 0; }
.input-group .input-addon{ display:grid; place-items:center; padding:0 12px; background:color-mix(in oklch, var(--surface) 50%, transparent); border:1px solid var(--border); border-left:0; color:var(--muted); font-family:var(--font-mono); font-size:13px; white-space:nowrap; }
input[type="range"]{ width:100%; height:6px; -webkit-appearance:none; appearance:none; background:color-mix(in oklch, var(--fg) 12%, transparent); border-radius:6px; outline:none; }
input[type="range"]::-webkit-slider-thumb{ -webkit-appearance:none; appearance:none; width:18px; height:18px; border-radius:50%; background:var(--fg); border:2px solid var(--bg); cursor:pointer; }
input[type="range"]::-moz-range-thumb{ width:18px; height:18px; border-radius:50%; background:var(--fg); border:2px solid var(--bg); cursor:pointer; border:0; }

/* ───────── Timeline / activity ───────── */
.timeline{ display:flex; flex-direction:column; position:relative; }
.timeline-item{ display:flex; gap:var(--gap-md); padding-bottom:var(--gap-md); position:relative; }
.timeline-item::before{ content:""; position:absolute; left:15px; top:32px; bottom:0; width:2px; background:var(--border); }
.timeline-item:last-child{ padding-bottom:0; }
.timeline-item:last-child::before{ display:none; }
.timeline-dot{ width:32px; height:32px; border-radius:50%; background:var(--glass-elevated); border:1px solid var(--border-2); display:grid; place-items:center; color:var(--muted); flex-shrink:0; z-index:1; }
.timeline-dot svg{ width:16px; height:16px; }
.timeline-body{ flex:1; padding-top:4px; }
.timeline-title{ font-size:14px; color:var(--fg); line-height:1.4; }
.timeline-meta{ font-family:var(--font-mono); font-size:12px; color:var(--muted-2); margin-top:2px; }

/* ───────── Two-pane (list + detail) ───────── */
.split-pane{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr); gap:var(--gap-md); align-items:start; }
@media (max-width:920px){ .split-pane{ grid-template-columns:1fr; } }

/* ───────── Utility ───────── */
.hidden{ display:none !important; }
.text-muted{ color:var(--muted); }
.text-fg{ color:var(--fg); }
.mono{ font-family:var(--font-mono); }
.flex{ display:flex; }
.flex-wrap{ flex-wrap:wrap; }
.items-center{ align-items:center; }
.justify-between{ justify-content:space-between; }
.gap-sm{ gap:var(--gap-sm); }
.gap-md{ gap:var(--gap-md); }
.mt-sm{ margin-top:var(--gap-sm); }
.mt-md{ margin-top:var(--gap-md); }
.mt-lg{ margin-top:var(--gap-lg); }
.mb-sm{ margin-bottom:var(--gap-sm); }
.mb-md{ margin-bottom:var(--gap-md); }
.mb-lg{ margin-bottom:var(--gap-lg); }
.w-full{ width:100%; }
.text-center{ text-align:center; }
.grid-2{ display:grid; grid-template-columns:repeat(2,1fr); gap:var(--gap-md); }
@media (max-width:560px){ .grid-2{ grid-template-columns:1fr; } }
/* Live backend surfaces shared by every product and operations screen. */
.live-stage{max-width:1440px;margin-inline:auto}.live-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--gap-lg)}
.live-section{min-width:0;background:var(--glass-surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:var(--gap-md);backdrop-filter:blur(16px) saturate(120%)}
.section-head,.live-record-head{display:flex;align-items:center;justify-content:space-between;gap:var(--gap-sm)}.section-head{margin-bottom:var(--gap-sm)}.section-head h2{font-size:var(--fs-h2);font-weight:600}
.live-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column}.live-record{padding:14px 0;border-top:1px solid var(--border)}.live-record:first-child{border-top:0}.live-record p{margin-top:6px;color:var(--muted);font-size:14px}
.live-fields,.live-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;margin-top:10px}.live-field{min-width:0;display:flex;flex-direction:column}.live-field span{font:11px/1.4 var(--font-mono);color:var(--muted-2);text-transform:uppercase;letter-spacing:.04em}.live-field strong{font-size:13px;overflow-wrap:anywhere}
@media(max-width:900px){.live-grid{grid-template-columns:1fr}}@media(max-width:480px){.live-fields,.live-summary{grid-template-columns:1fr}.live-section{padding:var(--gap-sm)}}
