/* OpsCenter UI — calm, dense, ink-on-paper. Light/dark, RTL-safe (logical properties), print-ready. */
:root {
  --brand: #b4235a;
  --ink: #111110; --ink-2: #2b2b29;
  --bg: #f6f6f3; --surface: #ffffff; --surface-2: #f1f1ee; --line: #e7e6e1; --line-2: #d6d5cf;
  --text: #111110; --text-2: #3d3d3a; --muted: #85847e;
  --good: #16794c; --good-bg: #e8f4ec; --warn: #9a5b06; --warn-bg: #fbf1de;
  --bad: #c0352b; --bad-bg: #fbeae8; --info: #2457c5; --info-bg: #e9effb;
  --c1: #111110; --c2: var(--brand); --c3: #c9a227; --c4: #3f8f6b; --c5: #6b7cc4; --c6: #a3a29b;
  --meta: #1f5fd6; --tiktok: #111110; --snapchat: #d9b800;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(17,17,16,.03);
  --shadow-lg: 0 18px 40px -12px rgba(17,17,16,.28), 0 0 0 1px rgba(17,17,16,.06);
  --sidebar: 232px;
  --font: "Geist", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #f4f4f1; --ink-2: #d8d8d3;
  --bg: #0f0f0e; --surface: #181816; --surface-2: #20201e; --line: #2a2a27; --line-2: #3a3a36;
  --text: #f1f1ee; --text-2: #cfcfc9; --muted: #8e8d87;
  --good: #5bc48d; --good-bg: rgba(91,196,141,.12); --warn: #e6b34c; --warn-bg: rgba(230,179,76,.12);
  --bad: #f07a6e; --bad-bg: rgba(240,122,110,.12); --info: #7fa6f2; --info-bg: rgba(127,166,242,.12);
  --c1: #f1f1ee; --tiktok: #f1f1ee; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --ink: #f4f4f1; --ink-2: #d8d8d3;
    --bg: #0f0f0e; --surface: #181816; --surface-2: #20201e; --line: #2a2a27; --line-2: #3a3a36;
    --text: #f1f1ee; --text-2: #cfcfc9; --muted: #8e8d87;
    --good: #5bc48d; --good-bg: rgba(91,196,141,.12); --warn: #e6b34c; --warn-bg: rgba(230,179,76,.12);
    --bad: #f07a6e; --bad-bg: rgba(240,122,110,.12); --info: #7fa6f2; --info-bg: rgba(127,166,242,.12);
    --c1: #f1f1ee; --tiktok: #f1f1ee; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 13.5px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11"; }
a { color: inherit; text-decoration: none; }
.content a:not(.btn):not(.chip):not(.tab):not(.kpi):not(.pal-item) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.content a:not(.btn):not(.chip):not(.tab):not(.kpi):hover { text-decoration-color: currentColor; }
h1 { font-size: 20px; line-height: 1.2; margin: 0; font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: 13.5px; margin: 0; font-weight: 600; letter-spacing: -.005em; }
h3 { font-size: 13px; margin: 0 0 8px; font-weight: 600; }
p { margin: 0 0 8px; }
code, .mono, pre { font-family: var(--mono); font-size: 12.5px; }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--bad); }
.pos { color: var(--good); }
.nowrap { white-space: nowrap; }
.icon { width: 16px; height: 16px; flex: none; }
.hidden, [hidden] { display: none !important; }
kbd { font-family: var(--mono); font-size: 10.5px; padding: 1px 5px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); background: var(--surface); }

/* ── Tooltips: any element with data-tip ── */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; z-index: 60; inset-inline-start: 0; top: calc(100% + 6px);
  width: max-content; max-width: 280px; white-space: normal; text-align: start;
  background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 450; line-height: 1.45; letter-spacing: 0; text-transform: none;
  padding: 7px 10px; border-radius: 7px; box-shadow: var(--shadow-lg); pointer-events: none;
  animation: tip-in .12s ease-out .25s both;
}
@keyframes tip-in { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
.tip { display: inline-flex; align-items: center; color: var(--muted); cursor: help; vertical-align: middle; }
.tip .icon { width: 14px; height: 14px; }
.tip:hover { color: var(--ink); }
.lbl { cursor: help; border-bottom: 1px dotted var(--line-2); }
.lbl:hover { border-bottom-color: var(--muted); }
.help { display: inline-flex; color: var(--muted); cursor: help; font-size: 11px; }

/* ── Shell ── */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); flex: none; background: var(--bg); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 9px; padding: 16px 16px 10px; color: var(--text); font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.brand-logo { height: 28px; max-width: 130px; object-fit: contain; }
.nav { padding: 2px 8px 16px; flex: 1; }
.nav-group { font-size: 11px; color: var(--muted); padding: 16px 10px 4px; font-weight: 500; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 7px; color: var(--text-2); font-weight: 450; }
.nav-item .icon { color: var(--muted); }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface); color: var(--ink); font-weight: 550; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(17,17,16,.04); }
.nav-item.active .icon { color: var(--ink); }
.nav-count { margin-inline-start: auto; background: var(--bad); color: #fff; font-size: 10.5px; border-radius: 999px; padding: 0 6px; line-height: 17px; font-variant-numeric: tabular-nums; }
.sidebar-foot { padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-bg); cursor: help; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 28px; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-spacer { flex: 1; }
.search-trigger { display: flex; align-items: center; gap: 8px; width: 300px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.search-trigger span { flex: 1; text-align: start; }
.search-trigger:hover { border-color: var(--line-2); }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.bell-dot { position: absolute; top: 3px; inset-inline-end: 2px; background: var(--bad); color: #fff; font-size: 9.5px; line-height: 14px; min-width: 14px; border-radius: 7px; padding: 0 3px; font-weight: 600; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 6px 3px 3px; border-radius: 8px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--surface-2); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 600; font-size: 11px; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-meta strong { font-weight: 550; font-size: 13px; }
.user-meta small { color: var(--muted); font-size: 11.5px; }
.menu { position: absolute; inset-inline-end: 0; top: 40px; min-width: 210px; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 5px; z-index: 30; }
.menu a, .menu-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 9px; border-radius: 6px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; text-align: start; }
.menu a:hover, .menu-btn:hover { background: var(--surface-2); }
.menu form { margin: 0; }
.content { padding: 26px 28px 48px; max-width: 1440px; width: 100%; margin: 0 auto; }
.demo-banner { display: flex; gap: 8px; align-items: center; padding: 6px 28px; background: var(--warn-bg); color: var(--warn); font-size: 12.5px; border-bottom: 1px solid var(--line); }
.only-mobile { display: none; }

/* ── Page head ── */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { display: flex; align-items: center; gap: 8px; }
.subtitle { display: none; }
.page-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.content .crumbs a { color: var(--muted); text-decoration: none; }
.content .crumbs a:hover { color: var(--ink); }

/* ── Buttons & forms ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: var(--muted); }
.btn .icon { width: 15px; height: 15px; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-danger { color: var(--bad); }
.btn-danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=url], input[type=tel], input[type=color], input:not([type]), select, textarea {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; outline: none; }
textarea { height: auto; min-height: 80px; padding: 8px 10px; resize: vertical; }
input[type=color] { padding: 2px; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent); }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); width: 15px; height: 15px; vertical-align: middle; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field-label { font-weight: 500; font-size: 12.5px; color: var(--text-2); }
.field-hint { font-size: 11.5px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 14px; }
.form-actions { display: flex; gap: 6px; justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 6px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters > * { width: auto; }
.filters .field { margin-bottom: 0; }
.filters input[type=search], .filters input[type=text] { min-width: 230px; }
.filters select { min-width: 140px; }
.select-filter { margin-bottom: 4px; font-size: 12px; height: 28px !important; }

/* ── Cards, KPIs ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 16px 0; }
.card-head h2 { font-size: 13px; color: var(--text-2); font-weight: 550; }
.card-actions { display: flex; gap: 6px; align-items: center; }
.content .card-actions a:not(.btn) { font-size: 12.5px; color: var(--muted); text-decoration: none; }
.content .card-actions a:not(.btn):hover { color: var(--ink); }
.card-body { padding: 14px 16px 16px; }
.card-body.flush { padding: 10px 0 0; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 0; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kpis .kpi { border: 0; border-radius: 0; box-shadow: inset -1px 0 0 var(--line), inset 0 -1px 0 var(--line); }
.kpi { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 13px; color: var(--text); min-width: 0; transition: background .12s; }
a.kpi-link:hover { background: var(--surface-2); }
.kpi-label { color: var(--muted); font-size: 12px; font-weight: 450; display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 24px; font-weight: 600; margin-top: 6px; letter-spacing: -.025em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.kpi-value .cur { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-inline-end: 4px; vertical-align: 2px; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-height: 18px; }
.kpi.t-bad .kpi-value { color: var(--bad); }
.kpi.t-warn .kpi-value { color: var(--warn); }
.kpi.t-good .kpi-value { color: var(--good); }
.kpi.t-bad, .kpi.t-warn, .kpi.t-good { background: var(--surface); }
.delta { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 550; padding: 0 6px; border-radius: 5px; line-height: 18px; font-variant-numeric: tabular-nums; cursor: help; }
.up-good { color: var(--good); background: var(--good-bg); }
.up-bad { color: var(--bad); background: var(--bad-bg); }
.delta.flat, .delta.muted { color: var(--muted); background: var(--surface-2); }
.section-title { font-size: 12px; color: var(--muted); font-weight: 500; margin: 22px 0 8px; }

/* ── Badges, callouts, flash ── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 500; white-space: nowrap; line-height: 20px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.t-neutral { background: var(--surface-2); color: var(--text-2); }
.t-good { background: var(--good-bg); color: var(--good); }
.t-warn { background: var(--warn-bg); color: var(--warn); }
.t-bad { background: var(--bad-bg); color: var(--bad); }
.t-info { background: var(--info-bg); color: var(--info); }
.t-brand { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.callout { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 9px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-inline-start: 3px solid currentColor; font-size: 13px; }
.callout > div { color: var(--text); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; }
.callout > div p { margin: 0; }
.callout .btn { margin-inline-start: auto; }
.flash { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 9px; margin-bottom: 14px; font-weight: 500; font-size: 13px; }
.flash-ok { background: var(--good-bg); color: var(--good); }
.flash-err { background: var(--bad-bg); color: var(--bad); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--good); } .dot.error { background: var(--bad); } .dot.running { background: var(--warn); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 14px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; font-weight: 500; color: var(--muted); background: var(--surface); white-space: nowrap; position: sticky; top: 0; }
th.num { text-align: end; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover { color: var(--ink); }
th.sorted-asc::after { content: " ↑"; } th.sorted-desc::after { content: " ↓"; }
tbody tr:hover { background: var(--surface-2); }
tr.clickable, tr[data-href] { cursor: pointer; }
tfoot td, tr.total td { font-weight: 600; background: var(--surface-2); }
tr.subtotal td { font-weight: 550; }
tr.indent td:first-child { padding-inline-start: 30px; }
tr.group td { font-weight: 550; background: var(--bg); font-size: 11.5px; color: var(--muted); }
.card-body.flush table tr:last-child td { border-bottom: 0; }
td .sub { display: block; font-size: 11.5px; color: var(--muted); }
.thumb { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); vertical-align: middle; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; font-size: 12.5px; }
.pager-btns { display: flex; align-items: center; gap: 8px; }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; }
.empty p { margin-bottom: 12px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 500; }

/* ── Tabs, chips, range ── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 8px 12px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.range { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.range-chips { display: inline-flex; gap: 2px; flex-wrap: wrap; background: var(--surface-2); border-radius: 9px; padding: 3px; }
.chip { padding: 4px 10px; border-radius: 7px; color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; cursor: pointer; list-style: none; }
.chip::-webkit-details-marker { display: none; }
.chip:hover { color: var(--ink); }
.chip.active { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(17,17,16,.06); }
.range-pop { position: relative; }
.range-pop[open] .range-custom { display: flex; }
.range-custom { display: none; position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 40; gap: 6px; align-items: center; background: var(--surface); padding: 10px; border-radius: 10px; box-shadow: var(--shadow-lg); }
.range-custom input { width: 150px; height: 30px; }
.range-label { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── Charts ── */
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .axis { fill: var(--muted); font-size: 10.5px; font-family: var(--mono); }
.chart .series { fill: none; stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart .area { opacity: .07; }
.chart .pt { opacity: 0; } .chart .pt:hover { opacity: 1; }
.chart .bar:hover { opacity: .75; }
.chart .wf-label { font-size: 10px; font-family: var(--font); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.legend i, .legend-list i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-inline-end: 6px; vertical-align: middle; }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.hbar-track { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 3px; }
.hbar-val { font-variant-numeric: tabular-nums; font-weight: 550; min-width: 64px; text-align: end; }
.donut-wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.donut { width: 116px; height: 116px; }
.legend-list { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 150px; }
.legend-list li { display: flex; align-items: center; gap: 4px; padding: 3px 0; font-size: 12.5px; color: var(--text-2); }
.legend-list li b { margin-inline-start: auto; font-variant-numeric: tabular-nums; font-weight: 550; color: var(--text); }
.spark { width: 100%; height: 28px; } .spark polyline { fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.meter { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 3px; }
.meter-fill.t-good { background: var(--good); } .meter-fill.t-warn { background: var(--warn); } .meter-fill.t-bad { background: var(--bad); } .meter-fill.t-brand, .meter-fill.t-info, .meter-fill.t-neutral { background: var(--ink); }

/* ── Statements (P&L, balance sheet, board report) ── */
.statement td:first-child { width: 60%; }
.statement .pct { color: var(--muted); width: 80px; }
.platform { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.platform::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--muted); }
.platform.meta::before { background: var(--meta); } .platform.tiktok::before { background: var(--tiktok); } .platform.snapchat::before { background: var(--snapchat); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.list-plain li:last-child { border-bottom: 0; }
.alert-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; font-size: 13px; }
.alert-row .grow { flex: 1; min-width: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; padding: 7px 0 7px 34px; position: relative; }
[dir=rtl] .steps li { padding: 7px 34px 7px 0; }
.steps li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.steps li.done::before { content: "✓"; background: var(--good-bg); color: var(--good); }

/* ── Command palette ── */
.palette { position: fixed; inset: 0; z-index: 100; background: rgba(17,17,16,.35); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.palette-box { width: min(600px, 92vw); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.palette-input input { border: 0 !important; box-shadow: none !important; font-size: 15px; padding: 0; background: transparent; }
.palette-results { max-height: 60vh; overflow-y: auto; padding: 6px; }
.pal-group { font-size: 11px; color: var(--muted); padding: 8px 10px 4px; font-weight: 500; }
.pal-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.pal-item small { color: var(--muted); margin-inline-start: auto; }
.pal-item.sel, .pal-item:hover { background: var(--surface-2); }

/* ── Auth & error pages ── */
.auth-body { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 16px; }
.auth-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.auth-brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; margin-bottom: 22px; }
.auth-card h1 { margin-bottom: 4px; }
.auth-card .btn-primary { width: 100%; height: 38px; margin-top: 6px; }
.error-page { min-height: 100vh; display: grid; place-items: center; background: var(--bg); }
.error-box { text-align: center; max-width: 420px; padding: 24px; }
.error-code { font-size: 56px; font-weight: 700; color: var(--ink); line-height: 1; letter-spacing: -.04em; font-family: var(--mono); }
.error-actions { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }

/* ── Responsive ── */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3, .g-2-1 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); background: var(--surface); }
  [dir=rtl] .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: none !important; }
  .only-mobile { display: inline-grid; }
  .hide-mobile { display: none; }
  .search-trigger { width: auto; flex: 1; } .search-trigger kbd { display: none; }
  .content { padding: 16px; } .topbar { padding: 0 12px; }
  .g2, .g4 { grid-template-columns: minmax(0, 1fr); }
  .filters input[type=search], .filters input[type=text] { min-width: 0; width: 100%; }
  .range-custom { inset-inline-end: auto; inset-inline-start: 0; }
}

