:root {
  color-scheme: dark;
  --canvas: #0e1014;
  --surface: #171920;
  --surface-2: #1e2129;
  --line: #2a2d36;
  --text: #f1f1f4;
  --muted: #a5a7b4;
  --yellow: #ffea00;
  --violet: #c9aeff;
  --red: #ff8b91;
  --nav-width: 280px;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button:not(:disabled) { cursor: pointer; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; }
svg { width: 21px; height: 21px; flex: none; vertical-align: middle; }
h1, h2, p { margin: 0; }
p { line-height: 1.55; }
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--nav-width) minmax(0, 1fr); }
.sidebar { background: #13151a; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 26px 16px 22px; position: sticky; top: 0; height: 100dvh; min-width:0; width:100%; overflow-y:auto; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 5px; font-weight: 900; font-size: 14px; letter-spacing: .04em; }
.brand > span:last-child { min-width: 0; }
.brand small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; letter-spacing: .045em; white-space: normal; line-height: 1.6; }
.brand-icon { display: grid; place-items: center; width: 39px; height: 39px; background: var(--yellow); color: #141400; clip-path: polygon(0 0, 100% 0, 100% 74%, 74% 100%, 0 100%); flex: none; }
.brand-icon svg { width: 24px; height: 24px; }
.sidebar nav { display: grid; grid-template-columns:minmax(0,1fr); gap: 6px; margin-top: 55px; min-width:0; }
.sidebar nav a { color: var(--muted); min-height: 47px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 6px; font-size: .875rem; font-weight: 600; border: 1px solid transparent; }
.sidebar nav a:hover { color: var(--text); background: var(--surface-2); }
.sidebar nav a { min-width:0; width:100%; padding-top:10px; padding-bottom:10px; }
.sidebar nav a span { min-width:0; overflow-wrap:anywhere; }
.sidebar nav a.selected { color: var(--violet); background: #28213a; border-color: #372b50; box-shadow: inset 2px 0 #a77cf6; }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 20px 5px 0; font-size: .8125rem; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.sidebar-footer span { width: 7px; height: 7px; border-radius: 50%; background: #74dca6; }
.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 70px; padding: 0 clamp(18px, 3vw, 42px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #121419; gap: 12px; }
.location, .top-actions, .account { display: flex; align-items: center; gap: 14px; min-width: 0; }
.location { font-size: .95rem; font-weight: 650; }
.mode { color: #ded0fb; background: #211b2d; border: 1px solid #36294a; border-radius: 5px; padding: 6px 9px; font-size: .75rem; white-space: nowrap; }
.account { color: var(--muted); font-size: .875rem; gap: 7px; }
.account span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account svg { width: 17px; height: 17px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: fit-content; min-height: 40px; padding: 9px 14px; border: 1px solid transparent; font-size: .875rem; font-weight: 750; line-height: 1.2; border-radius: 5px; }
.button svg { width: 17px; height: 17px; }
.button-primary { color: #171600; background: var(--yellow); border-color: var(--yellow); }
.button-primary:hover { background: #fff369; border-color: #fff369; }
.button-outline { color: var(--text); background: var(--surface); border-color: #373b46; }
.button-outline:hover, .plain:hover { background: var(--surface-2); }
.button:disabled { opacity: .5; }
.plain { background: transparent; border: 0; color: var(--muted); border-radius: 4px; }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; }
.menu-button { display: none; }
main { padding: 25px clamp(18px, 3vw, 42px) 36px; width: 100%; max-width: 1670px; margin: 0 auto; flex: 1; }
.hero { min-height: 286px; display: flex; align-items: center; padding: 29px clamp(22px, 4vw, 51px); border: 1px solid #484022; border-radius: 9px; background: linear-gradient(90deg,#0c0b08 1%, #0c0b08bb 36%, transparent 72%), url("/static/truck.webp") center 58% / cover no-repeat #100e09; position: relative; overflow: hidden; }
.hero-content { position: relative; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--yellow); font-size: .75rem; font-weight: 800; letter-spacing: .15em; margin-bottom: 9px; }
.eyebrow span { width: 15px; height: 2px; background: currentColor; }
.hero h1 { font-size: clamp(2.55rem, 5vw, 4.35rem); font-weight: 900; line-height: .99; letter-spacing: -.065em; }
.hero h1 span { color: var(--yellow); }
.hero h1 + p { color: #d0ced0; margin: 15px 0 18px; max-width: 340px; font-size: .95rem; }
.hero .button { border-radius: 0; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%); }
.hero .button:focus-visible { outline-offset: -4px; outline-color: #1c1332; }
.overview { margin-top: 27px; }
.section-heading, .panel-heading, .page-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.section-heading { margin-bottom: 15px; }
h2 { font-size: 1.2rem; letter-spacing: -.02em; }
.section-heading p, .panel-heading p { color: var(--muted); font-size: .875rem; margin-top: 4px; }
.segmented { display: inline-flex; align-items: center; gap: 3px; flex: none; padding: 3px; border: 1px solid var(--line); background: #14161b; border-radius: 6px; }
.segmented a { font-size: .8125rem; color: var(--muted); font-weight: 650; padding: 7px 11px; border-radius: 4px; white-space: nowrap; }
.segmented a:hover { color: var(--text); }
.segmented a.chosen { color: var(--violet); background: #2e2442; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.stat { padding: 14px 16px 15px; min-width: 0; }
.stat-top { color: #c3c5ce; font-size: .875rem; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.stat-icon, .alert-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 6px; color: var(--violet); background: #2c2240; }
.stat-icon svg, .alert-icon svg { width: 18px; height: 18px; }
.stat-icon.clock { background: #302c16; color: #f3df51; }
.stat-icon.alerts, .alert-icon { background: #382228; color: var(--red); }
.stat-icon.wheel { background: #1d3330; color: #83e0b3; }
.stat strong { display: block; margin: 7px 0 4px; font-size: clamp(1.4rem, 2.5vw, 2.05rem); line-height: 1.13; letter-spacing: -.055em; }
.stat small { color: var(--muted); font-size: .78rem; }
.panels { display: grid; grid-template-columns: minmax(0, 1.68fr) minmax(0, 1fr); gap: 15px; margin-top: 16px; }
.chart-panel, .alert-panel { padding: 18px; min-width: 0; }
.chart-key { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.chart-key i { background: var(--yellow); width: 8px; height: 8px; border-radius: 2px; }
.chart { --plot-height: 145px; display: flex; gap: 9px; margin-top: 20px; height: calc(var(--plot-height) + 24px); }
.chart-scale { color: var(--muted); flex: none; min-width: 34px; text-align: right; display: flex; flex-direction: column; justify-content: space-between; font-size: .72rem; height: calc(var(--plot-height) + 14px); transform: translateY(-7px); }
.chart-bars { display: flex; flex: 1; min-width: 0; }
.bar-column { flex: 1; position: relative; min-width: 0; }
.bar-area { height: var(--plot-height); display: flex; align-items: end; justify-content: center; background: repeating-linear-gradient(to top, var(--line) 0, var(--line) 1px, transparent 1px, transparent 25%); border-top: 1px solid var(--line); }
.bar { width: 57%; max-width: 38px; display: block; border-radius: 3px 3px 0 0; background: linear-gradient(180deg,#e6d21e,#766815); }
.bar.current, .bar-column:hover .bar { background: var(--yellow); }
.bar-label { display: block; padding: 7px 0 0; text-align: center; font-size: .72rem; color: var(--muted); white-space: nowrap; }
.chart-totals { display: flex; flex-wrap: wrap; gap: 5px 17px; margin-top: 9px; color: var(--muted); font-size: .8125rem; }
.chart-totals strong { color: var(--text); margin-left: 4px; }
.alert-list { padding: 0; list-style: none; margin: 8px 0 12px; }
.alert-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.alert-list strong { font-size: .875rem; display: block; line-height: 1.3; }
.alert-list small { display: block; color: var(--muted); margin-top: 3px; font-size: .78rem; }
.text-link { color: var(--yellow); font-weight: 680; font-size: .875rem; }
.text-link:hover, .auth-links a:hover { text-decoration: underline; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 16px clamp(18px, 3vw, 42px); gap: 8px; color: var(--muted); border-top: 1px solid var(--line); font-size: .75rem; }
.page-heading { margin: 7px 0 23px; }
.page-heading h1, .auth-panel h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -.05em; line-height: 1.12; }
.page-heading p, .auth-panel p, .form-panel p { color: var(--muted); margin-top: 8px; }
.list-panel { padding: 18px; }
.search { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; margin-bottom: 18px; }
.search label { flex: 0 0 100%; font-size: .875rem; font-weight: 650; }
.search input { max-width: 340px; flex: 1; min-width: 135px; }
.table-scroll { overflow: auto; max-width:100%; min-width:0; overscroll-behavior-x:contain; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: .9rem; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .8125rem; }
.empty { color: var(--muted); white-space: normal; }
.kind { display: inline-block; padding: 5px 8px; border-radius: 4px; background: #2c2240; color: var(--violet); font-size: .8125rem; }
.kind.drive { background: #302c16; color: #f3df51; }
.kind.rest { background: #1d3330; color: #83e0b3; }
.pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; color: var(--muted); font-size: .875rem; }
.auth-wrap { display: grid; place-items: start center; padding-top: clamp(0px, 4vh, 44px); }
.auth-panel, .form-panel { padding: clamp(18px, 3vw, 29px); width: 100%; }
.auth-panel { max-width: 510px; }
.form-panel { max-width: 740px; }
.form-panel > a { display: inline-block; margin-top: 12px; }
.form-panel > form { margin-top: 16px; }
.stack { display: grid; gap: 13px; margin-top: 20px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .875rem; font-weight: 670; }
.required { color: var(--red); }
input:not([type=hidden]), textarea, select { min-height: 40px; border: 1px solid #424551; background: #101217; color: var(--text); border-radius: 5px; padding: 8px 10px; width: 100%; }
textarea { resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 17px center, right 12px center; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.password { position: relative; }
.password input { padding-right: 50px; }
.password .reveal { position: absolute; right: 3px; top: 2px; }
.auth-panel .hint { font-size: .8125rem; margin-top: -6px; }
.auth-panel .button { margin-top: 4px; }
.auth-links { margin-top: 17px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; color: var(--violet); font-size: .875rem; }
.notice { border: 1px solid #38574b; background: #21342c; margin-top: 11px; border-radius: 5px; padding: 9px 11px; color: #baf2d4; font-size: .875rem; }
.notice.error { border-color: #66353a; background: #352124; color: #ffb0b4; }
code { color: var(--violet); }
@media (max-width: 1120px) {
  :root { --nav-width: 208px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .shell { display: flex; flex-direction: column; }
  .sidebar { display: none; order: 0; position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 18px; }
  .sidebar.open { display: flex; }
  .sidebar nav { margin-top: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar-footer { display: none; }
  .menu-button { display: inline-grid; }
  .topbar { height: 59px; }
  .workspace { flex: 1; }
}
@media (max-width: 590px) {
  .panels { grid-template-columns: 1fr; }
  .hero { min-height: 279px; background-position: 62% center; background-image: linear-gradient(90deg,#0c0b08 0%, #0c0b08cf 46%, #0c0b0830 100%), url("/static/truck.webp"); }
  .hero h1 { font-size: clamp(2.25rem, 10vw, 3.25rem); }
  .stat { padding: 11px; }
  .stats { gap: 8px; }
  .stat-top { font-size: .8125rem; }
  .mode { display: none; }
  .location, .top-actions { gap: 5px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .chart-panel, .alert-panel { padding: 13px; }
}
/* Authentication, period selection and administration */
.period-controls { display:flex; align-items:flex-end; justify-content:flex-end; flex-wrap:nowrap; gap:12px; flex-shrink:0; }
.period-controls .segmented { padding:0; min-height:40px; }
.period-controls .segmented a { display:flex; align-items:center; min-height:38px; padding:8px 14px; }
.week-control { display:grid; gap:5px; min-width:0; }
.week-control label { color:var(--muted); font-size:.8125rem; }
.week-control > div { display:flex; gap:7px; }
.week-control input { min-width:180px; }
.period-caption { margin:-10px 0 18px; color:var(--violet); }
.section-heading, .page-heading { flex-wrap:wrap; }
.auth-screen .shell { display:block; }
.auth-screen .sidebar { display:none; }
.auth-screen .topbar .menu-button, .auth-screen .top-actions { display:none; }
.auth-screen .workspace { min-height:100dvh; background:radial-gradient(ellipse at 15% 30%,#322c1444,transparent 55%),var(--canvas); }
.auth-screen .topbar::after { content:'ТАХОКОНТРОЛЬ'; color:var(--yellow); font-weight:850; letter-spacing:.08em; font-size:.85rem; }
.auth-screen .auth-wrap { padding:16px 0 30px; }
.auth-tabs { display:flex; gap:5px; background:#101217; padding:5px; border:1px solid var(--line); border-radius:7px; margin-bottom:24px; }
.auth-tabs a { flex:1; text-align:center; padding:11px; border-radius:4px; font-size:.9rem; font-weight:700; color:var(--muted); }
.auth-tabs a.chosen { background:#302440; color:var(--violet); }
.auth-panel { max-width:550px; }
.auth-panel .stack > .button { width:100%; min-height:46px; }
.captcha-block { border:1px solid #776b30; background:#232115; border-radius:7px; padding:14px; min-width:0; margin:4px 0; display:grid; gap:12px; }
.captcha-block legend { color:var(--yellow); font-size:.9rem; font-weight:750; padding:0 7px; }
.auth-panel .captcha-block p { font-size:.8125rem; margin:0; }
.captcha-picture { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.captcha-picture img { max-width:100%; height:auto; border-radius:4px; border:1px solid #b1a46c; }
.captcha-block input { text-transform:uppercase; letter-spacing:.2em; font-weight:700; }
.captcha-block .hint { margin:0; color:var(--muted); line-height:1.5; }
.admin-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-bottom:22px; }
.admin-summary .stat { padding:22px; }
.admin-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:20px; align-items:stretch; }
.admin-grid > .form-panel { max-width:none; display:grid; grid-template-rows:subgrid; grid-row:span 3; row-gap:12px; }
.admin-grid > .form-panel > p { margin-top:0; }
.admin-grid .stack { display:flex; flex-direction:column; gap:13px; margin-top:4px; }
.admin-grid .stack > .button { margin-top:auto; }
.hint { color:var(--muted); font-size:.8125rem; line-height:1.6; }
@media(max-width:1120px) { .brand { font-size:12px; gap:8px; padding:0; } .brand small { font-size:9px; max-width:128px; } .brand-icon { width:32px; height:36px; } .admin-grid { grid-template-columns:1fr; } }
@media(max-width:590px) { .period-controls { justify-content:flex-start; width:100%; } .week-control { width:100%; } .week-control input { min-width:0; } .admin-summary { grid-template-columns:1fr; } .auth-screen .topbar { padding:0 18px; } .auth-screen .location { font-size:.8rem; } .auth-screen .topbar::after { font-size:.7rem; } }
/* Full workflow screens */
.toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:18px 0; }
.report-filters { display:flex; align-items:end; flex-wrap:wrap; gap:12px; margin:16px 0 22px; }
.report-filters .field { min-width:220px; max-width:360px; flex:1; }
.report-filters .text-link { padding:10px 0; }
.detail-panel { padding:24px; margin:18px 0; min-width:0; }
.detail-panel > p { margin-top:12px; line-height:1.65; }
.detail-panel .chart { margin-top:24px; }
.detail-grid, .rules-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; align-items:start; margin-top:20px; }
.detail-grid > .panel, .rules-grid > .panel { margin:0; }
.details { display:grid; grid-template-columns:minmax(140px,.8fr) 1.2fr; gap:16px; font-size:.9rem; margin-top:25px; }
.details dt { color:var(--muted); }
.details dd { margin:0; overflow-wrap:anywhere; }
.badge { display:inline-block; white-space:nowrap; border:1px solid #4d4362; background:#2b2339; border-radius:5px; padding:6px 9px; font-size:.78rem; color:var(--violet); }
.badge.new { color:#ffc2a0; background:#382b20; border-color:#6e4932; }
.badge.review { color:#e3d79d; background:#302d20; border-color:#615831; }
.badge.resolved, .badge.active { color:#a4e7c5; background:#21362c; border-color:#365e49; }
.badge.archived { color:#b3b4bd; background:#272932; border-color:#444754; }
.alert-card { padding:24px; margin:16px 0; }
.alert-card > p { margin-top:14px; font-size:.9rem; color:var(--muted); }
.review-form { display:flex; align-items:end; flex-wrap:wrap; gap:12px; margin-top:20px; padding-top:18px; border-top:1px solid var(--line); }
.review-form .field:first-of-type { min-width:150px; }
.review-form .field:nth-of-type(2) { min-width:220px; flex:1; }
.audit-table td:last-child { white-space:normal; min-width:240px; max-width:600px; overflow-wrap:anywhere; }
.list-panel h2 { margin:5px 10px 18px; }
.sidebar nav { margin-top:30px; gap:4px; }
@media(max-width:1000px) { .detail-grid, .rules-grid { grid-template-columns:1fr; } }
@media(max-width:590px) { .detail-panel, .alert-card { padding:18px; } .details { grid-template-columns:1fr; gap:6px; } .details dd { margin-bottom:12px; } .alert-card .panel-heading { align-items:start; flex-direction:column; } .review-form .field { width:100%; } }
@media print { :root { color-scheme:light; } body { background:white; color:#111; } .sidebar, .topbar, .no-print, .period-controls, .report-filters, .toolbar, .footer { display:none !important; } .shell { display:block; } main { padding:0; max-width:none; } .panel, .stat { background:white; color:#111; border:1px solid #bbb; break-inside:avoid; } .panel p, th, .hint { color:#444; } td,th { border-bottom:1px solid #ccc; font-size:10pt; } .table-scroll { overflow:visible; } table { white-space:normal; } .page-heading h1 { font-size:24pt; } }
/* Layout follows the available viewport; wide tables scroll inside their panel. */
.panel, .field, .password, .stack, .hero-content, .panel-heading > div, .page-heading > div, .section-heading > div { min-width:0; }
input:not([type=hidden]), textarea, select { min-width:0; max-width:100%; }
.page-heading h1, .location, .stat strong, .panel h2, .hero p, .notice { overflow-wrap:anywhere; }
.topbar { min-height:70px; height:auto; padding-top:12px; padding-bottom:12px; }
.account { max-width:240px; }
.nav-backdrop { display:none; }
.sidebar-close { display:none; }
.coverage-formula { color:var(--yellow); padding:12px 14px; border-left:2px solid var(--yellow); background:#242113; border-radius:4px; font-size:.9rem; }
@media screen and (max-width:1100px) {
  .shell { display:block; }
  .workspace { min-height:100dvh; }
  .sidebar { display:none; position:fixed; inset:0 auto 0 0; width:min(280px,calc(100vw - 48px)); height:100dvh; z-index:50; padding:22px 16px; border-right:1px solid var(--line); border-bottom:0; box-shadow:12px 0 40px #0008; }
  .sidebar.open { display:flex; }
  .sidebar-close { display:inline-grid; position:absolute; top:8px; right:6px; font-size:26px; }
  .sidebar .brand { margin-top:20px; }
  .sidebar .brand { font-size:14px; gap:11px; padding:0 5px; }
  .sidebar .brand small { font-size:10px; max-width:none; }
  .sidebar .brand-icon { width:39px; height:39px; }
  .sidebar nav { grid-template-columns:minmax(0,1fr); margin-top:28px; }
  .sidebar-footer { display:flex; margin-top:24px; }
  .nav-backdrop:not([hidden]) { display:block; position:fixed; inset:0; z-index:40; background:#0009; border:0; padding:0; cursor:pointer; }
  .menu-open { overflow:hidden; }
  .menu-button { display:inline-grid; flex:none; }
  .topbar { min-height:64px; }
  .panels, .detail-grid, .rules-grid { grid-template-columns:minmax(0,1fr); }
  .admin-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media screen and (max-width:760px) {
  .topbar { flex-wrap:wrap; gap:8px; padding-left:18px; padding-right:18px; }
  .location { flex:1; }
  .top-actions { margin-left:auto; max-width:100%; }
  .mode { display:none; }
  .account { max-width:190px; }
  .section-heading, .page-heading { align-items:flex-start; flex-direction:column; }
  .period-controls { width:100%; justify-content:flex-start; flex-shrink:1; }
  .week-control { flex:1; max-width:360px; }
  .week-control input { min-width:0; flex:1; }
  .week-control > div { min-width:0; }
  .admin-grid { grid-template-columns:minmax(0,1fr); }
  .admin-grid > .form-panel { display:block; grid-row:auto; }
  .admin-grid > .form-panel > p { margin-top:8px; }
  .admin-grid .stack { margin-top:16px; }
  .report-filters .field { min-width:0; flex-basis:220px; max-width:none; }
  .review-form .field:first-of-type, .review-form .field:nth-of-type(2) { min-width:0; flex:1 1 220px; }
  .hero { min-height:260px; background-position:60% center; }
  .chart { --plot-height:160px; }
}
@media screen and (max-width:440px) {
  main { padding:18px 14px 28px; }
  .location { font-size:.85rem; }
  .account { max-width:145px; font-size:.75rem; }
  .top-actions { gap:4px; }
  .stat strong { font-size:1.35rem; }
  .stat-top { flex-wrap:wrap; font-size:.8rem; }
  .stats { gap:10px; }
  .hero { padding:24px 18px; }
  .hero h1 { font-size:2.45rem; }
  .hero .eyebrow { font-size:.65rem; letter-spacing:.08em; }
  .hero h1 + p { max-width:230px; }
  .period-controls { gap:8px; }
  .period-controls .segmented a { padding-left:10px; padding-right:10px; }
  .week-control .button { padding-left:10px; padding-right:10px; }
  .list-panel, .detail-panel, .alert-card { padding:14px; }
  .toolbar .button { flex:1 1 auto; }
  .auth-panel { padding:18px; }
  .auth-screen .topbar::after { font-size:.65rem; }
  .details { grid-template-columns:1fr; }
}
@media print { .nav-backdrop { display:none !important; } }
