@font-face { font-family: Vazirmatn; src: url(/panel/fonts/Vazirmatn.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }

/* ---------------------------------------------------------------- tokens */
:root {
  --bg: #f4f5f9; --surface: #ffffff; --surface-2: #f1f3f8; --surface-3: #e8ebf2; --border: #e3e6ee; --border-2: #d3d8e3;
  --text: #121726; --text-2: #3b4256; --muted: #6b7386;
  --accent: #6d5efc; --accent-2: #22c3a6; --accent-soft: rgba(109, 94, 252, .1); --accent-text: #5847f0;
  --ok: #12a865; --ok-soft: rgba(18, 168, 101, .12); --warn: #e08700; --warn-soft: rgba(224, 135, 0, .13);
  --err: #e5383b; --err-soft: rgba(229, 56, 59, .11); --info: #2f80ed; --info-soft: rgba(47, 128, 237, .11);
  --off: #9aa1b2; --off-soft: rgba(130, 138, 156, .14);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-lg: 0 20px 50px -12px rgba(16, 24, 40, .25);
  --r: 16px; --r-sm: 10px; --side: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d13; --surface: #12151d; --surface-2: #181c26; --surface-3: #212633; --border: #232837; --border-2: #2f3547;
    --text: #e8ebf2; --text-2: #c2c8d6; --muted: #8c94a8;
    --accent: #8274ff; --accent-soft: rgba(130, 116, 255, .16); --accent-text: #a79dff;
    --ok: #2fcf86; --ok-soft: rgba(47, 207, 134, .14); --warn: #f5a524; --warn-soft: rgba(245, 165, 36, .14);
    --err: #ff5d61; --err-soft: rgba(255, 93, 97, .14); --info: #5aa2ff; --info-soft: rgba(90, 162, 255, .14);
    --off: #7a8296; --off-soft: rgba(122, 130, 150, .16);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d13; --surface: #12151d; --surface-2: #181c26; --surface-3: #212633; --border: #232837; --border-2: #2f3547;
  --text: #e8ebf2; --text-2: #c2c8d6; --muted: #8c94a8;
  --accent: #8274ff; --accent-soft: rgba(130, 116, 255, .16); --accent-text: #a79dff;
  --ok: #2fcf86; --ok-soft: rgba(47, 207, 134, .14); --warn: #f5a524; --warn-soft: rgba(245, 165, 36, .14);
  --err: #ff5d61; --err-soft: rgba(255, 93, 97, .14); --info: #5aa2ff; --info-soft: rgba(90, 162, 255, .14);
  --off: #7a8296; --off-soft: rgba(122, 130, 150, .16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 Vazirmatn, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.locked { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; }
h2 { font-size: 22px; } h3 { font-size: 15px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .center { text-align: center; }
.err-txt { color: var(--err); } .warn-txt { color: var(--warn); }
.clip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.grow { flex: 1; min-width: 0; } .end { text-align: end; display: flex; flex-direction: column; align-items: flex-end; }
.ic { flex: none; } .spin { animation: spin 1s linear infinite; }
[dir="rtl"] .flip { transform: scaleX(-1); }
[dir="ltr"] .ic.flip { transform: none; }
[dir="ltr"] .back .ic, [dir="ltr"] .pager .btn:first-child .ic { transform: scaleX(-1); }
[dir="rtl"] .pager .btn:first-child .ic { transform: none; }
[dir="rtl"] .pager .btn:last-child .ic { transform: scaleX(-1); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: var(--surface-2); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), #8b6cff); color: #fff; box-shadow: 0 4px 14px -4px rgba(109, 94, 252, .6); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { background: var(--err); color: #fff; }
.btn.ghost { background: transparent; border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.ghost.on { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.btn.icon { width: 38px; padding: 0; }
.btn.ghost.icon { border-color: transparent; }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.sm.icon { width: 32px; padding: 0; }
.btn.lg { height: 46px; font-size: 15px; }
.input { width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--border-2); background: var(--surface);
  transition: border-color .15s, box-shadow .15s; min-width: 0; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.55; }
select.input { padding-inline-end: 30px; appearance: none; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238c94a8' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat; background-position: left 10px center; }
[dir="ltr"] select.input { background-position: right 10px center; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--muted); opacity: .7; }
.input.num { text-align: start; }
[dir="rtl"] .input.num, [dir="rtl"] .input[dir="ltr"] { text-align: right; }
.input-wrap { position: relative; display: flex; }
.input-wrap .input { padding-inline-end: 44px; }
.btn.in { position: absolute; inset-inline-end: 1px; top: 1px; height: 38px; }
.input-unit { display: flex; align-items: stretch; }
.input-unit .input { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-unit > span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--border-2); border-inline-start: 0; background: var(--surface-2);
  border-start-end-radius: var(--r-sm); border-end-end-radius: var(--r-sm); color: var(--muted); font-size: 13px; white-space: nowrap; }
.exp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.lbl { font-size: 13px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12px; color: var(--muted); } .hint.err { color: var(--err); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.fs { border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; margin: 16px 0 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fs legend { padding: 0 6px; font-weight: 600; }
details.fs > summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 6px; }
details.fs > summary::before { content: '›'; font-size: 18px; transition: transform .15s; display: inline-block; }
details.fs[open] > summary::before { transform: rotate(90deg); }
details.fs[open] > summary { margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--border-2); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all .15s; white-space: nowrap; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.scroll-x { overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x .chips { flex-wrap: nowrap; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 500; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { width: 40px; height: 23px; border-radius: 99px; background: var(--surface-3); position: relative; transition: background .2s; flex: none; border: 1px solid var(--border-2); }
.toggle .thumb { position: absolute; top: 2px; inset-inline-start: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: inset-inline-start .2s; }
.toggle input:checked + .track { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .track .thumb { inset-inline-start: 19px; }
.toggle input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle.off { opacity: .5; cursor: not-allowed; }
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 12px; max-width: 100%; overflow-x: auto; scrollbar-width: none; flex: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; height: 32px; padding: 0 12px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tab-body { margin-top: 16px; }
.pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; padding: 0 5px; }

/* ---------------------------------------------------------------- badges & indicators */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap; vertical-align: middle; }
.badge.ok, .badge.st-active { background: var(--ok-soft); color: var(--ok); }
.badge.warn, .badge.st-limited { background: var(--warn-soft); color: var(--warn); }
.badge.err, .badge.st-expired { background: var(--err-soft); color: var(--err); }
.badge.info, .badge.st-on_hold { background: var(--info-soft); color: var(--info); }
.badge.off, .badge.st-disabled { background: var(--off-soft); color: var(--off); }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); }
.badge .x { border: 0; background: none; padding: 0; display: grid; cursor: pointer; color: inherit; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); } .dot.err { background: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); } .dot.off { background: var(--off); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.usage { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.usage-txt { font-size: 13px; white-space: nowrap; } .usage-txt b { font-weight: 600; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s; }
[dir="rtl"] .bar i { background: linear-gradient(270deg, var(--accent), var(--accent-2)); }
.bar.warn i { background: var(--warn); } .bar.err i { background: var(--err); }
.usage.compact .bar { height: 4px; }
.minibar { height: 4px; border-radius: 99px; background: var(--surface-3); margin-top: 5px; overflow: hidden; }
.minibar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; } .minibar i.err { background: var(--err); }
.online { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13px; }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 12px; font-weight: 500; }
.alert .ic { margin-top: 2px; }
.alert.err { background: var(--err-soft); color: var(--err); } .alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--info-soft); color: var(--info); } .alert.ok { background: var(--ok-soft); color: var(--ok); }
.alerts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; align-items: flex-start; }
.alerts .alert { width: 100%; }
.alert.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }

