/* مرکز کوپن آفرجو — سیستم طراحی
   ایده‌ی اصلی: یک کنسول عملیاتی آرام و خوانا؛ تنها عنصر شاخص، کارت منبع‌ها به شکل «بلیت کوپن» با لبه‌ی سوراخ‌دار است.
   رنگ‌ها: جوهر سرد + کبالت برای اقدام + زرد «کوپن» فقط برای ته‌بلیت. */

@font-face { font-family: "Vazirmatn"; src: url("/static/fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/static/fonts/Vazirmatn-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/static/fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #F3F5F7;
  --surface: #FFFFFF;
  --surface-2: #F8F9FB;
  --ink: #17202A;
  --ink-2: #4A5562;
  --ink-3: #7A8592;
  --line: #E1E5EA;
  --line-2: #CDD3DA;

  --accent: #2448C9;
  --accent-hover: #1C3AA6;
  --accent-weak: #EBF0FF;
  --accent-ink: #1A3594;

  --stub: #FFF4CF;
  --stub-line: #E9CF73;
  --stub-ink: #5E4500;

  --ok: #13704F;    --ok-bg: #E4F4EC;
  --warn: #8A5A00;  --warn-bg: #FDF1D5;
  --err: #B12E1C;   --err-bg: #FCE9E5;
  --muted-bg: #EEF0F3;

  --radius: 10px;
  --radius-sm: 7px;
  --sidebar: 240px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1419;
    --surface: #161C23;
    --surface-2: #1B222A;
    --ink: #E6EAEE;
    --ink-2: #AEB7C1;
    --ink-3: #7F8994;
    --line: #26303A;
    --line-2: #33404C;
    --accent: #6C8BFF;
    --accent-hover: #87A0FF;
    --accent-weak: #1B2647;
    --accent-ink: #B9C8FF;
    --stub: #2A2412;
    --stub-line: #5C4C1D;
    --stub-ink: #F2D88A;
    --ok: #5CC99A;   --ok-bg: #12291F;
    --warn: #E8B551; --warn-bg: #2C2312;
    --err: #F08A79;  --err-bg: #301915;
    --muted-bg: #20272F;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--paper);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.5; margin: 0; font-weight: 700; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 0.98rem; font-weight: 500; }
p { margin: 0 0 .6em; }
code, .ltr { direction: ltr; unicode-bidi: isolate; }
code { font-family: var(--mono); font-size: .86em; background: var(--muted-bg); padding: .1em .4em; border-radius: 5px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface);
  border-inline-end: 1px solid var(--line);
  padding: 22px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px; background: var(--stub); color: var(--stub-ink);
  display: grid; place-items: center; border: 1px dashed var(--stub-line); flex: none;
}
.brand-mark svg { width: 18px; height: 18px; }
.brand b { display: block; font-size: .98rem; line-height: 1.3; }
.brand small { color: var(--ink-3); font-size: .78rem; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { color: var(--ink-3); font-size: .78rem; padding: 14px 10px 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--ink-2); font-weight: 500; font-size: .93rem;
}
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--accent-weak); color: var(--accent-ink); }
.nav a .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-inline-start: auto; }
.nav a .dot.off { background: var(--line-2); }
.sidebar-foot { margin-top: auto; padding: 0 10px; font-size: .82rem; color: var(--ink-3); }
.sidebar-foot form { display: inline; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ink-2); font: inherit; cursor: pointer; }
.linkbtn:hover { color: var(--err); }