/* ── Print (board report → PDF) ── */
@media print {
  .sidebar, .topbar, .page-actions, .range, .filters, .pager, .demo-banner, .no-print, .palette, .tip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11.5px; }
  .content { padding: 0; max-width: none; }
  .card, .kpi, .kpis { box-shadow: none; break-inside: avoid; border-color: #ccc; }
  [data-tip]::after { display: none !important; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* ── Board report ── */
.report-cover { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 28px; padding: 30px 32px; margin-bottom: 14px; border-radius: 16px; background: var(--ink); color: var(--bg); position: relative; overflow: hidden; }
.report-cover::after { content: ""; position: absolute; inset-inline-end: -120px; top: -120px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 55%, transparent), transparent 70%); pointer-events: none; }
.rc-brand { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .65; font-weight: 600; }
.rc-title { font-size: 30px; letter-spacing: -.03em; margin: 6px 0 2px; color: var(--bg); }
.rc-period { font-family: var(--mono); font-size: 13px; opacity: .75; }
.rc-lead { font-size: 15px; line-height: 1.6; margin: 18px 0 14px; max-width: 62ch; opacity: .92; }
.rc-meta { font-size: 11.5px; opacity: .55; }
.rc-side { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding-inline-start: 24px; border-inline-start: 1px solid color-mix(in srgb, var(--bg) 18%, transparent); }
.rc-label { font-size: 12px; opacity: .65; }
.rc-net { font-size: 46px; font-weight: 650; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.rc-net .rc-cur { font-size: 15px; font-weight: 500; opacity: .6; margin-inline-end: 6px; letter-spacing: 0; vertical-align: 14px; }
.rc-net.pos { color: #6ee7a8; } .rc-net.neg { color: #ff8a80; }
.rc-sub { font-size: 12.5px; opacity: .7; margin-bottom: 16px; }
.gauge { cursor: help; }
.gauge-head { display: flex; justify-content: space-between; font-size: 12px; opacity: .85; margin-bottom: 6px; }
.gauge-head b { font-size: 15px; font-variant-numeric: tabular-nums; }
.gauge-head b.pos { color: #6ee7a8; } .gauge-head b.neg { color: #ff8a80; }
.gauge-track { position: relative; height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--bg) 16%, transparent); overflow: visible; }
.gauge-fill { height: 100%; border-radius: 5px; }
.gauge-fill.pos { background: #6ee7a8; } .gauge-fill.neg { background: #ff8a80; }
.gauge-mark { position: absolute; top: -4px; bottom: -4px; inset-inline-start: 50%; width: 2px; background: var(--bg); border-radius: 1px; }
.gauge-foot { display: flex; justify-content: space-between; font-size: 10.5px; opacity: .6; margin-top: 6px; font-family: var(--mono); }
.stack-bar { position: relative; display: flex; height: 34px; border-radius: 8px; overflow: visible; background: var(--surface-2); }
.stack-seg { height: 100%; cursor: help; transition: filter .12s; }
.stack-seg:first-child { border-start-start-radius: 8px; border-end-start-radius: 8px; }
.stack-seg:last-of-type { border-start-end-radius: 8px; border-end-end-radius: 8px; }
.stack-seg:hover { filter: brightness(1.12); }
.stack-rev { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--bad); }
.stack-legend { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; }
.stack-legend li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.stack-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.stack-legend b { margin-inline-start: auto; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text); }
.chart .bar-val { fill: var(--text); font-weight: 600; font-size: 11px; }
.flow-head { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0 8px; font-size: 12.5px; color: var(--muted); }
.flow-head:first-child { margin-top: 0; }
.flow-head b { font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.flow-head b.pos { color: var(--good); } .flow-head b.neg { color: var(--bad); }
.flow-net { border-top: 1px solid var(--line); padding-top: 12px; }
.position-net { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.position-net span { color: var(--muted); font-size: 12.5px; }
.position-net b { font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rec-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
dl.kv.unit { grid-template-columns: 1fr auto; gap: 10px 12px; }
dl.kv.unit dd { font-size: 15px; font-weight: 600; text-align: end; font-variant-numeric: tabular-nums; }
.report-notes { padding: 16px 4px; color: var(--muted); font-size: 12px; }
.report-notes h2 { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.report-notes ul { margin: 0; padding-inline-start: 18px; columns: 2; column-gap: 32px; }
.report-notes li { margin-bottom: 4px; break-inside: avoid; }
@media (max-width: 860px) { .report-cover { grid-template-columns: 1fr; } .rc-side { padding-inline-start: 0; border-inline-start: 0; } .report-notes ul { columns: 1; } }
@media print {
  .report-cover { background: #111 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .board-report .card, .stack-seg, .gauge-fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report-break { break-before: page; }
}
.chart .area-g { stroke: none; }
.chart .last { stroke: var(--surface); stroke-width: 2; }

/* ── Sidebar sub-menus ── */
.nav-tree > summary { list-style: none; cursor: pointer; user-select: none; }
.nav-tree > summary::-webkit-details-marker { display: none; }
.nav-chev { margin-inline-start: auto; color: var(--muted); font-size: 15px; line-height: 1; transition: transform .15s; }
[dir=rtl] .nav-chev { transform: scaleX(-1); }
.nav-tree[open] > summary .nav-chev { transform: rotate(90deg); }
[dir=rtl] .nav-tree[open] > summary .nav-chev { transform: rotate(90deg) scaleX(-1); }
.nav-item.nav-parent.active { background: transparent; box-shadow: none; color: var(--ink); font-weight: 600; }
.nav-sub { position: relative; margin: 2px 0 6px; padding-inline-start: 34px; display: flex; flex-direction: column; }
.nav-sub::before { content: ""; position: absolute; top: 2px; bottom: 2px; inset-inline-start: 18px; width: 1px; background: var(--line-2); }
.nav-subitem { display: block; padding: 4px 10px; border-radius: 6px; color: var(--muted); font-size: 12.8px; position: relative; }
.nav-subitem:hover { color: var(--ink); background: var(--surface-2); }
.nav-subitem.active { color: var(--ink); font-weight: 550; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.nav-subitem.active::before { content: ""; position: absolute; inset-inline-start: -17px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--ink); }

/* ── Toasts ── */
.toasts { position: fixed; top: 64px; inset-inline-end: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); border-inline-start: 3px solid var(--info); opacity: 0; transform: translateY(-8px) scale(.98); transition: opacity .2s, transform .2s; }
.toast.in { opacity: 1; transform: none; }
.toast.out { opacity: 0; transform: translateX(16px); }
[dir=rtl] .toast.out { transform: translateX(-16px); }
.toast-ok { border-inline-start-color: var(--good); } .toast-err { border-inline-start-color: var(--bad); } .toast-warn { border-inline-start-color: var(--warn); }
.toast-ic { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--info-bg); color: var(--info); }
.toast-ok .toast-ic { background: var(--good-bg); color: var(--good); } .toast-err .toast-ic { background: var(--bad-bg); color: var(--bad); } .toast-warn .toast-ic { background: var(--warn-bg); color: var(--warn); }
.toast-ic svg { width: 14px; height: 14px; }
.toast-body { flex: 1; min-width: 0; font-size: 13px; line-height: 1.45; display: flex; flex-direction: column; gap: 1px; }
.toast-body b { font-size: 13px; font-weight: 600; }
.toast-body span { color: var(--text-2); word-wrap: break-word; }
.toast-x { flex: none; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; border-radius: 4px; }
.toast-x:hover { color: var(--ink); background: var(--surface-2); }
.toast-bar { position: absolute; inset-inline-start: 0; bottom: 0; height: 2px; width: 100%; background: currentColor; opacity: .18; transform-origin: left; animation: toast-life 4.5s linear forwards; }
[dir=rtl] .toast-bar { transform-origin: right; }
.toast-warn .toast-bar { animation-duration: 7s; }
.toast:hover .toast-bar { animation-play-state: paused; }
@keyframes toast-life { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.js .flash { display: none; }

/* ── Modal ── */
.modal-backdrop { position: fixed; inset: 0; z-index: 210; background: rgba(17,17,16,.42); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .16s; }
.modal-backdrop.in { opacity: 1; }
.modal { width: min(460px, 100%); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); transform: translateY(8px) scale(.98); transition: transform .18s; overflow: hidden; }
.modal-backdrop.in .modal { transform: none; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 4px; }
.modal-head h3 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.modal-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-2); color: var(--ink); }
.modal-danger .modal-ic { background: var(--bad-bg); color: var(--bad); }
.modal-body { padding: 8px 20px 4px 66px; font-size: 13.5px; color: var(--text-2); }
[dir=rtl] .modal-body { padding: 8px 66px 4px 20px; }
.modal-body p { margin: 0 0 10px; }
.modal-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 4px 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; }
.modal-dl dt { color: var(--muted); } .modal-dl dd { margin: 0; color: var(--text); font-weight: 550; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.modal-note { font-size: 12px; color: var(--muted); }
.modal-type { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.modal-type input { font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }
@media (max-width: 520px) { .modal-body, [dir=rtl] .modal-body { padding: 8px 20px 4px; } .modal-foot .btn { flex: 1; } }

/* ── Busy buttons & invalid fields ── */
.btn.is-busy { opacity: .85; cursor: progress; }
.spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.is-invalid { border-color: var(--bad) !important; box-shadow: 0 0 0 3px var(--bad-bg) !important; }
@media print { .toasts, .modal-backdrop { display: none !important; } }
/* exec pages — Command Center, Ads, Search (prefix ex-) */

/* ── Hero band (light) ── */
.ex-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 28px; padding: 24px 28px; margin-bottom: 14px; border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 9%, var(--surface)), var(--surface) 60%); border: 1px solid var(--line); position: relative; overflow: hidden; }
.ex-hero::after { content: ""; position: absolute; inset-inline-end: -90px; top: -110px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%); pointer-events: none; }
.ex-hero-main, .ex-hero-side { position: relative; z-index: 1; min-width: 0; }
.ex-hero-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.content a.ex-hero-value, .ex-hero-value { display: inline-block; font-size: 44px; font-weight: 650; letter-spacing: -.04em; line-height: 1.05; margin-top: 6px; font-variant-numeric: tabular-nums; text-decoration: none; color: var(--ink); }
.ex-hero-value.pos { color: var(--good); } .ex-hero-value.neg { color: var(--bad); }
.ex-hero-value:hover { opacity: .85; }
.ex-cur { font-size: 14px; font-weight: 500; color: var(--muted); margin-inline-end: 6px; letter-spacing: 0; vertical-align: 14px; }
.ex-hero-sub { display: flex; gap: 8px; align-items: center; margin-top: 4px; font-size: 13px; color: var(--muted); }
.ex-hero-status { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.ex-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 550; background: var(--surface-2); color: var(--text-2); }
.content a.ex-pill { text-decoration: none; }
.ex-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ex-pill.pos { background: var(--good-bg); color: var(--good); }
.ex-pill.neg { background: var(--bad-bg); color: var(--bad); }
.ex-pill.warn { background: var(--warn-bg); color: var(--warn); }
.ex-hero-side { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding-inline-start: 24px; border-inline-start: 1px solid var(--line); }
.ex-hero-minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ex-mini { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line); min-width: 0; }
.content a.ex-mini { text-decoration: none; color: var(--text); }
a.ex-mini:hover { border-color: var(--line-2); }
.ex-mini span { font-size: 11.5px; color: var(--muted); }
.ex-mini b { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Gauge (ROAS vs break-even) ── */
.ex-gauge { cursor: help; }
.ex-gauge-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.ex-gauge-head b { font-size: 22px; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ex-gauge-head b.pos { color: var(--good); } .ex-gauge-head b.neg { color: var(--bad); }
.ex-gauge-track { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--bad-bg) 0 50%, var(--good-bg) 50% 100%); }
.ex-gauge-fill { height: 100%; border-radius: 5px; background: var(--muted); }
.ex-gauge-fill.pos { background: var(--good); } .ex-gauge-fill.neg { background: var(--bad); }
.ex-gauge-mark { position: absolute; top: -4px; bottom: -4px; inset-inline-start: calc(50% - 1px); width: 2px; background: var(--ink); border-radius: 1px; }
.ex-gauge-foot { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 6px; font-family: var(--mono); }

