:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f8f9fd;
  --ink: #172033;
  --muted: #68728a;
  --line: #e5e8f1;
  --primary: #6657e8;
  --primary-dark: #5142d5;
  --primary-soft: #eeecff;
  --green: #168a60;
  --green-soft: #e8f7f1;
  --amber: #b86f0a;
  --amber-soft: #fff5dd;
  --red: #ca3c4c;
  --red-soft: #fff0f2;
  --blue: #2875c7;
  --blue-soft: #eaf4ff;
  --shadow: 0 12px 40px rgba(34, 41, 78, .08);
  --sidebar: 264px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 3px solid rgba(102, 87, 232, .3); outline-offset: 2px; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 10px 16px; border-radius: 8px; color: #fff; background: var(--primary); }
.skip-link:focus { top: 12px; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar); padding: 24px 18px;
  display: flex; flex-direction: column; color: #eef0ff;
  background: linear-gradient(180deg, #171a35 0%, #202345 100%);
  box-shadow: 8px 0 30px rgba(22, 25, 55, .08);
}
.brand, .login-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand { padding: 4px 8px 26px; color: #fff; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 13px; color: #fff; font-size: 22px; background: linear-gradient(135deg, #7b6cf2, #a75ee6); box-shadow: 0 8px 22px rgba(115, 86, 232, .35); }
.brand strong, .login-brand strong { display: block; font-size: 16px; letter-spacing: -.01em; }
.brand small, .login-brand small { display: block; margin-top: 2px; font-size: 11px; letter-spacing: .06em; opacity: .65; text-transform: uppercase; }
.nav-list { display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px 13px; border: 0; border-radius: 10px; color: #b9bfd5; background: transparent; text-decoration: none; text-align: left; cursor: pointer; transition: .18s ease; }
.nav-link span { width: 22px; text-align: center; color: #969fca; font-size: 17px; }
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .065); }
.nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(113, 93, 235, .42), rgba(113, 93, 235, .18)); box-shadow: inset 3px 0 #8c7bf8; }
.nav-link.active span { color: #b9afff; }
.button-link { font-size: 14px; }
.sidebar-foot { margin-top: auto; display: grid; gap: 6px; }
.sidebar-foot form { margin: 0; }
.admin-chip { display: flex; align-items: center; gap: 10px; margin: 15px 5px 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .09); }
.admin-chip > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: #6657e8; font-weight: 700; }
.admin-chip strong, .admin-chip small { display: block; }
.admin-chip strong { font-size: 13px; }
.admin-chip small { margin-top: 2px; color: #8f98b9; font-size: 11px; }

.page-column { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { min-height: 88px; padding: 18px clamp(24px, 4vw, 54px); display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .88); backdrop-filter: blur(12px); }
.topbar h1 { margin: 2px 0 0; font-size: clamp(21px, 2vw, 27px); line-height: 1.2; letter-spacing: -.03em; }
.eyebrow { margin: 0; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.secure-indicator { margin-left: auto; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.secure-indicator i, .status-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(26, 151, 103, .11); }
.menu-toggle { display: none; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; cursor: pointer; }
.content { width: 100%; max-width: 1500px; margin: 0 auto; padding: 30px clamp(22px, 4vw, 54px) 60px; }
.nav-backdrop { display: none; }

.alert { display: flex; align-items: flex-start; gap: 11px; margin: 0 0 22px; padding: 13px 15px; border: 1px solid; border-radius: 12px; font-size: 14px; }
.alert > span { display: grid; place-items: center; flex: 0 0 22px; height: 22px; border-radius: 50%; color: #fff; font-weight: 800; }
.alert p { flex: 1; margin: 2px 0; }
.alert button { border: 0; color: currentColor; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; }
.alert-success { color: var(--green); border-color: #b9ead7; background: var(--green-soft); }
.alert-success > span { background: var(--green); }
.alert-warning { color: var(--amber); border-color: #f2d694; background: var(--amber-soft); }
.alert-warning > span { background: var(--amber); }
.alert-error { color: var(--red); border-color: #f1bdc4; background: var(--red-soft); }
.alert-error > span { background: var(--red); }

.hero-card { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; min-height: 195px; padding: 34px 38px; border-radius: 20px; color: #fff; background: linear-gradient(125deg, #5b4ddb 0%, #7b5de2 55%, #985fd6 100%); box-shadow: 0 18px 45px rgba(91, 77, 219, .22); }
.hero-card::before, .hero-card::after { content: ""; position: absolute; border: 1px solid rgba(255, 255, 255, .13); border-radius: 50%; }
.hero-card::before { width: 290px; height: 290px; right: 7%; top: -160px; }
.hero-card::after { width: 190px; height: 190px; right: -60px; bottom: -100px; }
.hero-card > * { position: relative; z-index: 1; }
.hero-card h2 { max-width: 720px; margin: 16px 0 8px; font-size: clamp(25px, 3vw, 36px); line-height: 1.16; letter-spacing: -.035em; }
.hero-card p { max-width: 720px; margin: 0; color: rgba(255, 255, 255, .78); line-height: 1.65; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; width: fit-content; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.hero-card .status-pill { color: #eafff5; background: rgba(255, 255, 255, .13); }
.status-active { color: var(--green); background: var(--green-soft); }
.status-warning { color: var(--amber); background: var(--amber-soft); }
.status-muted { color: #747d91; background: #edf0f5; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 22px 0; }
.stat-card { display: flex; align-items: center; gap: 16px; min-height: 130px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 6px 24px rgba(34, 41, 78, .035); }
.stat-card p, .stat-card small { margin: 0; color: var(--muted); }
.stat-card p { font-size: 12px; font-weight: 700; }
.stat-card strong { display: block; margin: 4px 0 1px; font-size: 29px; letter-spacing: -.04em; }
.stat-card small { font-size: 11px; }
.stat-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; font-size: 20px; }
.stat-icon.purple { color: var(--primary); background: var(--primary-soft); }
.stat-icon.green { color: var(--green); background: var(--green-soft); }
.stat-icon.amber { color: var(--amber); background: var(--amber-soft); }
.stat-icon.blue { color: var(--blue); background: var(--blue-soft); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .8fr); gap: 22px; }
.panel { margin-bottom: 22px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 7px 26px rgba(34, 41, 78, .035); }
.panel-heading { min-height: 74px; padding: 20px 23px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 3px 0 0; font-size: 18px; letter-spacing: -.025em; }
.panel-heading p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.text-link { color: var(--primary); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.people-list { padding: 6px 20px 14px; }
.person-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid #edf0f6; text-decoration: none; }
.person-row:last-child { border: 0; }
.person-row:hover strong { color: var(--primary); }
.person-row strong, .person-row small { display: block; }
.person-row strong { font-size: 13px; }
.person-row small, .person-row time { margin-top: 3px; color: var(--muted); font-size: 11px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; color: var(--primary); background: var(--primary-soft); font-size: 13px; font-weight: 800; }
.quick-panel { padding-bottom: 12px; }
.quick-link { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 13px; margin: 9px 14px; padding: 12px; border-radius: 12px; text-decoration: none; transition: .18s ease; }
.quick-link:hover { background: var(--surface-soft); transform: translateX(2px); }
.quick-link .stat-icon { width: 42px; height: 42px; flex-basis: 42px; }
.quick-link strong, .quick-link small { display: block; }
.quick-link strong { font-size: 13px; }
.quick-link small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.quick-link b { color: #a2a9ba; }

.page-intro { display: flex; align-items: center; justify-content: space-between; gap: 26px; margin: 0 0 22px; }
.page-intro h2 { margin: 0 0 7px; font-size: 22px; letter-spacing: -.03em; }
.page-intro p { max-width: 780px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.count-badge { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.form-panel { padding-bottom: 23px; }
.form-panel .panel-heading { margin-bottom: 22px; }
.settings-form .form-panel { scroll-margin-top: 20px; }
.form-grid { display: grid; gap: 19px; padding: 0 23px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
label { color: #3c455a; font-size: 12px; font-weight: 750; }
input, textarea, select { width: 100%; margin-top: 7px; border: 1px solid #dce0ea; border-radius: 10px; color: var(--ink); background: #fff; transition: border-color .16s, box-shadow .16s; }
input, select { height: 43px; padding: 0 12px; }
textarea { min-height: 82px; padding: 11px 12px; line-height: 1.5; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a6adbc; }
input:focus, textarea:focus, select:focus { outline: none; border-color: #9389ee; box-shadow: 0 0 0 3px rgba(102, 87, 232, .1); }
label > small, .form-grid small, .text-editor small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.45; }
.unit-field { display: flex; align-items: center; margin-top: 7px; border: 1px solid #dce0ea; border-radius: 10px; overflow: hidden; }
.unit-field input { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.unit-field span { padding: 0 12px; color: var(--muted); font-size: 11px; font-weight: 600; }
.toggle-row { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin: 21px 23px 0; padding: 16px 18px; border-radius: 12px; background: var(--surface-soft); }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch > span { position: relative; width: 36px; height: 21px; border-radius: 999px; background: #c8cedb; transition: .18s; }
.switch > span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); transition: .18s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(15px); }
.switch input:focus-visible + span { outline: 3px solid rgba(102, 87, 232, .25); }
.text-editor-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 0 23px; }
.text-editor { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.text-editor > span { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.text-editor code { color: #858da0; font-size: 10px; font-weight: 500; }
.text-editor textarea { background: #fff; }
.sticky-actions { position: sticky; bottom: 14px; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 auto; padding: 13px 15px 13px 20px; border: 1px solid #d9d7f8; border-radius: 14px; background: rgba(255, 255, 255, .93); box-shadow: 0 14px 42px rgba(34, 41, 78, .14); backdrop-filter: blur(12px); }
.sticky-actions span { color: var(--muted); font-size: 12px; }
.stack-form { display: grid; gap: 18px; }
.form-panel > .stack-form { padding: 0 23px; }
.form-panel > .stack-form .form-grid { padding: 0; }
.form-panel > .stack-form .toggle-row { margin-left: 0; margin-right: 0; }
.form-actions { display: flex; gap: 10px; margin-top: 3px; }

.button { min-height: 41px; padding: 9px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 800; line-height: 1.2; text-decoration: none; cursor: pointer; transition: .17s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--primary); box-shadow: 0 7px 18px rgba(102, 87, 232, .2); }
.button-primary:hover { background: var(--primary-dark); }
.button-secondary { color: var(--primary); border-color: #d8d4fa; background: var(--primary-soft); }
.button-light { color: #5043bf; background: #fff; }
.button-ghost { color: #525b70; border-color: var(--line); background: #fff; }
.button-danger-ghost { color: var(--red); border-color: #f0cbd0; background: #fff; }
.button-test { color: var(--blue); border-color: #c9e0f7; background: var(--blue-soft); }
.button-wide { width: 100%; }
.button-small { min-height: 33px; padding: 6px 10px; border-radius: 8px; font-size: 11px; }
.button:disabled, .disabled { opacity: .42; pointer-events: none; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 11px 16px; color: #858da0; background: #fafbfe; font-size: 10px; font-weight: 800; letter-spacing: .045em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 14px 16px; border-top: 1px solid #edf0f5; vertical-align: middle; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #fcfcff; }
td strong, .table-sub { display: block; }
.table-sub { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
td time { white-space: nowrap; }
td code { color: #555e73; font-size: 11px; }
.actions-column { text-align: right; }
.row-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.row-actions form { margin: 0; }
.order-actions { display: flex; align-items: center; gap: 3px; }
.order-actions > span { min-width: 20px; font-weight: 800; }
.order-actions form { margin: 0; }
.order-actions button { width: 25px; height: 27px; padding: 0; border: 1px solid var(--line); border-radius: 6px; color: #646d81; background: #fff; cursor: pointer; }
.order-actions button:disabled { opacity: .3; cursor: default; }
.kind-badge, .micro-badge, .audit-action, .referral-status { display: inline-flex; width: fit-content; padding: 4px 7px; border-radius: 6px; font-size: 10px; font-weight: 800; }
.kind-badge { color: var(--primary); background: var(--primary-soft); }
.micro-badge { color: #70798e; background: #f0f2f7; }
.badge-stack { display: grid; gap: 5px; width: fit-content; }
.identity-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.mono-value { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.metric-inline b { font-size: 16px; }
.muted { color: #979eae; }
.referral-status.status-valid { color: var(--green); background: var(--green-soft); }
.referral-status.status-invalid { color: var(--red); background: var(--red-soft); }
.referral-status.status-pending { color: var(--amber); background: var(--amber-soft); }
.referral-status.status-candidate { color: var(--blue); background: var(--blue-soft); }
.audit-action { color: var(--primary); background: var(--primary-soft); }
details { position: relative; }
details summary { color: var(--primary); font-weight: 700; cursor: pointer; }
details pre { max-width: 420px; max-height: 220px; overflow: auto; margin: 8px 0 0; padding: 10px; border-radius: 8px; color: #4d566a; background: #f2f4f8; font-size: 10px; white-space: pre-wrap; word-break: break-word; }

.filter-bar { padding: 16px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.search-box { flex: 1; display: flex; align-items: center; gap: 8px; padding-left: 12px; border: 1px solid #dce0ea; border-radius: 10px; background: #fff; }
.search-box > span { color: #9299aa; font-size: 17px; }
.search-box input { min-width: 160px; margin: 0; padding-left: 0; border: 0; box-shadow: none; }
.search-box .button { margin: 4px; }
.split-filter .search-box { max-width: 600px; }
.select-filter { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.select-filter select { width: auto; min-width: 130px; margin: 0; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 15px; padding: 17px; border-top: 1px solid var(--line); }
.pagination span { color: var(--muted); font-size: 11px; font-weight: 700; }
.empty-state { display: grid; justify-items: center; padding: 52px 24px; text-align: center; }
.empty-state > span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; color: var(--primary); background: var(--primary-soft); font-size: 25px; }
.empty-state h3 { margin: 15px 0 6px; font-size: 16px; }
.empty-state p { max-width: 430px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.narrow-column { max-width: 660px; }
.security-note { display: flex; gap: 13px; padding: 17px; border: 1px solid #dcd9fa; border-radius: 13px; color: #554bb0; background: var(--primary-soft); }
.security-note > span { font-size: 20px; }
.security-note strong { font-size: 13px; }
.security-note p { margin: 4px 0 0; color: #6e66ae; font-size: 11px; line-height: 1.5; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 70px; }
.password-field button { position: absolute; right: 7px; top: 14px; border: 0; color: var(--primary); background: transparent; font-size: 10px; font-weight: 800; cursor: pointer; }

.auth-page { display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 15% 20%, rgba(121, 101, 229, .15), transparent 33%), radial-gradient(circle at 85% 85%, rgba(44, 142, 200, .12), transparent 30%), #f3f5fb; }
.auth-shell { width: 100%; display: grid; place-items: center; }
.login-card { width: min(100%, 450px); padding: 35px 38px; border: 1px solid rgba(224, 227, 239, .9); border-radius: 22px; background: rgba(255, 255, 255, .94); box-shadow: 0 24px 70px rgba(37, 42, 78, .13); backdrop-filter: blur(15px); }
.login-brand { margin-bottom: 35px; color: var(--ink); }
.login-copy h1 { margin: 7px 0 9px; font-size: 29px; letter-spacing: -.04em; }
.login-copy > p:last-child { margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.login-card .alert { margin-bottom: 18px; }
.login-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 22px 0 0; color: #8a92a5; font-size: 10px; }
.public-card .login-brand { margin-bottom: 24px; }
.public-card .login-copy > p:last-child { font-size: 16px; }
.public-card label, .public-card input, .public-card .button { font-size: 14px; }
.auth-help { margin: 20px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.auth-links { margin: 20px 0 0; text-align: center; font-size: 14px; }
.error-card { text-align: center; }
.error-code { display: block; color: var(--primary); font-size: 54px; font-weight: 850; letter-spacing: -.06em; }
.error-card h1, .error-panel h2 { margin: 5px 0 8px; }
.error-card p, .error-panel p { margin: 0 0 23px; color: var(--muted); }
.error-panel { padding: 48px; text-align: center; }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .text-editor-list { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-102%); transition: transform .22s ease; }
  .nav-open .sidebar { transform: translateX(0); }
  .nav-backdrop { position: fixed; inset: 0; z-index: 25; border: 0; background: rgba(17, 20, 42, .48); }
  .nav-open .nav-backdrop { display: block; }
  .page-column { margin-left: 0; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .quick-panel { order: -1; }
}

@media (max-width: 680px) {
  .topbar { min-height: 76px; padding: 14px 16px; }
  .topbar .eyebrow, .secure-indicator { display: none; }
  .topbar h1 { font-size: 20px; }
  .content { padding: 20px 14px 45px; }
  .hero-card { min-height: 0; padding: 26px 22px; display: block; }
  .hero-card .button { margin-top: 20px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 115px; padding: 15px; display: block; }
  .stat-card .stat-icon { width: 36px; height: 36px; margin-bottom: 10px; border-radius: 10px; font-size: 16px; }
  .stat-card strong { font-size: 24px; }
  .stat-card small { display: none; }
  .page-intro { align-items: flex-start; flex-direction: column; gap: 13px; }
  .page-intro .button { width: 100%; }
  .panel-heading { padding: 18px; }
  .two-columns { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .form-grid, .text-editor-list { padding-left: 17px; padding-right: 17px; }
  .toggle-row { align-items: flex-start; flex-direction: column; margin-left: 17px; margin-right: 17px; }
  .form-panel > .stack-form { padding: 0 17px; }
  .sticky-actions { align-items: stretch; flex-direction: column; bottom: 8px; }
  .sticky-actions span { display: none; }
  .filter-bar { align-items: stretch; flex-direction: column; padding: 13px; }
  .search-box { width: 100%; }
  .split-filter .search-box { max-width: none; }
  .select-filter { justify-content: space-between; }
  .select-filter select { flex: 1; }
  th, td { padding-left: 12px; padding-right: 12px; }
  .login-card { padding: 28px 22px; border-radius: 18px; }
  .auth-page { padding: 15px; }
  .person-row { grid-template-columns: 38px 1fr; }
  .person-row time { display: none; }
}

@media (max-width: 390px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { display: flex; min-height: 94px; }
  .stat-card .stat-icon { margin: 0; }
  .stat-card small { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
