/* Falcon Eye admin panel — styles. All colours/sizes come from assets/tokens.css.
   Component patterns follow 01 Visual Identity/design-system.html. */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
html[lang="ar"] .en, html[lang="en"] .ar { display: none !important; }
html[data-theme="dark"] .th-light, html[data-theme="light"] .th-dark { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-xs); }
.ltr { direction: ltr; unicode-bidi: isolate; }
bdi.n { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.latin { font-family: var(--font-latin); }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
html[dir="rtl"] .flip { transform: scaleX(-1); }
code { font-family: var(--font-mono); font-size: 12px; background: var(--surface-2); padding: 1px 6px; border-radius: var(--r-xs); direction: ltr; unicode-bidi: isolate; }

/* ======================= shell ======================= */
.app { --side-w: 232px; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns var(--dur-base) var(--ease-out); }
.app.collapsed { --side-w: 64px; }
.side { background: var(--surface); border-inline-end: 1px solid var(--border); z-index: var(--z-modal); min-width: 0; }
.side-in { position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; padding: 14px 10px; }
.side .brand { display: flex; align-items: center; height: 36px; padding: 0 8px; margin-bottom: 14px; }
.side .brand img { height: 26px; display: block; }
.side .brand .mk { height: 26px; display: none; }
.side h6 { margin: 16px 10px 6px; font: 600 11px var(--font-latin); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-subtle); white-space: nowrap; }
html[lang="ar"] .side h6 { font-family: var(--font-arabic); letter-spacing: 0; font-size: 12px; }
.side nav a { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 10px; border-radius: var(--r-sm); color: var(--text-muted); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background-color var(--dur-fast), color var(--dur-fast); }
.side nav a:hover { background: var(--surface-hover); color: var(--text); }
.side nav a.on { background: var(--surface-2); color: var(--text); }
.side nav a.on svg.i { color: var(--accent-text); }
.side nav a .cnt { margin-inline-start: auto; min-width: 20px; height: 20px; border-radius: var(--r-pill); padding: 0 6px; background: var(--danger); color: #fff; font: 700 11px/20px var(--font-latin); text-align: center; }
html[data-theme="light"] .side nav a .cnt { color: #fff; }
.side .foot { margin-top: auto; padding: 12px 10px 2px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-subtle); white-space: nowrap; }
.side .foot b { display: block; color: var(--text-muted); font-weight: 600; letter-spacing: .35em; font: 600 10px var(--font-latin); margin-top: 2px; }
.app.collapsed .side .lbl, .app.collapsed .side h6, .app.collapsed .side .foot, .app.collapsed .side nav a .cnt { display: none; }
.app.collapsed .side .brand .full { display: none; }
.app.collapsed .side .brand .mk { display: block; }
.app.collapsed .side nav a { justify-content: center; padding: 0; }
.app.collapsed .side h6 + nav, .app.collapsed .side nav + h6 { margin-top: 10px; }
.app.collapsed .side nav a.has-cnt { position: relative; }
.app.collapsed .side nav a.has-cnt::after { content: ""; position: absolute; top: 8px; inset-inline-end: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: var(--z-sticky); height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 20px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar .crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; color: var(--text-muted); overflow: hidden; white-space: nowrap; }
.topbar .crumbs b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumbs svg.i { width: 14px; height: 14px; color: var(--text-subtle); }
.topbar .sp { flex: 1; }
.ibtn { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--text-muted); position: relative; transition: background-color var(--dur-fast), color var(--dur-fast); flex: none; }
.ibtn:hover { background: var(--surface-hover); color: var(--text); }
.ibtn .dot { position: absolute; top: 2px; inset-inline-end: 1px; min-width: 15px; height: 15px; border-radius: 8px; padding: 0 3px; line-height: 15px !important; font-size: 9.5px !important; background: var(--danger); color: #fff; font: 700 10px/16px var(--font-latin); border: 2px solid var(--bg); box-sizing: content-box; }
.search-btn { display: flex; align-items: center; gap: 10px; height: 36px; width: 280px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--text-subtle); font-size: 13px; transition: border-color var(--dur-fast); }
.search-btn:hover { border-color: var(--border-strong); }
.search-btn kbd, .kbd { margin-inline-start: auto; font: 600 11px var(--font-latin); border: 1px solid var(--border); border-radius: var(--r-xs); padding: 1px 6px; color: var(--text-muted); background: var(--surface-2); direction: ltr; }
.clock { font: 600 12px var(--font-latin); color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 4px 10px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.clock i { width: 6px; height: 6px; border-radius: 50%; background: var(--live); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font: 600 12px var(--font-latin); color: var(--text); flex: none; text-transform: uppercase; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.menu { position: relative; }
.menu-pop { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: 6px; z-index: var(--z-dropdown); display: none; }
.menu-pop.open { display: block; animation: pop var(--dur-fast) var(--ease-out); }
.menu-pop .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-pop .who b { display: block; }
.menu-pop .who small { color: var(--text-muted); }
.menu-pop button, .menu-pop a { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border-radius: var(--r-sm); text-align: start; font-size: 14px; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--surface-hover); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }

.view { padding: 24px 28px 64px; max-width: 1480px; width: 100%; }
.view.enter { animation: viewIn var(--dur-base) var(--ease-out); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
.demo-strip { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); padding: 6px 28px; border-bottom: 1px solid var(--border); background: var(--surface); }
.demo-strip svg.i { width: 15px; height: 15px; color: var(--info); }

/* page head */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.ph h1 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.25; }
.ph p { margin: 4px 0 0; color: var(--text-muted); font-size: 14px; }
.ph .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.back:hover { color: var(--text); }
.back svg.i { width: 16px; height: 16px; }
h2.sh { font-size: 15px; font-weight: 600; margin: 0; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.sec-h a, .sec-h .lnk { font-size: 13px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px; }
.sec-h a:hover { color: var(--text); }
.sec-h a svg.i { width: 15px; height: 15px; }

/* grids */
.grid { display: grid; gap: 16px; }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: grid; gap: 16px; align-content: start; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); min-width: 0; }
.card.pad { padding: 16px; }
.card-b { padding: 16px; }

