@charset "UTF-8";

:root {
  color-scheme: light;
  --canvas: #f5f6f1;
  --surface: #ffffff;
  --ink: #263126;
  --muted: #697166;
  --olive: #354c2d;
  --olive-dark: #263726;
  --lime: #d9e9a8;
  --line: #e3e7dc;
  --soft: #eef2e7;
  --danger: #a03630;
  --radius: 16px;
  --sidebar-width: 248px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
input, select, textarea { max-width: 100%; }
textarea { resize: vertical; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--olive); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; }
h1 { margin-bottom: 12px; font-size: clamp(1.85rem, 2.8vw, 2.5rem); font-weight: 650; letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { margin-bottom: 0; font-size: 1.15rem; font-weight: 650; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
ul, ol { padding-left: 1.3rem; }
::selection { color: var(--olive-dark); background: var(--lime); }
:focus-visible { outline: 3px solid #7e983e; outline-offset: 4px; }
[hidden] { display: none; }
.icon { flex: 0 0 auto; vertical-align: middle; }
.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; top: 12px; left: 12px; z-index: 100; padding: 12px 20px; background: var(--surface); border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.muted { color: var(--muted); }
.unit { font-size: .8rem; font-weight: 400; color: var(--muted); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: .67rem; font-weight: 750; letter-spacing: .16em; line-height: 1.5; }
.heading-dot { color: #7c943e; }

/* Navigation and workspace */
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 35px 20px 20px; color: #e8eee0; background: var(--olive-dark); overflow-y: auto; }
.brand { display: flex; width: fit-content; flex-direction: column; padding-left: 14px; color: #fff; }
.brand-logo { display: block; width: 150px; max-width: 100%; height: auto; flex-shrink: 0; }
.brand-product { margin-top: 12px; font-size: .71rem; font-weight: 600; letter-spacing: .27em; }
.mobile-brand .brand-logo, .login-mobile-brand .brand-logo, .standalone-brand .brand-logo, .print-brand .brand-logo { filter: brightness(0); }
.sidebar-caption { margin: 53px 14px 14px; font-size: .61rem; letter-spacing: .14em; color: #aab7a2; font-weight: 600; }
.desktop-nav { display: grid; gap: 7px; }
.nav-link { display: flex; align-items: center; min-height: 49px; padding: 12px 14px; gap: 13px; border-radius: 9px; color: #ccd6c7; font-size: .91rem; font-weight: 550; transition: background-color 150ms ease, color 150ms ease; }
.nav-link:hover { background: #354732; color: #fff; }
.nav-link.is-active { color: #263726; background: var(--lime); }
.nav-link .icon { width: 19px; height: 19px; }
.sidebar-bottom { margin-top: auto; padding-top: 42px; }
.sidebar-note { margin: 0 14px 34px; }
.small-leaf { display: grid; width: 28px; height: 35px; place-items: center; border: 1px solid #697e4e; border-radius: 24px 4px 24px 4px; font-size: 1.1rem; color: var(--lime); }
.sidebar-note p { margin: 13px 0 0; font-size: .8rem; line-height: 1.65; color: #b6c3ae; }
.user-card { display: flex; gap: 11px; align-items: center; padding: 19px 8px 8px; border-top: 1px solid #43513c; }
.avatar { display: grid; place-items: center; width: 37px; height: 37px; flex-shrink: 0; border: 1px solid #637254; border-radius: 50%; background: #3c4d34; color: #e1eacb; font-size: .91rem; font-weight: 650; }
.user-copy { min-width: 0; }
.user-copy strong { display: block; color: #f2f5ec; font-size: .85rem; overflow-wrap: anywhere; }
.user-copy span { font-size: .72rem; color: #b4c1aa; }
.workspace { margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 20; height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; border-bottom: 1px solid var(--line); background: #fff; gap: 16px; }
.topbar-context { display: flex; gap: 13px; align-items: center; color: var(--muted); font-size: .75rem; }
.context-dot { width: 7px; height: 7px; background: #71864b; border-radius: 50%; }
.topbar-divider { color: #aeb7a6; }
.topbar-meta { display: flex; align-items: center; gap: 20px; margin-left: auto; font-size: .78rem; color: var(--muted); }
.header-logout { flex-shrink: 0; }
.header-logout button { white-space: nowrap; }
.role-chip { display: inline-flex; min-height: 30px; align-items: center; padding: 3px 11px; color: #536344; border: 1px solid var(--line); border-radius: 6px; font-size: .73rem; }
.main-content { max-width: 1660px; margin: 0 auto; padding: 38px 40px 0; }
.mobile-brand, .mobile-nav { display: none; }
.page-heading { display: flex; gap: 24px; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.page-description { max-width: 680px; margin-bottom: 0; color: var(--muted); font-size: .9rem; line-height: 1.7; }
.heading-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.page-footer { display: flex; justify-content: space-between; margin-top: 45px; padding: 22px 0 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .71rem; }
.role-worklists { display: grid; gap: 24px; margin-top: 24px; }

/* Shared controls and feedback */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; gap: 9px; padding: 11px 17px; border: 1px solid transparent; border-radius: 8px; font-size: .84rem; font-weight: 600; line-height: 1.4; text-align: center; transition: background-color 150ms ease, border-color 150ms ease; }
.button-primary { background: var(--olive); color: #fff; border-color: var(--olive); }
.button-primary:hover { background: #263d21; border-color: #263d21; }
.button-secondary { background: #fff; color: var(--ink); border-color: #dbe1d4; }
.button-secondary:hover { background: #f0f3e9; border-color: #bfcab1; }
.button-quiet { color: var(--muted); background: transparent; }
.button-quiet:hover { background: var(--soft); color: var(--ink); }
.button-danger { background: #fff2ef; color: var(--danger); border-color: #e9c8c0; }
.button-danger:hover { background: #ffe8e2; }
.button:disabled { color: #70756b; background: #edf0e8; border-color: #e0e5d9; }
.button-small { min-height: 44px; padding: 9px 12px; font-size: .77rem; }
.button .icon { width: 18px; height: 18px; }
.icon-button { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid transparent; background: transparent; color: #60714e; }
.icon-button:hover { background: var(--soft); }
.text-link { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; color: var(--olive); font-size: .78rem; font-weight: 600; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-link .icon { width: 17px; height: 17px; }
.back-link { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; margin-bottom: 15px; color: var(--muted); font-size: .8rem; }
.back-link:hover { color: var(--olive); }
.back-link .icon { width: 17px; height: 17px; }
.demo-notice { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 23px; padding: 12px 16px; background: #fbf5de; border: 1px solid #e5d99f; border-radius: 8px; color: #6c561b; font-size: .8rem; }
.messages { display: grid; gap: 10px; margin-bottom: 23px; }
.message { display: flex; align-items: flex-start; gap: 10px; padding: 15px 18px; border: 1px solid #c6d7b8; border-radius: 9px; background: #edf5e8; color: #354e27; font-size: .88rem; }
.message-error { color: #8d302b; background: #fff0ec; border-color: #eac7bf; }
.message-warning { color: #6c561b; background: #fbf5de; border-color: #e5d99f; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 5px; font-size: .67rem; font-weight: 650; line-height: 1.3; white-space: nowrap; }
.status-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-waiting { background: #fcf2d8; color: #82621c; }
.status-processing { background: #e9effa; color: #3e5c90; }
.status-ready, .status-available { background: #eaf1e0; color: #4c672c; }
.status-custody { background: #f0eafb; color: #70518c; }
.status-cancelled { background: #f6eae7; color: #915048; }
.carry-tag { display: inline-block; margin-left: 5px; padding: 2px 5px; border-radius: 4px; color: #876222; background: #faf0d9; font-size: .64rem; font-weight: 600; vertical-align: middle; }

/* Overview */
.overview-stats { display: grid; grid-template-columns: 1.18fr repeat(3, 1fr); gap: 17px; margin-bottom: 26px; }
.stat-card { min-width: 0; padding: 21px 21px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .79rem; color: var(--muted); }
.stat-top .icon { width: 19px; height: 19px; color: #728360; }
.stat-value { margin: 18px 0 12px; font-size: clamp(1.7rem, 2.8vw, 2.4rem); line-height: 1; letter-spacing: -.05em; font-weight: 620; font-variant-numeric: tabular-nums; }
.stat-value span { margin-left: 7px; font-size: .78rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.stat-foot { display: flex; align-items: center; gap: 8px; min-height: 28px; color: var(--muted); font-size: .69rem; }
a.stat-foot { min-height: 44px; margin-top: -8px; margin-bottom: -8px; }
a.stat-foot:hover { color: var(--olive); }
.stat-foot .icon { width: 14px; height: 14px; }
.stat-card-featured { background: #e7edda; border-color: #d7e1c6; }
.stat-card-featured .stat-top, .stat-card-featured .stat-value span, .stat-card-featured .stat-foot { color: #586c3e; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 24px; }
.dashboard-primary, .dashboard-secondary { display: grid; gap: 24px; align-content: start; min-width: 0; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 23px 24px; }
.panel-heading .eyebrow { margin-bottom: 6px; font-size: .6rem; }
.panel-heading > .icon { color: #7c8e69; }
.subtle-label { color: var(--muted); font-size: .72rem; }
.line-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 0 24px 24px; }
.line-card { display: flex; flex-direction: column; padding: 20px; min-height: 213px; border: 1px solid #e3e8dc; border-radius: 10px; background: #f9faf6; }
.line-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.line-number { font-size: 1.9rem; color: #83936d; line-height: 1; font-weight: 400; letter-spacing: -.06em; }
.line-card h3 { margin-bottom: 9px; font-size: .92rem; }
.line-busy { background: #fcfdf9; border-color: #dbe3cf; }
.line-customer { display: flex; justify-content: space-between; gap: 7px; min-height: 44px; align-items: center; font-weight: 600; font-size: .85rem; }
.line-customer:hover { color: var(--olive); }
.line-customer .icon { width: 15px; height: 15px; }
.line-data { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .69rem; color: var(--muted); }
.line-data strong { color: var(--ink); font-weight: 600; font-size: .84rem; white-space: nowrap; }
.line-idle { margin-bottom: 6px; color: var(--muted); font-size: .8rem; }
.line-foot { margin-top: auto; margin-bottom: 0; padding-top: 15px; color: var(--muted); font-size: .68rem; }
.line-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; color: #576b3f; }
.line-link .icon { width: 15px; height: 15px; }
.oil-summary { padding: 24px; border: 1px solid #dae3c7; border-radius: var(--radius); background: #edf2e3; }
.oil-summary-heading { display: flex; gap: 10px; align-items: center; margin-bottom: 24px; }
.oil-summary-heading .icon { width: 19px; height: 19px; color: #5f753e; }
.oil-summary-heading h2 { font-size: 1rem; }
.oil-figure { padding-bottom: 20px; }
.oil-figure + .oil-figure { padding-top: 17px; border-top: 1px solid #d6dfc9; }
.oil-figure > span { display: block; margin-bottom: 7px; font-size: .76rem; color: #61704f; }
.oil-figure > strong { font-size: 1.8rem; font-weight: 600; line-height: 1.2; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.oil-figure small { font-size: .8rem; font-weight: 400; color: #647153; letter-spacing: 0; }
.oil-summary .text-link { margin-bottom: -10px; font-size: .72rem; }
.event-list { list-style: none; margin: 0; padding: 0 24px 6px; }
.event-list li { position: relative; display: flex; gap: 13px; padding-bottom: 24px; }
.event-list li:not(:last-child)::before { content: ""; position: absolute; top: 10px; bottom: 0; left: 4px; border-left: 1px solid var(--line); }
.event-marker { position: relative; width: 9px; height: 9px; flex-shrink: 0; margin-top: 5px; border: 2px solid #9eaf84; border-radius: 50%; background: #fff; }
.event-content { min-width: 0; }
.event-content strong { display: block; font-size: .78rem; font-weight: 600; }
.event-content p { margin: 6px 0; color: var(--muted); font-size: .73rem; overflow-wrap: anywhere; }
.event-meta { display: block; margin-top: 6px; color: var(--muted); font-size: .65rem; line-height: 1.6; }
.section-empty { padding: 0 24px 20px; color: var(--muted); font-size: .82rem; }

/* Tables, searching and pagination */
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .81rem; }
.data-table thead { color: var(--muted); background: #fafbf7; }
.data-table th { padding: 13px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .66rem; font-weight: 550; white-space: nowrap; }
.data-table td { padding: 16px 20px; border-bottom: 1px solid #eef0e9; vertical-align: middle; }
.data-table th:first-child, .data-table td:first-child { padding-left: 24px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 24px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fdfefb; }
.reference-link { display: inline-flex; align-items: center; min-height: 44px; margin: -7px 0 -2px; font-size: .76rem; font-weight: 650; white-space: nowrap; }
.customer-link { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; font-size: .81rem; font-weight: 600; }
.reference-link:hover, .customer-link:hover { color: #557137; text-decoration: underline; text-underline-offset: 3px; }
.cell-secondary { display: block; margin-top: 4px; color: var(--muted); font-size: .66rem; line-height: 1.6; }
.weight-cell { font-weight: 650; }
.data-table .row-action { width: 58px; padding-left: 0; }
.table-avatar { display: grid; place-items: center; flex-shrink: 0; width: 35px; height: 35px; background: #edf1e4; color: #64764a; border: 1px solid #e1e8d4; border-radius: 50%; font-size: .83rem; }
.phone-link { display: inline-flex; min-height: 44px; align-items: center; white-space: nowrap; }
.phone-link:hover { text-decoration: underline; }
.custody-value { display: inline-flex; padding: 5px 8px; gap: 4px; color: #68518b; background: #f3eefa; border-radius: 5px; }
.filter-bar { display: flex; align-items: center; gap: 12px; padding: 20px 24px; }
.search-field { position: relative; flex: 1; min-width: 140px; }
.search-field > .icon { position: absolute; top: 50%; left: 14px; width: 18px; height: 18px; transform: translateY(-50%); color: #7c8870; pointer-events: none; }
.search-field input { width: 100%; min-height: 46px; padding: 11px 13px 11px 41px; border: 1px solid #dce2d4; border-radius: 8px; background: #fcfdf9; font-size: .81rem; color: var(--ink); }
.search-field input::placeholder { color: #778170; opacity: 1; }
.filter-select select { min-height: 46px; min-width: 168px; padding: 10px 32px 10px 13px; border: 1px solid #dce2d4; border-radius: 8px; background: #fff; font-size: .81rem; color: var(--ink); }
.filter-checkbox { display: flex; min-height: 46px; align-items: center; gap: 9px; padding: 8px 4px; color: #5d6854; font-size: .8rem; cursor: pointer; white-space: nowrap; }
.filter-checkbox input { width: 19px; height: 19px; margin: 0; }
.pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 24px; border-top: 1px solid var(--line); }
.pagination-summary { color: var(--muted); font-size: .72rem; }
.pagination-controls { display: flex; align-items: center; gap: 10px; }
.page-count { min-width: 48px; text-align: center; color: var(--muted); font-size: .77rem; }
.page-count strong { color: var(--ink); }
.empty-state { padding: 52px 24px; text-align: center; }
.empty-state > .icon { width: 32px; height: 32px; color: #819364; margin-bottom: 17px; }
.empty-state h3 { margin-bottom: 9px; font-size: 1rem; font-weight: 600; }
.empty-state p { max-width: 370px; margin: 0 auto 19px; font-size: .82rem; line-height: 1.7; color: var(--muted); }
.empty-state-small { padding-top: 24px; padding-bottom: 28px; }

/* Forms */
.form-page { max-width: 880px; margin: 0 auto; }
.form-panel { padding: 28px 32px 0; }
.form-intro { display: flex; gap: 15px; align-items: center; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid var(--line); }
.form-step { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #dee7ce; background: #f0f4e8; border-radius: 10px; color: #607a3d; flex-shrink: 0; }
.form-intro h2 { font-size: 1rem; }
.form-intro p { margin: 6px 0 0; font-size: .76rem; color: var(--muted); }
.form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 22px; }
.form-field { min-width: 0; }
.form-field:has(textarea), .form-field:has(select[multiple]), .form-field[data-field="customer"], .form-field[data-field="password1"], .form-field[data-field="password2"], .form-field[data-field="roles"], .form-field[data-field="parent"] { grid-column: 1 / -1; }
.form-field > label, .cancel-panel label { display: flex; gap: 5px; align-items: baseline; margin-bottom: 8px; color: #35422d; font-size: .83rem; font-weight: 600; }
.required-mark { color: #996424; margin-left: 2px; }
.optional-label { margin-left: auto; color: #77806f; font-size: .65rem; font-weight: 400; }
.form-field input:not([type="checkbox"]):not([type="radio"]), .form-field select, .form-field textarea, .cancel-panel textarea { display: block; width: 100%; min-height: 49px; padding: 12px 13px; border: 1px solid #cfd8c5; border-radius: 8px; background: #fff; color: var(--ink); font-size: 1rem; line-height: 1.4; transition: border-color 150ms ease; }
.form-field textarea { min-height: 107px; }
.form-field input:hover, .form-field textarea:hover, .form-field select:hover { border-color: #a3b48f; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus, .search-field input:focus, .filter-select select:focus { border-color: #648148; outline: 3px solid #e5ecd9; outline-offset: 1px; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #7d8575; opacity: 1; }
.form-field input[readonly] { background: #f5f7f0; color: var(--muted); }
.field-help { margin-top: 7px; color: var(--muted); font-size: .72rem; line-height: 1.7; }
.field-help ul { margin: 6px 0 0; padding-left: 18px; }
.field-help a { text-decoration: underline; text-underline-offset: 3px; }
.field-error { margin-top: 7px; color: var(--danger); font-size: .78rem; line-height: 1.5; }
.field-error p { margin: 3px 0 0; }
.has-error input:not([type="checkbox"]):not([type="radio"]), .has-error select, .has-error textarea { border-color: #bd5f52; background: #fffbf9; }
.form-errors { margin-bottom: 23px; padding: 15px 18px; color: #943b31; background: #fff1ec; border: 1px solid #e9c6bb; border-radius: 8px; font-size: .82rem; }
.form-errors strong { display: block; margin-bottom: 6px; }
.form-errors ul { margin: 0; }
.checkbox-field { display: flex; flex-direction: column; justify-content: center; }
.checkbox-control { display: flex; align-items: center; gap: 10px; min-height: 49px; }
.checkbox-control input, .form-field input[type="checkbox"], .form-field input[type="radio"] { width: 20px; height: 20px; margin: 0 8px 0 0; vertical-align: middle; flex-shrink: 0; }
.checkbox-control label { display: flex; align-items: center; min-height: 44px; font-size: .87rem; cursor: pointer; }
.checkbox-group { margin: 0; padding: 0; border: 0; }
.checkbox-group legend { margin-bottom: 9px; padding: 0; font-size: .83rem; font-weight: 600; }
.checkbox-group label { display: flex; align-items: center; min-height: 44px; font-size: .87rem; cursor: pointer; }
.form-field > div[id] > div > label { display: flex; min-height: 44px; align-items: center; font-size: .88rem; cursor: pointer; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 28px; padding: 22px 0; border-top: 1px solid var(--line); }
.panel-form { padding: 0 24px; }
.section-description { margin-bottom: 23px; color: var(--muted); font-size: .83rem; line-height: 1.7; }
.panel-body { padding: 0 24px 24px; }

/* Customer, batch and movement records */
.customer-detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin-bottom: 24px; }
.contact-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin: 0; padding: 0 24px 24px; }
.contact-list dt { display: flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--muted); }
.contact-list dt .icon { width: 16px; height: 16px; }
.contact-list dd { margin: 10px 0 0; font-size: .9rem; font-weight: 550; overflow-wrap: anywhere; }
.contact-list dd a { display: inline-flex; align-items: center; min-height: 44px; margin: -9px 0; }
.customer-notes { margin: 0 24px; padding: 20px 0 24px; border-top: 1px solid var(--line); }
.customer-notes h3 { margin-bottom: 9px; font-size: .78rem; }
.prose-note { font-size: .81rem; line-height: 1.75; color: var(--muted); overflow-wrap: anywhere; }
.customer-totals { display: grid; gap: 12px; }
.compact-stat { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 24px; border: 1px solid var(--line); background: #fff; border-radius: 12px; }
.compact-stat > span { font-size: .83rem; color: var(--muted); }
.compact-stat strong { font-size: 1.5rem; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.compact-stat small { font-size: .75rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.compact-stat-olive { background: #edf2e3; border-color: #d8e2c7; }
.batch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 295px; gap: 24px; align-items: start; }
.batch-main, .batch-aside { display: grid; gap: 24px; min-width: 0; }
.title-with-status { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 12px; }
.title-with-status h1 { margin: 0; }
.batch-customer { display: flex; gap: 13px; align-items: center; margin: 0 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.avatar-light { background: #edf2e2; border-color: #d8e2c7; color: #637a45; }
.batch-customer > div { min-width: 0; }
.batch-customer a { display: inline-flex; min-height: 44px; align-items: center; font-size: .98rem; font-weight: 600; }
.batch-customer span:not(.avatar) { display: block; font-size: .76rem; color: var(--muted); overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 26px 24px; }
.detail-grid dt { margin-bottom: 7px; font-size: .75rem; color: var(--muted); }
.detail-grid dd { margin: 0; font-size: .92rem; font-weight: 550; overflow-wrap: anywhere; }
.detail-grid .detail-weight dd { font-size: 1.6rem; font-weight: 600; letter-spacing: -.04em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.detail-weight dd span { font-size: .8rem; color: var(--muted); letter-spacing: 0; font-weight: 400; }
.note-block { padding: 20px 24px; border-top: 1px solid var(--line); }
.note-block h3 { margin-bottom: 9px; font-size: .76rem; }
.note-block p { margin-bottom: 0; color: var(--muted); font-size: .83rem; line-height: 1.75; overflow-wrap: anywhere; }
.action-panel { border-color: #cfdcbc; }
.start-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.start-lines form { display: flex; flex-direction: column; gap: 18px; padding: 17px; border: 1px solid #e0e7d7; border-radius: 9px; background: #fcfdf9; }
.start-line-copy { display: grid; gap: 6px; }
.start-line-copy strong { font-size: .9rem; }
.start-line-copy span { font-size: .76rem; color: var(--muted); }
.start-lines .button { margin-top: auto; }
.movement-balance { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0 24px 26px; padding: 20px; border-radius: 8px; background: #f1f5e9; }
.movement-balance span { display: block; margin-bottom: 7px; font-size: .73rem; color: #61724f; }
.movement-balance strong { display: block; font-size: 1.5rem; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.movement-balance small { font-size: .75rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.movement-list { padding: 0 24px; }
.movement-entry { padding: 21px 0; border-top: 1px solid var(--line); }
.movement-entry-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.movement-entry-heading > div { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.movement-entry-heading time { font-size: .68rem; color: var(--muted); }
.movement-entry-heading > strong { font-size: 1.18rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.movement-entry-heading small { font-size: .73rem; font-weight: 400; color: var(--muted); }
.movement-details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin: 0; }
.movement-details dt { margin-bottom: 4px; font-size: .68rem; color: var(--muted); }
.movement-details dd { margin: 0; font-size: .8rem; overflow-wrap: anywhere; }
.movement-note { margin: 16px 0 0; padding: 12px 14px; background: #f7f8f3; border-radius: 6px; font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.cancel-panel { padding: 0 20px; border: 1px solid #e2d6d0; border-radius: 12px; background: #fdfbf8; }
.cancel-panel summary { min-height: 54px; padding: 17px 0; color: #8b4e3e; font-size: .8rem; font-weight: 550; cursor: pointer; }
.cancel-panel p { font-size: .76rem; color: var(--muted); line-height: 1.7; }
.cancel-panel label { font-size: .76rem; }
.cancel-panel form { padding-bottom: 18px; }
.cancel-panel .button { margin-top: 15px; width: 100%; }
.staff-name { display: flex; align-items: center; gap: 10px; }
.staff-name strong { font-weight: 600; }

/* Sign in */
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(460px, 1fr); min-height: 100svh; }
.login-brand-panel { display: flex; flex-direction: column; justify-content: space-between; padding: 56px 64px 35px; background: var(--olive-dark); color: #fff; }
.login-brand-panel .brand { padding-left: 0; }
.login-statement { margin: 75px 0; }
.login-statement .eyebrow { margin-bottom: 27px; color: #c2d0b4; font-size: .66rem; }
.login-statement h1 { color: #f5f7ed; font-size: clamp(2.8rem, 4.5vw, 5.5rem); font-weight: 500; line-height: 1.08; letter-spacing: -.065em; }
.login-statement h1 > span { color: var(--lime); }
.login-statement > p:last-child { margin: 29px 0 0; color: #c0cdb4; font-size: .97rem; line-height: 1.8; }
.login-brand-footer { display: flex; justify-content: space-between; gap: 20px; padding-top: 24px; border-top: 1px solid #4a5b3b; font-size: .58rem; letter-spacing: .11em; color: #abbba0; }
.login-form-area { display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; padding: 70px 48px 95px; background: #fcfdf8; }
.login-form-wrap { width: 100%; max-width: 380px; }
.login-lock { display: grid; place-items: center; width: 49px; height: 49px; margin-bottom: 34px; border: 1px solid #dce5ce; border-radius: 13px; background: #edf3e1; color: #607443; }
.login-lock .icon { width: 22px; height: 22px; }
.login-form-wrap h2 { margin-bottom: 13px; font-size: 2.2rem; letter-spacing: -.05em; font-weight: 600; }
.login-description { margin-bottom: 32px; color: var(--muted); font-size: .91rem; }
.login-form .form-fields { grid-template-columns: 1fr; gap: 23px; }
.login-form .required-mark, .login-form .optional-label { display: none; }
.login-form .form-field input { background: #fff; }
.login-submit { width: 100%; justify-content: space-between; margin-top: 27px; min-height: 51px; padding-left: 18px; padding-right: 18px; }
.login-help { max-width: 320px; margin: 27px auto 0; color: var(--muted); font-size: .75rem; line-height: 1.8; text-align: center; }
.login-footer { position: absolute; bottom: 27px; color: #76816b; font-size: .71rem; }
.login-mobile-brand { display: none; }

/* Errors and print document */
.error-page { display: flex; flex-direction: column; align-items: flex-start; max-width: 620px; margin: 50px auto 90px; padding: 30px 0; }
.standalone-error { max-width: 720px; margin: 0 auto; padding: 40px 25px; }
.standalone-brand { display: flex; align-items: center; color: var(--olive-dark); }
.standalone-brand small { margin-left: 13px; font-size: .6rem; letter-spacing: .18em; }
.error-code { display: block; margin-bottom: 35px; font-size: 6rem; font-weight: 500; color: #a7b88b; line-height: 1; letter-spacing: -.08em; }
.error-page h1 { font-size: 2.2rem; }
.error-page > p:not(.eyebrow) { margin: 5px 0 25px; color: var(--muted); line-height: 1.8; font-size: .95rem; }
.print-body { background: #ecefe7; padding: 24px; }
.print-toolbar { display: flex; justify-content: space-between; gap: 15px; max-width: 660px; margin: 0 auto 22px; }
.print-card { max-width: 660px; margin: 0 auto; padding: 36px; background: #fff; border: 1px solid #dce1d5; color: #202720; }
.print-header { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding-bottom: 22px; border-bottom: 2px solid #34492c; }
.print-header p { margin: 10px 0 0; font-size: .61rem; letter-spacing: .14em; }
.print-reference { display: grid; gap: 7px; text-align: right; }
.print-reference strong { font-size: .9rem; }
.print-reference span { font-size: .76rem; }
.print-customer { padding: 22px 0; }
.print-customer h1 { margin-bottom: 8px; font-size: 1.45rem; }
.print-customer p { margin: 0; font-size: .79rem; }
.print-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid #d4dacc; border-left: 1px solid #d4dacc; }
.print-grid > div { padding: 12px; border-bottom: 1px solid #d4dacc; border-right: 1px solid #d4dacc; break-inside: avoid; }
.print-grid dt { margin-bottom: 5px; font-size: .66rem; color: #5a6354; }
.print-grid dd { margin: 0; font-size: .84rem; font-weight: 550; overflow-wrap: anywhere; }
.print-notes, .print-movements { margin-top: 22px; }
.print-card h2 { margin-bottom: 10px; font-size: .88rem; }
.print-notes p { margin-bottom: 7px; font-size: .76rem; overflow-wrap: anywhere; }
.print-movements table { width: 100%; border-collapse: collapse; font-size: .69rem; text-align: left; }
.print-movements th, .print-movements td { padding: 8px 6px; border-bottom: 1px solid #dce1d6; }
.print-movements th { font-weight: 600; }
.print-movements td:last-child { white-space: nowrap; }
.print-movements small { display: block; margin-top: 4px; font-size: .65rem; }
.print-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 26px; padding-top: 12px; border-top: 1px solid #d4dacc; font-size: .61rem; color: #5b6652; }

/* Responsive work surfaces */
@media (min-width: 1600px) {
  .main-content { padding-top: 46px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 330px; }
  .batch-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .stat-card { padding: 25px 26px 20px; }
}

@media (max-width: 1279px) {
  :root { --sidebar-width: 216px; }
  .sidebar { padding-left: 13px; padding-right: 13px; }
  .topbar { padding-left: 28px; padding-right: 28px; }
  .main-content { padding: 30px 28px 0; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-secondary { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
  .overview-stats { gap: 12px; }
  .stat-card { padding: 18px 16px 14px; }
  .stat-top { font-size: .72rem; gap: 7px; }
  .stat-top .icon { width: 16px; height: 16px; }
  .stat-foot { font-size: .65rem; }
  .batch-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; }
  .batch-main .panel-heading, .batch-main .panel-body { padding-left: 20px; padding-right: 20px; }
  .start-lines { grid-template-columns: 1fr; }
  .batch-main .form-fields { grid-template-columns: 1fr; }
  .batch-main .detail-grid { gap: 21px 15px; }
  .customer-detail-grid { grid-template-columns: 1fr 1fr; }
  .contact-list { grid-template-columns: 1fr; }
  .compact-stat { flex-wrap: wrap; gap: 10px; }
  .login-brand-panel { padding-left: 44px; padding-right: 44px; }
  .login-layout { grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr); }
}

@media (max-width: 1023px) {
  :root { --sidebar-width: 190px; }
  .sidebar { padding-top: 30px; }
  .nav-link { gap: 10px; font-size: .84rem; padding-left: 11px; padding-right: 11px; }
  .sidebar .brand-logo { width: 130px; }
  .brand-product { font-size: .6rem; }
  .sidebar-caption { font-size: .53rem; }
  .topbar { height: 70px; padding: 0 22px; }
  .topbar-context { font-size: .65rem; gap: 8px; }
  .topbar-meta { gap: 10px; font-size: .7rem; }
  .main-content { padding: 28px 22px 0; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 18px; }
  .overview-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-value { font-size: 2.15rem; }
  .stat-top { font-size: .78rem; }
  .batch-layout { grid-template-columns: 1fr; }
  .batch-aside { grid-template-columns: 1fr 1fr; align-items: start; }
  .batch-aside .cancel-panel { grid-column: 1 / -1; }
  .batch-main .form-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-field:has(textarea), .form-field[data-field="customer"], .form-field[data-field="parent"] { grid-column: 1 / -1; }
  .start-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-detail-grid { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: 1fr 1fr; }
  .customer-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .compact-stat { display: block; padding: 20px 17px; }
  .compact-stat strong { display: block; margin-top: 10px; font-size: 1.35rem; }
  .compact-stat > span { font-size: .75rem; }
  .filter-bar { flex-wrap: wrap; gap: 10px; }
  .filter-bar .search-field { flex-basis: 100%; }
  .filter-bar .filter-select { flex: 1; }
  .filter-select select { width: 100%; }
  .data-table td, .data-table th { padding-left: 13px; padding-right: 13px; }
  .login-brand-panel { padding-left: 30px; padding-right: 30px; }
  .login-layout { grid-template-columns: minmax(0, 1fr) minmax(390px, 1fr); }
  .login-form-area { padding-left: 36px; padding-right: 36px; }
  .login-brand-footer { display: grid; gap: 12px; }
}

@media (max-width: 767px) {
  :root { font-size: 16px; }
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 70px; height: auto; padding: 12px 20px; gap: 8px 12px; }
  .topbar-context { display: none; }
  .mobile-brand { display: flex; align-items: center; color: var(--olive-dark); line-height: 1; }
  .mobile-brand .brand-logo { width: 104px; }
  .mobile-brand small { margin-left: 10px; font-size: .53rem; font-weight: 650; letter-spacing: .14em; }
  .header-logout { grid-column: 2; grid-row: 1; }
  .topbar-meta { grid-column: 1 / -1; margin-left: 0; }
  .topbar-meta time { display: none; }
  .role-chip { font-size: .62rem; min-height: 28px; padding: 4px 7px; max-width: 115px; }
  .main-content { padding: 27px 20px 0; }
  .page-heading { margin-bottom: 25px; }
  .page-heading h1 { font-size: 1.95rem; }
  .eyebrow { font-size: .59rem; margin-bottom: 8px; }
  .page-description { font-size: .81rem; }
  .heading-actions { width: 100%; }
  .heading-actions .button-primary { flex: 1; }
  .button { font-size: .79rem; min-height: 48px; padding-left: 15px; padding-right: 15px; }
  .button-small { min-height: 44px; }
  .overview-stats { gap: 11px; margin-bottom: 20px; }
  .stat-card { padding: 17px 15px 14px; border-radius: 10px; }
  .stat-top { min-height: 36px; font-size: .75rem; }
  .stat-top .icon { width: 16px; height: 16px; }
  .stat-value { font-size: 1.9rem; margin-top: 20px; }
  .stat-value span { font-size: .65rem; margin-left: 5px; }
  .stat-foot { font-size: .69rem; }
  .stat-foot .icon { width: 12px; height: 12px; }
  .dashboard-grid, .dashboard-primary, .dashboard-secondary { gap: 20px; }
  .dashboard-secondary { grid-template-columns: 1fr 1fr; }
  .panel { border-radius: 12px; }
  .panel-heading { padding: 21px 20px; gap: 12px; }
  .panel-heading h2 { font-size: 1rem; }
  .panel-heading .eyebrow { font-size: .54rem; }
  .subtle-label { font-size: .63rem; }
  .text-link { font-size: .7rem; gap: 5px; }
  .text-link .icon { width: 15px; height: 15px; }
  .line-grid { gap: 12px; padding: 0 20px 20px; }
  .line-card { padding: 17px 15px; min-height: 215px; }
  .line-number { font-size: 1.75rem; }
  .line-card h3 { font-size: .83rem; }
  .line-customer { font-size: .76rem; }
  .line-data { flex-wrap: wrap; gap: 7px; font-size: .61rem; }
  .line-idle { font-size: .73rem; }
  .line-foot { font-size: .61rem; }
  .status { font-size: .7rem; padding: 5px 7px; }
  .oil-summary { padding: 20px; border-radius: 12px; }
  .oil-summary-heading { gap: 7px; }
  .oil-summary-heading h2 { font-size: .89rem; }
  .oil-figure > span { font-size: .76rem; }
  .oil-figure > strong { font-size: 1.7rem; }
  .oil-summary .text-link { font-size: .62rem; }
  .event-list { padding-left: 20px; padding-right: 20px; }
  .event-list li { gap: 10px; }
  .event-content strong { font-size: .8rem; }
  .event-content p { font-size: .74rem; }
  .event-meta { font-size: .68rem; }
  .filter-bar { padding: 17px 20px; }
  .search-field input { font-size: 1rem; }
  .filter-select select { min-height: 48px; font-size: .9rem; }
  .filter-checkbox { font-size: .76rem; }
  .filter-bar > .button-primary { min-width: 88px; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody { display: block; }
  .data-table tbody tr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 15px 20px; padding: 20px; border-top: 1px solid var(--line); }
  .data-table td, .data-table th { display: block; padding: 0; border: 0; text-align: left; }
  .data-table td:first-child, .data-table td:last-child { padding: 0; }
  .data-table td[data-label]::before { display: block; content: attr(data-label); margin-bottom: 6px; color: var(--muted); font-size: .62rem; font-weight: 400; }
  .data-table .row-action { position: absolute; right: 12px; top: 14px; width: auto; }
  .batch-table td:first-child, .delivery-table td:first-child, .customer-table td:first-child { grid-column: 1 / -1; padding-right: 50px; }
  .batch-table td:first-child::before, .delivery-table td:first-child::before, .customer-table td:first-child::before { display: none; }
  .batch-table td:nth-child(2) { grid-column: 1 / -1; }
  .batch-table td:nth-child(2)::before { display: none; }
  .reference-link { min-height: 44px; font-size: .81rem; }
  .customer-link { min-height: 44px; font-size: .91rem; }
  .cell-secondary { margin-top: 3px; font-size: .75rem; }
  .batch-table td:first-child .cell-secondary { display: inline-block; margin-left: 8px; font-size: .61rem; }
  .batch-table .status { min-height: 25px; }
  .batch-table td:nth-child(4) > .cell-secondary { display: inline-block; margin-left: 6px; }
  .data-table .numeric { font-size: .91rem; }
  .data-table .unit { font-size: .7rem; }
  .customer-table td:nth-child(2) { margin: -7px 0; }
  .customer-table td:nth-child(2)::before { padding-top: 7px; margin-bottom: 0; }
  .customer-table td:nth-child(4) { grid-column: 1 / -1; font-size: .7rem; }
  .customer-table td:nth-child(4)::before { display: inline; margin-right: 8px; }
  .delivery-table .row-action { position: static; display: flex; grid-column: 1 / -1; justify-content: flex-end; }
  .delivery-table td:first-child { padding-right: 0; }
  .delivery-table td .cell-secondary { margin-top: 3px; }
  .staff-table td:first-child { grid-column: 1 / -1; }
  .staff-table td:first-child::before { display: none; }
  .staff-table td { font-size: .78rem; }
  .pagination { padding: 15px 20px; }
  .pagination-summary { font-size: .65rem; }
  .pagination-controls { gap: 6px; }
  .page-count { font-size: .69rem; min-width: 42px; }
  .empty-state { padding: 38px 20px; }
  .empty-state h3 { font-size: .93rem; }
  .empty-state p { font-size: .76rem; }
  .page-footer { margin-top: 30px; padding: 19px 0 100px; font-size: .61rem; gap: 10px; }
  .mobile-nav { display: flex; position: fixed; z-index: 40; inset: auto 0 0; align-items: stretch; justify-content: space-around; padding: 7px 8px max(9px, env(safe-area-inset-bottom)); border-top: 1px solid #d9e1cc; background: #fff; box-shadow: 0 -4px 18px rgb(38 55 38 / 3%); }
  .mobile-nav .nav-link { display: flex; flex-direction: column; flex: 1; justify-content: center; gap: 5px; padding: 7px 3px; color: #728168; font-size: .67rem; font-weight: 550; min-height: 55px; border-radius: 8px; }
  .mobile-nav .nav-link .icon { width: 21px; height: 21px; }
  .mobile-nav .nav-link.is-active { background: #edf3df; color: #405b2b; }
  .mobile-nav .nav-link:hover { background: #f3f6ec; color: #405b2b; }
  .form-panel { padding: 22px 20px 0; }
  .form-intro { padding-bottom: 22px; margin-bottom: 23px; }
  .form-intro h2 { font-size: .93rem; }
  .form-intro p { font-size: .7rem; }
  .form-fields, .batch-main .form-fields { grid-template-columns: 1fr; gap: 21px; }
  .form-field > label { font-size: .81rem; }
  .form-field input:not([type="checkbox"]):not([type="radio"]), .form-field select, .form-field textarea { min-height: 51px; font-size: 1rem; }
  .optional-label { font-size: .63rem; }
  .field-help { font-size: .7rem; }
  .form-actions { margin-top: 24px; padding: 20px 0; }
  .form-actions .button-primary { flex: 1; }
  .back-link { margin-top: -8px; margin-bottom: 13px; font-size: .75rem; }
  .customer-totals { gap: 10px; }
  .compact-stat { padding: 17px 13px; }
  .compact-stat > span { font-size: .67rem; }
  .compact-stat strong { font-size: 1.14rem; }
  .compact-stat small { font-size: .64rem; }
  .customer-detail-grid { gap: 20px; margin-bottom: 20px; }
  .contact-list { padding: 0 20px 20px; }
  .contact-list dt { font-size: .66rem; }
  .contact-list dd { font-size: .82rem; }
  .batch-layout, .batch-main, .batch-aside { gap: 20px; }
  .batch-customer { margin: 0 20px; padding-bottom: 19px; }
  .batch-customer a { font-size: .9rem; }
  .batch-customer span:not(.avatar) { font-size: .69rem; }
  .detail-grid { padding: 22px 20px; }
  .detail-grid dt { font-size: .67rem; }
  .detail-grid dd { font-size: .83rem; }
  .detail-grid .detail-weight dd { font-size: 1.5rem; }
  .note-block { padding: 18px 20px; }
  .note-block p { font-size: .76rem; }
  .panel-form { padding-left: 20px; padding-right: 20px; }
  .section-description { font-size: .76rem; }
  .movement-balance { margin-left: 20px; margin-right: 20px; padding: 16px; gap: 12px; }
  .movement-balance span { font-size: .63rem; }
  .movement-balance strong { font-size: 1.35rem; }
  .movement-list { padding: 0 20px; }
  .movement-details { gap: 15px; }
  .movement-details dd { font-size: .76rem; }
  .movement-entry-heading > strong { font-size: 1.06rem; }
  .movement-entry-heading time { font-size: .63rem; }
  .cancel-panel { grid-column: 1 / -1; }
  .demo-notice { padding: 12px 14px; font-size: .73rem; }
  .message { padding: 13px 15px; font-size: .8rem; }
  .login-layout { display: block; }
  .login-brand-panel { display: none; }
  .login-form-area { min-height: 100svh; padding: 32px 26px 80px; }
  .login-form-wrap { max-width: 410px; }
  .login-mobile-brand { display: flex; align-items: center; margin-bottom: 49px; color: var(--olive-dark); }
  .login-mobile-brand small { margin-left: 13px; font-size: .59rem; letter-spacing: .18em; }
  .login-lock { margin-bottom: 25px; }
  .login-form-wrap h2 { font-size: 2rem; }
  .login-description { font-size: .83rem; margin-bottom: 29px; }
  .login-form .form-fields { gap: 22px; }
  .login-help { font-size: .69rem; }
  .login-footer { font-size: .65rem; bottom: 23px; }
  .error-page { margin-top: 15px; margin-bottom: 40px; }
  .error-page h1 { font-size: 1.85rem; }
  .error-page > p:not(.eyebrow) { font-size: .87rem; }
  .print-body { padding: 16px; }
  .print-card { padding: 24px; }
}

@media (max-width: 479px) {
  .topbar { padding-left: 17px; padding-right: 17px; }
  .mobile-brand small { margin-left: 8px; font-size: .48rem; letter-spacing: .1em; }
  .main-content { padding-left: 16px; padding-right: 16px; }
  .page-heading h1 { font-size: 1.76rem; }
  .stat-card { padding: 16px 12px 13px; }
  .stat-top { font-size: .72rem; }
  .stat-top .icon { width: 15px; height: 15px; }
  .stat-value { font-size: 1.68rem; }
  .stat-foot { font-size: .66rem; }
  .stat-foot .icon { display: none; }
  .panel-heading { padding-left: 17px; padding-right: 17px; }
  .panel-heading .text-link { font-size: .62rem; }
  .subtle-label { font-size: .57rem; }
  .line-grid { padding-left: 17px; padding-right: 17px; gap: 10px; }
  .line-card { padding: 16px 12px; }
  .line-card-top { gap: 5px; }
  .line-number { font-size: 1.5rem; }
  .line-card .status { font-size: .68rem; padding: 5px 6px; gap: 4px; }
  .line-card .status-dot { width: 4px; height: 4px; }
  .line-customer { font-size: .8rem; }
  .line-customer .icon { display: none; }
  .line-data { font-size: .57rem; }
  .line-data strong { font-size: .8rem; }
  .line-foot { font-size: .69rem; }
  .dashboard-secondary { grid-template-columns: 1fr; }
  .dashboard-secondary .oil-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .dashboard-secondary .oil-summary-heading { grid-column: 1 / -1; margin-bottom: 20px; }
  .dashboard-secondary .oil-figure { padding-bottom: 13px; }
  .dashboard-secondary .oil-figure + .oil-figure { padding-top: 0; border-top: 0; }
  .dashboard-secondary .oil-summary .text-link { grid-column: 1 / -1; font-size: .7rem; }
  .activity-panel .event-content strong { font-size: .82rem; }
  .activity-panel .event-content p { font-size: .75rem; }
  .event-meta { font-size: .7rem; }
  .filter-bar { padding-left: 17px; padding-right: 17px; }
  .filter-select select { min-width: 0; font-size: .81rem; padding-left: 11px; }
  .filter-checkbox { flex: 1; font-size: .72rem; }
  .batch-aside { grid-template-columns: 1fr; }
  .start-lines { grid-template-columns: 1fr; }
  .start-lines form { gap: 15px; }
  .customer-totals { grid-template-columns: 1fr; }
  .compact-stat { display: flex; align-items: center; flex-wrap: nowrap; padding: 18px; }
  .compact-stat > span { font-size: .73rem; }
  .compact-stat strong { margin: 0; font-size: 1.35rem; }
  .compact-stat small { font-size: .7rem; }
  .contact-list { grid-template-columns: 1fr; gap: 22px; }
  .print-card { padding: 20px; }
  .print-header { gap: 12px; }
  .print-reference strong { font-size: .76rem; }
  .print-grid > div { padding: 10px; }
  .print-grid dd { font-size: .73rem; }
  .print-footer { flex-direction: column; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .button, .nav-link, .form-field input, .form-field select, .form-field textarea { transition: none; }
}

@page { size: A5 portrait; margin: 10mm; }
@media print {
  :root { font-size: 10pt; }
  .print-body { padding: 0; background: #fff; }
  .print-toolbar { display: none; }
  .print-card { max-width: none; padding: 0; border: 0; }
  .print-header { padding-bottom: 12px; }
  .print-customer { padding: 15px 0; }
  .print-grid > div { padding: 8px 10px; }
  .print-notes, .print-movements { margin-top: 15px; }
  .print-movements tr { break-inside: avoid; }
  .print-movements thead { display: table-header-group; }
  .print-footer { margin-top: 18px; }
  .print-header, .print-customer, .print-footer { break-inside: avoid; }
  h2 { break-after: avoid; }
  a { color: inherit; text-decoration: none; }
}