.main { min-width: 0; padding: 28px 36px 64px; }
.container { max-width: 1180px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--ink-3); margin: 2px 0 0; font-size: .9rem; }
.crumbs { font-size: .85rem; color: var(--ink-3); margin-bottom: 4px; }
.crumbs a { color: var(--ink-3); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.card-head p { margin: 0; color: var(--ink-3); font-size: .85rem; }
.section { margin-top: 28px; }
.section > h2 { margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.split > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 500; font-size: .92rem; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); text-decoration: none; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--err); }
.btn-danger:hover { background: var(--err-bg); border-color: var(--err); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-sm { height: 32px; padding: 0 11px; font-size: .85rem; }
.btn[disabled], .btn.is-busy { opacity: .55; pointer-events: none; }
.htmx-request.btn { opacity: .6; pointer-events: none; }

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 500; white-space: nowrap; background: var(--muted-bg); color: var(--ink-2);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.draft, .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.fail { background: var(--err-bg); color: var(--err); }
.pill.run { background: var(--accent-weak); color: var(--accent-ink); }
.pill.run::before { animation: pulse 1.2s ease-in-out infinite; }
.pill.plain::before { display: none; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kpi { background: var(--surface); padding: 16px 20px; }
.kpi .v { font-size: 1.7rem; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--ink-3); font-size: .85rem; }
.kpi .v.err { color: var(--err); }

/* ---------- ticket (signature) ---------- */
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 18px; }
.ticket {
  --notch: 11px;
  position: relative; display: grid; grid-template-columns: 1fr 132px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  min-height: 188px;
}
.ticket.is-off { opacity: .72; }
.ticket-main { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ticket-title { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.ticket-title h3 { font-size: 1.05rem; font-weight: 700; }
.ticket-title a { color: var(--ink); }
.ticket dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: .86rem; }
.ticket dt { color: var(--ink-3); }
.ticket dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ticket-stub {
  position: relative; background: var(--stub); color: var(--stub-ink);
  border-start-end-radius: var(--radius); border-end-end-radius: var(--radius);
  border-inline-start: 2px dashed var(--stub-line);
  padding: 16px 12px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 8px; text-align: center;
}
/* سوراخ‌های بالا و پایین خط پرفراژ */
.ticket-stub::before, .ticket-stub::after {
  content: ""; position: absolute; inset-inline-start: calc(-1 * var(--notch) - 1px);
  width: calc(var(--notch) * 2); height: var(--notch); background: var(--paper); border: 1px solid var(--line);
}
.ticket-stub::before { top: -1px; border-top: 0; border-radius: 0 0 var(--notch) var(--notch); }
.ticket-stub::after { bottom: -1px; border-bottom: 0; border-radius: var(--notch) var(--notch) 0 0; }
.stub-num { font-size: 2.3rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stub-label { font-size: .78rem; line-height: 1.5; }
.ticket-stub .btn { width: 100%; background: var(--surface); border-color: var(--stub-line); color: var(--ink); }
.ticket-stub .btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.ticket-foot { margin-top: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .82rem; color: var(--ink-3); }

/* toggle */
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: .88rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 36px; height: 20px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track, .switch .track.on { background: var(--ok); }
[dir="rtl"] .switch input:checked + .track::after, [dir="rtl"] .switch .track.on::after { transform: translateX(-16px); }
button.switch:focus-visible .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
button.switch { background: none; border: 0; padding: 0; font: inherit; color: inherit; }

/* ---------- chart ---------- */
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; height: 150px; padding: 18px 20px 0; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar i { display: block; width: 100%; max-width: 28px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; opacity: .85; }
.bar i.zero { background: var(--line-2); }
.bar span { font-size: .7rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bar-labels { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; padding: 6px 20px 14px; font-size: .7rem; color: var(--ink-3); text-align: center; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: start; font-weight: 500; color: var(--ink-3); font-size: .82rem; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table a.rowlink { color: var(--ink); font-weight: 500; }
.cell-sub { color: var(--ink-3); font-size: .82rem; display: block; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 36px 20px; text-align: center; color: var(--ink-3); }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; }

/* ---------- forms ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 500; font-size: .9rem; }
.hint { color: var(--ink-3); font-size: .82rem; line-height: 1.6; }
.err-text { color: var(--err); font-size: .82rem; }
input[type=text], input[type=number], input[type=password], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 11px; min-height: 38px;
}
select { padding-inline-end: 28px; }
.filters input, .filters select { width: auto; min-width: 150px; }
.filters input[type=search] { min-width: 240px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.has-error input, .has-error textarea { border-color: var(--err); }
textarea { line-height: 1.8; resize: vertical; }
textarea.prompt { min-height: 260px; font-size: .9rem; }
textarea.list { min-height: 220px; }
.input-ltr { direction: ltr; text-align: left; font-family: var(--mono); font-size: .88rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px; }
.settings-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-layout > * { min-width: 0; }
.hint code, .kv code { overflow-wrap: anywhere; }
.subnav { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 2px; font-size: .9rem; }
.subnav a { color: var(--ink-2); padding: 5px 10px; border-radius: 6px; border-inline-start: 2px solid transparent; }
.subnav a:hover { background: var(--surface); text-decoration: none; color: var(--ink); }
.form-section { scroll-margin-top: 20px; }
.form-section .card-pad { display: flex; flex-direction: column; gap: 16px; }
.savebar {
  position: sticky; bottom: 0; z-index: 5; margin-top: 20px;
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(6px);
  border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 10px; align-items: center;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-family: var(--mono); font-size: .78rem; direction: ltr; background: var(--muted-bg); color: var(--ink-2); padding: 1px 8px; border-radius: 5px; }

/* ---------- flash ---------- */
.flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.flash { padding: 10px 14px; border-radius: var(--radius-sm); font-size: .92rem; border: 1px solid; }
.flash.ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.flash.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.flash.error { background: var(--err-bg); color: var(--err); border-color: color-mix(in srgb, var(--err) 25%, transparent); }

/* ---------- run / logs ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
/* خط‌های بین خانه‌ها با سایه‌ی نیم‌پیکسلی؛ ردیف آخرِ ناقص دیگر خانه‌ی خاکستری خالی ندارد */
.stat { background: var(--surface); padding: 12px 16px; box-shadow: 0 0 0 0.5px var(--line); }
.stat .v { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--ink-3); font-size: .8rem; }
.stat .v.ok { color: var(--ok); } .stat .v.err { color: var(--err); } .stat .v.warn { color: var(--warn); }
.log {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  max-height: 560px; overflow-y: auto; padding: 8px 0; font-size: .84rem; line-height: 1.7;
}
.log-line { display: grid; grid-template-columns: 74px 10px 1fr; gap: 10px; padding: 1px 14px; align-items: baseline; }
.log-line time { font-family: var(--mono); color: var(--ink-3); font-size: .78rem; direction: ltr; }
.log-line .lv { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); align-self: center; }
.log-line.ok .lv { background: var(--ok); } .log-line.warn .lv { background: var(--warn); } .log-line.err .lv { background: var(--err); }
.log-line.err .msg { color: var(--err); }
.log-line .msg { white-space: pre-wrap; word-break: break-word; unicode-bidi: plaintext; text-align: start; }
.log-line.head { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.log-line.head:first-child { margin-top: 0; border-top: 0; }
.log-line.head .msg { font-weight: 700; }
.log-line.head .lv { background: transparent; }
pre.report { white-space: pre-wrap; unicode-bidi: plaintext; font-family: var(--mono); font-size: .84rem; margin: 0; background: var(--surface-2); padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .88rem; }
.reasons li { display: flex; justify-content: space-between; gap: 10px; }

/* ---------- compare (coupon detail) ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.compare > div { padding: 16px 20px; min-width: 0; }
.compare > div + div { border-inline-start: 1px solid var(--line); }
.compare h3 { color: var(--ink-3); font-size: .8rem; margin-bottom: 6px; font-weight: 500; }
.compare .t { font-weight: 700; font-size: 1.02rem; margin-bottom: 14px; }
.compare .d { white-space: pre-wrap; font-size: .92rem; line-height: 1.95; }
.compare .new { background: color-mix(in srgb, var(--accent-weak) 45%, var(--surface)); border-end-end-radius: var(--radius); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: .9rem; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.meter { height: 6px; background: var(--muted-bg); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--ok); }
.meter i.over { background: var(--err); }

/* prompt test */
.test-panel { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 14px 16px; background: var(--surface-2); }
.test-out { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.test-out .block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.test-out .block b { display: block; font-size: .8rem; color: var(--ink-3); font-weight: 500; margin-bottom: 4px; }
.test-out .block div { white-space: pre-wrap; }
details summary { cursor: pointer; color: var(--ink-3); font-size: .82rem; }
details pre { white-space: pre-wrap; font-size: .8rem; max-height: 240px; overflow: auto; background: var(--surface); padding: 10px; border-radius: 6px; border: 1px solid var(--line); }

/* brands matrix */
.matrix th, .matrix td { text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: start; }
.matrix thead th { position: sticky; top: 0; z-index: 2; }
.mcell { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; display: inline-grid; place-items: center; color: transparent; padding: 0; }
.mcell svg { width: 16px; height: 16px; }
.mcell.on { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 40%, transparent); color: var(--ok); }
.mcell:hover { border-color: var(--accent); }
.row-diff td { background: color-mix(in srgb, var(--warn-bg) 55%, transparent); }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; }
.login-card .brand { margin-bottom: 18px; padding: 0; }

.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 16px; font-size: .9rem; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row code { flex: 1; display: block; padding: 8px 12px; white-space: pre-wrap; word-break: break-all; font-size: .8rem; text-align: left; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .grid-3, .split { grid-template-columns: minmax(0, 1fr); }
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .subnav { position: static; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; padding: 10px 14px; gap: 12px; overflow-x: auto; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .brand small, .nav-group, .sidebar-foot .who { display: none; }
  .nav { flex-direction: row; }
  .nav a { white-space: nowrap; }
  .nav a .dot { display: none; }
  .sidebar-foot { margin: 0; padding: 0; }
  .main { padding: 20px 16px 48px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .grid-2, .form-grid, .form-grid-3, .compare { grid-template-columns: 1fr; }
  .compare > div + div { border-inline-start: 0; border-top: 1px solid var(--line); }
  .ticket { grid-template-columns: 1fr 112px; }
  .bars, .bar-labels { gap: 3px; padding-inline: 12px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .filters input, .filters select, .filters input[type=search] { min-width: 0; flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