/* ---------------------------------------------------------------- layout shell */
.app { min-height: 100vh; }
.sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--side); background: var(--surface); border-inline-end: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 12px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; }
.brand b { display: block; font-size: 16px; letter-spacing: .3px; } .brand small { display: block; font-size: 12px; line-height: 1.3; }
.brand.big { flex-direction: column; text-align: center; padding: 0 0 8px; } .brand.big b { font-size: 22px; }
.wordmark { direction: ltr; unicode-bidi: isolate; letter-spacing: .5px !important; font-weight: 800; } .wordmark span { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 11px; color: var(--text-2); font-weight: 500;
  border: 0; background: none; cursor: pointer; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.side-foot { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.toggles { display: flex; gap: 4px; }
.lang-tag { font-size: 12px; font-weight: 800; }
.me-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 0 6px; }
.me-row b, .me-row small { display: block; line-height: 1.35; }
.topbar { display: none; }
.main { margin-inline-start: var(--side); padding: 28px 32px 48px; }
.page { max-width: 1320px; margin: 0 auto; animation: fade .25s; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin-top: 2px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bottomnav { display: none; }
.splash { min-height: 100vh; display: grid; place-items: center; animation: fade .4s; }
.splash .logo { animation: spin 2s ease-in-out infinite; }

/* ---------------------------------------------------------------- cards & grids */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.span2 { grid-column: 1 / -1; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; gap: 6px; animation: rise .35s backwards; }
.kpi:nth-child(2) { animation-delay: .04s; } .kpi:nth-child(3) { animation-delay: .08s; } .kpi:nth-child(4) { animation-delay: .12s; }
.kpi-top { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; font-size: 13px; }
.kpi-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.kpi-ic.ok { background: var(--ok-soft); color: var(--ok); } .kpi-ic.info { background: var(--info-soft); color: var(--info); } .kpi-ic.warn { background: var(--warn-soft); color: var(--warn); }
.kpi-val { font-size: 30px; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; }
.kpi-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); font-weight: 600; font-size: 13px; margin-top: auto; }
.seg { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; margin: 4px 0 2px; }
.seg i { min-width: 3px; }
.seg .st-active { background: var(--ok); } .seg .st-on_hold { background: var(--info); } .seg .st-limited { background: var(--warn); }
.seg .st-expired { background: var(--err); } .seg .st-disabled { background: var(--off); }
.seg-legend { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; color: var(--muted); }
.seg-legend a { display: inline-flex; align-items: center; gap: 5px; } .seg-legend a:hover { color: var(--text); }
.seg-legend b { color: var(--text); font-weight: 700; }
.seg-legend .st-active .dot { background: var(--ok); } .seg-legend .st-on_hold .dot { background: var(--info); } .seg-legend .st-limited .dot { background: var(--warn); }
.seg-legend .st-expired .dot { background: var(--err); } .seg-legend .st-disabled .dot { background: var(--off); }
.att-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.att-row:hover { background: var(--surface-3); } .att-row b { font-size: 16px; }
.spark { width: 100%; height: 30px; margin-top: auto; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--border); min-width: 0; }
.row:last-child { border-bottom: 0; }
.row small { display: block; }
.rows.dense .row { padding: 7px 2px; }
.row.dim { opacity: .65; }
.probe-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.probe-sum > div { border-radius: 12px; padding: 14px; display: flex; flex-direction: column; }
.probe-sum b { font-size: 26px; font-weight: 800; }
.probe-sum .ok { background: var(--ok-soft); color: var(--ok); } .probe-sum .err { background: var(--err-soft); color: var(--err); }
.rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ring { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.ring svg { width: 74px; height: 74px; transform: rotate(-90deg); }
.ring .rb { fill: none; stroke: var(--surface-3); stroke-width: 3.2; }
.ring .rf { fill: none; stroke: var(--ok); stroke-width: 3.2; stroke-linecap: round; transition: stroke-dasharray .6s; }
.ring.warn .rf { stroke: var(--warn); } .ring.err .rf { stroke: var(--err); }
.ring > div { display: flex; flex-direction: column; line-height: 1.35; } .ring b { font-size: 16px; } .ring span { font-size: 12px; font-weight: 600; } .ring small { font-size: 11px; }
.kv2 { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--muted); }
.kv2 span { display: inline-flex; align-items: center; gap: 5px; } .kv2 b { color: var(--text); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.kv > span:nth-child(odd) { color: var(--muted); }

/* ---------------------------------------------------------------- lists / tables */
.toolbar { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; }
.toolbar > .input, .toolbar > select { width: auto; flex: none; max-width: 220px; }
.search { position: relative; flex: 1; min-width: 0; }
.search .ic { position: absolute; inset-inline-start: 12px; top: 11px; color: var(--muted); pointer-events: none; }
.search .input { padding-inline-start: 38px; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; margin: 10px 0; animation: rise .2s; }
.active-f { margin: 8px 0; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: start; font-size: 12px; font-weight: 600; color: var(--muted); padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.sel { background: var(--accent-soft); }
.table .cb { width: 44px; } .table .act { width: 90px; } .w-usage { width: 200px; }
.table small { display: block; max-width: 260px; }
.row-acts { display: flex; justify-content: flex-end; gap: 2px; }
.ulink b { font-weight: 700; } .ulink:hover b { color: var(--accent-text); }
.cards { display: flex; flex-direction: column; gap: 10px; }
.ucard { padding: 14px; display: flex; flex-direction: column; gap: 12px; animation: rise .25s backwards; }
.ucard.sel { border-color: var(--accent); background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); }
.ucard-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ucard-top .ulink { display: flex; flex-direction: column; min-width: 0; }
.ucard-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text-2); }
.ucard-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; font-weight: 600; }
.bulkbar { position: sticky; top: 8px; z-index: 15; display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap;
  padding: 8px 8px 8px 14px; margin-bottom: 10px; border-radius: 14px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); animation: rise .2s; }
