:root {
  --navy-950: #101923;
  --navy-900: #172331;
  --navy-800: #213247;
  --ink: #18212b;
  --muted: #667383;
  --line: #dfe4e8;
  --line-strong: #ccd4da;
  --surface: #ffffff;
  --surface-subtle: #f6f8f9;
  --canvas: #eef1f3;
  --accent: #b54d28;
  --accent-dark: #91391c;
  --success: #25714c;
  --success-bg: #eaf5ef;
  --warning: #946317;
  --warning-bg: #fff6df;
  --danger: #a73737;
  --danger-bg: #fbecec;
  --focus: #2c74b8;
  --radius: 8px;
  --shadow: 0 8px 28px rgba(16, 25, 35, .08);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: #295f91; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid rgba(44, 116, 184, .35); outline-offset: 2px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: #fff;
  background: var(--navy-950);
  border-radius: 4px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }
.is-hidden { display: none !important; }
.muted { color: var(--muted); }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  width: 256px;
  flex-direction: column;
  color: #dce3ea;
  background: var(--navy-950);
}
.brand {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
}
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}
.brand strong, .brand small { display: block; }
.brand strong { color: #fff; font-size: 16px; letter-spacing: .01em; }
.brand small { margin-top: 1px; color: #98a7b6; font-size: 11px; }
.side-nav { overflow-y: auto; padding: 10px 12px; }
.nav-label {
  margin: 20px 10px 7px;
  color: #7f91a2;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 2px 0;
  padding: 10px 11px;
  color: #c9d3dc;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.side-nav a > span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  color: #96a7b7;
  font-size: 17px;
}
.side-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.side-nav a[aria-current="page"] {
  color: #fff;
  background: var(--navy-800);
  box-shadow: inset 3px 0 var(--accent);
}
.side-nav a[aria-current="page"] > span { color: #e59c7e; }
.sidebar-footer {
  margin-top: auto;
  padding: 18px 22px 22px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-footer small { display: block; margin-top: 7px; color: #8798a8; font-size: 11px; }
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  color: #405065;
  background: #edf1f4;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.sidebar .role-badge { color: #dce5ec; background: rgba(255,255,255,.1); }
.app-column { min-height: 100vh; margin-left: 256px; }
.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
}
.menu-button { display: none !important; }
.freshness { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.freshness small, .freshness strong { display: block; }
.freshness small { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.freshness strong { color: var(--ink); font-size: 12px; font-weight: 600; }
.status-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; }
.status-dot.is-ok { background: #2f9a66; box-shadow: 0 0 0 4px #e6f4ed; }
.status-dot.is-muted { background: #9aa5af; box-shadow: 0 0 0 4px #eef0f2; }
.profile { display: flex; align-items: center; gap: 9px; }
.profile form { margin: 0; }
.profile-copy strong, .profile-copy small { display: block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { font-size: 12px; }
.profile-copy small { color: var(--muted); font-size: 10px; }
.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  color: #fff;
  background: #52677d;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}
.avatar-small { width: 30px; height: 30px; flex-basis: 30px; }
.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: #586777;
  background: transparent;
  border: 0;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
}
.icon-button:hover { color: var(--ink); background: var(--surface-subtle); }
.main-content { width: 100%; max-width: 1660px; margin: 0 auto; padding: 34px 38px 60px; }
.drawer-backdrop { display: none; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(25px, 2vw, 34px); line-height: 1.18; letter-spacing: -.025em; }
h2 { margin-bottom: 4px; font-size: 18px; line-height: 1.3; }
.eyebrow {
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.page-heading {
  display: flex;
  min-height: 76px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.page-heading > div:first-child > p:last-child { max-width: 720px; margin-bottom: 0; color: var(--muted); }
.period-summary {
  min-width: 245px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 5px;
}
.period-summary small, .period-summary strong, .period-summary span { display: block; }
.period-summary small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.period-summary strong { margin: 2px 0; font-size: 13px; }
.period-summary span { color: var(--muted); font-size: 10px; }
.section-heading { margin-bottom: 15px; }
.section-heading p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.section-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.button-primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button-primary:hover { color: #fff; background: var(--accent-dark); border-color: var(--accent-dark); }
.button-quiet { color: #3d4b58; background: #fff; border-color: var(--line-strong); }
.button-quiet:hover { color: var(--ink); background: var(--surface-subtle); }
.button-full { width: 100%; }
.button-link { padding: 5px 2px; color: #2b6294; background: none; border: 0; font-weight: 600; cursor: pointer; }
.button-link:hover { color: var(--accent-dark); text-decoration: underline; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 3px 14px rgba(16, 25, 35, .04);
}
.kpi { position: relative; min-height: 139px; padding: 23px 24px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi-label, .kpi-note, .kpi a { display: block; }
.kpi-label { color: var(--muted); font-size: 12px; }
.kpi strong { display: block; margin: 5px 0 9px; font-size: 31px; line-height: 1; letter-spacing: -.03em; }
.kpi-note, .kpi a { color: var(--muted); font-size: 11px; }
.kpi a { color: #2b6294; }
.kpi-warning::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--danger); content: ""; }
.kpi-warning strong { color: var(--danger); }
.workspace-section { margin-top: 34px; }
.action-list { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.action-row {
  display: grid;
  min-height: 80px;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 14px 20px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.action-row:last-child { border-bottom: 0; }
.action-row:hover { color: var(--ink); background: var(--surface-subtle); }
.action-row strong, .action-row small { display: block; }
.action-row small { margin-top: 2px; color: var(--muted); }
.action-icon { display: grid; width: 36px; height: 36px; place-items: center; color: #335f84; background: #eaf1f6; border-radius: 6px; font-size: 18px; font-weight: 700; }
.action-icon-alert { color: var(--danger); background: var(--danger-bg); }

.filter-panel, .form-panel, .data-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 3px 14px rgba(16, 25, 35, .035);
}
.filter-panel { margin-bottom: 25px; }
.filter-panel summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 17px;
  font-weight: 700;
  cursor: pointer;
}
.filter-panel summary::marker { color: var(--muted); }
.summary-hint { margin-left: auto; color: var(--muted); font-size: 11px; font-weight: 400; }
.count-badge {
  display: inline-grid;
  min-width: 23px;
  height: 23px;
  margin-left: 5px;
  padding: 0 6px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 12px;
  font-size: 11px;
}
.filter-form {
  display: grid;
  grid-template-columns: 2fr repeat(4, minmax(145px, 1fr));
  gap: 14px;
  padding: 18px;
  background: var(--surface-subtle);
  border-top: 1px solid var(--line);
}
.field { min-width: 0; }
.field label { display: block; margin-bottom: 5px; color: #465463; font-size: 11px; font-weight: 700; }
.field input:not([type="checkbox"]), .field select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}
.field input:not([type="checkbox"]):hover, .field select:hover { border-color: #aab5be; }
.field input:not([type="checkbox"]):focus, .field select:focus { border-color: var(--focus); outline: 3px solid rgba(44,116,184,.13); }
.field-checkbox { display: flex; min-height: 40px; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 21px; }
.field-checkbox label { margin: 0; order: 2; }
.field-checkbox input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.field-checkbox .help-text, .field-checkbox .field-error { width: 100%; order: 3; }
.filter-actions { display: flex; align-items: end; gap: 8px; }
.help-text { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.field-error { display: block; margin-top: 4px; color: var(--danger); font-size: 11px; font-weight: 600; }
.field-invalid input:not([type="checkbox"]), .field-invalid select { border-color: var(--danger); }

.data-section { margin-top: 25px; padding: 18px 0 0; }
.data-section > .section-heading { padding: 0 18px; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.table-wrap:focus { outline-offset: -3px; }
.data-table { width: 100%; min-width: 900px; border-spacing: 0; border-collapse: separate; }
.report-table-autorder { min-width: 1900px; }
.report-table-oos { min-width: 1480px; }
.scroll-hint { display: none; margin: 0; padding: 0 14px 10px; color: var(--muted); font-size: 10px; }
.data-table th, .data-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.data-table th {
  color: #52606d;
  background: #f4f6f7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table th a { color: inherit; text-decoration: none; }
.data-table th a:hover { color: var(--accent-dark); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #fafbfb; }
.data-table .numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table th.is-emphasis { color: #fff; background: var(--navy-800); }
.data-table td.value-strong { color: var(--navy-900); background: #f4f7f9; font-weight: 750; }
.sku { color: #3d5062; font-family: Consolas, "Courier New", monospace; font-size: 12px; font-weight: 700; white-space: nowrap; }
.product-cell { min-width: 210px; }
.product-cell strong, .product-cell small { display: block; }
.product-cell strong { max-width: 330px; font-size: 12px; }
.product-cell small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.no-data { color: var(--muted); font-size: 11px; white-space: nowrap; }
.margin-cue { display: block; margin-top: 2px; color: var(--warning); font-size: 9px; font-weight: 600; }
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.status-success, .status-succeeded { color: var(--success); background: var(--success-bg); }
.status-error, .status-failed { color: var(--danger); background: var(--danger-bg); }
.status-warning, .status-queued { color: var(--warning); background: var(--warning-bg); }
.status-running { color: #2d648f; background: #e9f2f8; }
.status-neutral { color: #5e6b77; background: #edf0f2; }
.empty-state { padding: 45px 20px; text-align: center; }
.empty-state > span { display: block; margin-bottom: 8px; color: #91a0ad; font-size: 30px; }
.empty-state strong { display: block; font-size: 14px; }
.empty-state p { margin: 4px 0 8px; color: var(--muted); font-size: 12px; }
.pagination { display: grid; min-height: 64px; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); }
.pagination > :last-child { justify-self: end; }
.pagination > span { color: var(--muted); font-size: 11px; }

.form-panel { padding: 20px; }
.form-panel-narrow { max-width: 760px; }
.model-form { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.form-grid-users { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-single { grid-template-columns: 1fr; }
.form-actions { display: flex; align-items: center; gap: 9px; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.unsaved-note { display: none; margin-left: 6px; color: var(--warning); font-size: 11px; }
.is-dirty .unsaved-note { display: inline; }
.data-section + .data-section, .form-panel + .data-section { margin-top: 25px; }
.alert { padding: 11px 13px; border: 1px solid; border-radius: 5px; font-size: 12px; }
.alert + .alert { margin-top: 8px; }
.alert-error { color: #842e2e; background: var(--danger-bg); border-color: #efc7c7; }
.alert-info { color: #305b7c; background: #edf5fa; border-color: #cddfea; }
.alert-success { color: var(--success); background: var(--success-bg); border-color: #c4e1d1; }
.message-stack { margin-bottom: 18px; }
.user-cell { display: flex; align-items: center; gap: 9px; }
.user-cell strong, .user-cell small { display: block; }
.user-cell small { color: var(--muted); font-size: 10px; }
.password-help ul { margin: 5px 0 0; padding-left: 18px; }

.two-column-layout { display: grid; grid-template-columns: minmax(360px, .85fr) minmax(420px, 1.15fr); gap: 25px; margin-top: 25px; align-items: start; }
.two-column-layout .data-section { margin-top: 0; }
.compact-list { margin: 22px -20px -20px; border-top: 1px solid var(--line); }
.compact-list > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.compact-list > div:last-child { border-bottom: 0; }
.compact-list strong, .compact-list small { display: block; }
.compact-list small { color: var(--muted); font-size: 10px; }
.audit-section { max-height: 680px; overflow: auto; }
.audit-list { padding: 0 18px 18px; }
.audit-list article { position: relative; display: grid; grid-template-columns: 13px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.audit-list article:first-child { border-top: 0; }
.audit-marker { width: 7px; height: 7px; margin-top: 6px; background: #8998a6; border-radius: 50%; }
.audit-list strong { font-size: 11px; }
.audit-list p, .audit-list time { display: block; margin: 1px 0 0; color: var(--muted); font-size: 10px; }
.error-cell { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.auth-body { min-height: 100vh; background: var(--navy-950); }
.auth-main { min-height: 100vh; }
.auth-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(340px, 1.1fr) minmax(420px, .9fr); }
.auth-intro {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 6vw, 80px);
  color: #d9e1e8;
  background-color: var(--navy-950);
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
}
.brand-auth { padding: 0; }
.auth-intro-copy { max-width: 620px; margin: auto 0; }
.auth-intro-copy h1 { max-width: 580px; color: #fff; font-size: clamp(36px, 4.4vw, 64px); line-height: 1.03; }
.auth-intro-copy > p:last-child { max-width: 560px; color: #aebbc7; font-size: 16px; }
.auth-caption { margin: 0; color: #768797; font-size: 11px; }
.auth-card {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 8vw, 110px);
  background: #fff;
}
.auth-card > div:first-child { margin-bottom: 25px; }
.auth-card h2 { margin-bottom: 6px; font-size: 28px; }
.auth-card > div:first-child > p:last-child, .auth-help { color: var(--muted); }
.auth-form { margin-top: 20px; }
.auth-form .field { margin-bottom: 17px; }
.auth-form .field input { min-height: 46px; }
.auth-help { margin: 18px 0 0; font-size: 11px; text-align: center; }
.success-state { max-width: 580px; margin: 12vh auto 0; padding: 48px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); }
.success-icon { display: grid; width: 50px; height: 50px; margin: 0 auto 18px; place-items: center; color: var(--success); background: var(--success-bg); border-radius: 50%; font-size: 24px; font-weight: 800; }
.error-icon { color: var(--danger); background: var(--danger-bg); }
.success-state p:not(.eyebrow) { color: var(--muted); }

@media (max-width: 1180px) {
  .filter-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .field-search { grid-column: span 2; }
  .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi { padding: 20px; }
  .two-column-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  body.drawer-open { overflow: hidden; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 16px 0 40px rgba(0,0,0,.2); }
  .drawer-open .sidebar { transform: none; }
  .drawer-backdrop { position: fixed; z-index: 40; inset: 0; width: 100%; height: 100%; padding: 0; background: rgba(9,15,22,.5); border: 0; }
  .drawer-open .drawer-backdrop { display: block; }
  .app-column { margin-left: 0; }
  .topbar { padding: 0 20px; }
  .menu-button { display: grid !important; margin-right: 8px; }
  .freshness { margin-right: auto; }
  .main-content { padding: 28px 24px 50px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .form-grid, .form-grid-users { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-intro { display: none; }
  .auth-card { min-height: 100vh; max-width: none; padding: 10vh max(28px, calc((100vw - 470px) / 2)); }
}

@media (max-width: 640px) {
  .topbar { height: 60px; padding: 0 12px; }
  .freshness small { display: none; }
  .freshness strong { max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .profile-copy, .profile > .avatar { display: none; }
  .profile { gap: 1px; }
  .main-content { padding: 22px 14px 40px; }
  .page-heading { display: block; margin-bottom: 22px; }
  .page-heading > .button, .page-heading > form, .page-heading > .status-badge { margin-top: 17px; }
  .page-heading > form .button { width: 100%; }
  .period-summary { min-width: 0; margin-top: 17px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi { min-height: 126px; padding: 16px; }
  .kpi strong { font-size: 26px; }
  .action-row { min-height: 72px; grid-template-columns: 36px 1fr auto; gap: 10px; padding: 12px; }
  .action-row small { font-size: 10px; }
  .action-icon { width: 32px; height: 32px; }
  .filter-form { grid-template-columns: 1fr 1fr; padding: 14px; }
  .field-search { grid-column: 1 / -1; }
  .filter-actions { grid-column: 1 / -1; }
  .filter-actions .button { flex: 1; }
  .summary-hint { display: none; }
  .form-panel { padding: 16px; }
  .form-grid, .form-grid-users { grid-template-columns: 1fr; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .unsaved-note { width: 100%; margin: 3px 0 0; }
  .data-section { padding-top: 15px; }
  .data-section > .section-heading { padding: 0 14px; }
  .scroll-hint { display: block; }
  .report-table-wrap {
    background:
      linear-gradient(to right, #fff 30%, rgba(255,255,255,0)),
      linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right,
      linear-gradient(to right, rgba(16,25,35,.12), rgba(16,25,35,0)),
      linear-gradient(to left, rgba(16,25,35,.12), rgba(16,25,35,0)) right;
    background-attachment: local, local, scroll, scroll;
    background-repeat: no-repeat;
    background-size: 38px 100%;
  }
  .report-table th:first-child,
  .report-table td:first-child {
    position: sticky;
    z-index: 2;
    left: 0;
    min-width: 128px;
    max-width: 160px;
    background: #fff;
    box-shadow: 1px 0 0 var(--line);
  }
  .report-table th:first-child { z-index: 3; background: #f4f6f7; }
  .report-table tbody tr:hover td:first-child { background: #fafbfb; }
  .pagination { grid-template-columns: 1fr 1fr; }
  .pagination > span { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .auth-card { padding: 48px 24px; }
  .success-state { margin-top: 5vh; padding: 32px 22px; }
}

@media (max-width: 400px) {
  .filter-form { grid-template-columns: 1fr; }
  .field-search, .filter-actions { grid-column: auto; }
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi { min-height: 112px; border-right: 0; border-bottom: 1px solid var(--line); }
  .kpi:nth-child(3) { border-bottom: 1px solid var(--line); }
  .kpi:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media print {
  .sidebar, .topbar, .filter-panel, .pagination, .page-heading .button { display: none !important; }
  .app-column { margin: 0; }
  .main-content { max-width: none; padding: 0; }
  .data-section { border: 0; box-shadow: none; }
  .table-wrap { overflow: visible; }
}