/* ── KPI sparklines ── */
.ex-kpis .kpi-sub { flex-wrap: wrap; }
.ex-spark { display: block; width: 100%; height: 26px; margin-top: 6px; flex-basis: 100%; cursor: help; }
.ex-spark-cur { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ex-spark-prev { fill: none; stroke: var(--line-2); stroke-width: 1.2; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.ex-spark-area { opacity: .10; }

/* ── Row of three: attention / fulfilment / cash ── */
.ex-row3 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .85fr); }
.ex-actions { list-style: none; margin: 0; padding: 0; }
.ex-actions li + li { border-top: 1px solid var(--line); }
.ex-actions a { display: flex; align-items: center; gap: 10px; padding: 9px 2px; color: var(--text); }
.content .ex-actions a { text-decoration: none; }
.ex-actions a:hover .ex-act-label { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ex-actions .icon { width: 15px; height: 15px; color: var(--muted); }
.ex-act-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ex-act-val { font-size: 16px; font-variant-numeric: tabular-nums; }
.ex-act-ago { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ex-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.ex-dot.t-bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.ex-dot.t-warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.ex-dot.t-good { background: var(--good); } .ex-dot.t-info { background: var(--info); } .ex-dot.t-neutral { background: var(--muted); }
.ex-clear { display: flex; align-items: center; gap: 8px; padding: 6px 0; color: var(--good); font-weight: 550; }

.ex-ful-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.ex-ful-head b { font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ex-seg { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.ex-seg-part { display: block; min-width: 4px; transition: filter .12s; }
.ex-seg-part:hover { filter: brightness(1.12); }
.ex-seg-legend { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.ex-seg-legend li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); min-width: 0; }
.ex-seg-legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.ex-seg-legend b { margin-inline-start: auto; font-variant-numeric: tabular-nums; color: var(--text); }
.ex-seg-legend .small { min-width: 38px; text-align: end; }

.ex-cash-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; margin-bottom: 12px; }
.ex-cash { list-style: none; margin: 0; padding: 0; }
.ex-cash a { display: flex; align-items: center; gap: 9px; padding: 7px 0; color: var(--text); }
.content .ex-cash a { text-decoration: none; }
.ex-cash li + li { border-top: 1px solid var(--line); }
.ex-cash-l { flex: 1; font-size: 13px; }
.ex-cash b { font-size: 15px; font-variant-numeric: tabular-nums; }

/* ── Top products ── */
.ex-top { list-style: none; margin: 0; padding: 0; }
.ex-top li { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.ex-top li + li { border-top: 1px solid var(--line); }
.ex-rank { width: 18px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; flex: none; }
.ex-thumb { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; flex: none; border: 1px solid var(--line); background: var(--surface-2); }
.ex-thumb-ph { display: grid; place-items: center; font-weight: 650; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.ex-top-main { flex: 1; min-width: 0; }
.ex-top-title { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-top-bar { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.ex-top-bar span { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.ex-top-val { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.ex-top-val b { font-variant-numeric: tabular-nums; }
.ex-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ex-chips .chip { border: 1px solid var(--line); }

/* ── Freshness ── */
.ex-fresh { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 12px; color: var(--text-2); padding: 4px 2px 8px; }
.ex-fresh-label { font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.ex-fresh-item { display: inline-flex; align-items: center; gap: 6px; }
.content a.ex-fresh-item { color: var(--text-2); text-decoration: none; }

/* ── Ads ── */
.ex-plats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ex-plat { position: relative; display: block; padding: 16px 18px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; color: var(--text); }
.content a.ex-plat { text-decoration: none; }
.ex-plat::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--pc, var(--ink)); }
.ex-plat:hover { border-color: var(--line-2); }
.ex-plat.sel { box-shadow: 0 0 0 2px var(--pc, var(--ink)); }
.ex-plat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ex-plat-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ex-plat-name i { width: 10px; height: 10px; border-radius: 3px; background: var(--pc, var(--ink)); }
.ex-plat-spend { font-size: 24px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ex-plat-spend small { font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-inline-start: 6px; }
.ex-plat .ex-gauge { margin-top: 12px; }
.ex-plat .ex-gauge-head b { font-size: 18px; }
.ex-plat-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.ex-plat-foot div { display: flex; flex-direction: column; min-width: 0; }
.ex-plat-foot span { font-size: 11px; color: var(--muted); }
.ex-plat-foot b { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ex-plat .ex-spark { height: 30px; }

.ex-funnel { display: flex; flex-direction: column; gap: 8px; }
.ex-fn-step { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; }
.ex-fn-label { font-size: 12.5px; color: var(--muted); }
.ex-fn-bar { position: relative; height: 34px; display: flex; align-items: center; }
.ex-fn-fill { height: 100%; border-radius: 8px; background: var(--brand); min-width: 6px; margin-inline: auto; display: grid; place-items: center; color: #fff; font-weight: 650; font-variant-numeric: tabular-nums; font-size: 13px; }
.ex-fn-step:nth-child(1) .ex-fn-fill { background: color-mix(in srgb, var(--brand) 35%, var(--surface)); color: var(--ink); }
.ex-fn-step:nth-child(2) .ex-fn-fill { background: color-mix(in srgb, var(--brand) 65%, var(--surface)); }
.ex-fn-val { position: absolute; inset-inline-end: 0; font-size: 12px; color: var(--muted); }
.ex-fn-rate { grid-column: 2; font-size: 11.5px; color: var(--muted); text-align: center; margin-top: -4px; }

.ex-share { display: flex; align-items: center; gap: 8px; justify-content: flex-end; min-width: 110px; }
.ex-share-bar { width: 60px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.ex-share-bar span { display: block; height: 100%; background: var(--pc, var(--ink)); }
.ex-roas { display: inline-block; padding: 1px 8px; border-radius: 999px; font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
.ex-roas.pos { background: var(--good-bg); color: var(--good); }
.ex-roas.mid { background: var(--warn-bg); color: var(--warn); }
.ex-roas.neg { background: var(--bad-bg); color: var(--bad); }

.ex-books { display: flex; flex-direction: column; gap: 12px; }
.ex-books-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }
.ex-books-track { position: relative; height: 10px; border-radius: 5px; background: var(--warn-bg); overflow: hidden; }
.ex-books-track span { display: block; height: 100%; background: var(--good); border-radius: 5px; }
.ex-books-row b { font-variant-numeric: tabular-nums; }
.ex-books-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--line); }
.ex-books-total b { font-size: 20px; letter-spacing: -.02em; }

/* ── Search page ── */
.ex-search { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: 16px; box-shadow: var(--shadow); }
.ex-search .icon { color: var(--muted); }
.ex-search input[type=search] { border: 0; box-shadow: none; font-size: 17px; padding: 6px 4px; background: transparent; }
.ex-search input[type=search]:focus { box-shadow: none; }
.ex-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.ex-res-group h2 { display: flex; align-items: center; gap: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.ex-res-group h2 b { background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 0 7px; font-size: 11px; letter-spacing: 0; }
.ex-res-list { list-style: none; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ex-res-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.content .ex-res-list a { text-decoration: none; }
.ex-res-list a:hover { background: var(--surface-2); }
.ex-res-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.ex-res-ic .icon { width: 15px; height: 15px; }
.ex-res-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ex-res-main b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-res-main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-res-empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.ex-res-empty .icon { width: 28px; height: 28px; }

/* ── Responsive ── */
@media (max-width: 1100px) { .ex-row3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .ex-row3 > :first-child { grid-column: 1 / -1; } }
@media (max-width: 860px) {
  .ex-hero { grid-template-columns: 1fr; padding: 18px; gap: 18px; }
  .ex-hero-side { padding-inline-start: 0; border-inline-start: 0; border-top: 1px solid var(--line); padding-top: 16px; }
  .ex-hero-value { font-size: 36px; }
  .ex-row3 { grid-template-columns: minmax(0, 1fr); }
  .ex-fn-step { grid-template-columns: 80px 1fr; }
  .ex-results { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) { .ex-hero-minis { grid-template-columns: 1fr 1fr; } .ex-seg-legend { grid-template-columns: 1fr; } }
@media print { .ex-hero, .ex-seg-part, .ex-gauge-fill, .ex-plat::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* links styled as components: no core underline */
.content a.ex-hero-value, .content a.ex-mini, .content a.ex-pill, .content .ex-actions a, .content .ex-cash a, .content a.ex-fresh-item,
.content a.ex-plat, .content .ex-res-list a, .content .ex-seg-legend a, .content a.ex-seg-part { text-decoration: none !important; }
.content .ex-top-title a { text-decoration: none !important; color: var(--text); }
.content .ex-top-title a:hover, .content .ex-seg-legend a:hover { text-decoration: underline !important; }
.ex-seg-legend a, .ex-seg-legend span:not(.small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: var(--text-2); }
.ex-gauge-bare { margin-top: 14px; max-width: 420px; }
.ex-gauge-bare .ex-gauge-head { display: none; }
.ex-pace .ex-spark { height: 48px; margin-top: 4px; }
/* ── Operations pages (orders, fulfilment, products, stock, purchase orders). Prefix: ops- ── */

/* Hero strip: one big answer + inline mini-metrics */
.ops-hero { display: flex; align-items: center; gap: 18px 32px; flex-wrap: wrap; padding: 18px 22px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; position: relative; overflow: hidden; }
.ops-hero::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--ink); }
.ops-hero.bad::before { background: var(--bad); } .ops-hero.warn::before { background: var(--warn); } .ops-hero.good::before { background: var(--good); }
.ops-hero-main { display: flex; align-items: baseline; gap: 12px; min-width: 0; color: var(--text); text-decoration: none !important; }
.ops-hero-num { font-size: 46px; font-weight: 650; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.ops-hero-num .cur { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-inline-end: 6px; vertical-align: 16px; }
.ops-hero.bad .ops-hero-num { color: var(--bad); } .ops-hero.warn .ops-hero-num { color: var(--warn); } .ops-hero.good .ops-hero-num { color: var(--good); }
.ops-hero-label { font-size: 15px; color: var(--text-2); font-weight: 550; }
.ops-hero-label small { display: block; font-size: 12px; color: var(--muted); font-weight: 450; margin-top: 2px; }
.ops-hero-stats { display: flex; gap: 10px 28px; margin-inline-start: auto; flex-wrap: wrap; }
.ops-stat { display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none !important; min-width: 70px; }
.ops-stat span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ops-stat b { font-size: 19px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ops-stat b.bad { color: var(--bad); } .ops-stat b.warn { color: var(--warn); } .ops-stat b.good { color: var(--good); }
a.ops-stat:hover b, a.ops-hero-main:hover .ops-hero-num { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* One-row filter bar with pill selects */
.ops-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.ops-bar > input[type=search] { flex: 1 1 200px; min-width: 160px; max-width: 320px; width: auto; height: 32px; padding: 4px 12px; border-radius: 999px; }
.ops-bar select.ops-pill { width: auto; max-width: 170px; height: 32px; padding-block: 3px; padding-inline: 12px 26px; border-radius: 999px; font-size: 12.5px; color: var(--text-2); background-color: var(--surface); }
.ops-bar select.ops-pill.on { border-color: var(--ink); color: var(--ink); font-weight: 600; background-color: var(--surface-2); }
.ops-toggle { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12.5px; color: var(--text-2); cursor: pointer; background: var(--surface); white-space: nowrap; }
.ops-toggle:has(input:checked) { border-color: var(--ink); color: var(--ink); font-weight: 600; background: var(--surface-2); }
.ops-toggle input { width: 13px; height: 13px; }
.ops-go { width: 32px; height: 32px; padding: 0 !important; border-radius: 50% !important; }
.ops-clear { font-size: 12.5px; color: var(--muted) !important; padding: 0 6px; }
.ops-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; height: 32px; }
.ops-seg a { display: inline-grid; place-items: center; padding: 0 10px; color: var(--muted) !important; text-decoration: none !important; }
.ops-seg a.on { background: var(--ink); color: var(--bg) !important; }
.ops-seg .icon { width: 15px; height: 15px; }

/* Status distribution bar — every segment filters the list */
.ops-dist { margin: 0 0 14px; }
.ops-dist-bar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); }
.ops-dist-bar a { display: block; height: 100%; min-width: 4px; transition: opacity .12s, filter .12s; }
.ops-dist-bar a:hover { filter: brightness(1.15); }
.ops-dist.focus .ops-dist-bar a:not(.on) { opacity: .28; }
.ops-dist-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 9px; font-size: 12.5px; }
.ops-dist-legend a { display: inline-flex; gap: 7px; align-items: center; color: var(--text-2) !important; text-decoration: none !important; padding: 2px 0; }
.ops-dist-legend a b { color: var(--text); font-variant-numeric: tabular-nums; }
.ops-dist-legend a.on { color: var(--ink) !important; font-weight: 600; }
.ops-dist-legend a.on b { text-decoration: underline; text-underline-offset: 3px; }
.ops-dist-legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }

/* Dots & chips */
.ops-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ops-pm, .ops-chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ops-chip { padding-block: 1px; padding-inline: 7px 9px; border-radius: 999px; font-size: 12px; font-weight: 550; background: var(--surface-2); color: var(--text-2); }
.ops-chip.lg { font-size: 13px; padding-block: 3px; padding-inline: 10px 12px; }
.ops-muted-dash { color: var(--line-2); }

/* Compact tables */
.ops-table th, .ops-table td { padding: 7px 10px; }
.ops-table td strong { font-weight: 650; }
.ops-table tr.ops-grp td { background: var(--surface-2); font-size: 12.5px; font-weight: 600; padding-block: 6px; }
.ops-table tr.ops-grp td .muted { font-weight: 450; }
.ops-thumb { width: 32px; height: 32px; border-radius: 7px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); vertical-align: middle; display: inline-block; flex: none; }
.ops-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* Small meter with value */
.ops-mm { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.ops-mm .meter { flex: 1; height: 6px; min-width: 50px; }
.ops-mm span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 34px; text-align: end; }
.ops-mm.idle .meter-fill { background: var(--c6); }
.ops-mm.over .meter-fill { background: var(--c5); }
.ops-mm span.bad { color: var(--bad); font-weight: 600; } .ops-mm span.warn { color: var(--warn); font-weight: 600; }

/* Ring (percentage donut) */
.ops-ring { position: relative; width: 58px; height: 58px; flex: none; }
.ops-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ops-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ops-ring.lg { width: 92px; height: 92px; } .ops-ring.lg b { font-size: 19px; }

/* Detail header */
.ops-dhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.ops-dhead-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ops-id { font-size: 36px; font-weight: 650; letter-spacing: -.035em; line-height: 1.05; margin: 0; }
.ops-dhead-sub { margin-top: 6px; color: var(--muted); font-size: 13px; display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.ops-dhead-sub b { color: var(--text); font-weight: 600; }
.ops-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.ops-dhead-img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); background: var(--surface-2); }
.ops-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.ops-side .card { margin-bottom: 14px; }

/* Economics */
.ops-econ { list-style: none; margin: 10px 0 0; padding: 0; }
.ops-econ li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ops-econ li:last-child { border-bottom: 0; }
.ops-econ li b { margin-inline-start: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.ops-econ li.total { font-weight: 650; font-size: 14px; }
.ops-econ li.total b { font-size: 17px; }
.ops-econ li b.neg { color: var(--bad); } .ops-econ li b.pos { color: var(--good); }

/* Vertical timeline with dots */
.ops-tl { list-style: none; margin: 0; padding: 0; }
.ops-tl li { position: relative; padding-block: 0 16px; padding-inline: 24px 0; }
.ops-tl li::before { content: ""; position: absolute; inset-inline-start: 5px; top: 14px; bottom: -2px; width: 2px; background: var(--line); }
.ops-tl li:last-child { padding-bottom: 0; } .ops-tl li:last-child::before { display: none; }
.ops-tl .ops-tl-dot { position: absolute; inset-inline-start: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); }
.ops-tl-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ops-tl-head strong { font-size: 13.5px; }
.ops-tl-head time { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ops-tl-body { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

/* Side key/value list */
.ops-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 14px; margin: 0; font-size: 13px; }
.ops-kv dt { color: var(--muted); }
.ops-kv dd { margin: 0; text-align: end; overflow-wrap: anywhere; }

/* Queue rows with SLA bars */
.ops-queue { list-style: none; margin: 0; padding: 0; }
.ops-queue li { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(120px, 1.4fr) auto; gap: 12px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ops-queue li:hover { background: var(--surface-2); }
.ops-queue li:last-child { border-bottom: 0; }
.ops-queue .q-id strong { display: block; }
.ops-queue .q-id small { color: var(--muted); font-size: 12px; }
.ops-queue .q-end { text-align: end; font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ops-sla { display: flex; flex-direction: column; gap: 4px; }
.ops-sla-track { position: relative; height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.ops-sla-fill { height: 100%; border-radius: 4px; background: var(--good); }
.ops-sla-fill.warn { background: var(--warn); } .ops-sla-fill.bad { background: var(--bad); }
.ops-sla small { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ops-sla small.bad { color: var(--bad); font-weight: 600; }
.ops-done { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--good-bg); color: var(--good); font-weight: 600; font-size: 12.5px; }
.ops-done .icon { width: 14px; height: 14px; }

/* Card grids (couriers, emirates, products) */
.ops-cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ops-ccard { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--text) !important; text-decoration: none !important; transition: border-color .12s; }
.ops-ccard:hover { border-color: var(--ink); }
.ops-ccard-top { display: flex; align-items: center; gap: 12px; }
.ops-ccard-top h3 { margin: 0; font-size: 15px; }
.ops-ccard-top .ops-ring { margin-inline-start: auto; }
.ops-ccard-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ops-ccard-stats div { display: flex; flex-direction: column; }
.ops-ccard-stats span { font-size: 11.5px; color: var(--muted); }
.ops-ccard-stats b { font-size: 15px; font-variant-numeric: tabular-nums; }
.ops-ccard-stats b.bad { color: var(--bad); }
.ops-egrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ops-etile { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text) !important; text-decoration: none !important; border: 1px solid transparent; }
.ops-etile:hover { border-color: var(--ink); }
.ops-etile-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 12.5px; font-weight: 600; }
.ops-etile-top span { color: var(--muted); font-weight: 450; font-variant-numeric: tabular-nums; }
.ops-etile-pct { font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ops-etile small { font-size: 11.5px; color: var(--muted); }
.ops-etile .meter { height: 5px; }

/* Product grid */
.ops-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ops-pcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: var(--text) !important; text-decoration: none !important; transition: border-color .12s, transform .12s; }
.ops-pcard:hover { border-color: var(--ink); }
.ops-pimg { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); display: grid; place-items: center; color: var(--line-2); }
.ops-pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ops-pimg .icon { width: 34px; height: 34px; }
.ops-ini { font-size: 30px; font-weight: 650; letter-spacing: -.02em; color: color-mix(in srgb, var(--ink) 22%, var(--surface-2)); }
.ops-pimg .ops-chip { position: absolute; top: 8px; inset-inline-start: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.ops-pimg .ops-flag { position: absolute; top: 8px; inset-inline-end: 8px; }
.ops-pbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.ops-ptitle { font-weight: 600; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.ops-prow { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12.5px; }
.ops-prow b { font-variant-numeric: tabular-nums; font-size: 14px; }
.ops-margin { display: inline-flex; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ops-margin.good { background: var(--good-bg); color: var(--good); } .ops-margin.warn { background: var(--warn-bg); color: var(--warn); }
.ops-margin.bad { background: var(--bad-bg); color: var(--bad); } .ops-margin.none { background: var(--surface-2); color: var(--muted); }
.ops-psales { font-size: 12px; color: var(--muted); }
.ops-psales b { color: var(--text); font-size: 12.5px; }

/* Import steps & drop zone */
.ops-steps { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.ops-step { display: flex; align-items: center; gap: 8px; padding-block: 6px; padding-inline: 6px 14px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 550; }
.ops-step i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-2); font-size: 11.5px; }
.ops-step.on { background: var(--ink); color: var(--bg); } .ops-step.on i { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.ops-step.done i { background: var(--good); color: #fff; border-color: var(--good); }
.ops-drop { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 20px; border: 2px dashed var(--line-2); border-radius: 14px; background: var(--surface-2); text-align: center; }
.ops-drop > .icon { width: 30px; height: 30px; color: var(--muted); }
.ops-drop small .icon { width: 13px; height: 13px; vertical-align: -2px; }
.ops-drop input[type=file] { max-width: 340px; }
.ops-drop small { color: var(--muted); font-size: 12px; max-width: 52ch; }
.ops-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 14px; }
.ops-map label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 550; }
.ops-map label.set { color: var(--ink); }
.ops-map select { height: 32px; padding: 3px 8px; font-size: 13px; }

/* Chart cards */
.ops-chart-empty { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 6px 0; }

@media (max-width: 1100px) { .ops-detail { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .ops-hero { padding: 14px 16px; gap: 12px 20px; }
  .ops-hero-num { font-size: 36px; }
  .ops-hero-stats { margin-inline-start: 0; gap: 10px 20px; }
  .ops-stat b { font-size: 16px; }
  .ops-id { font-size: 28px; }
  .ops-queue li { grid-template-columns: 1fr auto; }
  .ops-queue li .ops-sla { grid-column: 1 / -1; grid-row: 2; }
  .ops-pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ops-bar select.ops-pill { flex: 1 1 calc(50% - 4px) !important; width: calc(50% - 4px) !important; min-width: 0 !important; max-width: calc(50% - 4px) !important; }
  .ops-bar > input[type=search] { flex-basis: 100%; max-width: none; }
}
/* ── Finance: accounting & financial statements (prefix fin-) ── */

/* hero answer band */
.fin-hero { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.fin-hero-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; display: flex; gap: 6px; align-items: center; }
.fin-hero-num { font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.fin-hero-unit { font-size: 14px; font-weight: 500; color: var(--muted); margin-inline-start: 8px; }
.fin-hero-sub { color: var(--text-2); font-weight: 600; }
.fin-hero-side { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fin-mini { display: flex; flex-direction: column; padding: 6px 14px; border-inline-start: 1px solid var(--line); color: inherit; min-width: 90px; }
.fin-mini:hover { text-decoration: none; background: var(--surface-2); border-radius: var(--radius-sm); }
.fin-mini span { font-size: 11.5px; color: var(--muted); }
.fin-mini b { font-size: 16px; font-variant-numeric: tabular-nums; }
.fin-cta { padding: 10px 18px; font-size: 14.5px; }

/* 100% status bar */
.fin-stack { margin: 0 0 14px; }
.fin-stack-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.fin-stack-seg { display: block; height: 100%; }
.fin-stack-seg:hover { filter: brightness(1.1); }
.fin-stack-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; margin-top: 6px; }
.fin-stack-legend a { color: var(--text-2); }
.fin-stack-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 5px; vertical-align: middle; }

/* compact rows */
.fin-rows { display: flex; flex-direction: column; }
.fin-row { display: flex; gap: 10px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); color: inherit; flex-wrap: wrap; }
.fin-rows > :last-child, .fin-rows > :last-child .fin-row { border-bottom: 0; }
a.fin-row:hover { background: var(--surface-2); text-decoration: none; }
.fin-row .grow, .fin-check .grow, .fin-wiz-nav .grow { flex: 1; }
.fin-row .meter { width: 80px; }
.fin-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.fin-dot.t-good { background: var(--good); } .fin-dot.t-warn { background: var(--warn); } .fin-dot.t-bad { background: var(--bad); } .fin-dot.t-info { background: var(--info); }

/* work queues */
.fin-queues { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.fin-queue { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 130px auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--brand); border-radius: var(--radius); padding: 10px 14px; }
.fin-queue.t-warn { border-inline-start-color: var(--warn); } .fin-queue.t-bad { border-inline-start-color: var(--bad); } .fin-queue.t-info { border-inline-start-color: var(--info); } .fin-queue.t-good { border-inline-start-color: var(--good); }
.fin-queue { background: var(--surface); color: var(--text); }
.fin-queue-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.fin-queue-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fin-queue-title { font-weight: 600; }
.fin-queue-num { font-size: 26px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.fin-queue-amt { text-align: end; color: var(--text-2); font-variant-numeric: tabular-nums; }
.fin-aging { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-2); max-width: 360px; }
.fin-aging span { display: block; height: 100%; }
.fin-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.fin-queue .fin-chips { margin: 0; }
.fin-queue .chip { padding: 2px 8px; font-size: 12px; }
.fin-chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; background: var(--surface); }
.fin-chip small { color: var(--muted); }
.fin-chip:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, transparent); }

/* books vs shopify */
.fin-vs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.fin-vs > * { display: flex; flex-direction: column; padding: 8px 10px; background: var(--surface-2); border-radius: var(--radius-sm); color: inherit; }
.fin-vs span { font-size: 11.5px; color: var(--muted); }
.fin-vs b { font-variant-numeric: tabular-nums; }
.fin-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.fin-inline input[type=text] { flex: 1; min-width: 180px; }

/* wizard stepper */
.fin-steps { margin: 4px 0 16px; position: relative; }
.fin-steps-bar { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; margin: 0 6% 10px; }
.fin-steps-bar div { height: 100%; background: var(--brand); transition: width .3s; }
.fin-steps ol { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0; padding: 0; }
.fin-steps li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); text-align: center; }
.fin-steps li a { display: contents; color: inherit; }
.fin-step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-2); border: 2px solid var(--line-2); color: var(--text-2); }
.fin-steps li.done .fin-step-n { background: var(--good-bg); border-color: var(--good); color: var(--good); }
.fin-steps li.active { color: var(--text); font-weight: 600; }
.fin-steps li.active .fin-step-n { background: var(--brand); border-color: var(--brand); color: #fff; }
.fin-wiz-nav { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.fin-form2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; max-width: 560px; }

/* health checks */
.fin-checks { display: flex; flex-direction: column; }
.fin-check { display: flex; gap: 10px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.fin-mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.fin-check-label { font-weight: 550; cursor: help; }
.fin-check-n { color: var(--text-2); font-variant-numeric: tabular-nums; }
.fin-ack { display: flex; gap: 10px; align-items: center; padding: 6px 14px 10px 48px; border-bottom: 1px solid var(--line); background: var(--bad-bg); flex-wrap: wrap; }
[dir=rtl] .fin-ack { padding: 6px 48px 10px 14px; }
.fin-ack input[type=text] { flex: 1; min-width: 200px; }

/* selection & preview */
tr.fin-wait td { background: color-mix(in srgb, var(--warn-bg) 60%, transparent); }
.fin-note { width: 180px; padding: 3px 8px; font-size: 12.5px; margin-inline-start: 6px; }
.fin-diff { color: var(--warn); font-weight: 600; }
.fin-sumbar { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; box-shadow: var(--shadow); margin-top: 10px; z-index: 2; }
.fin-item { border-bottom: 1px solid var(--line); }
.fin-item > summary { list-style: none; cursor: pointer; border-bottom: 0; }
.fin-item > summary::-webkit-details-marker { display: none; }
.fin-item[open] > summary { background: var(--surface-2); }
.fin-lines { margin: 0 0 6px; }
.fin-lines td { padding: 4px 14px; border: 0; }
tr.fin-err td { background: var(--bad-bg); }

/* detail pages: main | side */
.fin-2col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.fin-timeline { list-style: none; margin: 0 0 12px; padding: 0; position: relative; }
.fin-timeline::before { content: ""; position: absolute; inset-inline-start: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.fin-timeline li { position: relative; padding: 0 0 14px 24px; display: flex; flex-direction: column; }
[dir=rtl] .fin-timeline li { padding: 0 24px 14px 0; }
.fin-timeline li::before { content: ""; position: absolute; inset-inline-start: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); }
.fin-timeline li.done::before { background: var(--good); border-color: var(--good); }
.fin-timeline li.bad::before { background: var(--bad); border-color: var(--bad); }
.fin-timeline small { color: var(--muted); }
.fin-actions { display: flex; flex-direction: column; gap: 8px; }
.fin-actions form, .fin-actions .btn { width: 100%; }
.fin-actions .btn { justify-content: center; }
.fin-pop { position: relative; display: inline-block; }
.fin-pop > summary { list-style: none; }
.fin-pop > summary::-webkit-details-marker { display: none; }
.fin-pop-body { display: flex; flex-direction: column; gap: 6px; padding: 10px; margin-top: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 240px; position: absolute; inset-inline-end: 0; z-index: 20; }
.fin-switch { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.fin-switch input { appearance: none; width: 34px; height: 20px; border-radius: 10px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.fin-switch input::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: inset-inline-start .2s; }
.fin-switch input:checked { background: var(--brand); }
.fin-switch input:checked::after { inset-inline-start: 16px; }

/* statements: inline % bars */
.fin-pct { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.fin-pct-track { width: 90px; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.fin-pct-fill { height: 100%; background: var(--ink-2); border-radius: 3px; }
.fin-pct-fill.neg { background: var(--bad); }
.fin-pct-fill.rev { background: var(--brand); }
.fin-pct b { min-width: 48px; text-align: end; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.fin-bsbar { display: flex; height: 28px; border-radius: 6px; overflow: hidden; margin: 6px 0 4px; }
.fin-bsbar span { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.fin-cf { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px; align-items: center; }
.fin-cf-in, .fin-cf-out { height: 18px; border-radius: 4px; }
.fin-cf-in { background: var(--good); }
.fin-cf-out { background: var(--bad); margin-inline-start: auto; }
.fin-cf-cell { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.fin-cf-cell.out { flex-direction: row-reverse; }
.fin-cf-head { font-size: 12px; color: var(--muted); font-weight: 600; }

/* filter bar */
.fin-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.fin-filters input[type=search] { min-width: 220px; flex: 1; max-width: 320px; }
.fin-filters select { width: auto; padding: 5px 8px; border-radius: 999px; font-size: 13px; }

@media (max-width: 900px) {
  .fin-2col { grid-template-columns: minmax(0, 1fr); }
  .fin-queue { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .fin-queue-amt { grid-column: 2; text-align: start; }
  .fin-queue .btn { grid-column: 3; }
  .fin-hero-num { font-size: 32px; }
  .fin-steps li > span:not(.fin-step-n), .fin-steps li a > span:not(.fin-step-n) { display: none; }
  .fin-form2, .fin-vs { grid-template-columns: minmax(0, 1fr); }
  .fin-cf { grid-template-columns: 100px minmax(0, 1fr) minmax(0, 1fr); }
  .fin-mini { border-inline-start: 0; padding: 4px 8px; }
}
@media print { .fin-wiz-nav, .fin-pop, .fin-actions, .fin-sumbar { display: none !important; } .fin-2col { grid-template-columns: 1fr; } }
.fin-queue-main > .badge, .fin-queue-main > span.small { align-self: flex-start; }
tr.fin-wait .fin-note { display: none; width: 180px !important; }
tr.fin-wait:has(input[type=checkbox]:checked) .fin-note { display: inline-block; }
.fin-wf .chart svg { max-height: 230px; }
.fin-asof { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.fin-asof input[type=date] { width: 170px; }
.fin-cf-out { margin-inline-start: 0; }
td .fin-aging { margin-top: 4px; max-width: 160px; }
.fin-bline { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 6px; background: var(--surface); }
.fin-bline > :first-child { flex-basis: 100%; }
.fin-bline .fin-sugg { flex-basis: 100%; }
.fin-bdet > summary { cursor: pointer; color: var(--brand); font-weight: 550; }
.fin-bdet[open] { flex-basis: 100%; }
@media (max-width: 600px) {
  .fin-pct-track { display: none; }
  .statement td:first-child { width: auto; }
  .fin-queue-num { font-size: 22px; }
}

/* bank-line matching */
.fin-hint { color: var(--info); font-weight: 550; }
.fin-match { flex-basis: 100%; }
.fin-match-body { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding: 10px; background: var(--surface-2); border-radius: var(--radius-sm); }
.fin-payout { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; padding: 8px 10px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius-sm); }
.fin-payout label { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--muted); }
.fin-payout label.grow { flex: 1; min-width: 180px; }
.fin-payout select, .fin-payout input { width: auto; padding: 4px 8px; font-size: 13px; color: var(--text); }
.fin-payout label.grow input { width: 100%; }
.fin-payout-title { font-weight: 650; align-self: center; display: inline-flex; gap: 4px; align-items: center; }
.fin-payout-net { display: flex; flex-direction: column; font-size: 11.5px; color: var(--muted); }
.fin-payout-net b { font-size: 15px; color: var(--ink); }
.fin-sugg-list { display: flex; flex-direction: column; gap: 4px; }
.fin-sugg-item { display: flex; gap: 8px; align-items: center; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); flex-wrap: wrap; }
.fin-sugg-item .grow { flex: 1; }
.fin-unrec { opacity: .8; border-style: dashed; }
.fin-rowfilter { max-width: 280px; padding: 4px 10px; font-size: 13px; }
.fin-cands { max-height: 260px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.fin-cands td { padding: 5px 10px; }
tr.fin-fit td { background: var(--good-bg); }
.fin-match-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fin-match-foot .grow { flex: 1; }
.fin-match-foot select { width: auto; padding: 4px 8px; font-size: 13px; }
.fin-acc { min-width: 200px; }
.fin-return { margin-bottom: 12px; }
/* admin pages — VAT, notifications, settings, account, integrations. Prefix: adm- */

.content a.adm-stat, .content a.adm-hero-big, .content a.adm-next, .content a.adm-f201-row, .content a.adm-flag,
.content a.adm-tile, .content a.adm-period, .content a.adm-person, .content a.adm-ntf-link { text-decoration: none !important; color: inherit; }

/* ── atoms ── */
.adm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.adm-dot.t-good { background: var(--good); } .adm-dot.t-warn { background: var(--warn); } .adm-dot.t-bad { background: var(--bad); }
.adm-dot.t-info { background: var(--info); } .adm-dot.t-brand { background: var(--brand); }
.adm-chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; line-height: 20px; border-radius: 999px; font-size: 11.5px; font-weight: 550; white-space: nowrap;
  background: var(--surface-2); color: var(--text-2); }
.adm-chip.t-good { background: var(--good-bg); color: var(--good); } .adm-chip.t-warn { background: var(--warn-bg); color: var(--warn); }
.adm-chip.t-bad { background: var(--bad-bg); color: var(--bad); } .adm-chip.t-info { background: var(--info-bg); color: var(--info); }
.adm-chip.t-brand { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.adm-chip .icon { width: 12px; height: 12px; }
.adm-avatar { --h: 300; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-size: 12px; font-weight: 650; letter-spacing: .02em;
  background: hsl(var(--h) 55% 92%); color: hsl(var(--h) 45% 32%); }
:root[data-theme="dark"] .adm-avatar { background: hsl(var(--h) 30% 22%); color: hsl(var(--h) 60% 80%); }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] .adm-avatar { background: hsl(var(--h) 30% 22%); color: hsl(var(--h) 60% 80%); } }
.adm-avatar.big { width: 64px; height: 64px; font-size: 22px; }
.adm-bar { position: relative; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: visible; min-width: 40px; }
.adm-bar-fill { height: 100%; border-radius: 3px; background: var(--ink); max-width: 100%; }
.adm-bar-fill.t-good { background: var(--good); } .adm-bar-fill.t-warn { background: var(--warn); } .adm-bar-fill.t-bad { background: var(--bad); }
.adm-bar-fill.t-info { background: var(--info); } .adm-bar-fill.t-brand { background: var(--brand); } .adm-bar-fill.t-neutral { background: var(--muted); }
.adm-bar-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 1px; }
.adm-split-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.adm-split-bar > div { height: 100%; min-width: 2px; }
.mono { font-family: var(--mono); }

/* switch */
.adm-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin-bottom: 12px; user-select: none; }
.adm-switch.bare { margin: 0; }
.adm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.adm-sw { width: 34px; height: 20px; border-radius: 10px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.adm-sw::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.adm-switch input:checked + .adm-sw { background: var(--good); }
.adm-switch input:checked + .adm-sw::after { transform: translateX(14px); }
[dir=rtl] .adm-switch input:checked + .adm-sw::after { transform: translateX(-14px); }
.adm-switch input:focus-visible + .adm-sw { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 18%, transparent); }
.adm-switch input:disabled + .adm-sw { opacity: .4; cursor: not-allowed; }

/* ring gauge */
.adm-ring { position: relative; flex: none; }
.adm-ring svg { width: 100%; height: 100%; display: block; }
.adm-ring circle { fill: none; stroke-width: 16; stroke-linecap: round; }
.adm-ring-track { stroke: var(--surface-2); }
.adm-ring-fill { stroke: var(--ink); transition: stroke-dasharray .6s; }
.adm-ring-fill.t-good { stroke: var(--good); } .adm-ring-fill.t-warn { stroke: var(--warn); } .adm-ring-fill.t-bad { stroke: var(--bad); }
.adm-ring-fill.t-info, .adm-ring-fill.t-brand { stroke: var(--brand); }
.adm-ring-mark { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.adm-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 18%; }
.adm-ring-big { font-size: 28px; font-weight: 650; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.adm-ring-sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* ── hero ── */
.adm-hero { display: flex; gap: 28px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 14px;
  background-image: radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 45%); }
[dir=rtl] .adm-hero { background-image: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 45%); }
.adm-hero-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.adm-eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 550; }
[dir=rtl] .adm-eyebrow { text-transform: none; letter-spacing: 0; }
.adm-hero-title { font-size: 20px; font-weight: 600; letter-spacing: -.02em; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.adm-hero-title .adm-chip { font-size: 13px; line-height: 26px; padding: 0 12px; }
.adm-hero-big { display: flex; align-items: baseline; gap: 6px; font-size: 36px; font-weight: 650; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.adm-hero-big .cur { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.adm-hero-big-l { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-inline-start: 6px; display: inline-flex; gap: 4px; align-items: center; }
.adm-stats { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--line); padding-top: 10px; }
.adm-stat { display: flex; flex-direction: column; gap: 2px; padding: 2px 18px 2px 0; margin-inline-end: 18px; border-inline-end: 1px solid var(--line); min-width: 0; }
[dir=rtl] .adm-stat { padding: 2px 0 2px 18px; }
.adm-stat:last-child { border-inline-end: 0; }
a.adm-stat:hover .adm-stat-v { text-decoration: underline; text-underline-offset: 3px; }
.adm-stat-l { font-size: 11.5px; color: var(--muted); }
.adm-stat-v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.adm-strip { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 14px; }
.adm-strip .adm-stats { border: 0; padding: 0; }
.adm-strip-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.adm-strip-big { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }

/* rules & next-step link */
.adm-rules { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-rule { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--text-2); cursor: help; background: var(--surface); }
.adm-rule .icon { width: 13px; height: 13px; color: var(--muted); }
.adm-next { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--text-2); margin-bottom: 14px; }
.adm-next span { flex: 1; }
.adm-next:hover { border-color: var(--ink); color: var(--ink); }
[dir=rtl] .adm-next .icon:last-child { transform: scaleX(-1); }

/* threshold ladder */
.adm-ladder { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.adm-ladder-row { display: grid; grid-template-columns: 150px 1fr 54px; gap: 12px; align-items: center; }
.adm-ladder-l { font-size: 12.5px; color: var(--text-2); display: flex; justify-content: space-between; gap: 6px; }
.adm-ladder-l b { font-variant-numeric: tabular-nums; }
.adm-ladder-p { font-size: 12.5px; font-weight: 600; text-align: end; font-variant-numeric: tabular-nums; }
.adm-ladder .adm-bar { height: 8px; }

/* projection chart */
.adm-proj .adm-dash { stroke-dasharray: 6 5; opacity: .75; }
.adm-thr { stroke-dasharray: 3 4; stroke-width: 1.4; }
.adm-thr-l { font-weight: 600; }
.adm-today { stroke: var(--line-2); stroke-dasharray: 2 3; }
.adm-dash-i { width: 14px !important; height: 0 !important; border-top: 2px dashed var(--brand); background: none !important; border-radius: 0 !important; }

/* ── VAT201 form ── */
.adm-f201 { display: flex; flex-direction: column; font-size: 13px; }
.adm-f201-head, .adm-f201-row { display: grid; grid-template-columns: 38px minmax(0,1fr) 130px 120px; gap: 10px; align-items: center; }
.adm-f201-head { color: var(--muted); font-size: 11.5px; padding: 0 8px 4px; }
.adm-f201-sec { margin: 12px 0 4px; padding: 0 8px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
[dir=rtl] .adm-f201-sec { text-transform: none; letter-spacing: 0; }
.adm-f201-sec:first-of-type { margin-top: 2px; }
.adm-f201-row { padding: 5px 8px; border-radius: 8px; }
a.adm-f201-row:hover { background: var(--surface-2); }
.adm-f201-row.total { font-weight: 600; }
.adm-f201-row.total .adm-field { background: var(--surface-2); }
.adm-f201-row.bad { background: var(--bad-bg); }
.adm-f201-row.grand { margin-top: 8px; padding: 10px 8px; background: var(--ink); color: var(--bg); font-weight: 650; }
.adm-f201-row.grand .adm-field { background: transparent; border-color: transparent; color: var(--bg); font-size: 16px; }
.adm-f201-row.grand .adm-boxno { background: var(--bg); color: var(--ink); }
.adm-f201-row.grand.t-good { background: var(--good); }
.adm-f201-lbl { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.adm-f201-lbl > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-f201-lbl .adm-bar { height: 4px; max-width: 220px; }
.adm-boxno { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); font-family: var(--mono); font-size: 11.5px; font-weight: 600; }
.adm-field { display: block; height: 28px; line-height: 26px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; overflow: hidden; }
.adm-field.off { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--surface-2) 5px 6px); border-color: transparent; }

/* return page */
.adm-stepper { display: flex; list-style: none; margin: 0; padding: 0; gap: 0; }
.adm-stepper li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; flex-wrap: wrap; }
.adm-stepper li small { color: var(--muted); font-weight: 400; }
.adm-stepper li + li::before { content: ""; width: 34px; height: 2px; background: var(--line-2); margin: 0 10px; }
.adm-stepper li span { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); }
.adm-stepper li.done { color: var(--ink); }
.adm-stepper li.done span { border-color: var(--good); background: var(--good); }
.adm-stepper li.done + li.done::before { background: var(--good); }
.adm-form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.adm-adj { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 8px; align-items: center; margin-bottom: 12px; }
.adm-adj input { text-align: end; font-variant-numeric: tabular-nums; }
.adm-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 8px; font-size: 13px; }
.adm-kv dt { color: var(--muted); } .adm-kv dd { margin: 0; text-align: end; font-weight: 550; }
.adm-danger summary { cursor: pointer; color: var(--bad); font-size: 12.5px; font-weight: 550; padding: 6px 0; }
.adm-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.adm-timeline li { position: relative; padding: 0 0 12px 22px; display: flex; flex-direction: column; gap: 1px; }
[dir=rtl] .adm-timeline li { padding: 0 22px 12px 0; }
.adm-timeline li::before { content: ""; position: absolute; inset-inline-start: 3px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--surface); z-index: 1; }
.adm-timeline li.t-warn::before { background: var(--warn); }
.adm-timeline li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 7px; top: 12px; bottom: -2px; width: 1px; background: var(--line-2); }
.adm-input-ic { position: relative; }
.adm-valid { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; }
.adm-valid.t-good { background: var(--good-bg); color: var(--good); } .adm-valid.t-bad { background: var(--bad-bg); color: var(--bad); }
.adm-valid .icon { width: 12px; height: 12px; }
.adm-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* returns list */
.adm-periods { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.adm-period { display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(0, 1.4fr) minmax(130px, 1fr) auto; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--line-2); border-radius: 10px; padding: 10px 14px; }
.adm-period.t-good { border-inline-start-color: var(--good); } .adm-period.t-info { border-inline-start-color: var(--info); }
.adm-period.t-warn { border-inline-start-color: var(--warn); } .adm-period.t-bad { border-inline-start-color: var(--bad); }
.adm-period-when { display: flex; flex-direction: column; }
.adm-period-state { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.adm-period-amt { display: flex; flex-direction: column; gap: 5px; text-align: end; font-weight: 600; }
.adm-period-amt .adm-bar { height: 4px; }

/* period timeline (settings) */
.adm-ptl { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.adm-ptl li { padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.adm-ptl li.now { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.adm-ptl-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* flags */
.adm-sevbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.adm-sev { display: flex; align-items: baseline; gap: 8px; padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid currentColor; }
.adm-sev b { font-size: 26px; letter-spacing: -.03em; line-height: 1; }
.adm-sev span { color: var(--text-2); font-size: 12.5px; }
.adm-sev.t-bad { color: var(--bad); } .adm-sev.t-warn { color: var(--warn); } .adm-sev.t-info { color: var(--info); }
.adm-sev.zero { color: var(--line-2); } .adm-sev.zero b { color: var(--muted); }
.adm-flags { display: flex; flex-direction: column; gap: 6px; }
.adm-flag { display: block; background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--muted); border-radius: 10px; padding: 9px 12px; margin-bottom: 6px; }
.adm-flag.t-bad { border-inline-start-color: var(--bad); } .adm-flag.t-warn { border-inline-start-color: var(--warn); } .adm-flag.t-info { border-inline-start-color: var(--info); }
.adm-flag-head { display: flex; align-items: center; gap: 8px; }
.adm-flag-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; flex: none; background: var(--surface-2); }
.adm-flag.t-bad .adm-flag-ic { background: var(--bad-bg); color: var(--bad); } .adm-flag.t-warn .adm-flag-ic { background: var(--warn-bg); color: var(--warn); }
.adm-flag.t-info .adm-flag-ic { background: var(--info-bg); color: var(--info); }
.adm-flag-t { font-weight: 550; min-width: 0; }
a.adm-flag { display: flex; justify-content: space-between; margin-top: 10px; }
.adm-flag-sp { flex: 1; }
.adm-flag-items { margin: 6px 0 0 34px; font-size: 12.5px; }
[dir=rtl] .adm-flag-items { margin: 6px 34px 0 0; }
.adm-flag-items summary { cursor: pointer; color: var(--muted); }
.adm-flag-items ul { margin: 6px 0 0; padding-inline-start: 16px; columns: 2; column-gap: 24px; }
.adm-flag-items li { break-inside: avoid; padding: 2px 0; }
.adm-allclear { display: flex; align-items: center; gap: 8px; color: var(--good); font-weight: 550; padding: 8px 2px; }
.adm-allclear.big { justify-content: center; padding: 30px; background: var(--good-bg); border-radius: var(--radius); margin-bottom: 14px; }

/* ── responsive ── */
@media (max-width: 760px) {
  .adm-hero { flex-direction: column; align-items: stretch; padding: 16px; gap: 16px; }
  .adm-hero .adm-ring { align-self: center; }
  .adm-hero-big { font-size: 30px; }
  .adm-stat { padding-inline-end: 12px; margin-inline-end: 12px; margin-bottom: 6px; }
  .adm-ladder-row { grid-template-columns: 110px 1fr 46px; }
  .adm-f201-head, .adm-f201-row { grid-template-columns: 34px minmax(0,1fr) 92px; }
  .adm-f201-head span:nth-child(3), .adm-f201-row > :nth-child(3) { display: none; }
  .adm-period { grid-template-columns: 1fr auto; gap: 8px; }
  .adm-period-state { grid-column: 1 / -1; order: 3; }
  .adm-period-amt { order: 2; }
  .adm-form2 { grid-template-columns: 1fr; }
  .adm-sevbar { gap: 6px; } .adm-sev { padding: 10px; flex-direction: column; gap: 2px; }
  .adm-flag-head { flex-wrap: wrap; }
  .adm-flag-items ul { columns: 1; }
}

/* ── notifications ── */
.adm-sevpills { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-sevpill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.adm-sevpill b { color: var(--ink); font-variant-numeric: tabular-nums; }
.adm-sevpill.zero { opacity: .55; }
.adm-sevpill.active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.content a.adm-sevpill { text-decoration: none !important; }
.adm-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.adm-seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--surface-2); gap: 2px; }
.adm-seg a { padding: 4px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 550; }
.content .adm-seg a { text-decoration: none !important; color: var(--muted); }
.content .adm-seg a.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.adm-pillform { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.adm-pillform select { height: 30px; min-width: 150px; width: auto; border-radius: 999px; font-size: 12.5px; }
.adm-pillform input[type=search], .adm-pillform input[type=text], .adm-pillform input[type=date] { height: 30px; border-radius: 999px; width: auto; min-width: 180px; font-size: 12.5px; }
.adm-pillform .btn { border-radius: 999px; min-width: 30px; height: 30px; }
.adm-day { display: flex; align-items: center; gap: 8px; margin: 14px 2px 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
[dir=rtl] .adm-day { text-transform: none; letter-spacing: 0; }
.adm-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.adm-day b { font-weight: 600; background: var(--surface-2); border-radius: 999px; padding: 0 7px; letter-spacing: 0; }
.adm-ntf-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.adm-ntf { display: grid; grid-template-columns: 18px 32px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); position: relative; }
.adm-ntf:last-child { border-bottom: 0; }
.adm-ntf.unread { background: color-mix(in srgb, var(--brand) 3.5%, var(--surface)); }
.adm-ntf.unread::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.adm-ntf:not(.unread) .adm-ntf-title { color: var(--text-2); font-weight: 450; }
.adm-ntf-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.adm-ntf.t-bad .adm-ntf-ic { background: var(--bad-bg); color: var(--bad); } .adm-ntf.t-warn .adm-ntf-ic { background: var(--warn-bg); color: var(--warn); }
.adm-ntf.t-good .adm-ntf-ic { background: var(--good-bg); color: var(--good); } .adm-ntf.t-info .adm-ntf-ic { background: var(--info-bg); color: var(--info); }
.adm-ntf-link { display: flex; flex-direction: column; min-width: 0; }
.adm-ntf-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-ntf-body { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.adm-ntf-link:hover .adm-ntf-title { text-decoration: underline; text-underline-offset: 3px; }
.adm-ntf-meta { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.adm-bulk { display: flex; justify-content: flex-end; margin: 10px 0; }
.adm-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 46px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text-2); margin-bottom: 14px; }
.adm-empty-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--good-bg); color: var(--good); }
.adm-empty-ic .icon { width: 24px; height: 24px; }
.adm-prefs-head { display: grid; grid-template-columns: minmax(0,1fr) 90px 90px; padding: 0 16px 6px; font-size: 12px; color: var(--muted); font-weight: 550; }
.adm-prefs-head span { display: inline-flex; align-items: center; gap: 5px; justify-content: center; }
.adm-prefs { padding: 4px 0; }
.adm-prefs-g { padding: 10px 16px 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
[dir=rtl] .adm-prefs-g { text-transform: none; letter-spacing: 0; }
.adm-pref { display: grid; grid-template-columns: minmax(0,1fr) 90px 90px; align-items: center; padding: 7px 16px; border-top: 1px solid var(--line); }
.adm-pref > span:not(.adm-pref-l), .adm-pref > label { justify-self: center; }
.adm-pref.off .adm-pref-l > span:nth-child(2) { color: var(--muted); }
.adm-pref-l { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.adm-pref-l .adm-ntf-ic { width: 26px; height: 26px; border-radius: 7px; }
@media (max-width: 760px) {
  .adm-ntf { grid-template-columns: 16px 30px minmax(0,1fr); }
  .adm-ntf-meta { grid-column: 3; }
  .adm-ntf-title, .adm-ntf-body { white-space: normal; }
  .adm-prefs-head, .adm-pref { grid-template-columns: minmax(0,1fr) 56px 56px; padding-inline: 12px; }
  .adm-prefs-head span { font-size: 0; } .adm-prefs-head .icon { width: 16px; height: 16px; }
}

/* ── settings hub tiles ── */
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 8px; }
.adm-tile { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .12s, transform .12s, box-shadow .12s; }
.adm-tile:hover { border-color: var(--line-2); box-shadow: 0 6px 18px -10px rgba(17,17,16,.25); transform: translateY(-1px); }
.adm-tile-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink); }
.adm-tile-ic .icon { width: 20px; height: 20px; }
.adm-tile-ic.t-good { background: var(--good-bg); color: var(--good); } .adm-tile-ic.t-warn { background: var(--warn-bg); color: var(--warn); }
.adm-tile-ic.t-bad { background: var(--bad-bg); color: var(--bad); }
.adm-tile-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.adm-tile-t { font-weight: 600; font-size: 14px; }
.adm-tile-h { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); min-width: 0; }
.adm-tile-h span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-tile-go { color: var(--line-2); transition: color .12s, transform .12s; }
.adm-tile:hover .adm-tile-go { color: var(--ink); transform: translateX(2px); }
[dir=rtl] .adm-tile-go .icon { transform: scaleX(-1); }
[dir=rtl] .adm-tile:hover .adm-tile-go { transform: translateX(-2px); }
.adm-tile[data-tip]:hover::after { inset-inline-start: 16px; }