/* KPI stat cards (dashboard pattern) */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; display: grid; gap: 4px; min-width: 0; transition: border-color var(--dur-fast); }
a.stat:hover { border-color: var(--border-strong); }
.stat .l { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .l svg.i { width: 16px; height: 16px; color: var(--accent-text); }
.stat b { font: 700 26px/1.2 var(--font-latin); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; text-align: start; }
.stat b small { font-size: 15px; font-weight: 600; color: var(--text-subtle); }
.stat .s { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.stat .s.err { color: var(--danger); } .stat .s.warn { color: var(--warning); }

/* buttons (design system) */
.btn { --h: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 16px; border-radius: var(--r-sm); border: 1px solid transparent; font: 600 14px var(--font); cursor: pointer; white-space: nowrap; position: relative; transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-instant) var(--ease-out); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn svg.i { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-press); }
.btn-secondary { background: var(--text); color: var(--bg); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { background: var(--surface-hover); border-color: var(--text-subtle); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--surface-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 88%, #000); }
.btn-sm { --h: 32px; padding: 0 12px; font-size: 13px; }
.btn-icon { width: var(--h); padding: 0; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--on-accent); border-inline-end-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* inputs */
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field .lab { font-size: 13px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--text-muted); }
.field .hint.err { color: var(--danger); }
.input { height: 38px; width: 100%; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); padding: 0 12px; font: 400 14px var(--font); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.input::placeholder { color: var(--text-subtle); }
.input:hover { border-color: var(--text-subtle); }
.input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.input.error { border-color: var(--danger); }
textarea.input { height: 84px; padding: 9px 12px; resize: vertical; line-height: 1.5; }
.input-wrap { position: relative; }
.input-wrap svg.i { position: absolute; top: 10px; inset-inline-start: 11px; color: var(--text-subtle); width: 18px; height: 18px; pointer-events: none; }
.input-wrap .input { padding-inline-start: 38px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 8l4 4 4-4' fill='none' stroke='%237B858B' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 18px; background-position: right 10px center; padding-inline-end: 34px; cursor: pointer; }
html[dir="rtl"] select.input { background-position: left 10px center; }
.input.ltr { text-align: left; }
html[dir="rtl"] .input.ltr::placeholder { text-align: right; }
html[dir="rtl"] .input-wrap .input.ltr { padding-left: 12px; padding-right: 38px; }
.auth .brandside .tag .a { font-family: var(--font-arabic); letter-spacing: 0; font-size: 13px; }

/* checkbox + switch */
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; position: relative; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; transition: background-color var(--dur-fast), border-color var(--dur-fast); flex: none; }
.check .box svg { width: 11px; height: 11px; stroke: var(--on-accent); stroke-width: 3; fill: none; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset var(--dur-base) var(--ease-out); }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .box svg { stroke-dashoffset: 0; }
.check input:indeterminate + .box { background: var(--accent); border-color: var(--accent); }
.check input:indeterminate + .box::after { content: ""; width: 8px; height: 2px; background: var(--on-accent); border-radius: 1px; }
.check input:focus-visible + .box { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch .track-s { width: 40px; height: 24px; border-radius: var(--r-pill); background: var(--border-strong); position: relative; transition: background-color var(--dur-base); flex: none; }
.switch .track-s::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: inset-inline-start var(--dur-base) var(--ease-snap); }
.switch input:checked + .track-s { background: var(--accent); }
.switch input:checked + .track-s::after { inset-inline-start: 19px; background: var(--fe-obsidian); }
.switch input:focus-visible + .track-s { outline: 2px solid var(--focus); outline-offset: 2px; }

/* segmented control with sliding thumb */
.seg { display: inline-flex; position: relative; border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px; background: var(--surface); flex: none; }
.seg button { position: relative; z-index: 1; padding: 4px 11px; border-radius: var(--r-pill); font: 500 12.5px var(--font-latin); color: var(--text-muted); transition: color var(--dur-fast) var(--ease-out); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg button[data-v="ar"] { font-family: var(--font-arabic); }
html[lang="ar"] .seg button { font-family: var(--font-arabic); }
html[lang="ar"] .seg button[data-v="en"] { font-family: var(--font-latin); }
.seg button[aria-pressed="true"] { color: var(--on-accent); }
.seg button:not([aria-pressed="true"]):hover { color: var(--text); }
.seg .thumb.still, .tabs .ink.still { transition: none; }
.seg .thumb { position: absolute; top: 3px; bottom: 3px; border-radius: var(--r-pill); background: var(--accent); transition: left var(--dur-base) var(--ease-snap), width var(--dur-base) var(--ease-snap); }
.seg svg.i { width: 15px; height: 15px; }

/* tabs with sliding underline */
.tabs { position: relative; display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { padding: 11px 14px; color: var(--text-muted); font-weight: 500; font-size: 14px; white-space: nowrap; transition: color var(--dur-fast); display: inline-flex; gap: 8px; align-items: center; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button .c { font: 600 11px var(--font-latin); color: var(--text-subtle); background: var(--surface-2); border-radius: var(--r-pill); padding: 1px 7px; }
.tabs .ink { position: absolute; bottom: 0; height: 2px; background: var(--accent); transition: left var(--dur-base) var(--ease-out), width var(--dur-base) var(--ease-out); }
html[data-theme="light"] .tabs .ink { background: var(--text); }
.tab-panel { animation: fadein var(--dur-base) var(--ease-out); }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } }

/* badges / status */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font: 600 11.5px var(--font); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); white-space: nowrap; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge.lime { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.badge.live i { background: var(--live); animation: pulse 1.6s var(--ease-out) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }
.badge.ok { color: var(--text); } .badge.ok i { background: var(--success); }
html[data-theme="light"] .badge.ok i { background: #3F7D0A; }
.badge.warn { color: var(--warning); }
.badge.err { color: var(--danger); }
.badge.info { color: var(--info); }
.badge.mute { color: var(--text-muted); }
.badge.proc i { background: none; border: 1.5px solid currentColor; border-inline-end-color: transparent; animation: spin .8s linear infinite; }
.sev { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.sev svg.i { width: 15px; height: 15px; }
.sev.critical, .sev.high { color: var(--danger); }
.sev.medium { color: var(--warning); }
.sev.low { color: var(--info); }

/* alerts (inline notices) */
.alert { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); align-items: start; font-size: 13.5px; }
.alert svg.i { margin-top: 1px; }
.alert b { display: block; font-size: 14px; }
.alert .t { color: var(--text-muted); }
.alert.info svg.i { color: var(--info); }
.alert.warn svg.i { color: var(--warning); }
.alert.err { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.alert.err svg.i { color: var(--danger); }

/* toasts */
.toasts { position: fixed; z-index: var(--z-toast); bottom: 20px; inset-inline-end: 20px; display: grid; gap: 10px; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-width: 260px; border-radius: var(--r-md); background: var(--fe-graphite); color: var(--fe-offwhite); border: 1px solid #2E373D; box-shadow: var(--shadow-2); font-size: 14px; animation: toastin var(--dur-base) var(--ease-snap); }
.toast.out { animation: toastout var(--dur-base) var(--ease-out) forwards; }
.toast svg.i { color: var(--fe-lime); }
.toast .undo { margin-inline-start: auto; font-weight: 600; color: var(--fe-lime); padding: 2px 6px; border-radius: var(--r-xs); }
@keyframes toastin { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toastout { to { opacity: 0; transform: translateY(8px); } }

/* filter bar */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px; border-bottom: 1px solid var(--border); }
.filters .input-wrap { flex: 1 1 220px; max-width: 320px; }
.filters select.input { width: auto; min-width: 140px; }
.filters .sp { flex: 1; }
.filters .count { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); font-size: 13px; animation: fadein var(--dur-fast) var(--ease-out); }
.bulk b { margin-inline-end: 6px; }

/* table (design system) */
.tbl-wrap { overflow-x: auto; }
.dtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dtable th, .dtable td { padding: 10px 14px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.dtable th { font-weight: 600; font-size: 12px; color: var(--text-muted); background: var(--surface); position: sticky; top: 0; }
.dtable th.r, .dtable td.r { text-align: end; }
.dtable tbody tr { transition: background-color var(--dur-fast); }
.dtable tbody tr:hover { background: var(--surface-hover); }
.dtable tbody tr.click { cursor: pointer; }
.dtable tbody tr.sel { background: color-mix(in srgb, var(--text) 5%, transparent); }
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable td.w { white-space: normal; min-width: 180px; }
.dtable .act { opacity: 0; transition: opacity var(--dur-fast); display: inline-flex; gap: 4px; }
.dtable tr:hover .act, .dtable .act:focus-within { opacity: 1; }
@media (hover: none) { .dtable .act { opacity: 1; } }
.dtable .cb { width: 36px; padding-inline-end: 0; }
.cell-main b { display: block; font-weight: 600; }
.cell-main small { color: var(--text-muted); font-size: 12px; }
.tfoot td { font-weight: 700; background: var(--surface-2); }

/* dot status lists */
.list > * { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border); min-width: 0; }
.list > *:last-child { border-bottom: 0; }
a.li:hover, button.li:hover { background: var(--surface-hover); }
.list .ic { width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--surface-2); display: grid; place-items: center; flex: none; color: var(--text-muted); }
.list .ic.err { color: var(--danger); } .list .ic.warn { color: var(--warning); } .list .ic.info { color: var(--info); } .list .ic.ok { color: var(--accent-text); }
.list .ic svg.i { width: 16px; height: 16px; }
.list .tx { min-width: 0; flex: 1; }
.list .tx b { display: block; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .tx small { display: block; color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .end { margin-inline-start: auto; color: var(--text-subtle); font-size: 12px; white-space: nowrap; text-align: end; flex: none; }
button.li { width: 100%; text-align: start; }

/* key/value */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0; font-size: 13.5px; }
.kv > * { padding: 9px 16px; border-bottom: 1px solid var(--border); min-width: 0; }
.kv > dt { color: var(--text-muted); }
.kv > dd { margin: 0; text-align: end; overflow-wrap: anywhere; }
.kv > *:nth-last-child(-n+2) { border-bottom: 0; }

/* chart */
.chart { padding: 14px 16px 10px; position: relative; }
.chart svg { display: block; width: 100%; height: 220px; overflow: visible; direction: ltr; }
.chart .gl { stroke: var(--border); stroke-width: 1; }
.chart .ax { fill: var(--text-subtle); font: 500 11px var(--font-latin); }
.chart .bar { fill: var(--n-600); transition: fill var(--dur-fast); }
html[data-theme="light"] .chart .bar { fill: var(--n-300); }
.chart .bar.now { fill: var(--accent); }
html[data-theme="light"] .chart .bar.now { fill: var(--text); }
.chart .hit { fill: transparent; cursor: default; }
.chart g.b:hover .bar { fill: var(--text-muted); }
.chart g.b:hover .bar.now { fill: var(--accent-hover); }
html[data-theme="light"] .chart g.b:hover .bar.now { fill: var(--n-700); }
.chart .lbl { fill: var(--text); font: 600 11px var(--font-latin); }
.tip { position: absolute; pointer-events: none; background: var(--text); color: var(--bg); font-size: 12px; padding: 6px 9px; border-radius: var(--r-sm); white-space: nowrap; transform: translate(-50%, -100%); opacity: 0; transition: opacity var(--dur-fast); z-index: 2; }
.tip.on { opacity: 1; }
.tip b { font-family: var(--font-latin); }
.chart-sum { display: flex; gap: 24px; flex-wrap: wrap; padding: 0 16px 14px; font-size: 12.5px; color: var(--text-muted); }
.chart-sum b { color: var(--text); font: 700 15px var(--font-latin); display: block; }

/* meter (battery / disk) */
.batt { display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--font-latin); direction: ltr; color: var(--text-muted); }
.batt span { width: 24px; height: 11px; border: 1.5px solid currentColor; border-radius: 3px; padding: 1px; display: inline-block; position: relative; }
.batt span::after { content: ""; position: absolute; right: -4px; top: 2.5px; width: 2px; height: 4px; background: currentColor; border-radius: 0 1px 1px 0; }
.batt span i { display: block; height: 100%; background: currentColor; border-radius: 1px; }
.batt.low { color: var(--warning); } .batt.crit { color: var(--danger); }
.bar-m { height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; min-width: 60px; }
.bar-m > span { display: block; height: 100%; background: var(--text-muted); border-radius: inherit; }

/* device chips (pitch cards) */
.devs { display: flex; gap: 6px; flex-wrap: wrap; }
.dev { width: 28px; height: 28px; border-radius: var(--r-sm); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-muted); position: relative; }
.dev svg.i { width: 15px; height: 15px; }
.dev::after { content: ""; position: absolute; top: -3px; inset-inline-end: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--success); border: 2px solid var(--surface); }
html[data-theme="light"] .dev::after { background: #3F7D0A; }
.dev.warn::after, .dev.updating::after { background: var(--warning); }
.dev.err::after { background: var(--danger); }
.dev.mute::after { background: var(--text-subtle); }

/* live feed + bracket (dashboard pattern) */
.feed { position: relative; border-radius: var(--r-md); overflow: hidden; background: #1E2529; aspect-ratio: 16 / 9; }
.feed svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.feed .bracket { position: absolute; width: 18%; height: 30%; left: 64%; top: 30%; --c: var(--fe-lime); --l: 14px; background: linear-gradient(var(--c),var(--c)) top left / var(--l) 2px, linear-gradient(var(--c),var(--c)) top left / 2px var(--l), linear-gradient(var(--c),var(--c)) top right / var(--l) 2px, linear-gradient(var(--c),var(--c)) top right / 2px var(--l), linear-gradient(var(--c),var(--c)) bottom left / var(--l) 2px, linear-gradient(var(--c),var(--c)) bottom left / 2px var(--l), linear-gradient(var(--c),var(--c)) bottom right / var(--l) 2px, linear-gradient(var(--c),var(--c)) bottom right / 2px var(--l); background-repeat: no-repeat; }
.feed .callout { position: absolute; left: 30%; top: 34%; background: rgb(10 13 15 / .88); border: 1px solid #2E373D; border-radius: var(--r-sm); padding: 7px 11px; font: 600 11px var(--font-latin); letter-spacing: .1em; color: var(--fe-lime); direction: ltr; }
.feed .callout small { display: block; color: #9AA3A8; font-weight: 500; letter-spacing: .03em; }
.feed .badge { position: absolute; top: 10px; inset-inline-end: 10px; background: rgb(10 13 15 / .75); border-color: transparent; color: #F3F5F2; }
.feed .ts { position: absolute; bottom: 8px; inset-inline-start: 10px; font: 500 11px var(--font-mono); color: #9AA3A8; direction: ltr; }
.feed .off { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; background: rgb(10 13 15 / .78); color: #F3F5F2; font-size: 13px; font-weight: 600; text-align: center; padding: 12px; z-index: 1; }
.feed .off svg.i { color: #FF5A4E; margin: 0 auto; width: 22px; height: 22px; }
.feed .lab { position: absolute; top: 10px; inset-inline-start: 10px; font: 600 11px var(--font); padding: 3px 9px; border-radius: var(--r-pill); background: rgb(10 13 15 / .75); color: #F3F5F2; }

.pitches { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.pitch { overflow: hidden; }
.pitch .feed { border-radius: 0; aspect-ratio: 16 / 8; }
.pitch .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.pitch .row b { display: block; font-size: 14px; }
.pitch .row small { color: var(--text-muted); font-size: 12px; }
.pitch.add { display: grid; place-items: center; align-content: center; gap: 8px; min-height: 200px; border-style: dashed; border-color: var(--border-strong); color: var(--text-muted); font-weight: 600; transition: background-color var(--dur-fast), color var(--dur-fast); width: 100%; }
.pitch.add:hover { background: var(--surface-hover); color: var(--text); }

/* venue header */
.vhead { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.vstats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }

/* timeline */
.tl { list-style: none; margin: 0; padding: 4px 16px 8px; }
.tl li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; position: relative; padding: 10px 0; }
.tl li::before { content: ""; position: absolute; inset-inline-start: 13.5px; top: 36px; bottom: -10px; width: 1px; background: var(--border-strong); }
.tl li:last-child::before { display: none; }
.tl .dt { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-muted); }
.tl .dt svg.i { width: 14px; height: 14px; }
.tl .dt.detect { color: var(--danger); } .tl .dt.resolve { color: var(--accent-text); } .tl .dt.ack, .tl .dt.assign { color: var(--info); }
.tl b { font-weight: 600; font-size: 13.5px; }
.tl small { display: block; color: var(--text-subtle); font-size: 12px; margin-top: 2px; }

/* modal (design system) */
.modal-bg { position: fixed; inset: 0; z-index: calc(var(--z-modal) + 2); background: var(--overlay); display: grid; place-items: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out); }
.modal-bg.open { opacity: 1; pointer-events: auto; }
.modal { width: min(480px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-3); transform: translateY(12px) scale(.98); transition: transform var(--dur-base) var(--ease-snap); }
.modal.wide { width: min(880px, 100%); }
.modal-bg.open .modal { transform: none; }
.modal h3 { font-size: 18px; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.modal h3 .x { margin-inline-start: auto; }
.modal > p { color: var(--text-muted); margin: 0 0 18px; font-size: 14px; }
.modal .form { display: grid; gap: 14px; margin-bottom: 20px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.steps { display: flex; gap: 8px; margin: 4px 0 18px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-2); transition: background-color var(--dur-base); }
.steps span.on { background: var(--accent); }
html[data-theme="light"] .steps span.on { background: var(--text); }

/* command palette */
.pal-bg { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--overlay); display: none; padding: 12vh 16px 16px; }
.pal-bg.open { display: block; animation: fadein var(--dur-fast) var(--ease-out); }
.pal { width: min(620px, 100%); margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-3); overflow: hidden; }
.pal .q { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.pal .q input { flex: 1; height: 52px; border: 0; background: none; color: var(--text); font: 400 16px var(--font); outline: none; }
.pal .q svg.i { color: var(--text-subtle); }
.pal .res { max-height: min(420px, 56vh); overflow-y: auto; padding: 6px; }
.pal .grp { font-size: 11.5px; font-weight: 600; color: var(--text-subtle); padding: 8px 10px 4px; }
.pal .it { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; }
.pal .it.on { background: var(--surface-2); }
.pal .it svg.i { color: var(--text-muted); }
.pal .it .tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal .it small { color: var(--text-subtle); font-size: 12px; }
.pal .hintbar { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-subtle); }
.pal .empty-r { padding: 28px; text-align: center; color: var(--text-muted); }

/* drawer (clip preview) */
.drawer-bg { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--overlay); opacity: 0; pointer-events: none; transition: opacity var(--dur-base); }
.drawer-bg.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; z-index: calc(var(--z-modal) + 1); top: 0; bottom: 0; inset-inline-end: 0; width: min(560px, 100vw); background: var(--surface); border-inline-start: 1px solid var(--border); box-shadow: var(--shadow-3); transform: translateX(calc(var(--d, 1) * 104%)); transition: transform var(--dur-base) var(--ease-out); overflow-y: auto; visibility: hidden; }
html[dir="rtl"] .drawer { --d: -1; }
.drawer.open { transform: none; visibility: visible; }
.drawer .dh { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.drawer .dh h3 { margin: 0; font-size: 16px; flex: 1; }
.drawer .db { padding: 16px; display: grid; gap: 16px; }

/* clip player (design system) */
.player { position: relative; background: #000; border-radius: var(--r-md); overflow: hidden; user-select: none; }
.player .scene-wrap { position: relative; aspect-ratio: 16/9; background: #1E2529; overflow: hidden; }
.player svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform var(--dur-slow) var(--ease-out); }
.player.angle-b svg.scene { transform: scaleX(-1); }
.player .bracket { position: absolute; width: 20%; height: 30%; --c: var(--fe-lime); --l: 10px; background: linear-gradient(var(--c),var(--c)) top left / var(--l) 2px, linear-gradient(var(--c),var(--c)) top left / 2px var(--l), linear-gradient(var(--c),var(--c)) top right / var(--l) 2px, linear-gradient(var(--c),var(--c)) top right / 2px var(--l), linear-gradient(var(--c),var(--c)) bottom left / var(--l) 2px, linear-gradient(var(--c),var(--c)) bottom left / 2px var(--l), linear-gradient(var(--c),var(--c)) bottom right / var(--l) 2px, linear-gradient(var(--c),var(--c)) bottom right / 2px var(--l); background-repeat: no-repeat; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; transition: opacity var(--dur-base); }
.player.near-goal .bracket { opacity: 1; }
.player .ov-top { position: absolute; top: 10px; inset-inline: 10px; display: flex; justify-content: space-between; pointer-events: none; }
.player .tag { font: 600 11px var(--font); padding: 4px 9px; border-radius: var(--r-pill); background: rgb(10 13 15 / .75); color: #F3F5F2; }
.player .slow-tag { background: var(--fe-lime); color: var(--fe-obsidian); font-family: var(--font-latin); opacity: 0; transition: opacity var(--dur-base); }
.player.slow .slow-tag { opacity: 1; }
.player .big { position: absolute; inset: 0; margin: auto; width: 60px; height: 60px; border-radius: 50%; background: var(--fe-lime); display: grid; place-items: center; transition: opacity var(--dur-fast), transform var(--dur-base) var(--ease-snap); }
.player .big:hover { transform: scale(1.06); }
.player .big svg { width: 22px; height: 22px; fill: var(--fe-obsidian); margin-left: 4px; }
.player.playing .big { opacity: 0; transform: scale(.8); pointer-events: none; }
.player .ctrl { direction: ltr; padding: 8px 12px 10px; background: #0A0D0F; color: #F3F5F2; }
.player .removed { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; align-content: center; gap: 6px; text-align: center; background: rgb(10 13 15 / .86); color: #F3F5F2; font-weight: 600; padding: 16px; }
.player .removed small { color: #9AA3A8; font-weight: 400; }
.scrub { position: relative; height: 22px; touch-action: none; cursor: pointer; }
.scrub .rail, .scrub .fill { position: absolute; top: 9px; height: 4px; border-radius: 2px; left: 0; }
.scrub .rail { right: 0; background: rgb(255 255 255 / .2); }
.scrub .fill { background: var(--fe-lime); width: 0; }
.scrub .knob { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; left: 0; }
.scrub .mk { position: absolute; top: 3px; width: 2px; height: 16px; background: #fff; border-radius: 1px; }
.scrub .mk::after { content: "GOAL"; position: absolute; bottom: 17px; left: 50%; transform: translateX(-50%); font: 700 9px var(--font-latin); color: var(--fe-lime); letter-spacing: .08em; }
.ctrl-row { display: flex; align-items: center; gap: 2px; margin-top: 2px; }
.ctrl-row button { width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center; transition: background-color var(--dur-fast); }
.ctrl-row button:hover { background: rgb(255 255 255 / .12); }
.ctrl-row svg.i { width: 18px; height: 18px; }
.ctrl-row .time { font: 600 12px var(--font-latin); color: #C9D0D3; margin: 0 6px; font-variant-numeric: tabular-nums; }
.ctrl-row .sp { flex: 1; }
.ctrl-row .pill { width: auto; height: 26px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid rgb(255 255 255 / .25); font: 700 12px var(--font-latin); }
.ctrl-row .pill.on { background: var(--fe-lime); color: var(--fe-obsidian); border-color: var(--fe-lime); }

/* clip thumb */
.cthumb { width: 72px; aspect-ratio: 16/10; border-radius: 6px; overflow: hidden; position: relative; background: #1E2529; flex: none; }
.cthumb svg { width: 100%; height: 100%; display: block; }
.cthumb.dim { opacity: .45; }

/* empty state */
.empty { text-align: center; padding: 44px 24px; display: grid; justify-items: center; gap: 6px; }
.empty .ic { width: 56px; height: 56px; border-radius: 50%; border: 1.5px dashed var(--border-strong); display: grid; place-items: center; margin-bottom: 10px; color: var(--text-muted); }
.empty .ic svg.i { width: 24px; height: 24px; }
.empty h4 { font-size: 16px; margin: 0; }
.empty p { margin: 0 0 12px; color: var(--text-muted); font-size: 14px; max-width: 40ch; }

/* WhatsApp templates (design system) */
.chat { background: var(--surface-2); border-radius: var(--r-md); padding: 18px; display: grid; gap: 10px; align-content: start; }
.bubble { max-width: 92%; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; border-start-start-radius: 4px; padding: 12px 14px; font-size: 14px; line-height: 1.6; white-space: pre-line; animation: fadein var(--dur-base) var(--ease-out); }
.bubble .lnk { color: var(--info); direction: ltr; unicode-bidi: isolate; }
.bubble .meta { display: block; text-align: end; font: 500 11px var(--font-latin); color: var(--text-subtle); margin-top: 4px; }
.bubble .prev { display: flex; gap: 10px; align-items: center; margin: -4px -6px 10px; padding: 8px; border-radius: 10px; background: var(--surface-2); }
.bubble .prev span.t { width: 64px; aspect-ratio: 16/10; border-radius: 6px; background: #1E2529; flex: none; display: grid; place-items: center; }
.bubble .prev span.t i { width: 18px; height: 18px; border-radius: 50%; background: var(--fe-lime); }
.bubble .prev b { font-size: 13px; display: block; }
.bubble .prev small { font-size: 11px; color: var(--text-muted); }
.tpl { font-family: var(--font); font-size: 14px; line-height: 1.7; white-space: pre-wrap; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px; margin: 0; }
.tpl .v { font-family: var(--font-mono); font-size: 12px; direction: ltr; unicode-bidi: isolate; color: var(--accent-text); background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 3px; padding: 0 2px; }
html[data-theme="light"] .tpl .v { background: color-mix(in srgb, var(--text) 8%, transparent); }

/* settings rows */
.srow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.srow:last-child { border-bottom: 0; }
.srow b { display: block; font-weight: 600; }
.srow small { color: var(--text-muted); font-size: 12.5px; }
.keybox { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--border); font: 500 13px var(--font-mono); direction: ltr; min-width: 0; }
.keybox span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* sign in */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth .pane { display: grid; place-items: center; padding: 40px 24px; }
.auth form { width: min(380px, 100%); display: grid; gap: 16px; }
.auth form h1 { font-size: 26px; margin: 0; line-height: 1.3; }
.auth form > p { margin: -8px 0 4px; color: var(--text-muted); }
.auth .brandside { background: var(--fe-obsidian); color: var(--fe-offwhite); border-inline-start: 1px solid var(--border); display: grid; align-content: space-between; padding: 40px; }
html[data-theme="light"] .auth .brandside { border-color: transparent; }
.auth .brandside img { height: 34px; }
.auth .brandside .feed { max-width: 560px; width: 100%; justify-self: center; }
.auth .brandside h2 { font-size: 30px; margin: 22px 0 6px; line-height: 1.3; }
.auth .brandside h2 em { font-style: normal; color: var(--fe-lime); }
.auth .brandside p { color: #9AA3A8; margin: 0; }
.auth .brandside .tag { font: 600 11px var(--font-latin); letter-spacing: var(--tracking-tag); color: #7B858B; }
.auth .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* misc */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.dotsep { color: var(--text-subtle); margin: 0 4px; }
.pill-n { font: 600 11px var(--font-latin); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 0 7px; color: var(--text-muted); }
.note { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.note:last-child { border-bottom: 0; }
.note p { margin: 0 0 4px; }
.note small { color: var(--text-subtle); font-size: 12px; }
.placeholder-tag { font: 600 10.5px var(--font-latin); letter-spacing: .08em; text-transform: uppercase; color: var(--warning); border: 1px solid color-mix(in srgb, var(--warning) 50%, var(--border)); border-radius: var(--r-pill); padding: 1px 7px; white-space: nowrap; }
html[lang="ar"] .placeholder-tag { font-family: var(--font-arabic); letter-spacing: 0; text-transform: none; }

/* ======================= responsive ======================= */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search-btn { width: 200px; }
}
@media (max-width: 1100px) {
  .g-main, .vhead { grid-template-columns: minmax(0, 1fr); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .app, .app.collapsed { grid-template-columns: minmax(0, 1fr); }
  .side-in { height: 100%; }
  .side { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: 260px; transform: translateX(calc(var(--d, 1) * -105%)); transition: transform var(--dur-base) var(--ease-out); visibility: hidden; }
  html[dir="rtl"] .side { --d: -1; }
  .app.nav-open .side { transform: none; visibility: visible; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: var(--overlay); z-index: calc(var(--z-modal) - 1); }
  .app.collapsed .side .lbl, .app.collapsed .side h6, .app.collapsed .side .foot { display: revert; }
  .app.collapsed .side .brand .full { display: block; } .app.collapsed .side .brand .mk { display: none; }
  .app.collapsed .side nav a { justify-content: flex-start; padding: 0 10px; }
  .view { padding: 20px 16px 56px; }
  .demo-strip { padding: 6px 16px; }
  .topbar { padding: 0 12px; gap: 6px; }
  .search-btn { width: 36px; padding: 0; justify-content: center; border-color: transparent; background: none; }
  .search-btn .lbl, .search-btn kbd { display: none; }
}
@media (max-width: 720px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat b { font-size: 22px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .vstats { grid-template-columns: 1fr 1fr; }
  .ph h1 { font-size: 21px; }
  .topbar .clock, .topbar .seg { display: none; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth .brandside { display: none; }
  .filters .input-wrap { max-width: none; flex-basis: 100%; }
  .filters select.input { flex: 1 1 120px; min-width: 0; }
  .filters .sp { display: none; }
  .srow { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .srow > :last-child { justify-self: start; }
  .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat b { overflow-wrap: anywhere; }
  .topbar .crumbs > :not(:last-child) { display: none; }
  .modal { padding: 18px; }
  .dtable.cards thead { display: none; }
  .dtable.cards, .dtable.cards tbody, .dtable.cards tr, .dtable.cards td { display: block; }
  .dtable.cards tr { padding: 10px 12px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
  .dtable.cards td { padding: 0; border: 0; white-space: normal; }
  .dtable.cards td[data-h] { grid-column: 2 / -1; font-size: 12.5px; color: var(--text-muted); display: flex; gap: 6px; }
  .dtable.cards td[data-h], .dtable.cards td.r[data-h] { text-align: start; justify-content: flex-start; align-items: center; flex-wrap: wrap; }
  .dtable.cards td[data-h]::before { content: attr(data-h); color: var(--text-subtle); min-width: 84px; }
  .dtable.cards td.lead { grid-column: 2 / 3; }
  .dtable.cards td.cb { grid-column: 1; grid-row: 1; width: auto; }
  .dtable.cards td.tail { grid-column: 3; grid-row: 1; text-align: end; }
  .dtable.cards td.hide-m { display: none; }
  .dtable.cards .act { opacity: 1; }
  .toasts { inset-inline: 16px; bottom: 16px; }
  .toast { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
