/* ==========================================================================
   News CMS – admin panel
   Brand colours come from brand_vars(admin_pid()) (CSS variables), never hard-coded.
   Light theme by default, [data-theme=dark] for dark, body.tower for the super admin "control tower".
   ========================================================================== */

:root {
  --brand: #C4161C; --brand-rgb: 196,22,28;
  --accent: #F5C400; --accent-rgb: 245,196,0;
  --dark: #111111; --dark-rgb: 17,17,17;
  --brand2: #7A0E12; --brand2-rgb: 122,14,18;

  --bg: #F3F4F7; --surface: #FFFFFF; --surface2: #F8F9FB; --surface3: #EEF0F4;
  --line: #E4E7EE; --line2: #EEF0F5;
  --text: #0E1320; --text2: #374151; --muted: #6B7280;
  --ok: #15803D; --ok-bg: #DCFCE7; --warn: #B45309; --warn-bg: #FEF3C7; --bad: #DC2626; --bad-bg: #FEE2E2; --info: #1D4ED8; --info-bg: #DBEAFE;

  --r: 14px; --r-sm: 10px; --r-lg: 20px; --r-pill: 999px;
  --sh1: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.05);
  --sh2: 0 10px 28px -10px rgba(16,24,40,.16), 0 2px 6px rgba(16,24,40,.05);
  --sh3: 0 28px 70px -16px rgba(16,24,40,.32);
  --ring: 0 0 0 3px rgba(var(--brand-rgb), .22);

  --font: "Inter", "Mukta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-d: "Mukta", "Inter", system-ui, sans-serif;
  --sbw: 268px; --tbh: 64px;
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0A0D13; --surface: #121722; --surface2: #161C28; --surface3: #1C2331;
  --line: #242C3B; --line2: #1D2431;
  --text: #E8EBF1; --text2: #C3C9D4; --muted: #8B94A6;
  --ok: #4ADE80; --ok-bg: rgba(34,197,94,.14); --warn: #FBBF24; --warn-bg: rgba(245,158,11,.14); --bad: #F87171; --bad-bg: rgba(239,68,68,.15); --info: #93C5FD; --info-bg: rgba(59,130,246,.16);
  --sh1: 0 1px 2px rgba(0,0,0,.4); --sh2: 0 12px 30px -12px rgba(0,0,0,.6); --sh3: 0 30px 80px -20px rgba(0,0,0,.8);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--tbh) + 16px); }