/* ── staff & roles ── */
.adm-otp { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: var(--radius); background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); margin-bottom: 14px; }
.adm-otp-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--warn); flex: none; }
.adm-otp-pw { font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: .04em; user-select: all; margin: 2px 0; direction: ltr; unicode-bidi: embed; }
.adm-people { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; align-self: start; }
.adm-person { display: grid; grid-template-columns: 34px minmax(0,1fr) auto 28px 110px; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.adm-person:last-child { border-bottom: 0; }
.adm-person:hover { background: var(--surface-2); }
.adm-person.off { opacity: .55; }
.adm-person-main { display: flex; flex-direction: column; min-width: 0; }
.adm-person-n { font-weight: 600; display: flex; gap: 6px; align-items: center; }
.adm-person-e { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-person-state { text-align: end; }
.adm-shield { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--line-2); }
.adm-shield.t-good { color: var(--good); background: var(--good-bg); } .adm-shield.t-bad { color: var(--bad); background: var(--bad-bg); }
.adm-hero-person .adm-avatar.big { flex: none; }
.adm-actions { display: grid; grid-template-columns: 1fr; gap: 6px; }
.adm-action { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; text-align: start; }
.adm-action:hover { border-color: var(--line-2); background: var(--surface-2); }
.adm-action .icon { color: var(--muted); }
.adm-action.danger { color: var(--bad); } .adm-action.danger .icon { color: var(--bad); }
.adm-sod { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; }
.adm-sod-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--info-bg); color: var(--info); }
.adm-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; margin-bottom: 14px; }
.adm-role { display: flex; flex-direction: column; gap: 10px; justify-content: space-between; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.adm-role:hover { border-color: var(--line-2); }
.content a.adm-role-main { text-decoration: none !important; display: flex; flex-direction: column; gap: 2px; }
.adm-role-n { font-weight: 600; display: flex; align-items: center; gap: 4px; }
.adm-role-n .icon { width: 13px; height: 13px; }
.adm-role-d { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.adm-role-meta { display: flex; align-items: center; gap: 10px; }
.adm-perm-meter { flex: 1; }
.adm-matrix { font-size: 12.5px; }
.adm-matrix th { text-align: center; white-space: nowrap; font-weight: 550; }
.adm-matrix th:first-child { text-align: start; }
.adm-matrix td { text-align: center; padding-top: 5px; padding-bottom: 5px; }
.adm-matrix td:first-child { text-align: start; }
.adm-matrix tr.adm-matrix-g td { text-align: start; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding-top: 12px; background: transparent; }
[dir=rtl] .adm-matrix tr.adm-matrix-g td { text-transform: none; letter-spacing: 0; }
.adm-on, .adm-off { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.adm-on { background: var(--good); box-shadow: 0 0 0 3px var(--good-bg); }
.adm-off { background: var(--line); }
.adm-permgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.adm-permcard { padding: 4px 0 6px; margin: 0; }
.adm-permrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 16px; border-top: 1px solid var(--line); }
.adm-permrow .adm-switch { margin: 0; }
@media (max-width: 760px) {
  .adm-person { grid-template-columns: 34px minmax(0,1fr) 28px; }
  .adm-person-role, .adm-person-state { display: none; }
}

/* core .t-* tones paint backgrounds; keep row containers neutral */
.adm-flag, .adm-period, .adm-ntf, .adm-timeline li, .adm-ptl li { color: var(--text); }
.adm-ntf, .adm-timeline li { background: var(--surface); }
.adm-ntf.unread { background: color-mix(in srgb, var(--brand) 3.5%, var(--surface)); }

/* ── company & brand ── */
.adm-brandhero { --bc: var(--brand); display: flex; gap: 20px; align-items: center; padding: 18px 22px; border-radius: var(--radius); margin-bottom: 14px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--bc) 14%, var(--surface)), var(--surface) 60%); border: 1px solid var(--line); border-inline-start: 6px solid var(--bc); }
.adm-brandhero-logo { width: 76px; height: 76px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: none; }
.adm-brandhero-logo img { max-width: 64px; max-height: 64px; object-fit: contain; }
.adm-brandhero-logo span { font-size: 34px; font-weight: 700; color: var(--bc); }
.adm-swatch { width: 14px; height: 14px; border-radius: 4px; background: var(--bc, var(--brand)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.adm-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; border: 1.5px dashed var(--line-2); border-radius: 10px; text-align: center; margin-bottom: 10px; }
.adm-drop > .icon { width: 22px; height: 22px; color: var(--muted); }
.adm-drop input[type=file] { height: auto; padding: 6px; border-style: dashed; font-size: 12px; }
.adm-preview { --bc: var(--brand); display: grid; grid-template-columns: 120px 1fr; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-height: 110px; }
.adm-preview-side { background: var(--surface-2); padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.adm-preview-side img { max-width: 90px; max-height: 30px; object-fit: contain; }
.adm-preview-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.adm-preview-body .adm-bar-fill { background: var(--bc); }
.adm-preview-btn { align-self: flex-start; background: var(--bc); color: #fff; padding: 6px 14px; border-radius: 8px; font-weight: 550; font-size: 12.5px; }

/* ── setting rows (operations) ── */
.adm-setlist { padding: 4px 0 0; }
.adm-setrow { display: grid; grid-template-columns: 38px minmax(0,1fr) minmax(170px, 240px); gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.adm-setrow-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.adm-setrow-l { font-weight: 550; display: flex; align-items: center; gap: 4px; }
.adm-setrow-c { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.adm-setrow-c input { text-align: end; font-variant-numeric: tabular-nums; font-weight: 600; }
.adm-unit { font-size: 12px; color: var(--muted); min-width: 34px; }
.adm-setlist .form-actions { border-top: 0; padding: 12px 16px; margin: 0; }

/* ── system ── */
.adm-bigic { width: 76px; height: 76px; border-radius: 20px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.adm-bigic .icon { width: 34px; height: 34px; }
.adm-action.big { padding: 12px 14px; gap: 14px; border-radius: var(--radius); }
.adm-action.big .adm-tile-ic { width: 38px; height: 38px; }
.adm-action.big .adm-tile-ic .icon { color: inherit; }
.adm-actions form { margin: 0; }
.adm-keynote { display: flex; align-items: center; gap: 4px; margin: 0 4px 4px; }

/* ── translations ── */
.adm-langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-bottom: 14px; }
.adm-lang { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.adm-lang.off { opacity: .6; }
.adm-lang-h { display: flex; align-items: center; gap: 8px; }
.adm-lang-h form { margin: 0; }
.adm-lang-code { font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; background: var(--ink); color: var(--bg); }
.adm-lang-p { display: grid; grid-template-columns: 1fr 42px; gap: 10px; align-items: center; }
.adm-lang-p b { text-align: end; font-variant-numeric: tabular-nums; }
.adm-lang-a { display: flex; gap: 4px; }
.adm-mini-switch { width: 34px; height: 20px; border-radius: 10px; border: 0; background: var(--line-2); position: relative; cursor: pointer; padding: 0; }
.adm-mini-switch span { position: absolute; top: 3px; inset-inline-start: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.adm-mini-switch.on { background: var(--good); }
.adm-mini-switch.on span { inset-inline-start: 17px; }

/* ── audit ── */
.adm-whos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.adm-who { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--surface-2); font-size: 12px; }
[dir=rtl] .adm-who { padding: 3px 3px 3px 10px; }
.adm-who .adm-avatar { width: 24px; height: 24px; font-size: 10px; }

/* ── notification routing ── */
.adm-rules-head, .adm-rule-row { display: grid; grid-template-columns: minmax(200px, 1.2fr) 64px minmax(0, 2fr) 56px 56px; gap: 10px; align-items: center; }
.adm-rules-head { padding: 0 16px 6px; font-size: 12px; color: var(--muted); font-weight: 550; }
.adm-rules-head span { display: inline-flex; justify-content: center; } .adm-rules-head span:nth-child(3) { justify-content: flex-start; }
.adm-rule-row { padding: 8px 16px; border-top: 1px solid var(--line); }
.adm-rule-row > label { justify-self: center; }
.adm-rule-row.off .adm-pref-l, .adm-rule-row.off .adm-rolechips { opacity: .45; }
.adm-rolechips { display: flex; flex-wrap: wrap; gap: 4px; }
.adm-cchip { position: relative; cursor: pointer; }
.adm-cchip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.adm-cchip span { display: inline-block; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); transition: all .12s; }
.adm-cchip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.adm-cchip input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 18%, transparent); }

/* ── account ── */
.adm-sessions { display: flex; flex-direction: column; }
.adm-session { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.adm-session:last-child { border-bottom: 0; }
.adm-session-main { display: flex; flex-direction: column; min-width: 0; }
.adm-session-main strong { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-weight: 550; }

@media (max-width: 760px) {
  .adm-brandhero { flex-direction: column; align-items: flex-start; }
  .adm-setrow { grid-template-columns: 34px minmax(0,1fr); }
  .adm-setrow-c { grid-column: 1 / -1; }
  .adm-rules-head { display: none; }
  .adm-rule-row { grid-template-columns: minmax(0,1fr) auto auto auto; }
  .adm-rule-row .adm-pref-l { grid-column: 1 / 2; }
  .adm-rolechips { grid-column: 1 / -1; order: 5; }
  .adm-preview { grid-template-columns: 1fr; }
}

.adm-pref-l { flex-wrap: nowrap; }
.adm-pref-l > span:nth-child(2) { flex: 1; min-width: 0; }

/* ── integrations ── */
:root { --adm-shopify: #5e8e3e; }
.adm-pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: adm-pulse 1.2s infinite; }
@keyframes adm-pulse { 50% { opacity: .25; } }
.adm-conns { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 12px; margin-bottom: 14px; }
.adm-conn { --pc: var(--ink); margin: 0; border-top: 4px solid var(--pc); overflow: hidden; }
.adm-conn-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 0; }
.adm-conn-logo { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--pc); color: #fff; font-weight: 700; font-size: 18px; }
:root[data-theme="dark"] .adm-conn[id=tiktok] .adm-conn-logo, :root[data-theme="dark"] [id=tiktok] .adm-conn-logo { color: #111; }
.adm-conn[id=snapchat] .adm-conn-logo, [id=snapchat] .adm-conn-logo { color: #111; }
.adm-conn-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.adm-conn-t h2 { font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 4px; }
.adm-conn-state { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.adm-conn-spark { width: 120px; height: 34px; color: var(--pc); }
.adm-conn-spark .spark { width: 100%; height: 100%; }
.adm-conn-spark .spark polyline { stroke: var(--pc); }
:root[data-theme="dark"] .adm-conn[id=tiktok] .adm-conn-spark polyline { stroke: var(--ink); }
.adm-conn-stats { display: flex; flex-wrap: wrap; margin-bottom: 10px; }
.adm-conn-stats .adm-stat-v .adm-bar { width: 60px; }
.adm-conn-err { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; background: var(--bad-bg); color: var(--bad); font-size: 12.5px; margin-bottom: 8px; }
.adm-conn-err span { color: var(--text); word-break: break-word; }
.adm-subsrc { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 10px; overflow: hidden; }
.content a.adm-subsrc-row { display: grid; grid-template-columns: 10px minmax(0,1fr) 70px 80px; gap: 10px; align-items: center; padding: 7px 10px; border-bottom: 1px solid var(--line); text-decoration: none !important; font-size: 12.5px; }
.adm-subsrc-row:last-child { border-bottom: 0; }
.adm-subsrc-row:hover { background: var(--surface-2); }
.adm-subsrc-row .muted { text-align: end; }
.adm-scopes { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 10px; }
.adm-scopes-l { font-size: 12px; color: var(--muted); margin-inline-end: 4px; display: inline-flex; align-items: center; gap: 3px; }
.adm-scope { font-family: var(--mono); font-size: 11px; padding: 1px 7px; border-radius: 5px; background: var(--surface-2); color: var(--text-2); direction: ltr; }
.adm-scope.r { background: var(--good-bg); color: var(--good); }
.adm-scope.w { background: var(--bad-bg); color: var(--bad); }
.adm-scope.wa { background: var(--surface-2); color: var(--muted); }
.adm-ack { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.adm-ack .adm-switch { margin: 0; }
.adm-conn-set { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.adm-conn-set summary { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 550; color: var(--text-2); padding: 4px 0 8px; }
.adm-conn-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
.adm-conn-actions form { margin: 0; }
.adm-danger-t { color: var(--bad) !important; }

/* ── setup guide ── */
.adm-guide { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 20px; align-items: start; }
.adm-g-toc { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.adm-g-toc .adm-eyebrow { margin: 0 8px 6px; }
.content .adm-g-toc a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; text-decoration: none !important; font-size: 13px; }
.content .adm-g-toc a:hover { background: var(--surface-2); }
.adm-g-toc a.sub { padding-inline-start: 24px; font-size: 12px; color: var(--muted); }
.adm-g-toc p { margin: 8px 8px 0; }
.adm-g-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.adm-g-dot.pc { background: var(--pc); }
.adm-g-sec { --pc: var(--ink); scroll-margin-top: 16px; overflow: hidden; }
.adm-g-band { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 13%, var(--surface)), var(--surface)); border-bottom: 1px solid var(--line); }
.adm-g-band h2 { font-size: 16px; color: var(--ink); }
.adm-g-band .adm-conn-logo { width: 34px; height: 34px; font-size: 16px; }
.adm-g-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.adm-g-box { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.adm-g-box p { margin: 0 0 6px; display: flex; gap: 6px; align-items: flex-start; }
.adm-g-need { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.adm-g-need li { display: flex; gap: 8px; align-items: flex-start; }
.adm-g-need .icon { color: var(--good); margin-top: 2px; }
.adm-g-h { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-size: 14px; }
.adm-g-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ink); color: var(--bg); font-size: 11.5px; display: grid; place-items: center; }
.adm-g-path { font-weight: 600; margin: 10px 0 8px; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--pc) 9%, var(--surface)); }
.adm-stepper-v { list-style: none; counter-reset: st; margin: 0 0 6px; padding: 0; }
.adm-stepper-v li { counter-increment: st; position: relative; padding: 0 0 14px 40px; }
[dir=rtl] .adm-stepper-v li { padding: 0 40px 14px 0; }
.adm-stepper-v li::before { content: counter(st); position: absolute; inset-inline-start: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 2px solid var(--pc, var(--ink)); color: var(--ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; z-index: 1; }
.adm-stepper-v li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 12px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.adm-stepper-v li > div { padding-top: 3px; }
.adm-g-warn { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 9px; background: var(--bad-bg); color: var(--bad); margin: 10px 0; }
.adm-g-code { margin: 10px 0; }
.adm-g-code-h { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.adm-g-code pre { white-space: pre-wrap; word-break: break-all; direction: ltr; text-align: left; background: var(--ink); color: var(--bg); border: 0; }
.adm-g-sec code { direction: ltr; unicode-bidi: embed; }
.adm-g-errors { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; }
.adm-g-errors summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; font-weight: 550; }
.adm-g-errors summary .icon { color: var(--warn); }
.adm-g-errlist { display: flex; flex-direction: column; }
.adm-g-err { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 12.5px; }
.adm-g-e { color: var(--bad); }
.adm-g-f { display: flex; gap: 6px; }
.adm-g-f .icon { color: var(--muted); flex: none; margin-top: 2px; }
[dir=rtl] .adm-g-f .icon { transform: scaleX(-1); }
.adm-g-check { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.adm-g-check label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.adm-g-check input:checked + span { color: var(--muted); text-decoration: line-through; }
@media (max-width: 900px) {
  .adm-guide { grid-template-columns: 1fr; }
  .adm-g-toc { position: static; }
  .adm-conns { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .adm-g-meta, .adm-g-err { grid-template-columns: 1fr; }
  .adm-conn-spark { width: 70px; }
  .content a.adm-subsrc-row { grid-template-columns: 10px minmax(0,1fr) 60px; }
  .adm-subsrc-row .muted { display: none; }
}
.adm-conn-actions:empty { display: none; }
#log .table-wrap { max-height: 560px; overflow: auto; }

@media (max-width: 760px) {
  .adm-f201-head, .adm-f201-row { grid-template-columns: 34px minmax(0,1fr) minmax(92px, auto); }
  .adm-f201-row.grand .adm-field { overflow: visible; }
  .adm-ntf-meta { flex-wrap: wrap; white-space: normal; min-width: 0; }
  .adm-ntf-meta .adm-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}
.adm-pillform.adm-toolbar { justify-content: flex-start; }
.adm-pref > span[data-tip], .adm-rule-row > span[data-tip] { display: inline-flex; }
/* ── Team & Tasks (prefix tk-). Uses the shared variables: light/dark and RTL come for free. ── */

.tk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tk-head-t { display: flex; align-items: center; gap: 8px; }
.tk-narrow { max-width: 860px; }
.tk-h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 22px 0 10px; color: var(--text); }
.tk-h2 .icon { color: var(--muted); }
.tk-h2 .tk-pill { margin-inline-start: auto; }
.tk-grow { flex: 1; }
.js .tk-nojs { display: none; }
/* our links are styled by their own classes, not the generic underlined content link */
.content .tk a.tk-row-title, .content .tk a.tk-card-title, .content .tk a.tk-rec, .content a.tk-rec, .content .tk a.tk-label, .content .tk a.tk-cal-dn,
.content .tk a.tk-cal-item, .content .tk a.tk-cal-more, .content .tk a.tk-wl-row, .content .tk a.tk-sort, .content .tk .tk-td-title > a, .content .tk a.tk-pill,
.content a.tk-pill, .content .tk a.tk-stat, .content .tk a.tk-hero-main, .content .tk-rows a.tk-row-title { text-decoration: none !important; }
.content .tk a.tk-row-title, .content .tk-rows a.tk-row-title, .content .tk a.tk-card-title, .content .tk .tk-td-title > a, .content .tk a.tk-cal-item, .content .tk a.tk-wl-row { color: var(--text) !important; }
.content .tk a.tk-row-title:hover, .content .tk-rows a.tk-row-title:hover, .content .tk a.tk-card-title:hover, .content .tk .tk-td-title > a:hover { text-decoration: underline !important; text-decoration-color: var(--line-2) !important; }
.content a.tk-rec, .content .tk a.tk-rec { color: var(--info) !important; }
.content .tk a.tk-label { color: var(--muted) !important; }
.content .tk a.tk-cal-dn { color: var(--text-2) !important; }
.content .tk a.tk-sort { color: var(--muted) !important; } .content .tk a.tk-sort.on, .content .tk a.tk-sort:hover { color: var(--ink) !important; }
.content .tk a.tk-cal-item.late { color: var(--bad) !important; }
.tk input[type=time] { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; outline: none; }
.tk input[type=time]:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent); }

/* View switcher */
.tk-views { display: flex; gap: 2px; padding: 3px; margin-bottom: 16px; background: var(--surface-2); border-radius: 10px; overflow-x: auto; scrollbar-width: none; width: max-content; max-width: 100%; }
.tk-views::-webkit-scrollbar { display: none; }
.tk-views a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 8px; color: var(--muted) !important; text-decoration: none !important; font-weight: 500; font-size: 12.8px; white-space: nowrap; }
.tk-views a .icon { width: 14px; height: 14px; }
.tk-views a:hover { color: var(--ink) !important; }
.tk-views a.on { background: var(--surface); color: var(--ink) !important; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(17,17,16,.06); }

/* Hero */
.tk-hero { display: flex; align-items: center; gap: 14px 32px; flex-wrap: wrap; padding: 16px 22px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; position: relative; overflow: hidden; }
.tk-hero::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--ink); }
.tk-hero.bad::before { background: var(--bad); } .tk-hero.warn::before { background: var(--warn); } .tk-hero.good::before { background: var(--good); }
.tk-hero-main { display: flex; align-items: baseline; gap: 12px; color: var(--text) !important; text-decoration: none !important; }
.tk-hero-num { font-size: 46px; font-weight: 650; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.tk-hero.bad .tk-hero-num { color: var(--bad); } .tk-hero.good .tk-hero-num { color: var(--good); }
.tk-hero.ink .tk-hero-num { color: var(--ink); }
.tk-hero-label { font-size: 15px; color: var(--text-2); font-weight: 550; }
.tk-hero-label small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 450; margin-top: 2px; }
.tk-hero-stats { display: flex; gap: 10px 28px; margin-inline-start: auto; flex-wrap: wrap; }
.tk-stat { display: flex; flex-direction: column; gap: 2px; color: var(--text) !important; text-decoration: none !important; min-width: 64px; }
.tk-stat span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tk-stat b { font-size: 19px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tk-stat b.bad { color: var(--bad); } .tk-stat b.warn { color: var(--warn); } .tk-stat b.good { color: var(--good); }
a.tk-stat:hover b, a.tk-hero-main:hover .tk-hero-num { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Quick add */
.tk-quick { margin-bottom: 14px; }
.tk-quick-in { display: flex; align-items: center; gap: 8px; padding: 5px 6px; padding-inline-start: 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; transition: border-color .12s, box-shadow .12s; }
.tk-quick-in:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent); }
.tk-quick-in > .icon { color: var(--muted); }
.tk-quick-in input[type=text] { border: 0 !important; box-shadow: none !important; padding: 0; height: 32px; font-size: 14px; background: transparent; min-width: 0; flex: 1; }
.tk-quick-in kbd { flex: none; }
.tk-quick-hint { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 11.5px; color: var(--muted); font-family: var(--mono); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tk-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tk-preview:empty { display: none; }
.tk-pv { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: var(--surface-2); color: var(--text-2); animation: tk-pop .14s ease-out; }
.tk-pv b { font-weight: 600; color: var(--text); }
.tk-pv small { color: var(--muted); }
.tk-pv.bad { background: var(--bad-bg); color: var(--bad); } .tk-pv.bad b { color: var(--bad); }
.tk-pv.warn { background: var(--warn-bg); } .tk-pv.p1 { background: var(--bad-bg); } .tk-pv.p2 { background: var(--warn-bg); }
.tk-pv.title { background: transparent; border: 1px dashed var(--line-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes tk-pop { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }

/* Tabs and sections (My tasks) */
.tk-tabs { margin-bottom: 14px; }
.tk-chip-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--surface-2); font-size: 11px; line-height: 17px; text-align: center; font-variant-numeric: tabular-nums; }
.chip.active .tk-chip-n { background: var(--ink); color: var(--bg); }
.tk-sec { margin-bottom: 16px; scroll-margin-top: 70px; }
.tk-sec-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 0 0 6px; padding-inline-start: 2px; }
.tk-sec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c6); }
.tk-sec-dot.bad { background: var(--bad); } .tk-sec-dot.warn { background: var(--warn); } .tk-sec-dot.info { background: var(--info); } .tk-sec-dot.good { background: var(--good); }
.tk-sec-n { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
details.tk-done-sec > summary { cursor: pointer; list-style: none; }
details.tk-done-sec > summary::-webkit-details-marker { display: none; }
.tk-clear { display: flex; align-items: center; gap: 14px; padding: 22px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: 14px; margin-bottom: 16px; }
.tk-clear-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--good-bg); color: var(--good); flex: none; }
.tk-clear-ic .icon { width: 20px; height: 20px; }

