/* Kerme console (14.14): one interface face (Inter, local), tabular figures, tokens for light and dark,
   one accent, semantic colours with AA contrast. Scale 12/13/14/16/20/24/32, weights 400/500/600. */
@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100 900;src:url(fonts/inter-cyrillic-ext-wght-normal.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100 900;src:url(fonts/inter-cyrillic-wght-normal.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100 900;src:url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100 900;src:url(fonts/inter-latin-wght-normal.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f1f3f6; --hover: #eef1f4; --ink: #10161f; --ink-2: #3b4655; --muted: #5d6877; --line: #e2e6eb; --line-strong: #cfd5dd;
  --accent: #0f6e7e; --accent-ink: #ffffff; --accent-soft: #e3f1f3; --accent-line: #9ccbd2;
  --ok: #1d6f43; --ok-soft: #e3f3e9; --warn: #855508; --warn-soft: #fbf0db; --bad: #b0311d; --bad-soft: #fbe6e2;
  --role-owner: #0f6e7e; --role-master: #c27c0e; --role-seller: #6d4fc2; --role-other: #8a94a3;
  --shadow: 0 1px 2px rgba(16, 22, 31, .06), 0 1px 1px rgba(16, 22, 31, .04);
  --shadow-pop: 0 12px 32px rgba(16, 22, 31, .16), 0 2px 6px rgba(16, 22, 31, .08);
  --radius: 10px; --radius-s: 6px;
  --side: 240px; --top: 56px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117; --surface: #151b23; --surface-2: #1b222c; --hover: #1f2731; --ink: #e8edf3; --ink-2: #c3ccd7; --muted: #95a1b0; --line: #262f3b; --line-strong: #344050;
    --accent: #4cbccc; --accent-ink: #061618; --accent-soft: #15333a; --accent-line: #2b6a74;
    --ok: #5cc98c; --ok-soft: #13301f; --warn: #e5b356; --warn-soft: #33290f; --bad: #f27b66; --bad-soft: #3a1c17;
    --role-owner: #4cbccc; --role-master: #e5b356; --role-seller: #a38bf0; --role-other: #7d8898;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-pop: 0 12px 32px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1117; --surface: #151b23; --surface-2: #1b222c; --hover: #1f2731; --ink: #e8edf3; --ink-2: #c3ccd7; --muted: #95a1b0; --line: #262f3b; --line-strong: #344050;
  --accent: #4cbccc; --accent-ink: #061618; --accent-soft: #15333a; --accent-line: #2b6a74;
  --ok: #5cc98c; --ok-soft: #13301f; --warn: #e5b356; --warn-soft: #33290f; --bad: #f27b66; --bad-soft: #3a1c17;
  --role-owner: #4cbccc; --role-master: #e5b356; --role-seller: #a38bf0; --role-other: #7d8898;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-pop: 0 12px 32px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 400 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
h1 { font-size: 24px; line-height: 1.25; font-weight: 600; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; line-height: 1.35; font-weight: 600; margin: 0; }
h3 { font-size: 14px; font-weight: 600; margin: 0; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boot { padding: 48px; color: var(--muted); }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.s { width: 16px; height: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grow { flex: 1 1 auto; min-width: 0; }
.spacer { flex: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- shell ---- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.app.collapsed { --side: 64px; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; padding: 12px 10px; gap: 2px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px; margin-bottom: 8px; font-weight: 600; font-size: 16px; white-space: nowrap; }
.brand i { width: 18px; height: 6px; border-radius: 3px; background: #e9a426; flex: none; }
.brand small { font-weight: 500; color: var(--muted); font-size: 13px; }
.group { font-size: 12px; font-weight: 500; color: var(--muted); padding: 14px 10px 6px; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: var(--radius-s); background: none; color: var(--ink-2); cursor: pointer; text-align: start; font-weight: 500; white-space: nowrap; position: relative; }
.nav:hover { background: var(--hover); color: var(--ink); }
.nav.on { background: var(--accent-soft); color: var(--ink); }
.nav.on::before { content: ""; position: absolute; inset-inline-start: -10px; top: 8px; bottom: 8px; width: 3px; border-start-end-radius: 3px; border-end-end-radius: 3px; background: var(--accent); }
.nav.on .icon { color: var(--accent); }
.nav .badge { margin-inline-start: auto; }
.side .foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.app.collapsed .side .label, .app.collapsed .group, .app.collapsed .brand small, .app.collapsed .nav .badge { display: none; }
.app.collapsed .group { display: block; height: 10px; padding: 0; }
.app.collapsed .nav { justify-content: center; padding: 0; }

.top { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.top .title { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .crumb { color: var(--muted); font-weight: 500; }
.searchbtn { display: flex; align-items: center; gap: 8px; width: min(360px, 38vw); height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--muted); cursor: pointer; }
.searchbtn kbd { margin-inline-start: auto; }
kbd { font: 500 12px Inter, system-ui, sans-serif; color: var(--muted); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface-2); }
.who { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 12px; }
.content { padding: 24px; max-width: 1280px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pagehead p { margin-top: 4px; color: var(--muted); max-width: 72ch; }
.menu-btn { display: none; }
.scrim { display: none; }

/* ---- buttons, inputs ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--hover); }
.btn.icon-only { width: 36px; padding: 0; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.sm.icon-only { width: 30px; }
.btn:disabled { opacity: .5; cursor: default; }
.seg { display: inline-flex; max-width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow-x: auto; background: var(--surface); scrollbar-width: none; }
.seg button { flex: none; }
.seg button { border: 0; background: none; height: 32px; padding: 0 12px; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.seg button + button { border-inline-start: 1px solid var(--line); }
.seg button.on { background: var(--accent-soft); color: var(--ink); }
input:not([type=checkbox]):not([type=radio]), select, textarea { height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); min-width: 0; }
textarea { height: auto; min-height: 88px; padding: 8px 10px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .error { font-size: 12px; color: var(--bad); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--bad); }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form .wide { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch { position: relative; width: 36px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background .15s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ---- cards, pills ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card > .hd p { color: var(--muted); font-size: 13px; }
.card > .bd { padding: 16px; }
.card > .bd.flush { padding: 0; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 16px; color: var(--muted); }
.empty .icon { width: 28px; height: 28px; color: var(--muted); }
.empty b { color: var(--ink); font-weight: 600; font-size: 16px; }
.empty p { max-width: 48ch; }
.empty .btn { margin-top: 6px; }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft); color: var(--ink); }
.note.warn { background: var(--warn-soft); }
.note .icon { color: var(--accent); margin-top: 2px; }
.note.warn .icon { color: var(--warn); }

/* ---- overview ---- */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric { padding: 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.metric .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.metric .value { font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric .value .unit { font-size: 20px; color: var(--muted); font-weight: 500; margin-inline-start: 2px; }
.metric .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); } .delta.flat { color: var(--muted); }
.delta small { color: var(--muted); font-weight: 400; margin-inline-start: 4px; }
.spark { width: 96px; height: 28px; flex: none; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.spark path.area { fill: color-mix(in srgb, var(--accent) 14%, transparent); stroke: none; }
.secondary { display: flex; flex-wrap: wrap; gap: 0; padding: 0; }
.secondary > div { flex: 1 1 140px; padding: 12px 16px; border-inline-start: 1px solid var(--line); min-width: 0; }
.secondary > div:first-child { border-inline-start: 0; }
.secondary b { display: block; font-size: 20px; font-weight: 600; }
.secondary span { color: var(--muted); font-size: 12px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 260px; overflow: visible; }
.chart .grid line { stroke: var(--line); }
.chart .axis text { fill: var(--muted); font-size: 12px; }
.chart .hoverbar { fill: var(--hover); }
.tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow-pop); padding: 8px 10px; font-size: 13px; min-width: 150px; z-index: 5; }
.tip .t { font-weight: 600; margin-bottom: 4px; }
.tip .r { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex: none; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.share { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.share .bar { width: 80px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.share .bar i { display: block; height: 100%; background: var(--accent); }

/* ---- data table ---- */
.dt { display: flex; flex-direction: column; min-width: 0; }
.dt .tools { display: flex; align-items: center; gap: 8px; padding: 12px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.dt .tools .search { position: relative; flex: 1 1 220px; max-width: 360px; }
.dt .tools .search input { width: 100%; padding-inline-start: 32px; }
.dt .tools .search .icon { position: absolute; inset-inline-start: 10px; top: 9px; color: var(--muted); }
.dt .bulk { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--accent-soft); border-bottom: 1px solid var(--accent-line); flex-wrap: wrap; }
.dt .wrap { overflow: auto; max-height: min(70vh, 720px); }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
th.sort { cursor: pointer; user-select: none; }
th.sort:hover { color: var(--ink); }
th .icon { width: 14px; height: 14px; vertical-align: -2px; margin-inline-start: 2px; }
th:first-child, td:first-child { padding-inline-start: 16px; }
th:last-child, td:last-child { padding-inline-end: 16px; }
tbody tr:hover td { background: var(--hover); }
tbody tr.sel td { background: var(--accent-soft); }
tbody tr:last-child td { border-bottom: 0; }
td.cb, th.cb { width: 40px; padding-inline-end: 0; }
td.act { width: 1%; white-space: nowrap; text-align: end; }
.dt.compact th, .dt.compact td { padding-top: 5px; padding-bottom: 5px; }
.dt .pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.cell-main { font-weight: 500; }
.cell-sub { color: var(--muted); font-size: 12px; }
.clickable { cursor: pointer; }

/* ---- menus, modals, toasts, palette ---- */
.pop { position: fixed; z-index: 60; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: 4px; }
.pop button { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 10px; border: 0; background: none; border-radius: var(--radius-s); cursor: pointer; text-align: start; color: var(--ink); white-space: nowrap; }
.pop button:hover, .pop button.on { background: var(--hover); }
.pop button.danger { color: var(--bad); }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.modal-back { position: fixed; inset: 0; z-index: 70; background: rgba(10, 14, 20, .45); display: grid; place-items: start center; padding: 10vh 16px 16px; overflow-y: auto; }
.modal { width: min(560px, 100%); background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-pop); border: 1px solid var(--line); }
.modal.wide { width: min(880px, 100%); }
.modal .hd { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal .hd h2 { flex: 1; }
.modal .bd { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.modal .ft { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 12px 12px; flex-wrap: wrap; }
.modal pre { margin: 0; white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border-radius: var(--radius-s); padding: 10px; font: 12px/1.5 var(--mono); max-height: 50vh; overflow: auto; }
.toasts { position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 8px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--radius); box-shadow: var(--shadow-pop); font-weight: 500; max-width: 420px; }
.toast.bad { background: var(--bad); color: #fff; }
.palette { width: min(620px, 100%); }
.palette input { width: 100%; height: 52px !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 12px 12px 0 0 !important; font-size: 16px; padding-block: 0 !important; padding-inline: 44px 16px !important; box-shadow: none !important; }
.palette .in { position: relative; }
.palette .in .icon { position: absolute; inset-inline-start: 16px; top: 17px; color: var(--muted); }
.palette .res { max-height: 56vh; overflow-y: auto; padding: 6px; }
.palette .grp { font-size: 12px; color: var(--muted); font-weight: 500; padding: 8px 10px 4px; }
.palette .it { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-s); background: none; cursor: pointer; text-align: start; color: var(--ink); }
.palette .it.on { background: var(--accent-soft); }
.palette .it .cell-sub { margin-inline-start: auto; }
.palette .foot { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* ---- login ---- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: min(400px, 100%); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.login .brand { padding: 0; margin: 0; }
.login .err { color: var(--bad); font-size: 13px; min-height: 18px; }

/* ---- responsive: laptop 1280–1440 first; tablet and phone hide the menu ---- */
@media (max-width: 1100px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1024px) {
  .app, .app.collapsed { grid-template-columns: minmax(0, 1fr); --side: 260px; }
  .side { position: fixed; inset-inline-start: 0; top: 0; bottom: 0; width: var(--side); transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-pop); }
  .app.open .side { transform: none; }
  .app.collapsed .side .label, .app.collapsed .group, .app.collapsed .brand small { display: revert; }
  .app.collapsed .nav { justify-content: flex-start; padding: 0 10px; }
  .app.open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(10, 14, 20, .35); }
  .menu-btn { display: inline-flex; }
  .collapse-btn { display: none !important; }
  .two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .top { padding: 0 12px; gap: 8px; }
  .content { padding: 16px; }
  .searchbtn { width: 36px; padding: 0; justify-content: center; }
  .searchbtn span, .searchbtn kbd, .who .name { display: none; }
  .metrics { grid-template-columns: minmax(0, 1fr); }
  .metric .value { font-size: 24px; }
  .secondary > div { flex-basis: 50%; border-inline-start: 0; border-top: 1px solid var(--line); }
  .form { grid-template-columns: minmax(0, 1fr); }
}
.col { min-width: 0; display: flex; flex-direction: column; }
.card > .hd > .row, .pagehead > .row { min-width: 0; max-width: 100%; }
.card > .hd > div:first-child { min-width: 0; }
[hidden] { display: none !important; }
.btn.menu-btn { display: none; }
@media (max-width: 1024px) { .btn.menu-btn { display: inline-flex; } }
.content > .seg { align-self: flex-start; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-s); }
.tablewrap td input { width: 100%; min-width: 96px; }
.tablewrap td .btn { white-space: nowrap; }
.row.nowrap { flex-wrap: nowrap; }

/* right to left (Arabic): the drawer comes from the right, arrows and the switch knob flip */
[dir="rtl"] .side { transform: none; }
@media (max-width: 1024px) { [dir="rtl"] .side { transform: translateX(100%); } [dir="rtl"] .app.open .side { transform: none; } }
[dir="rtl"] .switch input:checked + i::after { transform: translateX(-16px); }
[dir="rtl"] .switch i::after { left: auto; right: 2px; }
[dir="rtl"] .icon.flip, [dir="rtl"] .nav .icon.flip { transform: scaleX(-1); }
