/* =====================================================================
   Admin UI
   Palette: cool paper, deep navy ink, one verdigris accent.
   ===================================================================== */

:root {
  --paper: #F5F6F8;
  --surface: #FFFFFF;
  --ink: #0E1E45;
  --ink-2: #33405E;
  --muted: #6B7489;
  --line: #E3E6EC;
  --line-2: #EEF0F4;
  --accent: #1D5BD8;
  --accent-ink: #1748B0;
  --accent-soft: #E8EFFC;

  --ok: #157A4B;      --ok-bg: #E6F4EC;
  --warn: #9A6200;    --warn-bg: #FBF1DC;
  --bad: #B4322A;     --bad-bg: #FBE9E7;
  --info: #2C5AA0;    --info-bg: #E7EEF9;
  --done: #4B3F9E;    --done-bg: #ECEAF8;

  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 7px;
  --sidebar-w: 248px;
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.admin {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "tnum" 0;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num, .table td.num, .stat-value, .stage-count { font-variant-numeric: tabular-nums; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 2000; }
.skip-link:focus { left: 8px; color: #fff; }

[data-lucide], svg.lucide { width: 18px; height: 18px; stroke-width: 1.8; flex-shrink: 0; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: var(--ink);
  color: #C9CFDC;
  display: flex; flex-direction: column;
  position: fixed; inset: 0 auto 0 0;
  z-index: 1040;
  transition: transform .22s ease;
}
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }

.brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 18px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 13px; letter-spacing: .02em;
}
.brand-logo { height: 36px; width: 36px; object-fit: contain; }
.brand-name { color: #fff; font-weight: 600; font-size: 15px; line-height: 1.2; }

.side-nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.nav-group { margin-top: 14px; }
.nav-group-title { font-size: 12px; color: #8790A6; padding: 0 10px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; margin: 1px 0;
  color: #C9CFDC; border-radius: 8px; position: relative;
  font-weight: 500;
}
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.is-active { background: rgba(255,255,255,.09); color: #fff; }
.nav-link.is-active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-link.is-active [data-lucide], .nav-link.is-active svg { color: #8FB4FF; }
.nav-badge { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }

.sidebar-foot { border-top: 1px solid rgba(255,255,255,.08); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me-text { display: flex; flex-direction: column; min-width: 0; }
.me-text strong { color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { color: #8790A6; font-size: 12px; }

.sidebar-backdrop { display: none; }

/* ---------- Topbar ---------- */
.topbar {
  height: 64px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 28px;
  position: sticky; top: 0; z-index: 1020;
}
.topbar-date { color: var(--muted); font-size: 13.5px; }
.topbar-search { position: relative; flex: 1; max-width: 460px; }
.topbar-search [data-lucide], .topbar-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.topbar-search input {
  width: 100%; height: 38px; border: 1px solid var(--line); background: var(--paper);
  border-radius: 9px; padding: 0 12px 0 36px; font: inherit; color: var(--ink);
}
.topbar-search input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--ink-2); display: inline-grid; place-items: center; position: relative; cursor: pointer;
}
.icon-btn:hover { background: var(--paper); color: var(--ink); }
.icon-btn-dark { color: #C9CFDC; }
.icon-btn-dark:hover { background: rgba(255,255,255,.08); color: #fff; }
.notif-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; background: var(--bad); border-radius: 50%; border: 2px solid #fff; }

.me-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; color: var(--ink); font-weight: 500; }
.me-chip:hover { background: var(--paper); color: var(--ink); }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink);
  display: inline-grid; place-items: center; font-weight: 600; font-size: 13px; flex-shrink: 0; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar-lg { width: 84px; height: 84px; font-size: 26px; }
.sidebar .avatar { background: rgba(255,255,255,.1); color: #fff; }

/* Notifications dropdown */
.notif-menu { width: 360px; max-width: calc(100vw - 24px); padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 12px 32px rgba(14,30,69,.12); overflow: hidden; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.notif-item:hover { background: var(--paper); color: var(--ink); }
.notif-item.is-unread { background: #F5F8FE; }
.notif-item.is-unread .notif-title::after { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; margin-left: 6px; vertical-align: middle; }
.notif-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--paper); display: grid; place-items: center; color: var(--ink-2); flex-shrink: 0; }
.notif-ico svg { width: 16px; height: 16px; }
.notif-title { font-weight: 600; font-size: 13.5px; }
.notif-msg { color: var(--muted); font-size: 13px; }
.notif-time { color: var(--muted); font-size: 12px; margin-top: 2px; }
.notif-empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.notif-foot { display: block; text-align: center; padding: 11px; font-weight: 500; border-top: 1px solid var(--line); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-ink); font: inherit; font-size: 13px; cursor: pointer; }
.link-btn:hover { color: var(--accent); }

/* ---------- Content ---------- */
.content { padding: 28px; flex: 1; width: 100%; max-width: 1440px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { font-size: 24px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.page-sub { color: var(--muted); margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 28px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); }

/* ---------- Alerts ---------- */
.alert-line {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; border-radius: var(--r-md); margin-bottom: 16px; font-weight: 500;
  border: 1px solid transparent;
}
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: #CDE8D8; }
.alert-error, .alert-danger { background: var(--bad-bg); color: var(--bad); border-color: #F3CFCA; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #CFDCF1; }
.alert-warning { background: var(--warn-bg); color: var(--warn); border-color: #F1DDB0; }
.alert-close { background: none; border: 0; color: inherit; opacity: .7; padding: 2px; cursor: pointer; display: grid; }
.alert-close:hover { opacity: 1; }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-title { font-size: 15px; font-weight: 600; margin: 0; }
.panel-sub { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.panel-body { padding: 20px; }
.panel-body.tight { padding: 0; }
.panel-link { font-size: 13px; font-weight: 500; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
a.stat:hover { border-color: #CBD1DC; color: var(--ink); }
.stat-label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.stat-label svg { width: 16px; height: 16px; color: var(--ink-2); }
.stat-value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.stat-note { font-size: 12.5px; color: var(--muted); }
.stat-note.is-warn { color: var(--warn); font-weight: 500; }

/* ---------- Pipeline (dashboard signature) ---------- */
.pipeline { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px 18px; margin-bottom: 20px; }
.pipeline-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; }
.stages::before { content: ""; position: absolute; left: 6%; right: 6%; top: 15px; height: 2px; background: var(--line); }
.stage { position: relative; text-align: center; padding: 0 6px; color: var(--ink); }
.stage:hover { color: var(--ink); }
.stage-dot {
  width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 10px; position: relative; z-index: 1;
  background: var(--surface); border: 2px solid var(--line); display: grid; place-items: center; color: var(--muted);
}
.stage-dot svg { width: 15px; height: 15px; }
.stage.has-count .stage-dot { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.stage-count { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.stage-name { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- Grid helpers ---------- */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
.grid-2 > .panel + .panel, .grid-main > .panel + .panel, .grid-2 > * + .panel { margin-top: 0; }
.stack > * + * { margin-top: 20px; }
.chart-box { position: relative; height: 260px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; margin: 0; border-collapse: collapse; font-size: 14px; --bs-table-bg: transparent; }
.table th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px;
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: #FAFBFC; white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; color: var(--ink); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FAFBFC; }
.table .col-actions { text-align: right; white-space: nowrap; }
.cell-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-person strong { font-weight: 600; display: block; line-height: 1.25; }
.cell-person small, .cell-sub { color: var(--muted); font-size: 12.5px; display: block; }
.code { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--ink-2); white-space: nowrap; }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-done { background: var(--done-bg); color: var(--done); }
.pill-mute { background: #EFF1F4; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { font-weight: 500; border-radius: 9px; padding: 8px 14px; font-size: 14px; display: inline-flex; align-items: center; gap: 7px; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: var(--accent-ink); --bs-btn-hover-border-color: var(--accent-ink); --bs-btn-active-bg: var(--accent-ink); --bs-btn-active-border-color: var(--accent-ink); --bs-btn-disabled-bg: var(--accent); --bs-btn-disabled-border-color: var(--accent); }
.btn-dark { --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-hover-bg: #081332; --bs-btn-hover-border-color: #081332; }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--line); --bs-btn-color: var(--ink); --bs-btn-hover-bg: var(--paper); --bs-btn-hover-border-color: #CBD1DC; }
.btn-danger { --bs-btn-bg: var(--bad); --bs-btn-border-color: var(--bad); }
.btn-ghost-danger { color: var(--bad); background: transparent; border: 1px solid transparent; }
.btn-ghost-danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 8px; }

/* ---------- Forms ---------- */
.form-label { font-weight: 500; font-size: 13.5px; color: var(--ink-2); margin-bottom: 6px; }
.form-label .req { color: var(--bad); margin-left: 2px; }
.form-control, .form-select {
  border: 1px solid var(--line); border-radius: 9px; font-size: 14.5px; padding: 9px 12px; color: var(--ink); background-color: #fff;
}
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--bad); }
.invalid-feedback { color: var(--bad); font-size: 12.5px; }
.form-text { color: var(--muted); font-size: 12.5px; }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-section { padding: 22px 20px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.form-section-title { font-size: 15px; font-weight: 600; margin: 0 0 2px; }
.form-section-sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.form-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--line); background: #FAFBFC; border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.filters .form-control, .filters .form-select { height: 38px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; width: auto; min-width: 150px; }
.filters .grow { flex: 1; min-width: 220px; }

/* ---------- Pager ---------- */
.list-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.pager { display: flex; gap: 4px; flex-wrap: wrap; }
.pager-item { min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; display: inline-grid; place-items: center; color: var(--ink-2); font-size: 13px; background: #fff; }
.pager-item:hover { border-color: #CBD1DC; color: var(--ink); }
.pager-item.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager-item.is-disabled { color: #B3B9C6; background: #FAFBFC; }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 28px; height: 28px; color: #A6AEBF; margin-bottom: 8px; }
.empty strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.empty .btn { margin-top: 12px; }

/* ---------- Lists inside panels ---------- */
.row-list { list-style: none; margin: 0; padding: 0; }
.row-list li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.row-list li:last-child { border-bottom: 0; }
.row-list .grow { flex: 1; min-width: 0; }
.row-list .meta { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick a { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink); font-weight: 500; font-size: 13.5px; }
.quick a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.quick a svg { color: var(--accent); width: 18px; height: 18px; }

/* ---------- Detail views ---------- */
.dl { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 16px; margin: 0; }
.dl dt { color: var(--muted); font-weight: 400; font-size: 13.5px; }
.dl dd { margin: 0; font-weight: 500; word-break: break-word; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 18px 26px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
.timeline .t-title { font-weight: 600; }
.timeline .t-meta { color: var(--muted); font-size: 12.5px; }

.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; }
.tabs-line a, .tabs-line button { padding: 12px 12px; color: var(--muted); font-weight: 500; border: 0; background: none; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 14px; }
.tabs-line a:hover, .tabs-line button:hover { color: var(--ink); }
.tabs-line .is-active, .tabs-line .active { color: var(--ink); border-bottom-color: var(--accent); }

/* Modals */
.modal-content { border: 0; border-radius: var(--r-lg); }
.modal-header, .modal-footer { border-color: var(--line); }

/* ---------- Login ---------- */
body.auth { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: var(--ink); color: #C9CFDC; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side h2 { color: #fff; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; max-width: 420px; margin: 0 0 14px; }
.auth-side p { max-width: 400px; margin: 0; }
.auth-flow { list-style: none; padding: 0; margin: 36px 0 0; max-width: 360px; }
.auth-flow li { display: flex; align-items: center; gap: 12px; padding: 9px 0; color: #C9CFDC; position: relative; }
.auth-flow li span { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.25); display: grid; place-items: center; font-size: 12px; color: #fff; flex-shrink: 0; background: var(--ink); position: relative; z-index: 1; }
.auth-flow li:not(:last-child)::after { content: ""; position: absolute; left: 12.5px; top: 30px; height: 18px; width: 1.5px; background: rgba(255,255,255,.18); }
.auth-flow li:last-child span { background: var(--accent); border-color: var(--accent); }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 6px; }
.auth-card .lead-sub { color: var(--muted); margin-bottom: 24px; }
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 44px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; border-radius: 7px; }
.pw-toggle:hover { color: var(--ink); background: var(--paper); }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.is-open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .sidebar-backdrop.is-open { display: block; position: fixed; inset: 0; background: rgba(14,30,69,.45); z-index: 1030; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px; }
  .foot { padding: 14px 16px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; }
  .stages::before { display: none; }
  body.auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
}
@media (max-width: 575.98px) {
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 22px; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .dl dd { margin-bottom: 10px; }
  .quick { grid-template-columns: minmax(0, 1fr); }
  .page-title { font-size: 21px; }
  .filters .form-control, .filters .form-select { min-width: 0; width: 100%; }
  .topbar-date { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media print {
  .sidebar, .topbar, .foot, .page-actions, .filters, .pager, .no-print { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; }
  body.admin { background: #fff; }
  .panel { border: 0; }
}