body { margin: 0; font: 400 14.5px/1.55 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html[lang="hi"] body { font-size: 15px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code, kbd { font: 500 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { background: var(--surface3); padding: 2px 6px; border-radius: 6px; color: var(--text2); word-break: break-all; }
kbd { font-size: 10.5px; padding: 1px 5px; border-radius: 5px; border: 1px solid rgba(255,255,255,.35); opacity: .75; margin-left: 4px; }
button { font: inherit; color: inherit; cursor: pointer; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.clamp1, .clamp2 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp1 { -webkit-line-clamp: 1; } .clamp2 { -webkit-line-clamp: 2; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--brand); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); transition: top .2s; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid rgba(var(--brand-rgb), .9); outline-offset: 2px; }
::selection { background: rgba(var(--brand-rgb), .2); }
[hidden] { display: none !important; }

/* ---------- Sidebar ---------- */
.sb {
  position: fixed; inset: 0 auto 0 0; width: var(--sbw); z-index: 60; display: flex; flex-direction: column;
  color: rgba(255,255,255,.78);
  background:
    radial-gradient(140% 50% at 0% 0%, rgba(var(--brand-rgb), .32), transparent 55%),
    radial-gradient(120% 40% at 100% 100%, rgba(var(--brand2-rgb), .45), transparent 60%),
    linear-gradient(180deg, rgb(var(--dark-rgb)), #07080B);
  border-right: 1px solid rgba(255,255,255,.06);
}
.sb::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.sb-top { display: flex; align-items: center; gap: 8px; padding: 18px 14px 14px 16px; }
.sb-brand { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; color: #fff; }
.sb-bt { display: flex; flex-direction: column; min-width: 0; }
.sb-bt b { font: 800 15.5px/1.2 var(--font-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-bt small { font-size: 11.5px; color: rgba(255,255,255,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmark { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; font: 800 15px/1 var(--font-d); color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand2)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 6px 16px -6px rgba(var(--brand-rgb), .7); overflow: hidden; }
.pmark.has-img { background: #fff; padding: 3px; }
.pmark.has-img img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; }
.pmark.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; }
.pmark.lg { width: 52px; height: 52px; border-radius: 15px; font-size: 19px; }
.pmark .ic { width: 20px; height: 20px; }
.tower-mark { background: linear-gradient(135deg, #6E7BFF, #A78BFA); box-shadow: 0 6px 18px -6px rgba(124,140,255,.8); }
.btn-icon.sb-close { display: none; color: #fff; }
.sb-nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.sb-h { margin: 18px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.38); }
html[lang="hi"] .sb-h { letter-spacing: .02em; font-size: 12px; }
.sb-link { position: relative; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 9px 12px; border-radius: 11px; font-weight: 500; color: rgba(255,255,255,.74);
  transition: background .18s, color .18s, transform .18s var(--ease); }
.sb-link .ic { opacity: .85; }
.sb-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sb-link:active { transform: scale(.985); }
.sb-link.on { color: #fff; font-weight: 600; background: linear-gradient(90deg, rgba(var(--brand-rgb), .95), rgba(var(--brand2-rgb), .9)); box-shadow: 0 10px 22px -10px rgba(var(--brand-rgb), .9), inset 0 0 0 1px rgba(255,255,255,.12); }
.sb-link.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.sb-link.on .ic { opacity: 1; }
.sb-link .badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #111; font: 700 11px/20px var(--font); text-align: center; font-style: normal; }
.sb-portal .swatch { width: 18px; height: 18px; border-radius: 6px; flex: none; background: linear-gradient(135deg, var(--brand) 50%, var(--accent) 50%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.sb-portal .chip { margin-left: auto; }
.sb-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.sb-user { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sb-user b { font-size: 13.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user small { font-size: 11.5px; color: rgba(255,255,255,.5); }
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(5,8,14,.55); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .25s; }

/* ---------- Avatars ---------- */
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 700 12.5px/1 var(--font-d); color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand2)); box-shadow: 0 0 0 2px rgba(255,255,255,.14); }
.avatar.xs { width: 22px; height: 22px; font-size: 9.5px; box-shadow: none; }
.avatar.lg { width: 46px; height: 46px; font-size: 16px; }
.avatar.xl { width: 84px; height: 84px; font-size: 28px; box-shadow: 0 0 0 5px var(--surface), var(--sh2); }
.avatar.role-super { background: linear-gradient(135deg, #6E7BFF, #A78BFA); }
.avatar.role-admin { background: linear-gradient(135deg, var(--brand), var(--brand2)); }
.avatar.role-editor { background: linear-gradient(135deg, #0EA5E9, #2563EB); }
.avatar.role-reporter { background: linear-gradient(135deg, #10B981, #047857); }

/* ---------- Shell + top bar ---------- */
.shell { margin-left: var(--sbw); min-height: 100vh; display: flex; flex-direction: column; }
.guest .shell { margin-left: 0; }
.tb { position: sticky; top: 0; z-index: 40; height: var(--tbh); display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: rgba(var(--tb-rgb, 255,255,255), .82); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
[data-theme="dark"] .tb { --tb-rgb: 13,17,25; }
.btn-icon.tb-burger { display: none; }
.tb-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.tb-crumb { font-size: 11.5px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.btn-icon { width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; border-radius: 11px; border: 0; background: transparent; color: var(--text2); transition: background .15s, color .15s, transform .15s; }
.btn-icon:hover { background: var(--surface3); color: var(--text); }
.btn-icon:active { transform: scale(.94); }
.btn-icon.sm { width: 34px; height: 34px; border-radius: 9px; }
.btn-icon.sm .ic { width: 16px; height: 16px; }
.btn-icon.danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn-icon.ok:hover { background: var(--ok-bg); color: var(--ok); }
.btn-icon[disabled] { opacity: .35; pointer-events: none; }
.lang-glyph { font: 700 13px/1 var(--font-d); }
.i-sun { display: none; }
[data-theme="dark"] .i-sun { display: block; } [data-theme="dark"] .i-moon { display: none; }

/* Dropdowns (details/summary) */
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; }
.dd > summary::-webkit-details-marker { display: none; }
.dd > summary .chev { width: 15px; height: 15px; transition: transform .2s; }
.dd[open] > summary .chev { transform: rotate(180deg); }
.dd-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 70; min-width: 290px; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh3);
  animation: pop .18s var(--ease); }
.dd-menu.right { left: auto; right: 0; min-width: 250px; }
.pswitch .dd-menu { right: 0; left: auto; }
.dd-h { padding: 6px 10px 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dd-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border: 0; border-radius: 11px; background: none; text-align: left; color: var(--text); min-height: 44px; transition: background .15s; }
.dd-item:hover { background: var(--surface3); }
.dd-item.on { background: rgba(var(--brand-rgb), .08); }
.dd-item > span { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.dd-item b { font-weight: 600; font-size: 14px; }
.dd-item small { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.dd-item .ok { color: var(--brand); }
.dd-item.danger { color: var(--bad); }
.dd-item.danger:hover { background: var(--bad-bg); }
.dd-sep { height: 1px; margin: 6px 4px; background: var(--line); }
.dd-user { display: flex; align-items: center; gap: 12px; padding: 8px 10px; }
.dd-user > span { display: flex; flex-direction: column; line-height: 1.3; }
.dd-user small { color: var(--muted); font-size: 12px; }
.swatches { display: inline-flex; gap: 2px; }
.swatches i { width: 10px; height: 10px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.avatar-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; }
.avatar-btn .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(var(--brand-rgb), .35); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Content ---------- */
.ct { flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; padding: 26px 28px 60px; outline: 0; animation: fadeUp .35s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }
.ph-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.back:hover { color: var(--brand); }
.back .ic { width: 15px; height: 15px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 14px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 11px; border: 1px solid transparent;
  font: 600 14px/1.2 var(--font); white-space: nowrap; cursor: pointer; text-decoration: none; transition: background .18s, box-shadow .18s, transform .15s var(--ease), border-color .18s, color .18s, filter .18s; }
.btn .ic { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-p { color: #fff; background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0)) , var(--brand); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 8px 20px -8px rgba(var(--brand-rgb), .75); }
.btn-p:hover { filter: brightness(1.07); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 12px 26px -10px rgba(var(--brand-rgb), .85); }
.btn-brand { color: #fff; background: var(--brand); }
.btn-brand:hover { filter: brightness(1.1); }
.btn-accent { color: #141414; background: var(--accent); box-shadow: 0 10px 24px -10px rgba(var(--accent-rgb), .9); }
.btn-accent:hover { filter: brightness(1.05); }
.btn-glass { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255,255,255,.2); }
.btn-ghost { color: var(--text2); background: var(--surface); border-color: var(--line); box-shadow: var(--sh1); }
.btn-ghost:hover { border-color: rgba(var(--brand-rgb), .35); color: var(--text); }
.btn-dark { color: #fff; background: var(--text); }
[data-theme="dark"] .btn-dark { background: var(--surface3); border-color: var(--line); }
.btn-soft { color: var(--brand); background: rgba(var(--brand-rgb), .1); }
.btn-ok { color: #fff; background: #16A34A; }
.btn-danger { color: #fff; background: #DC2626; box-shadow: 0 8px 20px -8px rgba(220,38,38,.7); }
.btn-danger:hover { background: #B91C1C; }
.btn-danger-ghost { color: var(--bad); background: transparent; border-color: rgba(220,38,38,.3); }
.btn-danger-ghost:hover { background: var(--bad-bg); }
.btn-tower { color: #fff; background: linear-gradient(135deg, #6E7BFF, #9B6BFF); box-shadow: 0 10px 26px -10px rgba(124,140,255,.9); }
.btn-tower:hover { filter: brightness(1.08); }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-lg { min-height: 48px; padding: 12px 22px; font-size: 15px; border-radius: 13px; }
.btn-block { width: 100%; }

/* ---------- Chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); font: 600 12px/1 var(--font); white-space: nowrap; background: var(--surface3); color: var(--text2); font-style: normal; vertical-align: middle; }
.chip .ic { width: 13px; height: 13px; }
.chip .dot, .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.dot.bad { background: var(--bad); }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-bad { background: var(--bad-bg); color: var(--bad); }
.chip-info { background: var(--info-bg); color: var(--info); }
.chip-mute { background: var(--surface3); color: var(--muted); }
.chip-brand { background: rgba(var(--brand-rgb), .1); color: var(--brand); }
[data-theme="dark"] .chip-brand { color: #fff; background: rgba(var(--brand-rgb), .35); }
.chip-glass { background: rgba(255,255,255,.16); color: #fff; }
.chip-live { background: rgba(34,197,94,.2); color: #BBF7D0; }
.chip-live .dot { background: #4ADE80; box-shadow: 0 0 0 3px rgba(74,222,128,.25); animation: blink 1.6s infinite; }
.role-chip.role-super { background: rgba(124,140,255,.15); color: #5865F2; }
.role-chip.role-admin { background: rgba(var(--brand-rgb), .1); color: var(--brand); }
.role-chip.role-editor { background: rgba(14,165,233,.12); color: #0369A1; }
.role-chip.role-reporter { background: rgba(16,185,129,.12); color: #047857; }
[data-theme="dark"] .role-chip.role-editor, .tower .role-chip.role-editor { color: #7DD3FC; }
[data-theme="dark"] .role-chip.role-reporter, .tower .role-chip.role-reporter { color: #6EE7B7; }
[data-theme="dark"] .role-chip.role-admin, .tower .role-chip.role-admin { color: #FCA5A5; }
[data-theme="dark"] .role-chip.role-super, .tower .role-chip.role-super { color: #A5B4FC; }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh1); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.card-h h2 { display: flex; align-items: center; gap: 8px; }
.card-h p { font-size: 13px; margin-top: 2px; }
.card-b { padding: 18px 20px 20px; }
.card + .card { margin-top: 16px; }
.list { padding: 8px 10px 12px; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; transition: background .15s; min-height: 52px; }
.li:hover { background: var(--surface2); }
.li-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.li-main b { font-weight: 600; font-size: 14px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.li-main small { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.li-end { flex: none; display: flex; align-items: center; gap: 4px; font-size: 12.5px; }
.li-end .ic { width: 15px; height: 15px; }
.thumb { width: 52px; height: 40px; flex: none; border-radius: 9px; overflow: hidden; background: var(--surface3); display: grid; place-items: center; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ic { width: 18px; height: 18px; opacity: .6; }
.thumb.wide { width: 86px; height: 44px; }
.rank { width: 28px; height: 28px; flex: none; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: rgba(var(--brand-rgb), .1); color: var(--brand); }
.cat-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.cat-pill { --c: #888; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent); white-space: nowrap; }
.cat-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
[data-theme="dark"] .cat-pill, .tower .cat-pill { color: color-mix(in srgb, var(--c) 55%, #fff); background: color-mix(in srgb, var(--c) 22%, transparent); }
.cat-pill.lg { font-size: 13.5px; padding: 5px 12px 5px 10px; }

/* ---------- Dashboard ---------- */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 28px 30px; margin-bottom: 20px; border-radius: 24px; color: #fff;
  background: radial-gradient(90% 140% at 100% 0%, rgba(var(--accent-rgb), .3), transparent 50%), linear-gradient(120deg, var(--brand) 0%, var(--brand2) 55%, rgb(var(--dark-rgb)) 120%);
  box-shadow: 0 24px 50px -24px rgba(var(--brand-rgb), .7); }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent 30%, #000 100%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: 30px; margin: 6px 0 6px; }
.hero p { color: rgba(255,255,255,.85); max-width: 560px; }
.hero-kicker { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh1);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; overflow: hidden; }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--sh2); border-color: rgba(var(--brand-rgb), .3); }
.stat-ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; margin-bottom: 8px; color: var(--brand); background: rgba(var(--brand-rgb), .1); }
.stat:nth-child(2) .stat-ic { color: var(--brand2); background: rgba(var(--brand2-rgb), .1); }
.stat:nth-child(3) .stat-ic { color: #B45309; background: rgba(245,158,11,.14); }
.stat:nth-child(4) .stat-ic { color: #1D4ED8; background: rgba(59,130,246,.12); }
.stat:nth-child(5) .stat-ic { color: #047857; background: rgba(16,185,129,.12); }
[data-theme="dark"] .stat .stat-ic { filter: brightness(1.5); }
.stat-l { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.stat-v { font: 800 28px/1.15 var(--font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-v small { font-size: 16px; color: var(--muted); font-weight: 600; }
.stat-s { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.delta { font-weight: 700; } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #F59E0B; box-shadow: 0 0 0 0 rgba(245,158,11,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(245,158,11,0); } 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); } }

.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.dash-grid > .card { margin: 0; }
.span-2 { grid-column: span 1; }
.chart { width: 100%; height: 220px; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .ax { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar rect { fill: rgba(var(--brand-rgb), .28); transform-origin: bottom; transform-box: fill-box; animation: grow .7s var(--ease) both; transition: fill .2s; }
.chart .bar:hover rect { fill: rgba(var(--brand-rgb), .6); }
.chart .bar.today rect { fill: var(--brand); }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.mini-stats div { padding: 14px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line2); }
.mini-stats b { display: block; font-size: 26px; font-weight: 800; }
.mini-stats span { color: var(--muted); font-size: 12.5px; }

/* ---------- Empty states ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 24px; }
.empty-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin-bottom: 6px; color: var(--brand); background: radial-gradient(circle at 30% 30%, rgba(var(--accent-rgb), .3), rgba(var(--brand-rgb), .1)); }
.empty-ic .ic { width: 28px; height: 28px; }
.empty h3 { font-size: 17px; }
.empty p { color: var(--muted); max-width: 400px; }
.empty .btn { margin-top: 8px; }
.empty.sm { padding: 24px 12px; }
.empty.sm .empty-ic { width: 44px; height: 44px; border-radius: 14px; }
.empty.sm .empty-ic .ic { width: 20px; height: 20px; }

/* ---------- Segmented tabs, filters ---------- */
.seg { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 14px; background: var(--surface3); width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 14px; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--muted); white-space: nowrap; transition: background .15s, color .15s; }
.seg a:hover { color: var(--text); }
.seg a.on { background: var(--surface); color: var(--text); box-shadow: var(--sh1); }
.seg em { font-style: normal; font-size: 11.5px; min-width: 22px; padding: 1px 6px; border-radius: 8px; text-align: center; background: rgba(0,0,0,.06); }
[data-theme="dark"] .seg em { background: rgba(255,255,255,.08); }
.seg a.on em { background: rgba(var(--brand-rgb), .12); color: var(--brand); }
.filters { display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 16px; flex-wrap: wrap; border-radius: 16px; }
.filters .inp { width: auto; min-width: 160px; }
.filters .grow .inp { width: 100%; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; flex-wrap: wrap; }
.toolbar .seg { margin: 0; }
.search-sm { width: 260px; max-width: 100%; }

/* ---------- Forms ---------- */
.f { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.f > label, .lbl, legend { font-size: 13px; font-weight: 600; color: var(--text2); display: flex; align-items: center; gap: 6px; padding: 0; }
legend { margin-bottom: 6px; }
.lbl .ic { width: 15px; height: 15px; }
.req { color: var(--bad); font-style: normal; }
.inp { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); font: 400 14.5px/1.45 var(--font);
  transition: border-color .15s, box-shadow .15s, background .15s; -webkit-appearance: none; appearance: none; }
html[lang="hi"] .inp { font-size: 15px; }
.inp::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.inp:hover { border-color: color-mix(in srgb, var(--line) 50%, var(--muted)); }
.inp:focus { outline: 0; border-color: rgba(var(--brand-rgb), .7); box-shadow: var(--ring); }
textarea.inp { resize: vertical; min-height: 42px; }
select.inp { padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
input[type="number"].inp { -moz-appearance: textfield; }
input[type="file"].inp { padding: 7px; }
input[type="datetime-local"].inp, input[type="date"].inp { min-height: 42px; }
.inp.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; }
.inp.is-invalid, .is-invalid > .inp, .color-inp.is-invalid .inp { border-color: var(--bad); background: color-mix(in srgb, var(--bad-bg) 35%, var(--surface)); }
.inp.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.18); }
.f-err { display: flex; align-items: center; gap: 5px; color: var(--bad); font-size: 12.5px; font-weight: 500; animation: shake .3s; }
.f-err .ic { width: 13px; height: 13px; flex: none; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.f-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; min-height: 0; }
.count { margin-left: auto; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.count.warn { color: var(--warn); }
.hint { font-size: 12.5px; color: var(--muted); }
.url-hint { word-break: break-all; }
.url-hint b { color: var(--text2); }
.f-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.f-row-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.f-switch { justify-content: flex-end; }
.form-b { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; flex-wrap: wrap; }
.inp-ic { position: relative; display: flex; align-items: center; }
.inp-ic > .ic { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.inp-ic > .inp { padding-left: 38px; }
.inp-ic > .inp:has(~ .inp-btn) { padding-right: 46px; }
.inp-ic > .inp:has(~ .inp-btn ~ .inp-btn) { padding-right: 84px; }
.inp-btn { position: absolute; right: 4px; width: 36px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); }
.inp-btn + .inp-btn { right: 40px; }
.inp-btn:hover { background: var(--surface3); color: var(--text); }
.inp-btn .ic { width: 17px; height: 17px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--text2); user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.check.solo { min-height: 0; }
.check.sm { min-height: 30px; font-size: 12.5px; }
.check.solo span { display: none; }

/* Switch */
.switch { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { position: relative; width: 42px; height: 24px; flex: none; border-radius: 12px; background: var(--line); transition: background .2s; }
[data-theme="dark"] .sw { background: #2B3446; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.switch input:checked + .sw { background: var(--brand); }
.switch input:checked + .sw::after { transform: translateX(18px); }
.switch input:focus-visible + .sw { box-shadow: var(--ring); }
.sw-l { display: flex; flex-direction: column; line-height: 1.3; }
.sw-l b { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.sw-l b .ic { width: 15px; height: 15px; color: var(--brand); }
.sw-l small { font-size: 12px; color: var(--muted); }
.switch-row { display: flex; gap: 8px 28px; flex-wrap: wrap; }

/* Segmented radio */
.seg-radio { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface3); gap: 4px; }
.seg-radio label { position: relative; cursor: pointer; }
.seg-radio input { position: absolute; opacity: 0; }
.seg-radio span { display: block; min-width: 92px; padding: 8px 16px; border-radius: 9px; text-align: center; font-weight: 600; font-size: 13.5px; color: var(--muted); transition: background .15s, color .15s; }
.seg-radio input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--sh1); }
.seg-radio input:focus-visible + span { box-shadow: var(--ring); }

/* Role picker */
.role-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.role-opt { position: relative; cursor: pointer; }
.role-opt input { position: absolute; opacity: 0; }
.role-opt > span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s; }
.role-opt b { font-size: 14px; }
.role-opt small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.role-opt input:checked + span { border-color: var(--brand); background: rgba(var(--brand-rgb), .05); box-shadow: var(--ring); }
.role-opt input:focus-visible + span { box-shadow: var(--ring); }

/* Colour input */
.color-inp { display: flex; align-items: center; gap: 8px; }
.color-inp input[type="color"] { width: 46px; height: 42px; flex: none; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; }
.color-inp input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-inp input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 8px; }
.color-inp .inp { font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; }

/* Alerts */
.alert { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; margin-bottom: 16px; border-radius: 14px; border: 1px solid; font-size: 13.5px; }
.alert > .ic { width: 20px; height: 20px; margin-top: 1px; }
.alert > div { display: flex; flex-direction: column; gap: 2px; }
.alert b { font-weight: 700; }
.alert-bad { background: var(--bad-bg); border-color: rgba(220,38,38,.25); color: var(--bad); }
.alert-bad span { color: var(--text2); }
.alert-ok { background: var(--ok-bg); border-color: rgba(22,163,74,.25); color: var(--ok); }
.alert-ok span { color: var(--text2); }
.alert-info { background: var(--info-bg); border-color: rgba(37,99,235,.2); color: var(--info); }
.alert-info span { color: var(--text2); }
.alert-warn { background: var(--warn-bg); border-color: rgba(217,119,6,.25); color: var(--warn); }
.alert-warn span { color: var(--text2); }

/* Chips as buttons */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { min-height: 30px; padding: 4px 11px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface2); font: 500 13px/1 var(--font-d); color: var(--text2); transition: all .15s; }
.chip-btn:hover { border-color: var(--brand); color: var(--brand); background: rgba(var(--brand-rgb), .06); }

/* ---------- Tables ---------- */
.tbl-card { overflow: hidden; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th { position: sticky; top: 0; padding: 12px 14px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); background: var(--surface2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: var(--surface2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.is-sel { background: rgba(var(--brand-rgb), .05); box-shadow: inset 3px 0 0 var(--brand); }
.tbl tr.is-off td:not(.w-act) { opacity: .55; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .w-check { width: 44px; padding-right: 0; }
.tbl .w-act { width: 1%; white-space: nowrap; text-align: right; }
.t-main b { font-weight: 600; line-height: 1.35; }
.t-main small { display: block; font-size: 12.5px; color: var(--muted); }
.art-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.art-cell > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.art-cell b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a.art-cell:hover b { color: var(--brand); }
.flag { font-style: normal; font-weight: 700; font-size: 11px; color: var(--muted); }
.flag-red { color: var(--bad); } .flag-gold { color: #B45309; }
.row-act { display: inline-flex; align-items: center; gap: 2px; }
.row-act form { display: contents; }
.bulkbar { position: sticky; top: calc(var(--tbh) + 8px); z-index: 20; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border-radius: 14px; color: #fff; background: rgb(var(--dark-rgb)); box-shadow: var(--sh2); animation: pop .2s var(--ease); }
.bulkbar b { margin-right: auto; font-size: 13.5px; }
.list-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pager > a:not(.btn), .pager > b, .pager > span { min-width: 36px; height: 36px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--text2); }
.pager > a:not(.btn):hover { background: var(--surface3); }
.pager > b { background: var(--brand); color: #fff; }

/* ---------- Article editor ---------- */
.ed-head { position: sticky; top: var(--tbh); z-index: 30; margin: -26px -28px 18px; padding: 16px 28px 14px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.ed-head h1 { font-size: 22px; }
.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.ed-grid[disabled] { opacity: .8; }
.ed-main { min-width: 0; }
.ed-card { padding: 6px 22px 22px; }
.ltabs { display: flex; gap: 4px; margin: 0 -22px 18px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.ltabs button { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 12px 14px; border: 0; background: none; font: 700 14.5px/1 var(--font-d); color: var(--muted); }
.ltabs button.on { color: var(--text); }
.ltabs button.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.ltabs small { font-weight: 500; font-size: 11.5px; }
.inp-title { font: 700 22px/1.35 var(--font-d) !important; min-height: 52px; padding: 10px 14px; resize: none; overflow: hidden; letter-spacing: -.005em; }
.lpanel { animation: fadeUp .25s var(--ease); }
.rte { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.rte:focus-within { border-color: rgba(var(--brand-rgb), .6); box-shadow: var(--ring); }
.rte.is-invalid { border-color: var(--bad); }
.rte-bar { position: sticky; top: calc(var(--tbh) + 72px); z-index: 5; display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface2); border-radius: 14px 14px 0 0; }
.rte-g { display: flex; gap: 2px; padding-right: 4px; margin-right: 2px; border-right: 1px solid var(--line); }
.rte-g:last-child { border-right: 0; }
.rte-bar button { min-width: 36px; height: 36px; padding: 0 8px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--text2); font: 700 13.5px/1 var(--font); transition: background .12s, color .12s; }
.rte-bar button:hover { background: var(--surface3); color: var(--text); }
.rte-bar button.on { background: rgba(var(--brand-rgb), .12); color: var(--brand); }
.rte-bar .ic { width: 17px; height: 17px; }
.rte-area { min-height: 380px; padding: 18px 20px; outline: 0; font: 400 17px/1.75 var(--font-d); color: var(--text); overflow-wrap: break-word; }
.rte-area[lang="en"] { font-family: var(--font); font-size: 16px; }
.rte-area:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.rte-area > * + * { margin-top: .8em; }
.rte-area p { margin: 0; }
.rte-area h2 { font-size: 1.4em; margin-top: 1.2em; } .rte-area h3 { font-size: 1.18em; margin-top: 1em; }
.rte-area blockquote { margin: 1em 0; padding: 10px 18px; border-left: 4px solid var(--brand); background: var(--surface2); border-radius: 0 10px 10px 0; font-style: italic; }
.rte-area ul, .rte-area ol { padding-left: 1.4em; margin: 0; }
.rte-area a { color: var(--brand); text-decoration: underline; }
.rte-area img { border-radius: 10px; max-height: 480px; }
.rte-area figure { margin: 1em 0; }
.rte-area figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.rte-area iframe { width: 100%; aspect-ratio: 16/9; height: auto; border-radius: 12px; border: 0; background: #000; }
.rte-foot { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line2); font-size: 12px; color: var(--text2); }
.ed-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--tbh) + 84px); }
.side-card { padding: 16px 18px; }
.side-card h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 14px; }
.side-card h3 .ic { width: 16px; height: 16px; color: var(--brand); }
.side-card .f:last-child { margin-bottom: 0; }
.side-btns { display: flex; flex-direction: column; gap: 8px; }
.side-links { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; }
.side-links a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand); }
.side-links .ic { width: 15px; height: 15px; }
.dirty-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--warn); }
.dirty-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #F59E0B; animation: blink 1.4s infinite; }
.savebar { display: none; }

/* Image picker */
.imgpick { position: relative; border-radius: 14px; border: 1.5px dashed var(--line); background: var(--surface2); overflow: hidden; transition: border-color .15s, background .15s; }
.imgpick.drag { border-color: var(--brand); background: rgba(var(--brand-rgb), .05); }
.imgpick.is-invalid { border-color: var(--bad); }
.imgpick-prev { display: none; aspect-ratio: 16/9; background: repeating-conic-gradient(var(--surface3) 0 25%, var(--surface) 0 50%) 0 0/16px 16px; }
.imgpick-prev img { width: 100%; height: 100%; object-fit: cover; }
.imgpick.logo .imgpick-prev, .imgpick.fav .imgpick-prev { aspect-ratio: 3/1; }
.imgpick.logo .imgpick-prev img, .imgpick.fav .imgpick-prev img { object-fit: contain; padding: 10px; }
.imgpick.fav .imgpick-prev { aspect-ratio: 1; max-width: 140px; margin: 10px auto 0; border-radius: 12px; }
.imgpick.wide .imgpick-prev { aspect-ratio: 4/1; }
.imgpick.wide .imgpick-prev img { object-fit: contain; }
.imgpick.has .imgpick-prev { display: block; }
.imgpick-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 24px 16px; text-align: center; cursor: pointer; color: var(--text2); }
.imgpick-drop .ic { width: 26px; height: 26px; color: var(--brand); margin-bottom: 4px; }
.imgpick-drop b { font-size: 13.5px; } .imgpick-drop small { font-size: 12px; color: var(--muted); }
.imgpick-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.imgpick.has .imgpick-drop { position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; opacity: 0; }
.imgpick-bar { display: none; align-items: center; justify-content: flex-end; gap: 6px; padding: 8px; border-top: 1px solid var(--line); background: var(--surface); }
.imgpick.has .imgpick-bar { display: flex; }
.imgpick-bar [data-img-status] { margin-right: auto; }
.imgpick.busy::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent) -100% 0/50% 100% no-repeat, rgba(var(--brand-rgb), .06); animation: shimmer 1.1s infinite; }
@keyframes shimmer { to { background-position: 200% 0, 0 0; } }
.yt-prev { position: relative; margin-top: 10px; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; background: #000; }
.yt-prev img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.yt-prev span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.yt-prev span .ic { width: 46px; height: 46px; padding: 11px; border-radius: 50%; background: rgba(255,0,0,.9); box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.yt-prev.big { margin: 0; }

/* ---------- CRUD layouts ---------- */
.crud { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 18px; align-items: start; }
.crud-form { position: sticky; top: calc(var(--tbh) + 18px); }
.crud-form.is-focus, .form-card { animation: glow 1.2s var(--ease); }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb), .45); } 100% { box-shadow: 0 0 0 12px rgba(var(--brand-rgb), 0), var(--sh1); } }
.form-card { margin-bottom: 18px; }
.form-card.narrow { max-width: 820px; }
.vid-form-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.vid-form-grid .yt-prev[hidden] + .vid-fields { grid-column: 1 / -1; }
.ad-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }

/* ---------- Videos ---------- */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.vcard { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh1); transition: transform .2s var(--ease), box-shadow .2s; }
.vcard:hover { transform: translateY(-3px); box-shadow: var(--sh2); }
.vcard.is-off { opacity: .6; }
.vthumb { position: relative; display: block; aspect-ratio: 16/9; background: #000; overflow: hidden; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.vcard:hover .vthumb img { transform: scale(1.05); }
.vplay { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s; background: rgba(0,0,0,.25); color: #fff; }
.vplay .ic { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: rgba(255,0,0,.92); }
.vthumb:hover .vplay { opacity: 1; }
.vdur { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.8); color: #fff; font: 600 11.5px/1.5 var(--font); font-style: normal; }
.vflags { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; }
.vflags i { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; font: 700 11px/1 var(--font); font-style: normal; background: rgba(0,0,0,.72); color: #fff; }
.vflags i.gold { background: var(--accent); color: #111; } .vflags i.gold .ic { width: 13px; height: 13px; }
.vflags i.off { background: #6B7280; }
.vbody { padding: 12px 14px 6px; flex: 1; }
.vbody b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 600 14.5px/1.4 var(--font-d); }
.vbody small { display: block; margin-top: 4px; font-size: 12px; }
.vact { display: flex; align-items: center; gap: 4px; padding: 8px 10px 12px 14px; }
.vact .btn { margin-right: auto; }
.vact form { display: contents; }

/* ---------- Ticker preview ---------- */
.ticker-demo { display: flex; align-items: stretch; height: 44px; margin-bottom: 18px; border-radius: 14px; overflow: hidden; background: rgb(var(--dark-rgb)); color: #fff; box-shadow: var(--sh2); }
.td-tag { display: flex; align-items: center; gap: 6px; padding: 0 16px; background: var(--brand); font: 800 13px/1 var(--font-d); text-transform: uppercase; letter-spacing: .04em; position: relative; }
.td-tag .ic { width: 15px; height: 15px; color: var(--accent); }
.td-tag::after { content: ""; position: absolute; right: -12px; top: 0; border: 22px solid transparent; border-left: 12px solid var(--brand); border-right: 0; }
.td-track { flex: 1; overflow: hidden; display: flex; align-items: center; padding-left: 24px; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.td-run { display: flex; gap: 48px; white-space: nowrap; animation: marquee 28s linear infinite; font: 500 14.5px/1 var(--font-d); }
.td-run span::before { content: "●"; color: var(--accent); margin-right: 12px; font-size: 9px; vertical-align: middle; }
@keyframes marquee { from { transform: translateX(10%); } to { transform: translateX(-100%); } }

/* ---------- Media ---------- */
.dropzone { margin-bottom: 18px; border: 2px dashed var(--line); background: var(--surface); transition: border-color .2s, background .2s; }
.dropzone.drag { border-color: var(--brand); background: rgba(var(--brand-rgb), .05); }
.dropzone.busy { pointer-events: none; opacity: .7; }
.dz-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 20px; text-align: center; cursor: pointer; }
.dz-in input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand2)); box-shadow: 0 10px 24px -10px rgba(var(--brand-rgb), .8); margin-bottom: 6px; }
.dz-ic .ic { width: 24px; height: 24px; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.mcard { position: relative; margin: 0; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh1); transition: transform .2s var(--ease), box-shadow .2s; }
.mcard:hover { transform: translateY(-2px); box-shadow: var(--sh2); }
.mimg { display: block; aspect-ratio: 4/3; background: repeating-conic-gradient(var(--surface3) 0 25%, var(--surface) 0 50%) 0 0/14px 14px; }
.mimg img { width: 100%; height: 100%; object-fit: cover; }
.mused { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 7px; background: rgba(22,163,74,.92); color: #fff; font-size: 11px; font-weight: 700; }
.mused .ic { width: 12px; height: 12px; }
.mcard figcaption { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 12px; }
.mcard figcaption small { flex: 1; font-size: 11.5px; line-height: 1.4; }
.mact { display: flex; } .mact form { display: contents; }

/* ---------- Users ---------- */
.ucards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ucard { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh1); transition: box-shadow .2s, transform .2s var(--ease); }
.ucard:hover { box-shadow: var(--sh2); }
.ucard.is-off { opacity: .65; }
.ucard.is-sel { border-color: var(--brand); box-shadow: var(--ring); }
.ucard-top { display: flex; align-items: center; gap: 12px; }
.ucard-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ucard-id b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; }
.ucard-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 12px; border-radius: 14px; background: var(--surface2); }
.ucard-meta div { min-width: 0; }
.ucard-meta dt { font-size: 11px; color: var(--muted); font-weight: 600; }
.ucard-meta dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ucard-act { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.ucard-act form { display: contents; }
.ucard-act .btn-icon { margin-left: auto; }
.u-inline, .p-inline { display: inline-flex; align-items: center; gap: 9px; }
.u-inline > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.p-inline { font-weight: 600; font-size: 13.5px; }
.p-inline .swatch { width: 14px; height: 14px; border-radius: 5px; background: linear-gradient(135deg, var(--brand) 50%, var(--accent) 50%); flex: none; }
.p-inline.all { color: #7C8CFF; }
.p-inline .ic { width: 15px; height: 15px; }

/* ---------- Settings ---------- */
.set-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.set-tabs { position: sticky; top: calc(var(--tbh) + 18px); display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh1); }
.set-tabs button { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 12px; background: none; font-weight: 600; font-size: 14px; color: var(--text2); text-align: left; transition: background .15s, color .15s; }
.set-tabs button:hover { background: var(--surface2); color: var(--text); }
.set-tabs button.on { background: rgba(var(--brand-rgb), .09); color: var(--brand); }
[data-theme="dark"] .set-tabs button.on { color: #fff; background: rgba(var(--brand-rgb), .3); }
.set-tabs button .dot { margin-left: auto; }
.set-pane { animation: fadeUp .25s var(--ease); }
.brand-imgs { align-items: start; }
.colors-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.presets { margin-bottom: 18px; }
.preset-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.preset { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--text2); text-align: left; transition: border-color .15s, transform .15s var(--ease), box-shadow .15s; }
.preset:hover { transform: translateY(-2px); box-shadow: var(--sh2); }
.preset.on { border-color: var(--brand); box-shadow: var(--ring); }
.preset-sw { display: flex; width: 100%; height: 26px; border-radius: 8px; overflow: hidden; }
.preset-sw i { flex: 1; } .preset-sw i:first-child { flex: 2; }
.color-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.color-fields.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
.live { position: sticky; top: calc(var(--tbh) + 24px); }
.live .lbl { margin-bottom: 8px; }
.live-card { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #fff; color: #111; box-shadow: var(--sh2); font-family: var(--font-d); transition: all .3s; }
.live-card * { transition: background-color .3s, color .3s, border-color .3s; }
.lv-top { display: flex; justify-content: space-between; padding: 6px 14px; font-size: 11px; color: rgba(255,255,255,.75); background: var(--dark); }
.lv-live { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; color: #fff; }
.lv-live i { width: 7px; height: 7px; border-radius: 50%; background: #FF3B3B; animation: blink 1.2s infinite; }
.lv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; border-bottom: 3px solid var(--brand); }
.lv-logo { font-size: 18px; font-weight: 800; color: var(--brand); }
.lv-nav { display: flex; gap: 10px; font-size: 12px; font-weight: 600; color: #444; }
.lv-nav i { font-style: normal; padding-bottom: 2px; }
.lv-nav i.on { color: var(--brand); box-shadow: inset 0 -2px 0 var(--accent); }
.lv-break { display: flex; align-items: center; background: var(--dark); color: #fff; font-size: 12.5px; }
.lv-break em { font-style: normal; font-weight: 800; padding: 7px 10px; background: var(--brand); color: var(--accent); text-transform: uppercase; }
.lv-break span { padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-body { padding: 14px; }
.lv-hero { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 130px; padding: 14px; border-radius: 12px; color: #fff; background: linear-gradient(160deg, var(--brand2), var(--dark)); }
.lv-hero b { font-size: 16px; line-height: 1.35; }
.lv-cat { align-self: flex-start; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; background: var(--accent); color: #111; }
.lv-row { display: flex; gap: 8px; margin-top: 12px; }
.lv-btn { padding: 8px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: #fff; background: var(--brand); }
.lv-btn2 { padding: 8px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--brand); border: 1.5px solid var(--brand); }
.lv-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--dark); color: rgba(255,255,255,.8); font-size: 12px; font-weight: 700; }
.lv-dots { display: flex; gap: 4px; } .lv-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); } .lv-dots i:nth-child(2) { background: var(--brand); } .lv-dots i:nth-child(3) { background: var(--brand2); }
.view-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.view-opt { position: relative; cursor: pointer; display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s var(--ease); }
.view-opt:hover { transform: translateY(-2px); }
.view-opt input { position: absolute; opacity: 0; }
.view-opt:has(input:checked) { border-color: var(--brand); box-shadow: var(--ring); }
.view-opt:has(input:focus-visible) { box-shadow: var(--ring); }
.vo-t { display: flex; flex-direction: column; padding: 0 4px 4px; }
.vo-t small { font-size: 12px; color: var(--muted); }
.vo-check { position: absolute; top: 16px; right: 16px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; transform: scale(0); transition: transform .2s var(--ease); }
.vo-check .ic { width: 14px; height: 14px; }
.view-opt:has(input:checked) .vo-check { transform: scale(1); }
.vp { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 12px 44px 30px; gap: 6px; padding: 10px; border-radius: 11px; aspect-ratio: 16/10; }
.vp i { border-radius: 4px; }
.vp-bar { grid-column: 1 / -1; } .vp-hero { grid-column: 1 / -1; }
.vp-classic { background: #fff; border: 1px solid #E5E7EB; }
.vp-classic .vp-bar { background: var(--brand); } .vp-classic .vp-hero { background: #E5E7EB; } .vp-classic .vp-c { background: #F3F4F6; border-top: 3px solid var(--brand); }
.vp-tech { background: radial-gradient(circle at 80% 0%, rgba(var(--brand-rgb), .45), transparent 60%), #0A0D14; }
.vp-tech i { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(2px); }
.vp-tech .vp-bar { background: linear-gradient(90deg, var(--brand), var(--accent)); border: 0; } .vp-tech .vp-hero { box-shadow: 0 0 14px rgba(var(--brand-rgb), .5) inset; }
.vp-real3d { background: linear-gradient(180deg, #ECEEF2, #D9DDE4); }
.vp-real3d i { background: linear-gradient(180deg, #fff, #EEF0F3); box-shadow: 0 4px 8px rgba(0,0,0,.18), inset 0 1px 0 #fff; }
.vp-real3d .vp-bar { background: linear-gradient(180deg, var(--brand), var(--brand2)); }
.live-f label { gap: 8px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #EF4444; box-shadow: 0 0 0 3px rgba(239,68,68,.25); animation: blink 1.3s infinite; display: inline-block; }

/* ---------- Profile ---------- */
.profile-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 20px 20px; overflow: hidden; }
.pc-cover { align-self: stretch; height: 96px; margin: 0 -20px -42px; background: linear-gradient(120deg, var(--brand), var(--brand2) 60%, rgb(var(--dark-rgb))); }
.profile-card h2 { margin-top: 12px; font-size: 19px; }
.profile-card .chip { margin-top: 8px; }
.pc-meta { align-self: stretch; margin: 18px 0 0; padding: 0; text-align: left; }
.pc-meta div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line2); font-size: 13px; }
.pc-meta dt { color: var(--muted); } .pc-meta dd { margin: 0; font-weight: 600; text-align: right; }
.pc-act { align-self: stretch; text-align: left; margin-top: 10px; }
.sec-t { display: flex; align-items: center; gap: 8px; margin: 6px 0 14px; font-size: 15px; }
.sec-t:not(:first-of-type) { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line2); }
.sec-t .ic { width: 17px; height: 17px; color: var(--brand); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 0 8px; padding: 9px 0 9px 18px; border-left: 2px solid var(--line); margin-left: 4px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--surface); }
.timeline li > span, .timeline li > time { grid-column: 1 / -1; }
.timeline time { font-size: 11.5px; color: var(--muted); }
.timeline .tl-dot { display: none; }
.timeline.sm li { padding: 7px 0 7px 16px; }

/* ---------- Activity ---------- */
.log-act { display: inline-flex; align-items: center; gap: 8px; }
.log-ic { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; color: var(--brand); background: rgba(var(--brand-rgb), .09); }
.log-ic .ic { width: 15px; height: 15px; }
.log-act.bad .log-ic { color: var(--bad); background: var(--bad-bg); }
.log-act code { background: none; padding: 0; font-weight: 600; }

/* ---------- Toasts & modal ---------- */
.toasts { position: fixed; right: 20px; top: calc(var(--tbh) + 14px); z-index: 120; display: flex; flex-direction: column; gap: 10px; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 11px; padding: 13px 12px 13px 15px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh3); font-size: 14px; font-weight: 500;
  animation: toastIn .4s var(--ease) both; position: relative; overflow: hidden; }
.toast > .ic { width: 22px; height: 22px; padding: 3px; border-radius: 50%; color: #fff; flex: none; }
.toast-ok > .ic { background: #16A34A; } .toast-bad > .ic { background: #DC2626; }
.toast > span { flex: 1; padding-top: 1px; }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: currentColor; opacity: .15; transform-origin: left; animation: toastBar var(--life, 4.5s) linear forwards; }
.toast-ok::after { background: #16A34A; opacity: .5; } .toast-bad::after { background: #DC2626; opacity: .5; }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast-x { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); }
.toast-x:hover { background: var(--surface3); } .toast-x .ic { width: 15px; height: 15px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
@keyframes toastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; background: rgba(6,9,15,.55); backdrop-filter: blur(4px); animation: fade .2s; }
.modal-card { width: min(420px, 100%); padding: 26px 24px 20px; border-radius: 22px; background: var(--surface); box-shadow: var(--sh3); text-align: center; animation: pop .25s var(--ease); }
.modal-ic { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; color: var(--bad); background: var(--bad-bg); }
.modal-ic .ic { width: 26px; height: 26px; }
.modal.is-input .modal-ic { color: var(--brand); background: rgba(var(--brand-rgb), .1); }
.modal-card h3 { font-size: 19px; }
.modal-card p { margin-top: 8px; color: var(--muted); }
.modal-card .inp { margin-top: 14px; }
.modal-b { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.modal.is-input .btn-danger { background: var(--brand); box-shadow: none; }
@keyframes fade { from { opacity: 0; } }

/* ---------- Denied ---------- */
.denied { max-width: 460px; margin: 8vh auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.denied-ic { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; color: var(--brand); background: rgba(var(--brand-rgb), .1); }
.denied-ic .ic { width: 34px; height: 34px; }
.denied-code { font: 800 13px/1 var(--font); letter-spacing: .2em; color: var(--muted); margin-top: 6px; }
.denied p { color: var(--muted); }
.denied-b { margin-top: 12px; }

/* ---------- Login ---------- */
.login-body { background: var(--bg); }
.login { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }
.login-art { position: relative; overflow: hidden; color: #fff; background: radial-gradient(80% 60% at 85% 10%, rgba(var(--accent-rgb), .35), transparent 60%), linear-gradient(140deg, var(--brand) 0%, var(--brand2) 50%, rgb(var(--dark-rgb)) 100%); }
.la-grid { position: absolute; inset: -50%; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 44px 44px; transform: perspective(600px) rotateX(55deg) translateY(10%); animation: gridmove 18s linear infinite; mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 70%); }
@keyframes gridmove { to { background-position: 0 44px, 0 0; } }
.la-glow { position: absolute; width: 520px; height: 520px; right: -160px; bottom: -180px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), .45), transparent 65%); filter: blur(10px); animation: float 9s ease-in-out infinite; }
@keyframes float { 50% { transform: translate(-30px, -30px) scale(1.05); } }
.la-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 48px 56px; }
.la-brand { display: flex; align-items: center; gap: 16px; }
.la-brand b { display: block; font: 800 22px/1.2 var(--font-d); }
.la-brand small { font-size: 14px; color: rgba(255,255,255,.75); }
.la-logo { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; padding: 6px; background: #fff; box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); flex: none; }
.la-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 14px; }
.la-initials { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; font: 800 26px/1 var(--font-d); backdrop-filter: blur(6px); }
.la-copy h2 { font: 800 clamp(34px, 4vw, 54px)/1.1 var(--font-d); color: #fff; letter-spacing: -.02em; margin: 14px 0 14px; }
.la-copy p { max-width: 460px; font-size: 16px; color: rgba(255,255,255,.82); }
.la-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-pill); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.la-kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .3); animation: blink 1.6s infinite; }
.la-net { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.la-net > span { color: rgba(255,255,255,.6); font-weight: 600; margin-right: 4px; }
.la-net i { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px; border-radius: var(--r-pill); background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.14); font-style: normal; font-weight: 600; }
.la-net em { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, var(--brand) 50%, var(--accent) 50%); box-shadow: 0 0 0 2px rgba(255,255,255,.3); }
.login-panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 72px 24px 40px; }
.login-top { position: absolute; top: 18px; right: 20px; display: flex; gap: 8px; }
.login-card { width: min(410px, 100%); animation: fadeUp .5s var(--ease); }
.login-mark { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 20px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand2)); box-shadow: 0 14px 30px -12px rgba(var(--brand-rgb), .8); overflow: hidden; }
.login-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 4px; }
.login-mark .ic { width: 26px; height: 26px; }
.login-card h1 { font-size: 28px; }
.login-card > .muted { margin: 6px 0 24px; font-size: 15px; }
.login-card .inp { min-height: 48px; font-size: 15px; }
.login-card .btn-lg { margin-top: 6px; }
.login-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.login-foot .ic { width: 14px; height: 14px; }
.login-copy { margin-top: 36px; font-size: 12.5px; color: var(--muted); }

/* ==========================================================================
   Control tower (super admin): neutral premium dark; portals keep their colours.
   ========================================================================== */
.tower {
  --bg: #07090D; --surface: #0E121A; --surface2: #121722; --surface3: #192030;
  --line: #1E2533; --line2: #171D29; --text: #E9ECF2; --text2: #BCC3D0; --muted: #8790A3;
  --brand: #7C8CFF; --brand-rgb: 124,140,255; --brand2: #A78BFA; --brand2-rgb: 167,139,250; --accent: #F5C451; --accent-rgb: 245,196,81; --dark: #05070B; --dark-rgb: 5,7,11;
  --ok: #4ADE80; --ok-bg: rgba(34,197,94,.13); --warn: #FBBF24; --warn-bg: rgba(245,158,11,.13); --bad: #F87171; --bad-bg: rgba(239,68,68,.14); --info: #93C5FD; --info-bg: rgba(59,130,246,.15);
  --sh1: 0 1px 0 rgba(255,255,255,.03) inset, 0 1px 2px rgba(0,0,0,.5); --sh2: 0 16px 40px -16px rgba(0,0,0,.8); --sh3: 0 30px 80px -20px rgba(0,0,0,.9);
  color-scheme: dark;
  background: radial-gradient(900px 500px at 85% -10%, rgba(124,140,255,.12), transparent 60%), radial-gradient(700px 400px at 0% 100%, rgba(167,139,250,.08), transparent 60%), var(--bg);
  background-attachment: fixed;
}
.tower .sb { background: linear-gradient(180deg, #0A0D14, #05070B); border-right-color: rgba(255,255,255,.05); }
.tower .sb::before { background: linear-gradient(90deg, #6E7BFF, #A78BFA, #F5C451); }
.tower .sb-link.on { background: linear-gradient(90deg, rgba(124,140,255,.25), rgba(167,139,250,.1)); box-shadow: inset 0 0 0 1px rgba(124,140,255,.35); }
.tower .sb-link.on::before { background: #7C8CFF; }
.tower .tb { --tb-rgb: 9,12,18; border-bottom-color: rgba(255,255,255,.06); }
.tower .card, .tower .stat, .tower .ucard { background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0)) , var(--surface); }
.tower .btn-p { background: linear-gradient(135deg, #6E7BFF, #9B6BFF); }
.tower .btn-dark { background: var(--surface3); border-color: var(--line); }
.tower .stat .stat-ic { color: #A5B4FC; background: rgba(124,140,255,.12); filter: none; }
.tower .stat:nth-child(3) .stat-ic { color: #FCD34D; background: rgba(245,196,81,.12); }
.tower .stat:nth-child(4) .stat-ic { color: #93C5FD; background: rgba(59,130,246,.12); }
.tower .stat:nth-child(5) .stat-ic { color: #6EE7B7; background: rgba(16,185,129,.12); }
.tower .chart .bar rect { fill: rgba(124,140,255,.3); } .tower .chart .bar.today rect { fill: #7C8CFF; }
.tower code { background: rgba(255,255,255,.06); }
.tower .i-sun, .tower .i-moon { display: none; }
.tower [data-theme-toggle] { display: none; }
.tw-hero { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 30px 32px; margin-bottom: 20px; border-radius: 24px;
  border: 1px solid rgba(255,255,255,.07); background: radial-gradient(600px 300px at 100% 0%, rgba(124,140,255,.28), transparent 60%), radial-gradient(400px 260px at 0% 100%, rgba(245,196,81,.12), transparent 60%), #0C1018; }
.tw-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(90deg, transparent 40%, #000); pointer-events: none; }
.tw-hero > * { position: relative; z-index: 1; }
.tw-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #A5B4FC; }
.tw-hero h1 { font-size: 30px; margin: 8px 0 6px; }
.tw-hero p { color: var(--text2); }
.tw-hero-b { display: flex; gap: 10px; flex-wrap: wrap; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.pcard { position: relative; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid rgba(var(--brand-rgb), .35);
  box-shadow: 0 20px 50px -28px rgba(var(--brand-rgb), .7); transition: transform .25s var(--ease), box-shadow .25s; }
.pcard:hover { transform: translateY(-3px); box-shadow: 0 28px 60px -26px rgba(var(--brand-rgb), .85); }
.pcard.is-off { filter: saturate(.25); opacity: .75; }
.pcard-band { position: relative; padding: 20px 20px 18px; color: #fff; background: radial-gradient(120% 120% at 100% 0%, rgba(var(--accent-rgb), .3), transparent 50%), linear-gradient(130deg, var(--brand), var(--brand2) 60%, var(--dark)); }
.pcard-id { display: flex; align-items: center; gap: 14px; padding-right: 60px; }
.pcard-id b { display: block; font: 800 19px/1.2 var(--font-d); }
.pcard-id small { font-size: 12.5px; color: rgba(255,255,255,.75); }
.pcard-tags { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.pcard-sw { position: absolute; right: 18px; top: 20px; display: grid; grid-template-columns: repeat(2, 14px); gap: 3px; padding: 5px; border-radius: 9px; background: rgba(0,0,0,.25); }
.pcard-sw i { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.pcard-b { padding: 16px 20px 6px; flex: 1; }
.pcard-dom { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; }
.pcard-dom .ic { width: 15px; height: 15px; color: var(--muted); }
.pcard-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0 0; }
.pcard-stats div { padding: 10px 8px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--line2); text-align: center; }
.pcard-stats dt { font-size: 10.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-stats dd { margin: 2px 0 0; font: 800 18px/1.2 var(--font); font-variant-numeric: tabular-nums; }
.pcard-spark { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.spark { flex: 1; height: 40px; }
.spark-a { fill: rgba(var(--brand-rgb), .18); } .spark-l { fill: none; stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.tower .pcard .spark-l { stroke: color-mix(in srgb, var(--brand) 70%, #fff); }
.pcard-last { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pcard-last .ic { width: 14px; height: 14px; }
.pcard-last .warn { color: var(--warn); }
.pcard-f { display: flex; align-items: center; gap: 6px; padding: 12px 14px 14px 20px; border-top: 1px solid var(--line2); }
.pcard-f form { display: contents; }
.pcard-new { align-items: center; justify-content: center; gap: 8px; min-height: 300px; padding: 30px; text-align: center; border: 1.5px dashed rgba(255,255,255,.14); background: rgba(255,255,255,.015); box-shadow: none; --brand-rgb: 124,140,255; }
.pcard-new:hover { border-color: #7C8CFF; background: rgba(124,140,255,.05); }
.pn-ic { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #6E7BFF, #A78BFA); box-shadow: 0 14px 30px -12px rgba(124,140,255,.8); margin-bottom: 6px; }
.pn-ic .ic { width: 26px; height: 26px; }
.tw-lower { margin-top: 20px; }
.tower .timeline li { border-left-color: var(--line); }
.tower .timeline li[style]::before { background: linear-gradient(135deg, var(--brand) 50%, var(--accent) 50%); }
.tower .timeline code { background: none; padding: 0; color: var(--muted); font-size: 11.5px; }
.pe-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.pe-preview { border-radius: 16px; overflow: hidden; margin-bottom: 18px; box-shadow: 0 16px 40px -20px rgba(0,0,0,.8); }
.pe-band { display: flex; align-items: center; gap: 14px; padding: 18px; color: #fff; background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 55%), linear-gradient(130deg, var(--brand), var(--brand2) 60%, var(--dark)); }
.pe-band .pmark { background: rgba(255,255,255,.15); }
.pe-band .pmark.has-img { background: #fff; }
.pe-band b { font: 800 19px/1.2 var(--font-d); }
.pe-strip { display: flex; align-items: center; background: var(--dark); color: #fff; font-size: 13px; }
.pe-strip em { font-style: normal; font-weight: 800; padding: 8px 12px; background: var(--brand); color: var(--accent); text-transform: uppercase; }
.pe-strip span { padding: 0 12px; }
.dom { margin: 2px 4px 2px 0; display: inline-block; }
.sys-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sys-grid > .card { margin: 0; }
.sys-backup { grid-column: 1 / -1; border-color: rgba(124,140,255,.3); background: radial-gradient(600px 200px at 100% 0%, rgba(124,140,255,.16), transparent 60%), var(--surface) !important; }
.sys-backup .card-b { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px; }
.sys-backup p { max-width: 720px; }
.sys-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #6E7BFF, #A78BFA); }
.sys-ic .ic { width: 24px; height: 24px; }
.kv { margin: 0; }
.kv div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line2); font-size: 13.5px; }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.kv.cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.kv.cols div:nth-last-child(2) { border-bottom: 0; }
.ext-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ext-list li { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 11px; background: var(--surface2); border: 1px solid var(--line2); }
.ext-list li .ic { width: 16px; height: 16px; flex: none; }
.ext-list li.ok .ic { color: var(--ok); } .ext-list li.bad .ic { color: var(--bad); } .ext-list li.warn .ic { color: var(--warn); }
.ext-list code { background: none; padding: 0; flex: 1; }
.maint { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line2); }
.maint > div { display: flex; flex-direction: column; }
.maint small { font-size: 12.5px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1360px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .colors-grid { grid-template-columns: 1fr; }
  .live { position: static; max-width: 440px; }
}
@media (max-width: 1180px) {
  .crud { grid-template-columns: 1fr; }
  .crud-form { position: static; }
  .ed-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .f-row-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .sb { transform: translateX(-102%); transition: transform .32s var(--ease); box-shadow: var(--sh3); }
  .btn-icon.sb-close { display: inline-grid; }
  .nav-open .sb { transform: none; }
  .nav-open .scrim { opacity: 1; pointer-events: auto; }
  .nav-open { overflow: hidden; }
  .shell { margin-left: 0; }
  .btn-icon.tb-burger { display: inline-grid; margin-left: -8px; }
  .dash-grid, .pe-grid { grid-template-columns: 1fr; }
  .set-grid { grid-template-columns: 1fr; }
  .set-tabs { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .set-tabs::-webkit-scrollbar { display: none; }
  .set-tabs button { flex: none; }
  .profile-grid { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr 1fr; }
  .la-inner { padding: 36px; }
}
@media (max-width: 900px) {
  .ed-grid { grid-template-columns: 1fr; }
  .ed-side { position: static; }
  .rte-bar { top: calc(var(--tbh) + 64px); }
  .vid-form-grid, .ad-form { grid-template-columns: 1fr; }
  .vid-form-grid .yt-prev.big { max-width: 420px; }
  .sys-grid { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-art { min-height: 0; }
  .la-inner { padding: 28px 24px; gap: 18px; }
  .la-copy h2 { font-size: 30px; margin: 10px 0 6px; }
  .la-copy p, .la-net { display: none; }
  .login-panel { padding: 28px 20px 32px; justify-content: flex-start; }
  .login-top { position: static; align-self: flex-end; margin-bottom: 8px; }
}
@media (max-width: 860px) {
  /* Tables become stacked cards */
  .tbl-card { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl thead { display: none; }
  .tbl tr { position: relative; margin-bottom: 12px; padding: 14px 14px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh1); }
  .tbl tbody tr:hover { background: var(--surface); }
  .tbl td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border: 0; text-align: right; min-height: 34px; }
  .tbl td::before { content: attr(data-label); font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; flex: none; }
  .tbl td.t-main { display: block; text-align: left; padding: 0 0 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line2); }
  .tbl td.t-main::before { display: none; }
  .tbl tr:has(.w-check) td.t-main { padding-left: 34px; }
  .tbl td.num { text-align: right; }
  .tbl td.w-check { position: absolute; left: 12px; top: 16px; width: auto; padding: 0; min-height: 0; }
  .tbl td.w-check::before, .tbl td.w-act::before { display: none; }
  .tbl td.w-act { justify-content: flex-end; width: 100%; padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--line2); }
  .tbl td:not(.t-main):not(.w-act):not(.w-check):empty { display: none; }
  .tbl tr.is-sel { box-shadow: var(--ring); }
  .tbl tr.is-off td:not(.w-act) { opacity: .6; }
  .art-cell { align-items: flex-start; }
}
@media (max-width: 760px) {
  :root { --tbh: 58px; }
  body { font-size: 15px; }
  h1 { font-size: 22px; }
  .tb { padding: 0 12px; gap: 6px; }
  .tb-title b { font-size: 15px; }
  .tb-actions { gap: 2px; }
  .hide-sm { display: none !important; }
  .pswitch .btn { padding: 6px 8px; }
  .ct { padding: 18px 16px 120px; }
  .page-head { margin-bottom: 16px; }
  .page-head .ph-actions { width: 100%; }
  .page-head .ph-actions .btn { flex: 1; }
  .hero { padding: 22px 20px; border-radius: 20px; }
  .hero h1 { font-size: 24px; }
  .hero-actions, .hero-actions .btn { width: 100%; }
  .hero-actions .btn-glass { flex: 1; width: auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; border-radius: 16px; }
  .stat-ic { width: 34px; height: 34px; margin-bottom: 6px; }
  .stat-v { font-size: 24px; }
  .stats > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .chart { height: 180px; }
  .f-row, .f-row-4, .color-fields, .color-fields.four { grid-template-columns: 1fr; }
  .card-h { padding: 16px 16px 0; } .card-b { padding: 16px; }
  .filters { padding: 10px; }
  .filters .inp, .filters select.inp { flex: 1 1 140px; min-width: 0; }
  .filters .grow { flex: 1 1 100%; }
  .filters .btn { flex: 1; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search-sm { width: 100%; }
  .seg { width: 100%; }
  /* Editor */
  .ed-head { position: static; margin: 0 0 14px; padding: 0; background: none; backdrop-filter: none; }
  .ed-card { padding: 4px 14px 16px; }
  .ltabs { margin: 0 -14px 14px; padding: 0 8px; }
  .inp-title { font-size: 19px !important; }
  .rte-bar { top: var(--tbh); border-radius: 14px 14px 0 0; gap: 2px; padding: 5px; }
  .rte-bar::-webkit-scrollbar { display: none; }
  .rte-bar button { min-width: 40px; height: 40px; }
  .rte-area { min-height: 300px; padding: 14px; font-size: 17px; }
  .rte-foot .muted { display: none; }
  .savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -12px rgba(0,0,0,.2); }
  .savebar .btn { min-height: 46px; flex: 1; }
  .savebar-s { display: none; }
  .settings .savebar .btn, .editor .savebar .btn:only-of-type { flex: 1; }
  .side-btns { display: none; }
  .view-pick { grid-template-columns: 1fr; }
  .view-opt { flex-direction: row; align-items: center; }
  .vp { width: 120px; flex: none; }
  .vo-check { top: 50%; transform: translateY(-50%) scale(0); }
  .view-opt:has(input:checked) .vo-check { transform: translateY(-50%) scale(1); }
  .preset-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-pick { grid-template-columns: 1fr; }
  .vgrid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .vbody b { font-size: 13.5px; }
  .mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ucards { grid-template-columns: 1fr; }
  .pgrid { grid-template-columns: 1fr; }
  .pcard-stats dd { font-size: 16px; }
  .tw-hero { padding: 22px 20px; }
  .tw-hero h1 { font-size: 24px; }
  .tw-hero-b, .tw-hero-b .btn { width: 100%; }
  .ext-list, .kv.cols { grid-template-columns: 1fr; }
  .kv.cols div:nth-last-child(2) { border-bottom: 1px solid var(--line2); }
  .toasts { right: 12px; left: 12px; width: auto; top: calc(var(--tbh) + 10px); }
  .list-foot { justify-content: center; }
  .list-foot > span { width: 100%; text-align: center; }
  .modal { align-items: end; padding: 0; }
  .modal-card { width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); animation: sheet .3s var(--ease); }
  @keyframes sheet { from { transform: translateY(100%); } }
  .bulkbar { top: calc(var(--tbh) + 6px); }
}
@media (max-width: 420px) {
  .hide-xs { display: none !important; }
  .tb-crumb { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print { .sb, .tb, .savebar, .toasts { display: none !important; } .shell { margin: 0; } }