[dir="rtl"] .bulkbar { padding: 8px 14px 8px 8px; }
.bulkbar .btn.ghost { color: var(--bg); border-color: rgba(127, 127, 127, .35); }
.bulkbar .btn.ghost:hover { background: rgba(127, 127, 127, .2); }
.bulk-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.names { font-size: 12px; max-height: 140px; overflow: auto; padding: 10px; background: var(--surface-2); border-radius: 10px; color: var(--text-2); }

/* ---------------------------------------------------------------- menu */
.menu-wrap { position: relative; display: inline-flex; }
.menu { position: absolute; top: calc(100% + 4px); inset-inline-end: 0; z-index: 40; min-width: 200px; padding: 6px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: rise .15s; color: var(--text); }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; border-radius: 9px; cursor: pointer; text-align: start; font-weight: 500; white-space: nowrap; }
.menu button:hover, .menu button:focus-visible { background: var(--surface-2); outline: none; }
.menu button.danger { color: var(--err); }

/* ---------------------------------------------------------------- layers */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(8, 10, 18, .45); backdrop-filter: blur(3px); display: flex; animation: fade .18s; }
.modal-layer { align-items: center; justify-content: center; padding: 20px; }
.modal, .drawer { background: var(--surface); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); max-height: 100%; min-width: 0; }
.modal { width: 100%; max-width: 460px; border-radius: 20px; max-height: calc(100vh - 40px); animation: rise .2s; }
.modal.wide { max-width: 760px; }
.drawer-layer { justify-content: flex-end; }
.drawer { width: min(580px, 100%); height: 100%; animation: slide .25s cubic-bezier(.2, .8, .2, 1); }
[dir="rtl"] .drawer { animation-name: slide-r; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes slide-r { from { transform: translateX(-40px); opacity: 0; } }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.sheet-head h3 { font-size: 17px; } .sheet-head small { display: block; }
.modal .body, .drawer .body { padding: 4px 20px 20px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
.toasts { position: fixed; bottom: 24px; inset-inline: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 600; box-shadow: var(--shadow-lg);
  animation: rise .25s; max-width: 520px; pointer-events: auto; }
.toast.ok .ic { color: var(--ok); } .toast.err { background: var(--err); color: #fff; }

/* ---------------------------------------------------------------- states */
.skel-list { display: flex; flex-direction: column; gap: 10px; }
.skel { border-radius: var(--r); background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 36px 16px; text-align: center; color: var(--muted); }
.empty .ic { opacity: .55; }
.empty.soon { background: repeating-linear-gradient(-45deg, transparent 0 10px, var(--surface-2) 10px 20px); border-radius: var(--r); border: 1px dashed var(--border-2); }
.empty.soon .ic { color: var(--accent); opacity: 1; } .empty.err .ic { color: var(--err); opacity: 1; }

/* ---------------------------------------------------------------- charts */
.chart { position: relative; display: flex; flex-direction: column; padding-inline-start: 0; }
.ch-grid { position: absolute; inset: 0 0 22px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.ch-grid div { border-top: 1px dashed var(--border); position: relative; height: 0; }
.ch-grid span { position: absolute; left: 0; top: -9px; font-size: 10px; color: var(--muted); background: var(--surface); padding-right: 4px; }
.ch-plot { position: relative; flex: 1; margin-left: 56px; touch-action: pan-y; }
.ch-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ch-plot.bars { display: flex; align-items: flex-end; gap: 3px; }
.ch-col { flex: 1; display: flex; flex-direction: column-reverse; height: 100%; justify-content: flex-start; min-width: 0; border-radius: 4px 4px 0 0; overflow: hidden; transition: opacity .15s; }
.ch-col i { display: block; width: 100%; flex: none; }
.ch-plot.bars:hover .ch-col:not(.hi) { opacity: .55; }
.ch-cursor { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border-2); pointer-events: none; }
.ch-pt { position: absolute; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid var(--surface); pointer-events: none; }
.ch-tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 6px 10px; border-radius: 10px; font-size: 12px;
  pointer-events: none; white-space: nowrap; z-index: 2; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.ch-tip span { display: flex; align-items: center; gap: 5px; } .ch-tip span i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.ch-x { display: flex; justify-content: space-between; margin-left: 56px; font-size: 11px; color: var(--muted); height: 22px; align-items: flex-end; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; } .legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------------------------------------------------------------- user detail / subscription */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.back:hover { color: var(--text); }
.detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.dh-main { display: flex; gap: 14px; align-items: center; min-width: 0; }
.avatar { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.dh-sub { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.dh-sub .small { display: inline-flex; align-items: center; gap: 4px; }
.note { margin-top: 6px; white-space: pre-wrap; }
.dh-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.stats4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat > b { font-size: 18px; }
.stats4 + .alert { margin-bottom: 16px; }
.sub-box { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.qr-wrap { align-self: center; background: #fff; padding: 14px; border-radius: 16px; border: 1px solid var(--border); }
.qr { width: 200px; height: 200px; } .qr svg { width: 100%; height: 100%; display: block; }
.sub-url { display: flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 10px; padding: 4px 4px 4px 12px; min-width: 0; }
.sub-url code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; direction: ltr; text-align: left; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-btns .btn.primary { flex: 1; }
.fmts summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.fmt-row { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 8px; font-size: 12px; margin-top: 6px; }

/* ---------------------------------------------------------------- shared page bits */
.end-tools { justify-content: flex-end; }
.ok-txt { color: var(--ok); }
.spaced { margin: 14px 0; }
.sec-title { font-size: 14px; margin: 20px 0 6px; }
.drawer.wide { width: min(820px, 100%); }
.chip.half { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.kpis.mini { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.avatar.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }
.minibars { display: flex; align-items: flex-end; gap: 2px; height: 34px; }
.minibars i { flex: 1; background: var(--accent); opacity: .7; border-radius: 2px 2px 0 0; min-width: 2px; }
.checklist { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 8px; align-items: center; }
.job-st { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tpl-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tpl-stats div { display: flex; flex-direction: column; gap: 2px; font-size: 12px; } .tpl-stats b { font-size: 14px; }
.core { margin-bottom: 14px; }
.adv { margin-top: 14px; } .adv summary { cursor: pointer; font-weight: 600; }
.adv:not([open]) { gap: 0; } .adv + .adv { margin-top: 8px; }
.audit-row { display: grid; grid-template-columns: 150px 120px 70px 1fr 60px; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.audit-row:last-child { border-bottom: 0; }
.audit-row .badge { justify-self: start; }
.audit-row .path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.rule-grid > .input:first-child { grid-column: span 2; }
.input.bad { border-color: var(--err); }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.card-title { font-size: 15px; margin-bottom: 12px; }
.tabs-scroll { overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.tabs-scroll .tabs { width: max-content; }

/* ---------------------------------------------------------------- servers / protocols / hosts */
.srv { display: flex; flex-direction: column; gap: 14px; animation: rise .3s backwards; }
.srv-head { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.srv-head h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.srv-head .grow small { display: block; }
.meters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.meter { display: flex; flex-direction: column; gap: 4px; font-size: 12px; } .meter b { font-size: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.inb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.inb { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); min-width: 0; }
.inb-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.inb-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inb.dim { opacity: .62; }
.inb-use { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px; }
.inb-use > span:first-child { display: inline-flex; align-items: center; gap: 4px; }
.gpills { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.node-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nchip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--border); }
.nchip.err { color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.pr-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 14px; }
.idle-cores { margin-top: 6px; }
.idle-cores > summary { cursor: pointer; font-weight: 700; color: var(--muted); padding: 10px 2px; list-style-position: inside; }
.card.core.idle { opacity: .8; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.tpl { text-align: start; border: 1.5px solid var(--border); border-radius: 14px; padding: 14px; background: var(--surface); cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, transform .15s; }
.tpl:hover { border-color: var(--accent); transform: translateY(-1px); }
.tpl.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rtt { display: grid; grid-template-columns: 52px 1fr 34px; align-items: center; gap: 8px; font-size: 12px; }
.rtt .bar i { background: var(--ok); } .rtt .bar.warn i { background: var(--warn); } .rtt .bar.err i { background: var(--err); }
.apps { display: flex; flex-wrap: wrap; gap: 4px; }
.hgroup { margin-bottom: 18px; }
.hgroup-head { display: flex; align-items: center; gap: 10px; margin: 0 4px 8px; }
.hgroup-head h3 { font-size: 14px; }
.host { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); min-width: 0; transition: background .15s; }
.host:last-child { border-bottom: 0; }
.host.off { opacity: .55; }
.host .order { display: flex; flex-direction: column; }
.host .order .btn { height: 20px; width: 28px; }
.probes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.logbox { background: #0b0d13; color: #cfd6e4; font: 12px/1.55 ui-monospace, Menlo, Consolas, monospace; padding: 12px; border-radius: 12px; max-height: 60vh; min-height: 200px;
  overflow: auto; white-space: pre-wrap; word-break: break-all; direction: ltr; text-align: left; }
.logbox .err { color: #ff7b7e; }
.code-edit { min-height: 50vh; font-size: 12.5px; line-height: 1.5; tab-size: 2; white-space: pre; }
.perm-grid { display: flex; flex-direction: column; gap: 8px; }
.perm-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--border); }
.perm-row .chips .chip { height: 28px; font-size: 12px; padding: 0 10px; }
.list-edit { display: flex; flex-direction: column; gap: 8px; }
.list-row { display: grid; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.toggle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.save-bar { position: sticky; bottom: 12px; display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); z-index: 10; animation: rise .2s; }

/* ---------------------------------------------------------------- login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1000px 500px at 85% -10%, rgba(109, 94, 252, .22), transparent 60%), radial-gradient(800px 500px at -10% 110%, rgba(34, 195, 166, .18), transparent 60%), var(--bg); }
.login-top { position: fixed; top: 14px; inset-inline-end: 14px; }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; padding: 32px 26px; box-shadow: var(--shadow-lg); animation: rise .35s; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.more-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px; border-radius: 14px; background: var(--surface-2); font-weight: 600; font-size: 13px; text-align: center; }
.more-item:hover { background: var(--surface-3); }
.modal .me-row { margin-top: 18px; padding: 12px; background: var(--surface-2); border-radius: 14px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1200px) { .kpis, .stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) {
  .sidebar { display: none; }
  .main { margin: 0; padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
    background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
  .topbar h1 { font-size: 17px; flex: 1; }
  .page-head h2 { display: none; }
  .page-head { margin-bottom: 14px; align-items: center; }
  .bottomnav { display: flex; position: fixed; bottom: 0; inset-inline: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px);
    border-top: 1px solid var(--border); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottomnav .nav-item { flex-direction: column; gap: 2px; height: auto; padding: 6px 4px; font-size: 11px; flex: 1; max-width: 90px; border-radius: 12px; justify-content: center; }
  .bottomnav .nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .bulkbar { top: 62px; }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) {
  .grid2, .kpis { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis .kpi:first-child, .kpis .kpi:last-child { grid-column: 1 / -1; }
  .kpi-val { font-size: 24px; }
  .card { padding: 14px; }
  .form-grid, .filters { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none; }
  .modal-layer { align-items: flex-end; padding: 0; }
  .modal, .modal.wide { max-width: none; border-radius: 22px 22px 0 0; max-height: 92vh; animation: up .25s cubic-bezier(.2, .8, .2, 1); }
  .modal .body { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .sheet-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .drawer { width: 100%; border-radius: 0; }
  .sheet-foot .btn { flex: 1; }
  .meters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .perm-row { grid-template-columns: minmax(0, 1fr); }
  .toolbar { flex-wrap: wrap; }
  .toolbar .search { flex-basis: 100%; }
  .toolbar > select { flex: 1; max-width: none; width: auto; }
  .stats4 > .stat:first-child, .stats4 > .stat:last-child { grid-column: 1 / -1; }
  .audit-row { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 6px 10px; }
  .audit-row .path { grid-column: 1 / -1; order: 9; }
  .rings { gap: 4px; } .ring svg { width: 64px; height: 64px; }
}
@media (max-width: 400px) { .exp-row { grid-template-columns: minmax(0, 1fr); } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

/* ---------------------------------------------------------------- overview: health + top lists */
.health { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 145px), 1fr)); gap: 8px; }
.hcard { border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: grid; gap: 7px; min-width: 0; background: var(--surface-2); }
.hcard.bad { border-color: color-mix(in srgb, var(--err) 40%, var(--border)); background: var(--err-soft); }
.hc-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hc-foot { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.hc-foot span { display: inline-flex; align-items: center; gap: 4px; }
.meter { display: grid; grid-template-columns: 34px 1fr 40px; align-items: center; gap: 8px; font-size: 12px; }
.meter span { color: var(--muted); } .meter b { text-align: end; font-size: 12px; }
.meter .bar { height: 6px; }
.ic-title { display: flex; align-items: center; gap: 8px; }
.ic-title .kpi-ic { width: 28px; height: 28px; border-radius: 9px; }
.empty-line { padding: 14px 0 6px; text-align: center; }
.meter.warn .bar i { background: var(--warn); } .meter.err .bar i { background: var(--err); }
.kpi-ic.err { background: var(--err-soft); color: var(--err); }
.drawer .body > .tabs, .modal .body > .tabs { margin-bottom: 14px; }
.btn.full { width: 100%; margin-top: 8px; }
.bar.inf { background: repeating-linear-gradient(90deg, var(--surface-3) 0 6px, transparent 6px 10px); opacity: .7; }
/* iOS Safari zooms into any focused field under 16px: keep fields at 16px on touch screens */
@media (pointer: coarse) { .input, input, select, textarea { font-size: 16px; } }
.muted-in { opacity: .8; }

/* ---------------------------------------------------------------- hosts & groups (10-21 redesign) */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-row .stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); gap: 2px; }
.stat-row .stat b { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.stat-row .stat.good b { color: var(--ok); } .stat-row .stat.bad b { color: var(--err); }
.toolbar.wrap { flex-wrap: wrap; }
.gfilter { margin-bottom: 18px; }
.gchip i, .gpill i { width: 8px; height: 8px; border-radius: 50%; background: var(--g); display: inline-block; flex: none; }
.gchip { display: inline-flex; align-items: center; gap: 7px; }
.gchip.on { background: var(--g); border-color: var(--g); } .gchip.on i { background: #fff; }
.hsec { margin-bottom: 26px; animation: rise .3s backwards; }
.hsec-head { display: flex; align-items: center; gap: 12px; margin: 0 2px 12px; }
.hsec-head h3 { font-size: 16px; }
.hflag { font-size: 22px; line-height: 1; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); flex: none;
  font-family: 'Twemoji Country Flags', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }
.hflag.big { width: 42px; height: 42px; font-size: 26px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.hcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
  min-width: 0; transition: border-color .15s, box-shadow .15s, transform .15s; }
.hcard:hover { border-color: var(--border-2); box-shadow: 0 6px 20px -10px rgba(16, 24, 40, .25); }
.hcard.off { opacity: .6; background: var(--surface-2); }
.hcard-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hcard-top .grow b { font-size: 15px; } .hcard-top .grow small { display: block; }
.hcard-mid, .hcard-groups { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hcard-groups { padding-top: 10px; border-top: 1px dashed var(--border); }
.gpill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 700;
  background: color-mix(in srgb, var(--g) 13%, transparent); color: color-mix(in srgb, var(--g) 75%, var(--text)); }
.gpill.out { opacity: .4; }
.verdict { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.verdict.ok { background: var(--ok-soft); color: var(--ok); } .verdict.err { background: var(--err-soft); color: var(--err); }
.verdict.none { background: var(--off-soft); color: var(--off); }
.ggrid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.gcard { display: flex; flex-direction: column; gap: 14px; border-top: 4px solid var(--g); animation: rise .3s backwards; }
.gcard.dim { opacity: .6; }
.gcard-head { display: flex; align-items: center; gap: 12px; }
.gcard-head h3 { font-size: 17px; }
.gav { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 19px; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--g), color-mix(in srgb, var(--g) 60%, #000)); box-shadow: 0 6px 16px -8px var(--g); }
.glist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.glist li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; min-width: 0; }
.glist li:hover { background: var(--surface-2); }
.glist li .grow small { display: block; font-size: 12px; }
.glist .hflag { width: 30px; height: 30px; font-size: 19px; }
.gbtn { width: 100%; }
.ginb summary { cursor: pointer; list-style: none; } .ginb summary::-webkit-details-marker { display: none; }
.ginb summary::before { content: '▸ '; } .ginb[open] summary::before { content: '▾ '; }
.ginb .badges { margin-top: 8px; } .ginb .badge { font-family: ui-monospace, Menlo, monospace; font-weight: 500; font-size: 11px; height: 22px; }
.alert.small { padding: 8px 12px; font-size: 13px; }
.pick-sec { margin-top: 14px; } .pick-sec h4 { font-size: 13px; color: var(--muted); margin: 0 4px 6px; font-weight: 700; }
.pick { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1.5px solid var(--border); border-radius: 12px; margin-bottom: 6px; cursor: pointer; min-width: 0;
  transition: border-color .15s, background .15s; }
.pick.on { border-color: var(--accent); background: var(--accent-soft); }
.pick input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.pick .grow small { display: block; }
@media (max-width: 1000px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .hgrid, .ggrid { grid-template-columns: minmax(0, 1fr); } .stat-row .stat b { font-size: 20px; } }

/* owner 10-24: unsettled sales — blinking after 14 days (reduced motion: solid instead) */
@keyframes blink { 50% { opacity: .25; } }
.blink { animation: blink 1s steps(2, start) infinite; }
.alert.blink-box { border: 2px solid var(--err); }
.alert.blink-box .ic, .badge.blink { animation: blink 1s steps(2, start) infinite; }
.sale-box { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
.sale-box .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .sale-box .pair { grid-template-columns: 1fr; } }
button.badge { border: 0; cursor: pointer; font-family: inherit; }