/* Task rows */
.tk-rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.tk-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); min-height: 48px; transition: background .12s, opacity .2s; }
.tk-row:last-child { border-bottom: 0; }
.tk-row:hover { background: var(--surface-2); }
.tk-row:first-child { border-start-start-radius: 12px; border-start-end-radius: 12px; }
.tk-row:last-child { border-end-start-radius: 12px; border-end-end-radius: 12px; }
.tk-row-main { flex: 1; min-width: 0; }
.content a.tk-row-title { display: block; color: var(--text); text-decoration: none; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content a.tk-row-title:hover { text-decoration: underline; text-decoration-color: var(--line-2); }
.tk-row.is-done .tk-row-title, .tk-card.is-done .tk-card-title, .tk-dtitle.is-done, tr.is-done .tk-td-title > a { text-decoration: line-through !important; color: var(--muted) !important; }
.tk-row.just-done { opacity: .55; }
.tk-row-meta { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.tk-rows-compact .tk-row { padding: 6px 2px; min-height: 40px; }
.card .tk-rows { border: 0; border-radius: 0; background: transparent; margin-bottom: 10px; }
.tk-num { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: -.01em; white-space: nowrap; }
.tk-pill { display: inline-flex; align-items: center; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 20px; background: var(--surface-2); color: var(--text-2) !important; text-decoration: none !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-pill.bad { background: var(--bad-bg); color: var(--bad) !important; } .tk-pill.warn { background: var(--warn-bg); color: var(--warn) !important; } .tk-pill.good { background: var(--good-bg); color: var(--good) !important; }

/* Tick */
.tk-tick-f { margin: 0; flex: none; display: flex; }
.tk-tick { width: 22px; height: 22px; border-radius: 50%; border: 1.6px solid var(--line-2); background: var(--surface); color: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; transition: all .14s; }
.tk-tick .icon { width: 13px; height: 13px; stroke-width: 3; }
.tk-tick:hover { border-color: var(--good); color: var(--good); }
.tk-tick.on { background: var(--good); border-color: var(--good); color: #fff; }
.tk-tick.pop { animation: tk-tick .3s ease-out; }
@keyframes tk-tick { 50% { transform: scale(1.25); } }

/* Chips */
.tk-prio { display: inline-flex; color: var(--line-2); flex: none; }
.tk-prio .icon { width: 14px; height: 14px; }
.tk-prio.p1 { color: var(--bad); } .tk-prio.p1 .icon { fill: var(--bad); }
.tk-prio.p2 { color: var(--warn); } .tk-prio.p2 .icon { fill: var(--warn); }
.tk-prio.p3 { color: var(--line-2); }
.tk-prio.p4 { color: var(--line); }
.tk-due { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
.tk-due .icon { width: 13px; height: 13px; color: var(--muted); }
.tk-due.bad { color: var(--bad); font-weight: 600; } .tk-due.bad .icon { color: var(--bad); }
.tk-due.warn { color: var(--warn); font-weight: 600; } .tk-due.warn .icon { color: var(--warn); }
.tk-due.muted { color: var(--muted); }
.content a.tk-rec, .tk-rec { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 6px; background: var(--info-bg); color: var(--info); font-size: 11.5px; font-weight: 550; line-height: 19px; text-decoration: none; white-space: nowrap; max-width: 220px; }
.tk-rec span { overflow: hidden; text-overflow: ellipsis; }
.tk-rec .icon { width: 12px; height: 12px; flex: none; }
.content a.tk-rec:hover { filter: brightness(1.08); text-decoration: none; }
.tk-team { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.tk-team i, .tk-team-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; display: inline-block; }
.content a.tk-label, .tk-label { font-size: 11.5px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.tk-cnt { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tk-cnt .icon { width: 12px; height: 12px; }
.tk-cl { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tk-cl-bar { width: 32px; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; display: inline-block; }
.tk-cl-bar span { display: block; height: 100%; background: var(--info); border-radius: 2px; }
.tk-cl.done { color: var(--good); } .tk-cl.done .tk-cl-bar span { background: var(--good); }
.tk-av { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 10px; font-weight: 650; flex: none; letter-spacing: .02em; vertical-align: middle; }
.tk-av-none { background: transparent; color: var(--muted); border: 1.5px dashed var(--line-2); }
.tk-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 550; color: var(--text-2); white-space: nowrap; }
.tk-st i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.st-doing i, .tk-st.st-doing i { background: var(--info); } .st-blocked i { background: var(--bad); } .st-done i { background: var(--good); } .st-cancelled i { background: var(--c6); }

/* Row menu (snooze, priority, assignee, due) */
.tk-menu, .tk-move { position: relative; flex: none; }
.tk-menu > summary, .tk-move > summary { list-style: none; width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.tk-menu > summary::-webkit-details-marker, .tk-move > summary::-webkit-details-marker { display: none; }
.tk-menu > summary:hover, .tk-move > summary:hover, .tk-menu[open] > summary, .tk-move[open] > summary { background: var(--surface-2); color: var(--ink); }
.tk-menu-pop { position: absolute; z-index: 45; top: calc(100% + 4px); inset-inline-end: 0; width: 232px; padding: 8px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 4px; }
.tk-menu-pop form { margin: 0; }
.tk-menu-h { font-size: 11px; color: var(--muted); font-weight: 500; padding: 4px 2px 0; }
.tk-menu-row { display: flex; gap: 4px; }
.tk-menu-row .btn { flex: 1; }
.tk-menu-pop select, .tk-menu-pop input[type=date] { height: 30px; font-size: 12.5px; }
.tk-pbtn { flex: 1; height: 30px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--line-2); }
.tk-pbtn .icon { width: 14px; height: 14px; }
.tk-pbtn.p1 { color: var(--bad); } .tk-pbtn.p2 { color: var(--warn); } .tk-pbtn.p3 { color: var(--info); } .tk-pbtn.p4 { color: var(--c6); }
.tk-pbtn.on { border-color: currentColor; background: var(--surface-2); }
.tk-pbtn.on .icon { fill: currentColor; }

/* Board */
.tk-board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.tk-col { background: var(--surface-2); border-radius: 14px; padding: 8px; min-width: 0; scroll-snap-align: start; }
.tk-col-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 8px; }
.tk-col-n { margin-inline-start: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.tk-col-body { display: flex; flex-direction: column; gap: 8px; min-height: 90px; border-radius: 10px; transition: background .12s, box-shadow .12s; }
.tk-col-body.over { background: color-mix(in srgb, var(--info) 8%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--info) 45%, transparent); }
.tk-col-empty { display: grid; place-items: center; min-height: 80px; border: 1.5px dashed var(--line-2); border-radius: 10px; color: var(--muted); font-size: 12px; }
.tk-col-body:has(.tk-card) .tk-col-empty { display: none; }
.tk-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px 8px; cursor: grab; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 2px rgba(17,17,16,.04); transition: box-shadow .12s, transform .12s, opacity .12s; position: relative; }
.tk-card:hover { box-shadow: 0 4px 14px -6px rgba(17,17,16,.22); }
.tk-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tk-card.dragging { opacity: .45; transform: rotate(1.5deg); }
.tk-card.late { border-inline-start: 3px solid var(--bad); }
.tk-card.is-done { opacity: .72; }
.tk-card-top { display: flex; align-items: center; gap: 6px; }
.tk-card-top .tk-due { margin-inline-start: auto; }
.content a.tk-card-title { color: var(--text); text-decoration: none; font-weight: 550; line-height: 1.35; overflow-wrap: anywhere; }
.content a.tk-card-title:hover { text-decoration: underline; text-decoration-color: var(--line-2); }
.tk-card-foot { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.tk-move .tk-menu-pop { width: 170px; }
.tk-move-btn { width: 100%; text-align: start; background: none; border: 0; padding: 6px 8px; border-radius: 7px; cursor: pointer; font: inherit; }
.tk-move-btn:hover { background: var(--surface-2); }
.tk-kbd-hint { margin-top: 10px; display: flex; align-items: center; gap: 4px; }
.tk-kbd-hint .icon { width: 14px; height: 14px; }

/* List */
.tk-bar .export { margin-inline-start: auto; }
.tk-bulk { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; position: sticky; top: 58px; z-index: 15; }
.tk-bulk > select, .tk-bulk > input { width: auto; height: 30px; font-size: 12.5px; max-width: 170px; }
.tk-bulk-n { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-inline-end: 6px; }
.tk-bulk.has .tk-bulk-n { color: var(--ink); }
.tk-bulk:not(.has) button { opacity: .5; }
.tk-table td { vertical-align: middle; }
.tk-td-title { min-width: 220px; }
.content .tk-td-title > a { color: var(--text); text-decoration: none; font-weight: 550; }
.content a.tk-sort { color: var(--muted); text-decoration: none; }
.content a.tk-sort.on, .content a.tk-sort:hover { color: var(--ink); }

/* Calendar */
.tk-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tk-cal-nav { display: flex; align-items: center; gap: 8px; }
.tk-cal-nav h2 { font-size: 18px; letter-spacing: -.01em; min-width: 150px; text-align: center; }
.tk-cal-sum { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.tk-cal-sum b { color: var(--text); font-size: 16px; font-variant-numeric: tabular-nums; }
.tk-cal-sum .bad, .tk-cal-sum .bad b { color: var(--bad); }
.tk-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--line); gap: 1px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 10px; }
.tk-cal-wd { background: var(--surface); padding: 6px 8px; font-size: 11.5px; color: var(--muted); font-weight: 500; text-align: start; }
.tk-cal-day { background: var(--surface); min-height: 104px; padding: 5px 6px 6px; display: flex; flex-direction: column; gap: 3px; cursor: cell; min-width: 0; transition: background .1s; }
.tk-cal-day:hover { background: var(--surface-2); }
.tk-cal-day.wknd { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.tk-cal-day.out { background: var(--bg); }
.tk-cal-day.out .tk-cal-dn { color: var(--line-2) !important; }
.tk-cal-day.pick { box-shadow: inset 0 0 0 2px var(--ink); }
.tk-cal-dh { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.content a.tk-cal-dn { font-size: 12px; font-weight: 600; color: var(--text-2); text-decoration: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.content a.tk-cal-dn:hover { background: var(--surface-2); }
.tk-cal-day.today .tk-cal-dn { background: var(--ink); color: var(--bg) !important; }
.content a.tk-cal-more { font-size: 11px; color: var(--muted); text-decoration: none; font-weight: 600; }
.content a.tk-cal-item { display: flex; align-items: center; gap: 5px; font-size: 11.5px; line-height: 1.3; padding: 2px 4px; border-radius: 5px; color: var(--text); text-decoration: none; min-width: 0; background: var(--surface-2); }
.content a.tk-cal-item:hover { background: var(--line); }
.tk-cal-item i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.tk-cal-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-cal-item b { font-weight: 600; font-variant-numeric: tabular-nums; }
.content a.tk-cal-item.late { background: var(--bad-bg); color: var(--bad); }
.content a.tk-cal-item.is-done span { text-decoration: line-through; color: var(--muted); }

/* Workload */
.tk-wl-head, .tk-wl-row { display: grid; grid-template-columns: minmax(110px, 1.1fr) minmax(90px, 1.6fr) 74px 54px 64px; gap: 12px; align-items: center; }
.tk-wl-head { font-size: 11px; color: var(--muted); font-weight: 500; padding: 0 4px 6px; border-bottom: 1px solid var(--line); }
.tk-wl-head span:nth-child(n+3) { text-align: end; }
.content a.tk-wl-row { padding: 9px 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; border-radius: 6px; }
.content a.tk-wl-row:hover { background: var(--surface-2); }
.tk-wl-row:last-child { border-bottom: 0; }
.tk-wl-who { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 550; font-size: 13px; }
.tk-wl-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-wl-bar { display: flex; height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.tk-wl-bar span { height: 100%; }
.s-over { background: var(--bad); } .s-week { background: var(--warn); } .s-later { background: var(--info); } .s-none { background: var(--c6); }
.tk-wl-n { text-align: end; font-variant-numeric: tabular-nums; display: flex; justify-content: flex-end; gap: 6px; align-items: baseline; }
.tk-wl-n b { font-size: 15px; }
.tk-wl-n span { font-size: 12px; color: var(--muted); }
.tk-wl-n span.bad { color: var(--bad); font-weight: 600; }
.tk-wl-done, .tk-wl-avg { text-align: end; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.tk-wl-done .icon { width: 13px; height: 13px; color: var(--good); }
.tk-wl-legend { margin: 0; }
.tk-wl-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-inline-end: 5px; }

/* Task page */
.tk-dhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.tk-dhead-main { min-width: 0; flex: 1 1 380px; }
.tk-dhead-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.tk-dnum { font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding: 1px 7px; border: 1px solid var(--line-2); border-radius: 6px; }
.tk-dtitle { font-size: 26px; letter-spacing: -.025em; line-height: 1.2; overflow-wrap: anywhere; }
.tk-seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.tk-seg button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.tk-seg button i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.tk-seg button:hover { color: var(--ink); }
.tk-seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(17,17,16,.06); }
.tk-seg button.st-doing i { background: var(--info); } .tk-seg button.st-blocked i { background: var(--bad); }
.tk-seg button.st-done i { background: var(--good); } .tk-seg button.st-cancelled i { background: var(--c6); }
.tk-detail { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.tk-desc { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; margin-bottom: 8px; }
.tk-mention { color: var(--info); font-weight: 600; background: var(--info-bg); border-radius: 4px; padding: 0 3px; }
details.tk-edit { margin-top: 10px; }
details.tk-edit > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.tk-edit > summary::-webkit-details-marker { display: none; }
details.tk-edit > summary::before { content: "›"; display: inline-block; transition: transform .15s; }
details.tk-edit[open] > summary::before { transform: rotate(90deg); }
details.tk-edit > summary:hover { color: var(--ink); }
details.tk-edit[open] > form { margin-top: 12px; }
.tk-check { list-style: none; margin: 12px 0 8px; padding: 0; }
.tk-check li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.tk-check li:last-child { border-bottom: 0; }
.tk-check form { margin: 0; display: flex; }
.tk-box { width: 20px; height: 20px; border-radius: 6px; border: 1.6px solid var(--line-2); background: var(--surface); color: transparent; display: grid; place-items: center; padding: 0; cursor: pointer; }
.tk-box .icon { width: 12px; height: 12px; stroke-width: 3; }
.tk-box:hover { border-color: var(--good); color: var(--good); }
.tk-check li.on .tk-box { background: var(--good); border-color: var(--good); color: #fff; }
.tk-check-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tk-check li.on .tk-check-t { text-decoration: line-through; color: var(--muted); }
.tk-x { width: 24px; height: 24px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; display: grid; place-items: center; cursor: pointer; opacity: .5; padding: 0; }
.tk-x .icon { width: 13px; height: 13px; }
.tk-x:hover { opacity: 1; color: var(--bad); background: var(--bad-bg); }
.tk-cl-pct { font-size: 12.5px; font-weight: 650; color: var(--info); font-variant-numeric: tabular-nums; }
.tk-cl-pct.done { color: var(--good); }
.tk-inline-add { display: flex; gap: 6px; margin-top: 6px; }
.tk-inline-add input { height: 32px; }
.tk-comments { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tk-comments li { display: flex; gap: 10px; }
.tk-comments .tk-av { width: 28px; height: 28px; font-size: 10.5px; }
.tk-cm { flex: 1; min-width: 0; background: var(--surface-2); border-radius: 4px 12px 12px 12px; padding: 8px 12px; }
[dir=rtl] .tk-cm { border-radius: 12px 4px 12px 12px; }
.tk-cm-h { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-bottom: 2px; }
.tk-cm-h time { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.tk-cm-b { font-size: 13.5px; overflow-wrap: anywhere; }
.tk-cm-form { position: relative; }
.tk-cm-form textarea { min-height: 64px; }
.tk-cm-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.tk-mention-pop { position: absolute; z-index: 40; inset-inline-start: 8px; top: 70px; min-width: 180px; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 4px; }
.tk-mention-pop button { display: block; width: 100%; text-align: start; border: 0; background: none; padding: 6px 10px; border-radius: 7px; cursor: pointer; font: inherit; }
.tk-mention-pop button:hover, .tk-mention-pop button.sel { background: var(--surface-2); }
.tk-files { list-style: none; margin: 0 0 10px; padding: 0; }
.tk-files li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 7px 0; border-bottom: 1px solid var(--line); }
.tk-files li:last-child { border-bottom: 0; }
.tk-files a { display: inline-flex; align-items: center; gap: 6px; }
.tk-upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tk-upload input[type=file] { flex: 1; min-width: 0; font-size: 12.5px; }
.tk-dside .card { margin-bottom: 14px; }
.tk-countdown { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin: -2px 0 12px; border-radius: 9px; font-weight: 600; font-size: 13.5px; background: var(--surface-2); }
.tk-countdown.bad { background: var(--bad-bg); color: var(--bad); } .tk-countdown.warn { background: var(--warn-bg); color: var(--warn); } .tk-countdown.good { background: var(--good-bg); color: var(--good); }
.tk-side-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.tk-sf { display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: center; gap: 10px; }
.tk-sf > span:first-child { font-size: 12.5px; color: var(--muted); }
.tk-sf select, .tk-sf input { height: 32px; font-size: 13px; }
.tk-side-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.tk-side-acts form { margin: 0; }
.tk-kv { margin-top: 12px !important; }
.tk-watchers, .tk-members { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-watcher { display: inline-flex; align-items: center; gap: 6px; padding-block: 2px; padding-inline: 2px 9px; border-radius: 999px; background: var(--surface-2); font-size: 12px; }
.tk-watcher .tk-av { width: 20px; height: 20px; font-size: 9px; }
.tk-lead { font-size: 10px; font-weight: 650; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; }
.tk-tl { max-height: 420px; overflow-y: auto; padding-inline-end: 4px; }
.tk-meta-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.tk-danger { display: flex; justify-content: flex-end; margin: 0; }

/* New task, record panel, dashboard */
.tk-tpl-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tk-tpl-pick select { width: auto; min-width: 220px; }
.tk-form .card-body { padding-top: 18px; }
.tk-panel .card-head h2 { display: flex; align-items: center; gap: 6px; }
.tk-panel .card-head h2 .icon { width: 15px; height: 15px; color: var(--muted); }
.tk-panel-add { display: flex; gap: 6px; }
.tk-panel-add input { height: 30px; font-size: 12.5px; }
.tk-dash .card-actions { gap: 6px; }

/* Teams */
.tk-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.tk-teams .card { margin: 0; }
.tk-team-card { border-top: 3px solid var(--team, var(--ink)); }
.tk-team-card h2 { display: flex; align-items: center; gap: 8px; font-size: 14px !important; color: var(--text) !important; }
.tk-team-card .tk-team-dot { width: 10px; height: 10px; border-radius: 3px; }
.tk-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-team-new { border-style: dashed; }

/* Templates */
.tk-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; align-items: start; }
.tk-tpls .card { margin: 0; }
.tk-tpl .card-body { display: flex; flex-direction: column; gap: 8px; }
.tk-tpl-h { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.tk-tpl-h strong { flex: 1; min-width: 0; font-weight: 600; }
.tk-tpl-acts { display: flex; gap: 6px; }
.tk-tpl-acts form { margin: 0; }
.tk-tpl details.tk-edit { margin-top: 0; }
details.tk-tpl-new { border-style: dashed; grid-column: 1 / -1; }
details.tk-tpl-new > summary { cursor: pointer; list-style: none; color: var(--text-2); font-weight: 550; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 6px; }
details.tk-tpl-new > summary::-webkit-details-marker { display: none; }
.tk-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Automation rules */
.tk-rules { list-style: none; margin: 0; padding: 0; }
.tk-rule { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.tk-rule form { margin: 0; }
.tk-rule:not(.on) .tk-rule-flow { opacity: .55; }
.tk-rule-flow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.tk-rule-when, .tk-rule-then { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 8px; background: var(--surface-2); font-weight: 500; }
.tk-rule-when .icon, .tk-rule-then .icon { width: 14px; height: 14px; color: var(--muted); }
.tk-rule.on .tk-rule-when { background: var(--warn-bg); } .tk-rule.on .tk-rule-then { background: var(--info-bg); }
.tk-rule-arrow { color: var(--muted); }
[dir=rtl] .tk-rule-arrow { transform: scaleX(-1); display: inline-block; }
.tk-rule-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tk-rule-stats .warn { color: var(--warn); }
.tk-switch { width: 36px; height: 20px; border-radius: 999px; border: 0; background: var(--line-2); position: relative; cursor: pointer; padding: 0; transition: background .15s; flex: none; }
.tk-switch i { position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: inset-inline-start .15s; }
.tk-switch.on { background: var(--good); }
.tk-switch.on i { inset-inline-start: 18px; }
.tk-rule-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; background: var(--bg); border-end-start-radius: var(--radius); border-end-end-radius: var(--radius); }
.tk-rule-add select { width: auto; max-width: 280px; height: 32px; font-size: 12.5px; }

/* Global quick-add dialog (T) */
.tk-qm { position: fixed; inset: 0; z-index: 205; background: rgba(17,17,16,.38); backdrop-filter: blur(2px); display: flex; justify-content: center; align-items: flex-start; padding: 14vh 16px 16px; opacity: 0; transition: opacity .14s; }
.tk-qm.in { opacity: 1; }
.tk-qm-box { width: min(620px, 100%); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 14px 16px 12px; transform: translateY(6px); transition: transform .16s; }
.tk-qm.in .tk-qm-box { transform: none; }
.tk-qm-t { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 2px 10px; display: flex; justify-content: space-between; align-items: center; }
.tk-qm .tk-quick { margin: 0; }

[dir=rtl] .tk-quick-hint { font-family: var(--font); }
[dir=rtl] .tk-cal-nav .tk-arrow { transform: scaleX(-1); }

/* Responsive */
@media (max-width: 1100px) {
  /* phone/tablet: status & owner card first, then the content, then the rest of the side column */
  .tk-detail { display: flex; flex-direction: column; gap: 0; }
  .tk-dside { display: contents; }
  .tk-dside > .card:first-child { order: -1; }
  .tk-dmain { order: 0; }
  .tk-dside > :not(:first-child) { order: 1; }
  .tk-board { grid-template-columns: repeat(4, minmax(260px, 82vw)); }
}
@media (max-width: 860px) {
  .tk-hero { padding: 14px 16px; }
  .tk-hero-num { font-size: 38px; }
  .tk-hero-stats { margin-inline-start: 0; width: 100%; justify-content: space-between; gap: 10px; }
  .tk-row { flex-wrap: wrap; gap: 6px 10px; }
  .tk-row-main { flex-basis: calc(100% - 70px); }
  .tk-row .tk-due { margin-inline-start: 56px; }
  .tk-row .tk-av { margin-inline-start: auto; }
  .tk-rows-compact .tk-row .tk-due { margin-inline-start: 34px; }
  .tk-quick-in kbd { display: none; }
  .tk-quick-hint { display: none; }
  .tk-dtitle { font-size: 21px; }
  .tk-seg { width: 100%; }
  .tk-seg button { flex: 1; justify-content: center; padding: 0 6px; }
  .tk-cal-day { min-height: 64px; padding: 3px; }
  .tk-cal-wd { padding: 5px 3px; font-size: 10.5px; text-align: center; }
  .tk-cal-dh { justify-content: center; }
  .content a.tk-cal-item { padding: 0; background: transparent; justify-content: center; }
  .content a.tk-cal-item span { display: none; }
  .content a.tk-cal-item i { width: 7px; height: 7px; }
  .tk-cal-more { display: none; }
  .tk-wl-head, .tk-wl-row { grid-template-columns: minmax(90px, 1fr) minmax(60px, 1fr) 58px; }
  .tk-wl-head span:nth-child(n+4), .tk-wl-done, .tk-wl-avg { display: none; }
  .tk-g2 { grid-template-columns: minmax(0, 1fr); }
  .tk-rule { flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; }
  .tk-rule-stats { flex-direction: row; gap: 8px; }
  .tk-bulk { position: static; }
  .tk-menu-pop { inset-inline-end: -4px; }
}
@media print { .tk-quick, .tk-views, .tk-menu, .tk-move, .tk-bulk, .tk-seg, .tk-side-form, .tk-cm-form, .tk-upload, .tk-inline-add { display: none !important; } }
