:root {
    --primary: #245b57;
    --primary-dark: #173f3c;
    --primary-soft: #e9f2f1;
    --ink: #1e2933;
    --muted: #6b7885;
    --line: #dfe5e9;
    --surface: #ffffff;
    --page: #f3f6f7;
    --danger: #b42318;
    --danger-soft: #fff0ee;
    --warning: #b46b09;
    --warning-soft: #fff7e8;
    --success: #187a4d;
    --success-soft: #eaf8f1;
    --shadow: 0 12px 34px rgba(24, 39, 52, .08);
    --radius: 18px;
    --radius-sm: 11px;
    --logo-height: 44px;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--page); }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.5; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
code { padding: 2px 6px; border-radius: 6px; background: #eef2f4; font-size: .9em; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: 276px; display: flex; flex-direction: column; color: #fff; background: linear-gradient(180deg, var(--primary-dark), #102b2a); box-shadow: 6px 0 26px rgba(10, 30, 29, .16); }
.sidebar-brand { min-height: 96px; display: flex; align-items: center; gap: 13px; padding: 20px 22px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand img { max-height: var(--logo-height); max-width: 150px; object-fit: contain; background: rgba(255,255,255,.94); padding: 5px 8px; border-radius: 10px; }
.sidebar-brand strong { display: block; max-width: 164px; font-size: 15px; line-height: 1.25; }
.sidebar-brand small { display: block; margin-top: 4px; color: rgba(255,255,255,.62); font-size: 11px; }
.brand-mark { width: 46px; height: 46px; flex: 0 0 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 15px; color: #fff; background: var(--primary); font-weight: 800; letter-spacing: .04em; box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.sidebar .brand-mark { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.17); }
.sidebar-nav { flex: 1; padding: 18px 14px; overflow-y: auto; }
.nav-section { padding: 22px 12px 8px; color: rgba(255,255,255,.43); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-link { display: flex; align-items: center; gap: 12px; margin: 3px 0; padding: 11px 12px; border-radius: 12px; color: rgba(255,255,255,.78); font-weight: 600; transition: .18s ease; }
.nav-link span { width: 23px; display: inline-flex; justify-content: center; color: rgba(255,255,255,.64); font-size: 17px; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-link.is-active { color: #fff; background: rgba(255,255,255,.14); box-shadow: inset 3px 0 0 rgba(255,255,255,.72); }
.sidebar-user { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 17px 18px; border-top: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.1); }
.sidebar-user strong, .sidebar-user small { display: block; }
.sidebar-user small { color: rgba(255,255,255,.55); }
.sidebar-user .btn-icon { color: #fff; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.08); }
.sidebar-overlay { display: none; }
.main-column { width: calc(100% - 276px); min-height: 100vh; margin-left: 276px; display: flex; flex-direction: column; }
.topbar { min-height: 82px; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 13px 30px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(13px); }
.topbar h1 { margin: 0; font-size: 21px; line-height: 1.2; }
.topbar small { color: var(--muted); }
.topbar-date { margin-left: auto; padding: 8px 12px; border-radius: 10px; color: var(--muted); background: #f5f7f8; font-weight: 700; }
.menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: 20px; }
.page-content { flex: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 28px 30px 36px; }
.app-footer, .auth-footer, .installer-footer { padding: 18px 24px; color: var(--muted); text-align: center; font-size: 12px; }
.app-footer { border-top: 1px solid var(--line); background: #fff; }
.app-footer a, .auth-footer a, .installer-footer a { font-weight: 800; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-heading h2 { margin: 2px 0 0; font-size: 25px; line-height: 1.25; }
.eyebrow { display: block; color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.panel { margin-bottom: 20px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 18px rgba(24,39,52,.035); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.panel-heading h3 { margin: 0; font-size: 17px; }
.panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.panel-heading > a { font-size: 12px; font-weight: 800; }
.sticky-panel-heading { position: sticky; top: 82px; z-index: 12; margin: -21px -21px 10px; padding: 16px 21px; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); }
.narrow-panel { max-width: 780px; }

.btn { min-height: 41px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border: 1px solid transparent; border-radius: 11px; font-weight: 750; line-height: 1; transition: .16s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(24,39,52,.09); }
.btn-primary { color: #fff; border-color: var(--primary); background: var(--primary); }
.btn-primary:hover { color: #fff; filter: brightness(.92); }
.btn-secondary { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 30%, #fff); background: var(--primary-soft); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: #fff; }
.btn-danger { color: #fff; background: var(--danger); }
.btn-block { width: 100%; }
.btn-small { min-height: 34px; padding: 7px 10px; font-size: 12px; }
.btn-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; font-size: 16px; font-weight: 800; }
.btn-icon:hover { border-color: var(--primary); color: var(--primary); }
.btn-icon.danger:hover { border-color: #f2b8b2; color: var(--danger); background: var(--danger-soft); }

.alert { margin: 0 0 15px; padding: 12px 15px; border: 1px solid; border-radius: 12px; font-weight: 600; }
.alert-success { color: var(--success); border-color: #b8e5ce; background: var(--success-soft); }
.alert-danger { color: var(--danger); border-color: #f2c1bc; background: var(--danger-soft); }
.alert-warning { color: var(--warning); border-color: #ecd3a4; background: var(--warning-soft); }
.alert-info { color: #245a7d; border-color: #bdd8e9; background: #edf7fd; }
.info-box { margin: 16px 0 20px; padding: 14px 16px; border-left: 4px solid var(--primary); border-radius: 0 12px 12px 0; background: var(--primary-soft); }
.help-text { color: var(--muted); }

.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(155px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-card { min-height: 126px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 5px 18px rgba(24,39,52,.035); }
.kpi-card span, .kpi-card small { display: block; color: var(--muted); }
.kpi-card span { font-size: 12px; font-weight: 700; }
.kpi-card strong { display: block; margin: 12px 0 5px; font-size: 25px; line-height: 1; }
.kpi-card small { font-size: 11px; }
.kpi-card.is-warning { border-color: #e9c681; background: var(--warning-soft); }
.kpi-link { display:block; position:relative; color:inherit; text-decoration:none; cursor:pointer; transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease; }
.kpi-link::after { content:'›'; position:absolute; top:14px; right:16px; color:var(--muted); font-size:22px; line-height:1; transition:transform .16s ease,color .16s ease; }
.kpi-link:hover { color:inherit; text-decoration:none; transform:translateY(-2px); border-color:var(--primary); border-color:color-mix(in srgb,var(--primary) 38%,var(--line)); box-shadow:0 12px 28px rgba(24,39,52,.10); }
.kpi-link:hover::after { color:var(--primary); transform:translateX(2px); }
.kpi-link:focus-visible { outline:3px solid rgba(31,111,235,.28); outline:3px solid color-mix(in srgb,var(--primary) 32%,transparent); outline-offset:3px; border-color:var(--primary); }
.compact-panel { padding-top:14px; padding-bottom:14px; }
.dashboard-detail-filter,.registration-history-filter { align-items:end; }

.report-kpis { grid-template-columns: repeat(5, 1fr); }
.content-grid { display: grid; gap: 20px; }
.content-grid.two-thirds { grid-template-columns: minmax(0,2fr) minmax(280px,1fr); }
.content-grid.equal { grid-template-columns: repeat(2,minmax(0,1fr)); }
.content-grid.one-third { grid-template-columns: minmax(290px,.7fr) minmax(0,2fr); }

.bar-chart { height: 260px; display: flex; align-items: stretch; gap: 9px; padding-top: 27px; overflow-x: auto; }
.bar-item { min-width: 42px; flex: 1; display: grid; grid-template-rows: 21px 1fr 23px; text-align: center; }
.bar-value { color: var(--muted); font-size: 10px; }
.bar-track { position: relative; min-height: 160px; overflow: hidden; border-radius: 10px 10px 5px 5px; background: #f1f4f5; }
.bar-track i { position: absolute; inset: auto 0 0; display: block; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 75%, #fff), var(--primary)); }
.bar-item small { padding-top: 5px; color: var(--muted); font-size: 10px; }
.quick-actions { display: grid; gap: 9px; }
.quick-actions a { display: flex; align-items: center; gap: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); transition: .15s; }
.quick-actions a:hover { border-color: color-mix(in srgb,var(--primary) 45%,#fff); background: var(--primary-soft); }
.quick-actions a > span { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; color: var(--primary); background: var(--primary-soft); font-size: 19px; font-weight: 800; }
.quick-actions strong, .quick-actions small { display: block; }
.quick-actions small { color: var(--muted); font-size: 11px; }
.alert-list { display: grid; gap: 7px; }
.alert-list a { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; padding: 10px; border-radius: 11px; color: var(--ink); background: #f8fafb; }
.alert-list strong, .alert-list small { display: block; }
.alert-list small { color: var(--muted); font-size: 11px; }
.alert-list time { color: var(--danger); font-size: 12px; font-weight: 800; }
.status-dot { width: 10px; height: 10px; display: inline-block; border-radius: 50%; background: #adb7bf; }
.status-dot.ok { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.status-dot.bad { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.status-dot.warn { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }

.table-wrap { width: 100%; overflow-x: auto; }
.wide-table { max-height: calc(100vh - 255px); overflow: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 780px; }
.data-table th { position: sticky; top: 0; z-index: 4; padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--muted); background: #f7f9fa; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid #edf0f2; vertical-align: middle; }
.data-table tbody tr:hover td { background: #fbfcfc; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table strong, .data-table small { display: block; }
.data-table small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.data-table.compact td { padding: 10px 11px; }
.input-table { min-width: 1280px; }
.input-table th { top: 0; }
.input-table tr.has-entry td { background: #fbfdfd; }
.table-input { width: 100%; min-width: 95px; padding: 8px 9px; border: 1px solid #d8e0e4; border-radius: 9px; background: #fff; }
.table-input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.table-input:disabled { color: #9aa4ad; background: #f2f4f5; }
.note-input { min-width: 180px; }
.note-cell { max-width: 300px; color: var(--muted); }
.center { text-align: center; }
.actions-col { width: 80px; }
.table-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.table-actions form { display: inline-flex; }
.empty-cell { padding: 38px !important; color: var(--muted); text-align: center; }
.empty-inline { padding: 25px 12px; color: var(--muted); text-align: center; }
.positive { color: var(--success); }
.negative { color: var(--danger); }
.muted-row { opacity: .62; }
.badge { display: inline-flex; align-items: center; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: #4b5965; background: #f7f9fa; font-size: 10px; font-weight: 800; white-space: nowrap; }
.badge-km { color: #245c7a; border-color: #c5ddea; background: #eef8fd; }
.badge-hour { color: #7a4d15; border-color: #ead3b6; background: #fff8ed; }
.badge-none { color: #655b72; border-color: #ded8e4; background: #f8f5fa; }
.status-pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.status-pill.active { color: var(--success); background: var(--success-soft); }
.status-pill.inactive { color: var(--muted); background: #edf0f2; }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding-top: 18px; }
.pagination a { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; font-weight: 700; }
.pagination a.is-current { color: #fff; border-color: var(--primary); background: var(--primary); }

form label { display: grid; gap: 6px; color: #34424e; font-size: 12px; font-weight: 750; }
form label small { color: var(--muted); font-size: 10px; font-weight: 500; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #d7dfe3; border-radius: 10px; color: var(--ink); background: #fff; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input[type="color"] { padding: 5px; }
input[type="checkbox"] { width: auto; min-height: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding-top: 4px; }
.form-divider { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding-top: 15px; border-top: 1px solid var(--line); }
.form-divider small { color: var(--muted); }
.stack-form { display: grid; gap: 14px; }
.filter-grid { display: grid; grid-template-columns: repeat(3,minmax(150px,1fr)) auto; align-items: end; gap: 12px; margin-bottom: 18px; }
.reports-filter { grid-template-columns: repeat(4,minmax(140px,1fr)) auto; }
.vehicle-filter { grid-template-columns: minmax(250px,2fr) minmax(160px,.7fr) auto; }
.filter-actions { display: flex; gap: 8px; align-items: end; }
.inline-filter { display: flex; align-items: end; gap: 8px; }
.inline-filter input { min-width: 160px; }
.panel-filter { margin-bottom: 15px; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 17px; color: var(--muted); }
.tiny-check { display: inline-flex; justify-content: center; }
.tiny-check input { width: 17px; height: 17px; }
.check-control { display: flex !important; grid-template-columns: auto 1fr !important; align-items: center; gap: 9px !important; }
.check-control input { width: 17px; height: 17px; }

.role-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 20px; }
.role-summary > div { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #f8fafb; }
.role-summary strong, .role-summary span { display: block; }
.role-summary span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.assignment-panel { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #f9fbfb; }
.vehicle-check-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; max-height: 340px; overflow-y: auto; }
.vehicle-check { display: flex !important; grid-template-columns: auto 1fr !important; align-items: center; gap: 9px !important; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.vehicle-check strong, .vehicle-check small { display: block; }
.vehicle-check.is-inactive { opacity: .55; }
.vehicle-check input { width: 17px; height: 17px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 25px; padding: 13px; border-radius: 11px; color: var(--muted); background: #f7f9fa; }

.tank-gauge { display: grid; grid-template-columns: minmax(180px,.7fr) minmax(240px,2fr) auto; align-items: center; gap: 20px; }
.tank-gauge strong, .tank-gauge small { display: block; }
.tank-gauge small { color: var(--muted); }
.gauge-track { height: 14px; overflow: hidden; border-radius: 999px; background: #e9edef; }
.gauge-track i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,var(--primary),color-mix(in srgb,var(--primary) 65%,#fff)); }
.settings-layout { display: grid; gap: 0; }
.current-file { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.current-file img { max-width: 180px; max-height: 50px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; object-fit: contain; }
.locked-setting > div { display: flex; gap: 14px; align-items: flex-start; }
.lock-icon { font-size: 24px; }
.locked-setting h3 { margin: 0; }
.locked-setting p { margin: 5px 0 0; color: var(--muted); }
.settings-savebar { position: static; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.95); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.settings-savebar span { color: var(--muted); font-size: 11px; }
.help-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.help-card { display: grid; grid-template-columns: 42px minmax(0,1fr); column-gap: 14px; row-gap: 0; align-items: start; padding: 21px; }
.help-card > span { position: static; grid-column: 1; grid-row: 1; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--primary); background: var(--primary-soft); font-size: 18px; font-weight: 800; line-height: 1; }
.help-card h3 { grid-column: 2; grid-row: 1; align-self: center; min-width: 0; margin: 0; line-height: 1.3; }
.help-card p { grid-column: 1 / -1; margin: 14px 0 0; color: var(--muted); }
.help-card p + p { margin-top: 10px; }
.empty-state { max-width: 620px; margin: 60px auto; padding: 45px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-align: center; }
.empty-icon { width: 54px; height: 54px; display: inline-flex; align-items: center; justify-content: center; border-radius: 18px; color: var(--danger); background: var(--danger-soft); font-size: 27px; font-weight: 900; }
.empty-state h2 { margin: 17px 0 7px; }
.empty-state p { margin: 0 0 20px; color: var(--muted); }

.auth-body { display: flex; align-items: center; justify-content: center; padding: 30px; background: radial-gradient(circle at top left, var(--primary-soft), transparent 38%), linear-gradient(135deg,#f7f9fa,#eaf0f1); }
.auth-shell { width: min(460px,100%); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 13px; margin-bottom: 18px; }
.auth-brand img { max-height: var(--logo-height); max-width: 190px; object-fit: contain; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { font-size: 16px; }
.auth-brand small { color: var(--muted); font-size: 11px; }
.auth-card { padding: 30px; border: 1px solid rgba(255,255,255,.7); border-radius: 24px; background: rgba(255,255,255,.95); box-shadow: 0 25px 70px rgba(30,55,58,.14); }
.auth-card-heading { margin-bottom: 22px; }
.auth-card-heading h1 { margin: 5px 0 7px; font-size: 25px; }
.auth-card-heading p { margin: 0; color: var(--muted); }
.security-note { margin-top: 16px; padding: 11px; border-radius: 10px; color: var(--muted); background: #f5f7f8; font-size: 11px; text-align: center; }
.auth-footer { padding-top: 20px; }

.installer-body { min-height: 100vh; padding: 30px; background: var(--page); }
.installer-shell { width: min(920px,100%); margin: 0 auto; }
.installer-header { display: flex; align-items: center; gap: 15px; padding: 10px 0 20px; }
.installer-header h1 { margin: 0; font-size: 23px; }
.installer-header p { margin: 3px 0 0; color: var(--muted); }
.installer-progress { display: grid; grid-template-columns: repeat(5,1fr); margin-bottom: 18px; }
.installer-step { position: relative; display: grid; justify-items: center; gap: 5px; color: #95a0a8; }
.installer-step::before { content: ""; position: absolute; top: 16px; right: 50%; width: 100%; height: 2px; background: #dce2e5; z-index: 0; }
.installer-step:first-child::before { display: none; }
.installer-step span { width: 33px; height: 33px; z-index: 1; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #d4dbdf; border-radius: 50%; background: var(--page); font-weight: 800; }
.installer-step small { font-size: 10px; font-weight: 700; }
.installer-step.is-current, .installer-step.is-done { color: var(--primary); }
.installer-step.is-current span, .installer-step.is-done span { color: #fff; border-color: var(--primary); background: var(--primary); }
.installer-step.is-done::before { background: var(--primary); }
.installer-card { min-height: 380px; padding: 30px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.installer-card h2 { margin-top: 0; }
.check-list { display: grid; gap: 8px; margin: 22px 0; }
.check-row { display: grid; grid-template-columns: 15px minmax(180px,1fr) 2fr; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #f7f9fa; }
.check-row small { color: var(--muted); overflow-wrap: normal; }
.success-panel { padding: 45px 15px; text-align: center; }
.success-icon { width: 66px; height: 66px; display: inline-flex; align-items: center; justify-content: center; border-radius: 22px; color: var(--success); background: var(--success-soft); font-size: 32px; font-weight: 900; }
.success-panel h2 { margin: 18px 0 8px; }
.success-panel p { max-width: 560px; margin: 0 auto 22px; color: var(--muted); }

@media (max-width: 1280px) {
    .kpi-grid, .report-kpis { grid-template-columns: repeat(3,1fr); }
    .vehicle-check-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 1050px) {
    .sidebar { transform: translateX(-102%); transition: transform .2s ease; }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-overlay { position: fixed; inset: 0; z-index: 40; display: block; visibility: hidden; opacity: 0; background: rgba(10,24,28,.45); transition: .2s; }
    .sidebar-overlay.is-open { visibility: visible; opacity: 1; }
    .main-column { width: 100%; margin-left: 0; }
    .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .content-grid.two-thirds, .content-grid.one-third { grid-template-columns: 1fr; }
    .topbar { padding: 13px 20px; }
    .page-content { padding: 24px 20px 32px; }
    .sticky-panel-heading { top: 82px; }
}
@media (max-width: 780px) {
    .page-heading { align-items: stretch; flex-direction: column; }
    .page-heading .btn { align-self: flex-start; }
    .kpi-grid, .report-kpis { grid-template-columns: repeat(2,1fr); }
    .content-grid.equal, .help-grid { grid-template-columns: 1fr; }
    .filter-grid, .reports-filter, .vehicle-filter { grid-template-columns: repeat(2,1fr); }
    .filter-actions { grid-column: span 2; }
    .role-summary { grid-template-columns: 1fr; }
    .tank-gauge { grid-template-columns: 1fr; }
    .topbar-date { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: span 1; }
    .vehicle-check-grid { grid-template-columns: 1fr; }
    .installer-progress small { display: none; }
    .check-row { grid-template-columns: 15px 1fr; }
    .check-row small { grid-column: 2; }
}
@media (max-width: 520px) {
    .page-content { padding: 18px 13px 28px; }
    .topbar { min-height: 72px; padding: 10px 13px; }
    .topbar h1 { font-size: 18px; }
    .kpi-grid, .report-kpis { grid-template-columns: 1fr; }
    .panel { padding: 16px; border-radius: 15px; }
    .sticky-panel-heading { top: 72px; margin: -16px -16px 10px; padding: 13px 16px; }
    .filter-grid, .reports-filter, .vehicle-filter { grid-template-columns: 1fr; }
    .filter-actions { grid-column: span 1; }
    .inline-filter { align-items: stretch; flex-direction: column; }
    .form-footer, .settings-savebar { align-items: stretch; flex-direction: column; }
    .form-footer .btn, .settings-savebar .btn { width: 100%; }
    .auth-body, .installer-body { padding: 15px; }
    .auth-card, .installer-card { padding: 22px 18px; }
    .installer-header { align-items: flex-start; }
}
@media print {
    .sidebar, .topbar, .app-footer, .page-heading .btn, form, .table-actions { display: none !important; }
    .main-column { width: 100%; margin: 0; }
    .page-content { max-width: none; padding: 0; }
    .panel, .kpi-card { box-shadow: none; break-inside: avoid; }
}

/* Registration email notifications */
.switch-control { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.switch-control input { position: absolute; opacity: 0; pointer-events: none; }
.switch-control span { position: relative; width: 44px; height: 24px; border-radius: 999px; background: #cfd8da; transition: .2s ease; }
.switch-control span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(20,40,45,.22); transition: .2s ease; }
.switch-control input:checked + span { background: var(--primary); }
.switch-control input:checked + span::after { transform: translateX(20px); }
.switch-control strong { font-size: 12px; }
.notification-settings .panel-heading { align-items: center; }
.reminder-config { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #f8fafb; }
.field-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.field-heading strong, .field-heading small { display: block; }
.field-heading small { margin-top: 3px; color: var(--muted); font-weight: 400; }
.reminder-list { display: grid; gap: 8px; margin-bottom: 8px; }
.reminder-row { display: flex; align-items: center; gap: 8px; }
.reminder-row label { flex: 1; display: grid; grid-template-columns: minmax(90px,130px) 1fr; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.reminder-row input { min-width: 0; }
.reminder-row span { color: var(--muted); font-size: 12px; }
.btn-small { min-height: 34px; padding: 7px 11px; font-size: 11px; }
.cron-box { padding: 17px; border: 1px solid color-mix(in srgb,var(--primary) 28%,var(--line)); border-radius: 14px; background: var(--primary-soft); }
.cron-box > strong { display: block; margin-bottom: 4px; }
.cron-box p { margin: 0 0 13px; color: var(--muted); }
.code-copy { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 10px; align-items: start; margin: 8px 0; }
.code-copy span { padding-top: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.code-copy code { display: block; padding: 8px 10px; overflow-wrap: normal; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 11px; user-select: all; }
.notification-actions .button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.notification-actions form { margin: 0; }

@media (max-width: 780px) {
    .notification-settings .panel-heading { align-items: flex-start; }
    .field-heading { align-items: stretch; flex-direction: column; }
    .field-heading .btn { align-self: flex-start; }
    .code-copy { grid-template-columns: 1fr; gap: 3px; }
    .code-copy span { padding-top: 0; }
}
@media (max-width: 520px) {
    .reminder-row label { grid-template-columns: 95px 1fr; }
    .notification-actions .button-row, .notification-actions form, .notification-actions .btn { width: 100%; }
}

/* Fleet maintenance, permissions and registration modules */
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.span-full { grid-column: 1 / -1; }
.muted-text { color: var(--muted); font-size: 11px; }
.permission-check-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.permission-check { display: flex !important; grid-template-columns: auto 1fr !important; align-items: flex-start; gap: 10px !important; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.permission-check input { width: 18px; height: 18px; margin-top: 2px; }
.permission-check strong, .permission-check small { display: block; }
.permission-check small { margin-top: 3px; }
.assignment-panel.is-disabled .permission-check { opacity: .55; }
.permission-superadmin-note { margin: 12px 0 0; }
.permission-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.permission-badge { color: var(--primary); border-color: color-mix(in srgb,var(--primary) 25%,var(--line)); background: var(--primary-soft); }
.service-filter { grid-template-columns: repeat(5,minmax(125px,1fr)) auto; }
.registration-filter { grid-template-columns: minmax(250px,2fr) minmax(190px,1fr) auto; }
.compact-filter { grid-template-columns: repeat(2,minmax(170px,1fr)) auto; }
.mechanic-list { display: grid; gap: 7px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.mechanic-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; background: #f9fbfb; }
.mechanic-row strong, .mechanic-row small { display: block; }
.mechanic-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.service-type-redovan { color: #245c7a; border-color: #c5ddea; background: #eef8fd; }
.service-type-vanredan { color: var(--danger); border-color: #f2c1bc; background: var(--danger-soft); }
.service-report-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 0; }
.registration-status { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.registration-status.valid { color: var(--success); background: var(--success-soft); }
.registration-status.soon { color: var(--warning); background: var(--warning-soft); }
.registration-status.expired { color: var(--danger); background: var(--danger-soft); }
.registration-status.inactive { color: var(--muted); background: #edf0f2; }
.registration-settings-actions { justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--line); }

.print-report-body { min-height: 100vh; padding: 22px; background: #e9edef; }
.print-toolbar { width: min(210mm,100%); display: flex; justify-content: flex-end; gap: 9px; margin: 0 auto 14px; }
.a4-report { width: 210mm; min-height: 297mm; max-width: 100%; margin: 0 auto; padding: 16mm 14mm; background: #fff; box-shadow: 0 10px 35px rgba(20,35,45,.14); }
.print-report-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 12mm; border-bottom: 2px solid var(--ink); }
.print-report-header span { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.print-report-header h1 { margin: 3px 0 4px; font-size: 25px; }
.print-report-header p { margin: 0; color: var(--muted); font-size: 11px; }
.print-report-count { min-width: 70px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; font-size: 24px; font-weight: 800; text-align: center; }
.print-report-count small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.print-table { width: 100%; margin-top: 9mm; border-collapse: collapse; font-size: 10px; }
.print-table th, .print-table td { padding: 8px 7px; border: 1px solid #cfd6da; text-align: left; }
.print-table th { background: #eef2f4; font-size: 8px; letter-spacing: .04em; text-transform: uppercase; }
.print-report-footer { margin-top: 12mm; padding-top: 5mm; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; text-align: center; }

@media (max-width: 1100px) {
    .service-filter { grid-template-columns: repeat(3,minmax(140px,1fr)); }
    .service-filter .filter-actions { grid-column: span 3; }
    .permission-check-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
    .service-filter, .registration-filter, .compact-filter { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .service-filter .filter-actions, .registration-filter .filter-actions, .compact-filter .filter-actions { grid-column: span 2; }
    .service-report-kpis { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .button-row, .button-row .btn { width: 100%; }
    .service-filter, .registration-filter, .compact-filter { grid-template-columns: 1fr; }
    .service-filter .filter-actions, .registration-filter .filter-actions, .compact-filter .filter-actions { grid-column: span 1; }
    .mechanic-row { align-items: flex-start; flex-direction: column; }
    .print-report-body { padding: 0; }
    .print-toolbar { padding: 10px; }
    .a4-report { padding: 10mm 7mm; }
}
@page { size: A4 portrait; margin: 8mm; }
@media print {
    .print-report-body { padding: 0; background: #fff; }
    .print-toolbar { display: none !important; }
    .a4-report { width: auto; min-height: 0; padding: 0; box-shadow: none; }
    .print-table tr { break-inside: avoid; }
}

/* Login security: Cloudflare Turnstile and persistent authentication */
.remember-control { display: flex !important; grid-template-columns: auto 1fr !important; align-items: center; gap: 10px !important; cursor: pointer; }
.remember-control input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.remember-control span { display: flex; align-items: baseline; gap: 6px; }
.remember-control small { color: var(--muted); font-size: 10px; font-weight: 650; }
.turnstile-wrap { display: flex; justify-content: center; min-height: 65px; overflow: hidden; }
.turnstile-wrap .cf-turnstile { max-width: 100%; }

/* v1.3.0 fleet management */
.nav-link { position: relative; }
.nav-badge, .topbar-notifications b { display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--danger);color:#fff;font-size:9px;font-weight:800; }
.nav-badge { margin-left:auto; }
.topbar-notifications { position:relative;display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);text-decoration:none;font-size:19px; }
.topbar-notifications b { position:absolute;right:-7px;top:-7px; }
.fleet-card-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px; }
.fleet-card { padding:18px;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:var(--shadow); }
.fleet-card-head,.fleet-card-actions { display:flex;align-items:flex-start;justify-content:space-between;gap:12px; }
.fleet-card-head h3 { display:inline;margin:0 0 3px;font-size:20px; }.fleet-card-head p{margin:0;color:var(--muted);font-size:11px}.fleet-card-head .status-dot{display:inline-block;margin-right:7px}
.fleet-card-stats { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0; }
.fleet-card-stats div { padding:10px;border-radius:12px;background:#f7f9fa; }.fleet-card-stats dt{color:var(--muted);font-size:9px;font-weight:800;text-transform:uppercase}.fleet-card-stats dd{margin:4px 0 0;font-weight:800}.fleet-card-stats small{color:var(--muted)}
.fleet-card-actions { align-items:center;justify-content:flex-start; }
.status-pill.in_service,.status-pill.waiting_parts { color:#8a5b00;background:#fff0c8 }.status-pill.temporarily_unavailable,.status-pill.reported {color:#955c00;background:#fff2d7}.status-pill.broken,.status-pill.danger {color:var(--danger);background:var(--danger-soft)}.status-pill.sold,.status-pill.retired {color:var(--muted);background:#edf0f2}.status-pill.in_progress{color:#245c7a;background:#eef8fd}.status-pill.completed{color:var(--success);background:var(--success-soft)}.status-pill.storage{color:#245c7a;background:#eef8fd}.status-pill.mounted{color:var(--success);background:var(--success-soft)}
.notification-list { display:grid;gap:10px }.notification-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:start;padding:15px;border:1px solid var(--line);border-left:4px solid #6b7a80;border-radius:14px;background:#fff}.notification-item.severity-danger{border-left-color:var(--danger)}.notification-item.severity-warning{border-left-color:var(--warning)}.notification-item.severity-info{border-left-color:#287095}.notification-item.is-read{opacity:.68}.notification-symbol{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:10px;background:#f0f3f4;font-weight:900}.notification-item h3{margin:0 0 3px}.notification-item p{margin:0 0 6px;color:var(--muted)}.notification-item form{display:flex;gap:6px;flex-wrap:wrap}
.attachment-list{display:grid;gap:8px}.attachment-list>div{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;padding:11px;border:1px solid var(--line);border-radius:12px;background:#fafbfb}.attachment-list strong,.attachment-list small{display:block}.attachment-list small{color:var(--muted);margin-top:2px}
.vehicle-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.vehicle-hero h2{margin:0}.vehicle-hero p{color:var(--muted)}
.system-count-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.system-count-grid div,.migration-list div{display:flex;justify-content:space-between;gap:12px;padding:10px;border:1px solid var(--line);border-radius:10px}.migration-list{display:grid;gap:7px;max-height:420px;overflow:auto}
.audit-json{max-width:460px}.audit-json summary{cursor:pointer;color:var(--primary);font-weight:700}.audit-json pre{white-space:pre-wrap;overflow-wrap:normal;padding:10px;border-radius:10px;background:#f4f6f7;font-size:10px}
.text-danger{color:var(--danger)}.text-warning{color:var(--warning)}.text-success{color:var(--success)}.text-neutral{color:var(--muted)}
@media(max-width:1100px){.fleet-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.fleet-card-grid{grid-template-columns:1fr}.notification-item{grid-template-columns:auto 1fr}.notification-item form{grid-column:1/-1}.fleet-card-stats{grid-template-columns:1fr}.topbar-date{display:none}}

/* v1.3.1 – email activity notifications, responsive polish and touch reliability */
.activity-notification-settings .info-box { margin-top: 0; }
.switch-control { display:inline-flex; align-items:center; gap:10px; min-height:42px; padding:8px 12px; border:1px solid var(--line); border-radius:12px; background:#fff; font-weight:800; }
.switch-control input { width:20px; height:20px; accent-color:var(--primary); }
.event-selection-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin:22px 0 12px; }
.event-selection-heading h4 { margin:0; font-size:15px; }
.event-selection-heading p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.activity-event-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.activity-event-group { min-width:0; margin:0; padding:13px; border:1px solid var(--line); border-radius:14px; background:#f9fbfb; }
.activity-event-group legend { padding:0 7px; color:var(--primary); font-size:12px; font-weight:800; }
.check-card { display:flex; align-items:flex-start; gap:10px; margin:7px 0; padding:11px; border:1px solid transparent; border-radius:11px; background:#fff; cursor:pointer; transition:border-color .15s ease,background .15s ease; }
.check-card:hover { border-color:color-mix(in srgb,var(--primary) 35%,#fff); background:var(--primary-soft); }
.check-card input { width:18px; height:18px; flex:0 0 18px; margin-top:2px; accent-color:var(--primary); }
.check-card strong,.check-card small { display:block; }
.check-card small { margin-top:2px; color:var(--muted); font-size:11px; line-height:1.35; }
.notification-queue-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:16px; }
.notification-queue-summary > div { min-width:0; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.notification-queue-summary span,.notification-queue-summary strong { display:block; }
.notification-queue-summary span { color:var(--muted); font-size:11px; }
.notification-queue-summary strong { margin-top:5px; font-size:16px; overflow-wrap:normal; }
.cron-url-field { display:block; margin-top:16px; }
.settings-secondary-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px; margin:-8px 0 24px; }
.settings-secondary-actions form { margin:0; }

/* Shared performance-friendly layout guards. */
.page-content,.panel,.content-grid,.form-grid { min-width:0; }
.table-wrap { position:relative; max-width:100%; overflow:auto; overscroll-behavior-inline:contain; -webkit-overflow-scrolling:touch; scrollbar-gutter:stable; }
.data-table { min-width:720px; }
.data-table th,.data-table td { vertical-align:top; }
.data-table td { overflow-wrap:normal; }
.table-actions,.button-row { flex-wrap:wrap; }
input,select,textarea { max-width:100%; }
textarea { resize:vertical; }

@media (hover:none) {
    .btn:hover { transform:none; box-shadow:none; }
    .check-card:hover { border-color:transparent; background:#fff; }
}

@media (max-width:1100px) {
    .page-content { padding:24px 22px 32px; }
    .content-grid.two-thirds,.content-grid.one-third { grid-template-columns:1fr; }
    .kpi-grid,.report-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .activity-event-groups { grid-template-columns:1fr 1fr; }
}

@media (max-width:780px) {
    body.has-open-sidebar { overflow:hidden; }
    body { font-size:14px; }
    .topbar { min-height:68px; padding:10px 14px; }
    .topbar h1 { font-size:17px; }
    .page-content { padding:16px 13px 26px; }
    .page-heading { align-items:stretch; flex-direction:column; gap:12px; margin-bottom:15px; }
    .page-heading h2 { font-size:21px; }
    .page-heading > .btn,.page-heading > form,.page-heading > .button-row { width:100%; }
    .page-heading > .btn,.page-heading > .button-row .btn,.page-heading > form .btn { min-height:44px; }
    .page-heading > .button-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
    .panel { margin-bottom:14px; padding:15px; border-radius:14px; }
    .panel-heading { align-items:flex-start; flex-direction:column; gap:10px; margin-bottom:13px; }
    .sticky-panel-heading { top:68px; margin:-15px -15px 10px; padding:13px 15px; border-radius:14px 14px 0 0; }
    .form-grid { grid-template-columns:1fr !important; gap:12px; }
    .form-grid .span-2,.span-full { grid-column:1 !important; }
    .content-grid.equal,.content-grid.two-thirds,.content-grid.one-third { grid-template-columns:1fr; gap:14px; }
    .kpi-grid,.report-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .kpi-card { min-height:108px; padding:14px; }
    .kpi-card strong { font-size:21px; }
    .inline-filter { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; align-items:end; }
    .inline-filter > label { min-width:0; }
    .inline-filter > .btn,.inline-filter > .button-row { width:100%; }
    .button-row { gap:8px; }
    .button-row .btn { flex:1 1 auto; min-height:42px; }
    .data-table { min-width:680px; }
    .data-table th,.data-table td { padding:10px 9px; }
    .table-actions { min-width:88px; }
    .btn-icon { width:38px; height:38px; }
    .activity-event-groups { grid-template-columns:1fr; }
    .notification-queue-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .event-selection-heading { align-items:stretch; flex-direction:column; }
    .event-selection-heading .button-row { width:100%; }
    .settings-savebar { gap:10px; }
    .settings-secondary-actions { justify-content:stretch; }
    .settings-secondary-actions form { flex:1 1 220px; }
    .settings-secondary-actions .btn { width:100%; }
    .auth-shell { padding:16px; }
    .auth-card { width:min(100%,520px); }
}

@media (max-width:520px) {
    .topbar { gap:10px; }
    .topbar > div:nth-child(2) { min-width:0; }
    .topbar h1,.topbar small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .page-content { padding:12px 9px 22px; }
    .panel { padding:13px; border-radius:12px; box-shadow:none; }
    .page-heading h2 { font-size:19px; }
    .page-heading > .button-row { grid-template-columns:1fr; }
    .kpi-grid,.report-kpis,.notification-queue-summary { grid-template-columns:1fr; }
    .inline-filter { grid-template-columns:1fr; }
    .button-row { display:grid; grid-template-columns:1fr; width:100%; }
    .button-row .btn,.button-row form,.button-row form .btn { width:100%; }
    .btn { min-height:44px; }
    input,select,textarea { min-height:44px; font-size:16px; }
    textarea { min-height:100px; }
    input[type="checkbox"],input[type="radio"] { min-height:auto; }
    .data-table { min-width:640px; font-size:13px; }
    .table-wrap { margin-inline:-4px; padding-bottom:4px; }
    .activity-event-group { padding:10px; }
    .check-card { padding:10px 8px; }
    .settings-savebar { align-items:stretch; flex-direction:column; }
    .settings-savebar .btn { width:100%; }
    .sidebar { width:min(88vw,310px); }
    .sidebar-brand { min-height:82px; padding:15px 17px; }
    .sidebar-nav { padding:12px 10px; }
    .nav-link { min-height:44px; }
    .auth-card { padding:20px 16px; border-radius:16px; }
}

/* v1.3.4 – fully fluid mobile/tablet layout without horizontal page scrolling */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

body,
button,
input,
select,
textarea {
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

.app-shell,
.main-column,
.topbar,
.page-content,
.page-heading,
.panel,
.panel-heading,
.content-grid,
.form-grid,
.filter-grid,
.inline-filter,
.button-row,
.quick-actions,
.alert-list,
.notification-list,
.attachment-list,
.fleet-card,
.fleet-card-head,
.fleet-card-actions,
.vehicle-hero,
.settings-savebar,
.settings-secondary-actions,
.activity-event-groups,
.activity-event-group,
.notification-queue-summary,
.table-wrap {
    min-width: 0;
    max-width: 100%;
}

.btn,
.btn-icon,
button,
.badge,
.status-pill,
.registration-status,
.nav-badge {
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
}

.table-wrap {
    overflow-y: visible;
}

.data-table td,
.check-row small,
.code-copy code,
.audit-json pre,
.notification-queue-summary strong {
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

@media screen and (max-width: 1100px) {
    .page-content,
    .main-column,
    .panel,
    .auth-shell,
    .installer-shell {
        width: 100%;
        max-width: 100%;
    }

    .page-heading > *,
    .panel-heading > *,
    .vehicle-hero > *,
    .fleet-card-head > *,
    .notification-item > *,
    .attachment-list > div > *,
    .system-count-grid > *,
    .migration-list > * {
        min-width: 0;
        max-width: 100%;
    }

    .page-heading,
    .panel-heading,
    .vehicle-hero,
    .print-report-header {
        align-items: stretch;
        flex-direction: column;
    }

    .page-heading .btn,
    .page-heading form,
    .page-heading form .btn,
    .panel-heading > .btn,
    .panel-heading > a.btn,
    .vehicle-hero .button-row {
        width: 100%;
    }

    .btn,
    button {
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .btn-icon {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .filter-grid,
    .reports-filter,
    .vehicle-filter,
    .service-filter,
    .registration-filter,
    .compact-filter,
    .dashboard-detail-filter,
    .registration-history-filter,
    .inline-filter {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
        gap: 11px;
        width: 100%;
    }

    .filter-grid > *,
    .reports-filter > *,
    .vehicle-filter > *,
    .service-filter > *,
    .registration-filter > *,
    .compact-filter > *,
    .inline-filter > * {
        min-width: 0 !important;
        max-width: 100%;
        width: 100%;
    }

    .filter-actions,
    .service-filter .filter-actions,
    .registration-filter .filter-actions,
    .compact-filter .filter-actions {
        grid-column: 1 / -1 !important;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 8px;
        width: 100%;
    }

    .filter-actions .btn,
    .filter-actions form,
    .filter-actions form .btn {
        width: 100%;
    }

    .bar-chart {
        width: 100%;
        height: auto;
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        align-items: end;
        gap: 7px;
        padding-top: 14px;
        overflow: visible;
    }

    .bar-item {
        width: 100%;
        min-width: 0;
        height: 210px;
        grid-template-rows: 28px minmax(130px, 1fr) 24px;
    }

    .bar-value,
    .bar-item small {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .table-wrap,
    .wide-table {
        width: 100%;
        max-width: 100%;
        max-height: none;
        margin: 0;
        padding: 0;
        overflow: visible;
        scrollbar-gutter: auto;
    }

    .data-table,
    .input-table {
        display: block;
        width: 100%;
        min-width: 0 !important;
        max-width: 100%;
        border: 0;
        border-spacing: 0;
        font-size: 13px;
    }

    .data-table thead {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }

    .data-table tbody {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
        max-width: 100%;
    }

    .data-table tbody tr {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 3px 12px rgba(24,39,52,.035);
    }

    .data-table tbody tr.has-entry {
        border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
        background: #fbfdfd;
    }

    .data-table tbody td,
    .data-table.compact tbody td,
    .data-table tbody td.table-actions {
        display: grid !important;
        grid-template-columns: minmax(104px, 36%) minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        min-width: 0 !important;
        padding: 10px 12px;
        border: 0;
        border-bottom: 1px solid #edf0f2;
        background: transparent !important;
        text-align: left !important;
        white-space: normal;
        overflow: hidden;
    }

    .data-table tbody td:last-child {
        border-bottom: 0;
    }

    .data-table tbody td::before {
        content: attr(data-label);
        min-width: 0;
        color: var(--muted);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .04em;
        line-height: 1.35;
        text-transform: uppercase;
        white-space: normal;
        word-break: normal;
        overflow-wrap: normal;
    }

    .data-table tbody td[data-label=""]::before,
    .data-table tbody td.empty-cell::before {
        display: none;
    }

    .data-table tbody td.empty-cell {
        display: block !important;
        padding: 24px 14px !important;
        text-align: center !important;
    }

    .mobile-cell-value {
        display: block;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        word-break: normal;
        overflow-wrap: normal;
        hyphens: none;
    }

    .mobile-cell-value > * {
        max-width: 100%;
    }

    td.table-actions .mobile-cell-value {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }

    td.table-actions .mobile-cell-value form {
        display: inline-flex;
        width: auto;
    }

    .table-input,
    .note-input {
        width: 100%;
        min-width: 0 !important;
        max-width: 100%;
    }

    .data-table code,
    .mobile-cell-value code,
    .mobile-cell-value a[href^="mailto:"],
    .mobile-cell-value a[href^="http"] {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .note-cell,
    .audit-json,
    .audit-json pre {
        width: 100%;
        max-width: 100%;
    }

    .audit-json pre {
        overflow: hidden;
        white-space: pre-wrap;
        word-break: normal;
        overflow-wrap: normal;
    }

    .notification-item,
    .attachment-list > div {
        grid-template-columns: 1fr;
    }

    .notification-symbol {
        justify-self: start;
    }

    .notification-item form,
    .attachment-list > div > :last-child {
        grid-column: 1;
        width: 100%;
    }

    .notification-item form .btn,
    .attachment-list > div > :last-child.btn,
    .attachment-list > div > :last-child form,
    .attachment-list > div > :last-child form .btn {
        width: 100%;
    }

    .system-count-grid {
        grid-template-columns: 1fr;
    }

    .system-count-grid div,
    .migration-list div {
        align-items: flex-start;
        flex-direction: column;
    }

    .code-copy code,
    .cron-url-field input,
    .current-file,
    .notification-queue-summary strong {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .print-report-body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .print-toolbar {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .a4-report {
        width: 100%;
        max-width: 100%;
        min-height: 0;
        padding: 18px 12px;
    }

    .print-report-count {
        align-self: flex-start;
        min-width: 0;
        width: min(120px, 100%);
    }

    .print-table {
        width: 100%;
        max-width: 100%;
        table-layout: fixed;
        font-size: 8px;
    }

    .print-table th,
    .print-table td {
        padding: 5px 4px;
        word-break: normal;
        overflow-wrap: normal;
        hyphens: none;
    }
}

@media screen and (max-width: 520px) {
    .filter-grid,
    .reports-filter,
    .vehicle-filter,
    .service-filter,
    .registration-filter,
    .compact-filter,
    .dashboard-detail-filter,
    .registration-history-filter,
    .inline-filter,
    .filter-actions {
        grid-template-columns: 1fr !important;
    }

    .bar-chart {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .bar-item {
        height: 180px;
        grid-template-rows: 26px minmax(110px, 1fr) 23px;
    }

    .data-table tbody td,
    .data-table.compact tbody td,
    .data-table tbody td.table-actions {
        grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
        gap: 9px;
        padding: 9px 10px;
    }

    .page-heading .btn,
    .panel-heading .btn,
    .button-row .btn,
    .filter-actions .btn,
    .settings-savebar .btn,
    .settings-secondary-actions .btn {
        width: 100%;
    }

    .reminder-row {
        align-items: stretch;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .reminder-row label {
        grid-template-columns: minmax(74px, 90px) minmax(0, 1fr);
    }

    .remember-control span {
        display: block;
    }

    .turnstile-wrap {
        justify-content: flex-start;
    }
}

@media screen and (max-width: 360px) {
    .page-content {
        padding-inline: 7px;
    }

    .panel {
        padding-inline: 11px;
    }

    .btn,
    button {
        font-size: 12px;
    }

    .data-table tbody td,
    .data-table.compact tbody td,
    .data-table tbody td.table-actions {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .data-table tbody td::before {
        margin-bottom: 2px;
    }

    .turnstile-wrap .cf-turnstile {
        transform: scale(.88);
        transform-origin: left top;
    }
}

@media screen and (max-width: 1100px) {
    .print-table.mobile-card-table {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin-top: 18px;
        border: 0;
    }

    .print-table.mobile-card-table thead {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }

    .print-table.mobile-card-table tbody {
        display: grid;
        gap: 10px;
        width: 100%;
    }

    .print-table.mobile-card-table tbody tr {
        display: block;
        width: 100%;
        overflow: hidden;
        border: 1px solid #cfd6da;
        border-radius: 12px;
        background: #fff;
    }

    .print-table.mobile-card-table tbody td {
        display: grid;
        grid-template-columns: minmax(104px, 38%) minmax(0, 1fr);
        gap: 9px;
        width: 100%;
        max-width: 100%;
        padding: 8px 10px;
        border: 0;
        border-bottom: 1px solid #e2e6e8;
        font-size: 11px;
        text-align: left;
        overflow: hidden;
    }

    .print-table.mobile-card-table tbody td:last-child {
        border-bottom: 0;
    }

    .print-table.mobile-card-table tbody td::before {
        content: attr(data-label);
        color: #66737d;
        font-size: 9px;
        font-weight: 800;
        line-height: 1.35;
        text-transform: uppercase;
    }
}

/* v1.3.4 – final overflow guards for shared components */
.topbar > div:nth-child(2),
.sidebar-brand > div,
.auth-brand > div,
.quick-actions a > div,
.alert-list a > div,
.current-file > *,
.form-footer > *,
.form-divider > *,
.field-heading > *,
.mechanic-row > *,
.fleet-card-actions > *,
.settings-savebar > * {
    min-width: 0;
    max-width: 100%;
}

.alert-list a {
    grid-template-columns: 12px minmax(0, 1fr) auto;
}

.migration-list {
    overflow-x: hidden;
    overflow-y: auto;
}

@media screen and (max-width: 1100px) {
    .topbar > div:nth-child(2) {
        flex: 1 1 auto;
        overflow: hidden;
    }

    .topbar h1,
    .topbar small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .form-footer,
    .form-divider,
    .field-heading,
    .mechanic-row,
    .fleet-card-actions,
    .settings-savebar,
    .current-file {
        flex-wrap: wrap;
    }

    .data-table thead tr,
    .data-table thead th,
    .print-table.mobile-card-table thead tr,
    .print-table.mobile-card-table thead th {
        display: block !important;
        width: 1px !important;
        min-width: 0 !important;
        max-width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        border: 0 !important;
    }
}

.vehicle-hero-metrics {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 10px;
}

.vehicle-hero-metrics > div {
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7f9fa;
}

.vehicle-hero-metrics span,
.vehicle-hero-metrics strong,
.vehicle-hero-metrics small {
    display: block;
    max-width: 100%;
}

.vehicle-hero-metrics span,
.vehicle-hero-metrics small {
    color: var(--muted);
    font-size: 10px;
}

.vehicle-hero-metrics strong {
    margin-top: 4px;
}

.form-actions,
.registration-settings-actions,
.locked-setting > div,
.sidebar-user {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
}

.sidebar-user > div,
.locked-setting > div > div {
    min-width: 0;
    max-width: 100%;
}

.btn-warning {
    color: #6d4300;
    border-color: #e9c681;
    background: var(--warning-soft);
}

@media screen and (max-width: 780px) {
    .vehicle-hero-metrics {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-actions,
    .registration-settings-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        width: 100%;
    }

    .form-actions .btn,
    .registration-settings-actions .btn,
    .registration-settings-actions form,
    .registration-settings-actions form .btn {
        width: 100%;
    }
}

@media screen and (max-width: 520px) {
    .vehicle-hero-metrics,
    .form-actions,
    .registration-settings-actions {
        grid-template-columns: 1fr;
    }

    .installer-header {
        flex-direction: column;
    }
}


/* v1.3.5 – help cards keep the step number in the normal layout on small screens */
@media screen and (max-width: 520px) {
    .help-card {
        grid-template-columns: 38px minmax(0, 1fr);
        column-gap: 12px;
    }

    .help-card > span {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .help-card h3 {
        font-size: 16px;
    }
}

/* ========================================================================== 
   v1.4.0 – Modular Custom ERP shell + Deliveries module
   ========================================================================== */
:root {
    --secondary: #0f766e;
    --accent: #d97706;
    --sidebar-bg: #102328;
    --sidebar-width: 286px;
    --blue-soft: #eef5ff;
    --blue: #2563eb;
    --orange-soft: #fff7e8;
    --orange: #d97706;
    --violet-soft: #f6f0ff;
    --violet: #7c3aed;
}
.sr-only { position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important; }
.nav-icon svg,.module-card-icon svg,.module-inline-icon svg,.btn svg,.topbar-notifications svg,.quick-actions svg,.delivery-meta svg,.delivery-search-field svg,.module-shortcuts svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round; }
.btn svg { width:16px;height:16px; }

/* Shell/navigation */
.sidebar { width:var(--sidebar-width); background:linear-gradient(180deg,color-mix(in srgb,var(--sidebar-bg) 92%,#fff),var(--sidebar-bg)); box-shadow:8px 0 30px rgba(15,35,40,.13); }
.main-column { width:calc(100% - var(--sidebar-width)); margin-left:var(--sidebar-width); }
.sidebar-brand { min-height:88px;padding:17px 19px; }
.sidebar-brand strong { max-width:172px;font-size:14px; }
.sidebar-nav { padding:14px 12px 18px; }
.nav-section { padding:19px 11px 7px;color:rgba(255,255,255,.42);font-size:9px;letter-spacing:.14em; }
.nav-link,.module-nav-toggle { width:100%;display:flex;align-items:center;gap:11px;margin:2px 0;padding:10px 11px;border:0;border-radius:11px;color:rgba(255,255,255,.76);background:transparent;font:inherit;font-weight:650;text-align:left;transition:background .16s ease,color .16s ease; }
.nav-link:hover,.module-nav-toggle:hover { color:#fff;background:rgba(255,255,255,.075); }
.nav-link.is-active,.module-nav-item.is-active>.module-nav-toggle { color:#fff;background:rgba(255,255,255,.11);box-shadow:none; }
.nav-icon { width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 22px;color:rgba(255,255,255,.64); }
.nav-link:hover .nav-icon,.nav-link.is-active .nav-icon,.module-nav-toggle:hover .nav-icon,.module-nav-item.is-active>.module-nav-toggle .nav-icon { color:#fff; }
.nav-label { min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.nav-badge { margin-left:auto; }
.module-nav-list { display:grid;gap:2px; }
.module-nav-item { border-radius:12px;overflow:hidden; }
.module-nav-chevron { width:17px;height:17px;display:inline-flex;align-items:center;justify-content:center;opacity:.5;transition:transform .18s ease; }
.module-nav-chevron svg { width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2; }
.module-nav-item.is-open .module-nav-chevron { transform:rotate(90deg);opacity:.85; }
.module-subnav { display:grid;gap:1px;margin:1px 0 5px;padding:3px 0 4px 33px; }
.module-subnav[hidden] { display:none; }
.module-subnav-link { display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:9px;color:rgba(255,255,255,.62);font-size:12px;font-weight:600; }
.module-subnav-link span:first-child { width:16px;height:16px;display:inline-flex;align-items:center;justify-content:center; }
.module-subnav-link svg { width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
.module-subnav-link:hover { color:#fff;background:rgba(255,255,255,.065); }
.module-subnav-link.is-active { color:#fff;background:rgba(255,255,255,.11); }
.module-subnav-link.is-active::before { content:"";width:4px;height:4px;margin-left:-16px;border-radius:50%;background:#8fe3bd;box-shadow:0 0 0 4px rgba(143,227,189,.12); }
.sidebar-user { display:grid;grid-template-columns:36px minmax(0,1fr) 34px;gap:9px;padding:14px 15px;flex-wrap:nowrap; }
.sidebar-user-avatar { width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:11px;background:rgba(255,255,255,.12);font-weight:800; }
.sidebar-user-copy { min-width:0; }
.sidebar-user-copy strong,.sidebar-user-copy small { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.topbar { min-height:72px;padding:10px 28px;gap:14px; }
.topbar-brand-copy { min-width:0; }
.topbar-brand-copy strong,.topbar-brand-copy small { display:block; }
.topbar-brand-copy strong { font-size:14px; }
.topbar-brand-copy small { margin-top:2px;font-size:10px; }
.topbar-context { margin-left:10px;padding-left:18px;border-left:1px solid var(--line);color:var(--muted);font-size:12px;font-weight:700; }
.topbar-notifications { margin-left:auto; }
.topbar-date { margin-left:0; }
.page-content { max-width:1760px;padding-top:25px; }
.erp-page-heading { display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:20px; }
.erp-page-heading h2 { margin:2px 0 0;font-size:28px;line-height:1.15;letter-spacing:-.02em; }
.erp-page-heading p { margin:6px 0 0;color:var(--muted);font-size:12px; }
.heading-actions { display:flex;align-items:center;gap:9px;flex-wrap:wrap; }

/* Dashboard module switcher */
.dashboard-heading { margin-bottom:14px; }
.dashboard-date-pill { min-width:125px;padding:9px 13px;border:1px solid var(--line);border-radius:12px;background:#fff; }
.dashboard-date-pill span,.dashboard-date-pill strong { display:block; }
.dashboard-date-pill span { color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.08em; }
.dashboard-date-pill strong { margin-top:2px;font-size:12px; }
.dashboard-module-switcher { display:flex;gap:4px;width:max-content;max-width:100%;margin:0 0 20px;padding:4px;border:1px solid var(--line);border-radius:13px;background:#fff;overflow:auto; }
.dashboard-module-switcher a { min-width:max-content;padding:8px 13px;border-radius:9px;color:var(--muted);font-size:11px;font-weight:750; }
.dashboard-module-switcher a:hover { color:var(--ink);background:#f5f7f8; }
.dashboard-module-switcher a.is-active { color:#fff;background:var(--primary);box-shadow:0 5px 12px color-mix(in srgb,var(--primary) 22%,transparent); }
.module-overview-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px; }
.module-overview-card { min-height:148px;display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:start;gap:13px;padding:19px;border:1px solid var(--line);border-radius:18px;color:var(--ink);background:#fff;box-shadow:0 5px 18px rgba(24,39,52,.035);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
.module-overview-card:hover { color:var(--ink);transform:translateY(-2px);border-color:color-mix(in srgb,var(--primary) 35%,var(--line));box-shadow:0 15px 34px rgba(24,39,52,.08); }
.module-card-icon { width:46px;height:46px;display:flex;align-items:center;justify-content:center;border-radius:14px;color:var(--primary);background:var(--primary-soft); }
.module-overview-card.services .module-card-icon { color:#7b5a0b;background:#fff8df; }
.module-overview-card.registrations .module-card-icon { color:#2563eb;background:#eef5ff; }
.module-overview-card.deliveries .module-card-icon { color:#167a49;background:#eaf8f1; }
.module-overview-card>div>span,.module-overview-card small { display:block;color:var(--muted); }
.module-overview-card>div>span { font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.07em; }
.module-overview-card strong { display:block;margin:9px 0 5px;font-size:20px;line-height:1.1; }
.module-overview-card small { font-size:10px;line-height:1.5; }
.module-overview-card>b { color:var(--muted);font-size:18px; }
.dashboard-overview-row { display:grid;grid-template-columns:minmax(0,1.45fr) minmax(310px,.65fr);gap:18px; }
.dashboard-quick-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.health-list { display:grid;gap:7px; }
.health-list a { display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:11px;align-items:center;padding:10px 6px;color:var(--ink);border-bottom:1px solid #edf0f2; }
.health-list a:last-child { border-bottom:0; }
.health-list strong,.health-list small { display:block; }
.health-list small { color:var(--muted);font-size:10px; }
.health-list b { color:var(--muted); }
.health-dot { width:8px;height:8px;border-radius:50%;background:#9eabb3; }
.health-dot.ok { background:var(--success);box-shadow:0 0 0 4px var(--success-soft); }
.health-dot.warn { background:var(--warning);box-shadow:0 0 0 4px var(--warning-soft); }
.dashboard-section-heading { display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px; }
.dashboard-section-heading>div { display:flex;align-items:center;gap:12px; }
.dashboard-section-heading h3 { margin:0;font-size:22px; }
.dashboard-section-heading p { margin:3px 0 0;color:var(--muted);font-size:11px; }
.module-inline-icon { width:42px;height:42px;display:flex;align-items:center;justify-content:center;border-radius:12px;color:var(--primary);background:var(--primary-soft); }
.dashboard-kpis { grid-template-columns:repeat(4,minmax(0,1fr)); }
.compact-record-list,.upcoming-deliveries-list { display:grid;gap:5px; }
.compact-record-list a,.upcoming-deliveries-list a { display:flex;align-items:center;gap:10px;padding:10px;border-radius:11px;color:var(--ink);background:#f8fafb; }
.compact-record-list a>div,.upcoming-deliveries-list a>div { min-width:0;flex:1; }
.compact-record-list strong,.compact-record-list small,.upcoming-deliveries-list strong,.upcoming-deliveries-list small { display:block; }
.compact-record-list small,.upcoming-deliveries-list small { color:var(--muted);font-size:10px; }
.compact-record-list b,.upcoming-deliveries-list b { font-size:12px; }
.module-shortcuts { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px; }
.module-shortcuts a { display:flex;gap:12px;padding:16px;border:1px solid var(--line);border-radius:14px;color:var(--ink);background:#fff; }
.module-shortcuts a>svg { width:24px;height:24px;color:var(--primary);flex:0 0 24px; }
.module-shortcuts strong,.module-shortcuts small { display:block; }
.module-shortcuts small { margin-top:3px;color:var(--muted);font-size:10px; }

/* Deliveries weekly planning */
.delivery-heading { margin-bottom:20px; }
.delivery-new-button { min-width:160px; }
.delivery-planner { overflow:hidden;border:1px solid var(--line);border-radius:19px;background:#fff;box-shadow:0 8px 28px rgba(24,39,52,.05); }
.delivery-week-toolbar { min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 16px;border-bottom:1px solid var(--line); }
.week-navigation { display:flex;align-items:center;gap:10px; }
.icon-button { width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:10px;color:var(--ink);background:#fff;font-size:18px;font-weight:700; }
.icon-button:hover { color:var(--primary);border-color:color-mix(in srgb,var(--primary) 40%,var(--line));background:var(--primary-soft); }
.week-title { min-width:150px;padding:0 2px; }
.week-title span,.week-title strong { display:block; }
.week-title span { color:var(--primary);font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.08em; }
.week-title strong { margin-top:2px;font-size:13px; }
.view-mode-chip { display:flex;align-items:center;gap:7px;padding:8px 12px;border-radius:10px;color:#35434d;background:#f4f7f8;font-size:11px;font-weight:700; }
.view-mode-chip svg { width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8; }
.delivery-summary-strip { display:grid;grid-template-columns:1.3fr .8fr .8fr;border-bottom:1px solid var(--line);background:#fbfcfc; }
.delivery-summary-cell { min-height:59px;display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border-right:1px solid var(--line); }
.delivery-summary-cell:last-child { border-right:0; }
.delivery-summary-cell>span { color:var(--muted);font-size:10px; }
.delivery-summary-cell>strong { font-size:18px; }
.summary-count { justify-content:flex-start;flex-wrap:wrap; }
.summary-count>span { margin-right:8px;color:var(--muted); }
.summary-count>span strong { color:var(--ink);font-size:17px; }
.summary-count small { display:flex;align-items:center;gap:5px;color:var(--muted);font-size:9px; }
.summary-count small b { color:var(--ink); }
.legend-dot { width:7px;height:7px;display:inline-block;border-radius:50%;background:#9aa4ad; }
.legend-dot.payment-a { background:var(--blue); }
.legend-dot.payment-b { background:var(--orange); }
.legend-dot.planned { background:var(--orange); }
.legend-dot.delivered { background:var(--success); }
.planned-value { color:var(--orange); }
.delivered-value { color:var(--success); }
.delivery-filter-bar { display:grid;grid-template-columns:150px minmax(260px,1.35fr) minmax(155px,.65fr) minmax(130px,.45fr) auto auto auto;align-items:center;gap:8px;padding:11px 13px;border-bottom:1px solid var(--line); }
.delivery-filter-bar label { margin:0; }
.delivery-filter-bar input,.delivery-filter-bar select { min-height:38px;border-radius:9px;font-size:11px; }
.delivery-date-filter { display:grid;grid-template-columns:auto 1fr;align-items:center;gap:7px;color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em; }.delivery-date-filter input { min-width:0;width:100%;font-size:11px;text-transform:none;letter-spacing:0; }
.delivery-search-field { position:relative;display:block!important; }
.delivery-search-field>span { position:absolute;left:11px;top:50%;z-index:1;width:16px;height:16px;display:flex;align-items:center;justify-content:center;transform:translateY(-50%);color:#89969f; }
.delivery-search-field input { padding-left:34px; }
.delivery-search-field svg { width:14px;height:14px; }
.segmented-filter { display:flex;gap:3px;padding:3px;border:1px solid var(--line);border-radius:10px;background:#f7f9fa; }
.segmented-filter button { min-height:30px;padding:5px 9px;border:0;border-radius:7px;color:var(--muted);background:transparent;font-size:10px;font-weight:700;white-space:nowrap; }
.segmented-filter button b { margin-right:2px; }
.segmented-filter button[data-payment-filter="A"] b { color:var(--blue); }
.segmented-filter button[data-payment-filter="B"] b { color:var(--orange); }
.segmented-filter button.is-active { color:var(--ink);background:#fff;box-shadow:0 2px 7px rgba(24,39,52,.08); }
.ajax-indicator { color:var(--muted);font-size:9px;white-space:nowrap; }
.delivery-week-board { display:grid;grid-template-columns:repeat(7,minmax(160px,1fr));min-height:480px; }
.delivery-day-column { min-width:0;border-right:1px solid var(--line);background:#fcfdfd; }
.delivery-day-column:last-child { border-right:0; }
.delivery-day-column.is-today { background:color-mix(in srgb,var(--primary-soft) 32%,#fff); }
.delivery-day-header { min-height:60px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border-bottom:1px solid var(--line);background:#f9fbfb; }
.delivery-day-header span,.delivery-day-header strong { display:block; }
.delivery-day-header span { color:#5d7192;font-size:8px;font-weight:800;text-transform:uppercase;letter-spacing:.06em; }
.delivery-day-header strong { margin-top:2px;font-size:12px; }
.day-add-button { width:26px;height:26px;border:0;border-radius:8px;color:#8aa2bf;background:transparent;font-size:17px; }
.day-add-button:hover { color:var(--primary);background:var(--primary-soft); }
.delivery-day-list { min-height:415px;display:grid;align-content:start;gap:9px;padding:10px 8px 13px; }
.delivery-card { padding:11px 10px;border:1px solid #e0e6e9;border-left:3px solid var(--orange);border-radius:12px;color:var(--ink);background:#fff;box-shadow:0 3px 10px rgba(24,39,52,.035);cursor:pointer;transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease; }
.delivery-card:hover,.delivery-card:focus-visible { outline:none;transform:translateY(-1px);border-color:color-mix(in srgb,var(--primary) 32%,var(--line));box-shadow:0 8px 20px rgba(24,39,52,.08); }
.delivery-card.status-delivered { border-left-color:var(--success); }
.delivery-card.status-cancelled { border-left-color:#9ca3af;opacity:.67; }
.delivery-card-top { display:flex;align-items:center;justify-content:space-between;gap:7px; }
.payment-chip { min-width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;padding:0 6px;border-radius:6px;font-size:10px;font-weight:850; }
.payment-chip.payment-a { color:var(--blue);background:var(--blue-soft); }
.payment-chip.payment-b { color:var(--orange);background:var(--orange-soft); }
.delivery-status { padding:4px 7px;border-radius:999px;font-size:8px;font-weight:800; }
.delivery-status.status-planned { color:#a15f03;background:#fff5dc; }
.delivery-status.status-delivered { color:var(--success);background:var(--success-soft); }
.delivery-status.status-cancelled { color:#6b7280;background:#f0f2f3; }
.delivery-card h4 { margin:10px 0 3px;overflow:hidden;font-size:13px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap; }
.delivery-card p { margin:0; }
.delivery-note-number { overflow:hidden;color:#6d39bd;font-size:8.5px;text-overflow:ellipsis;white-space:nowrap; }
.delivery-meta { display:flex;align-items:center;gap:5px;margin-top:9px!important;color:#7a8994;font-size:9px; }
.delivery-meta svg { width:12px;height:12px;flex:0 0 12px; }
.delivery-card-footer { display:grid;grid-template-columns:auto minmax(0,1fr);align-items:end;gap:6px;margin-top:10px;padding-top:8px;border-top:1px solid #edf0f2; }
.delivery-card-footer strong { font-size:11px; }
.delivery-card-footer span { overflow:hidden;color:#36454f;font-size:9px;line-height:1.35;text-align:right;text-overflow:ellipsis; }
.delivery-empty-slot { min-height:108px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:1px dashed #e2e7ea;border-radius:12px;color:#9fb0c5;background:transparent; }
.delivery-empty-slot:not(:disabled):hover { color:var(--primary);border-color:color-mix(in srgb,var(--primary) 35%,var(--line));background:var(--primary-soft); }
.delivery-empty-slot span { font-size:20px;font-weight:300; }
.delivery-empty-slot small { font-size:9px; }
.delivery-board-note { padding:9px 12px;border-top:1px solid var(--line);color:var(--muted);font-size:9px; }
.status-swatch { width:7px;height:7px;display:inline-block;margin:0 4px 0 8px;border-radius:50%; }
.status-swatch:first-child { margin-left:0; }
.status-swatch.planned { background:var(--orange); }.status-swatch.delivered { background:var(--success); }

/* ERP modal */
.erp-modal { position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:22px; }
.erp-modal[hidden] { display:none; }
.erp-modal-backdrop { position:absolute;inset:0;background:rgba(27,40,53,.60);backdrop-filter:blur(2px); }
.erp-modal-dialog { position:relative;width:min(720px,100%);max-height:calc(100vh - 44px);display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(255,255,255,.5);border-radius:20px;background:#fff;box-shadow:0 28px 70px rgba(12,24,36,.28); }
.delivery-modal-dialog { width:min(680px,100%); }
.compact-modal { width:min(560px,100%); }
.erp-modal-header { display:flex;align-items:flex-start;justify-content:space-between;gap:15px;padding:18px 20px 14px;border-bottom:1px solid var(--line); }
.erp-modal-header h3 { margin:0;font-size:21px; }
.erp-modal-header p { margin:3px 0 0;color:var(--muted);font-size:10px; }
.erp-modal-body { overflow:auto;padding:18px 20px; }
.erp-modal-footer { display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 20px;border-top:1px solid var(--line);background:#fbfcfc; }
.modal-record-hint { margin-right:auto;color:var(--muted);font-size:9px; }
.delivery-form-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:13px; }
.delivery-form-grid label { font-size:11px; }
.delivery-form-grid input,.delivery-form-grid select,.delivery-form-grid textarea { min-height:43px; }
.payment-choice { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0;border:0; }
.payment-choice legend { grid-column:1/-1;margin-bottom:1px;color:#34424e;font-size:11px;font-weight:750; }
.payment-choice label { display:block; }
.payment-choice input { position:absolute;opacity:0;pointer-events:none; }
.payment-choice label span { min-height:43px;display:flex;align-items:center;gap:7px;padding:9px 11px;border:1px solid var(--line);border-radius:10px;color:var(--ink);background:#fff;font-weight:650;cursor:pointer; }
.payment-choice label span b { color:var(--blue); }
.payment-choice label:nth-of-type(2) span b { color:var(--orange); }
.payment-choice input:checked+span { border-color:color-mix(in srgb,var(--primary) 65%,#fff);background:var(--primary-soft);box-shadow:0 0 0 1px color-mix(in srgb,var(--primary) 22%,transparent); }
.delivery-status-box { display:grid;grid-template-columns:minmax(0,1fr) 160px;gap:10px;margin:16px 0;padding:13px 14px;border:1px solid #f0d59d;border-radius:12px;background:#fffaf0; }
.delivery-status-box>div { min-width:0; }
.delivery-status-box>div span,.delivery-status-box>div strong,.delivery-status-box>div small { display:block; }
.delivery-status-box>div span { color:var(--orange);font-size:8px;font-weight:850;text-transform:uppercase;letter-spacing:.07em; }
.delivery-status-box>div strong { margin:2px 0 3px;font-size:12px; }
.delivery-status-box>div small { color:#a15f03;font-size:8.5px;line-height:1.45; }
.delivery-status-box label { font-size:10px; }
.delivery-status-box.is-delivered { border-color:#b8e5ce;background:var(--success-soft); }
.delivery-status-box.is-delivered>div span,.delivery-status-box.is-delivered>div small { color:var(--success); }
.delivery-secondary-fields { padding-top:2px; }
body.modal-open { overflow:hidden; }

/* Deliveries partners and debt ledger */
.delivery-master-grid { align-items:start; }
.partner-editor { position:sticky;top:92px; }
.stack-form { display:grid;gap:13px; }
.delivery-partner-search { display:grid;grid-template-columns:minmax(260px,1fr) auto auto;gap:8px;margin-bottom:15px; }
.partner-card-list { display:grid;gap:8px; }
.partner-card { display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:12px;padding:13px;border:1px solid var(--line);border-radius:14px;background:#fff; }
.partner-card.is-archived { opacity:.62;background:#f8f9fa; }
.partner-avatar { width:42px;height:42px;display:flex;align-items:center;justify-content:center;border-radius:12px;color:var(--primary);background:var(--primary-soft);font-size:11px;font-weight:850; }
.partner-card-main { min-width:0; }
.partner-title-row { display:flex;align-items:center;gap:8px; }
.partner-title-row h4 { margin:0;overflow:hidden;font-size:13px;text-overflow:ellipsis;white-space:nowrap; }
.partner-card-main>p { margin:3px 0;color:var(--muted);font-size:10px; }
.partner-meta { display:flex;flex-wrap:wrap;gap:6px 12px;color:#73828d;font-size:9px; }
.partner-actions { display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-end; }
.partner-actions form { display:inline-flex; }
.debt-kpi-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px; }
.debt-kpi { min-height:103px;padding:18px;border:1px solid var(--line);border-top:3px solid #c4cbd0;border-radius:15px;background:#fff; }
.debt-kpi span { display:block;color:var(--muted);font-size:11px; }
.debt-kpi strong { display:block;margin-top:6px;font-size:24px;line-height:1; }
.debt-kpi.payment-a { border-top-color:var(--orange); }.debt-kpi.payment-b { border-top-color:var(--violet); }
.debt-kpi.total { color:#fff;border-color:color-mix(in srgb,var(--primary) 75%,#000);background:linear-gradient(135deg,var(--primary),color-mix(in srgb,var(--primary) 78%,#092d25)); }
.debt-kpi.total span { color:rgba(255,255,255,.72); }.debt-kpi.total strong { color:#fff; }
.debt-filter-bar { display:grid;grid-template-columns:minmax(260px,1fr) auto auto;align-items:center;gap:10px;margin-bottom:15px; }
.check-inline { display:flex!important;align-items:center;gap:7px!important;white-space:nowrap;font-weight:650!important; }
.debt-table { min-width:1120px; }
.debt-table .debt-a strong { color:#d36905; }.debt-table .debt-b strong { color:var(--violet); }
.section-caption { margin:0 0 9px;font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted); }
.ledger-list { display:grid;gap:7px; }
.ledger-list article { display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:11px;background:#fbfcfc; }
.ledger-list strong,.ledger-list small { display:block; }.ledger-list small { color:var(--muted);font-size:9px; }

/* Delivery statistics */
.delivery-stats-controls { padding:12px 14px; }
.delivery-stats-controls form { display:grid;gap:10px; }
.stats-period-tabs { display:flex;gap:4px;padding-bottom:9px;border-bottom:1px solid var(--line);overflow:auto; }
.stats-period-tabs button { min-height:32px;padding:6px 11px;border:1px solid transparent;border-radius:8px;color:var(--muted);background:transparent;font-size:10px;font-weight:750;white-space:nowrap; }
.stats-period-tabs button.is-active { color:var(--primary);border-color:color-mix(in srgb,var(--primary) 25%,var(--line));background:var(--primary-soft); }
.stats-filter-row { display:grid;grid-template-columns:repeat(5,minmax(120px,1fr)) auto;align-items:end;gap:8px; }
.stats-filter-row label { font-size:9px; }.stats-filter-row input,.stats-filter-row select { min-height:36px;font-size:10px; }
.stats-period-heading { display:flex;align-items:baseline;gap:7px;margin:0 0 10px;color:var(--muted);font-size:10px; }.stats-period-heading strong { color:var(--ink);font-size:12px; }
.delivery-stats-kpis { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px; }
.delivery-stats-kpis article { padding:16px;border:1px solid var(--line);border-radius:14px;background:#fff; }
.delivery-stats-kpis span,.delivery-stats-kpis small { display:block;color:var(--muted); }.delivery-stats-kpis span { font-size:10px;font-weight:700; }.delivery-stats-kpis strong { display:block;margin:8px 0 4px;font-size:21px; }.delivery-stats-kpis small { font-size:9px; }
.delivery-bars { height:260px;display:flex;align-items:stretch;gap:7px;padding-top:18px;overflow:auto; }
.delivery-bar-group { min-width:44px;flex:1;display:grid;grid-template-rows:1fr auto auto;gap:3px;text-align:center; }
.delivery-bar-track { min-height:180px;display:flex;align-items:flex-end;justify-content:center;gap:3px;border-bottom:1px solid var(--line); }
.delivery-bar-track i { width:35%;max-width:18px;display:block;border-radius:5px 5px 1px 1px; }.delivery-bar-track i.planned { background:#f2b650; }.delivery-bar-track i.delivered { background:var(--success); }
.delivery-bar-group strong { font-size:9px;white-space:nowrap; }.delivery-bar-group small { color:var(--muted);font-size:8px; }
.chart-legend { display:flex;gap:14px;justify-content:center;margin-top:10px;color:var(--muted);font-size:9px; }.chart-legend span { display:flex;align-items:center;gap:5px; }
.payment-stat-list { display:grid;gap:9px; }.payment-stat-list article { display:grid;grid-template-columns:28px 1fr;gap:9px;align-items:center;padding:12px;border-radius:11px;background:#f8fafb; }.payment-stat-list strong,.payment-stat-list small { display:block; }.payment-stat-list small { color:var(--muted);font-size:9px; }
.top-partner-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }.top-partner-grid a { display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px;border:1px solid var(--line);border-radius:11px;color:var(--ink); }.top-partner-grid a>span { color:var(--muted);font-size:10px;font-weight:800; }.top-partner-grid strong,.top-partner-grid small { display:block; }.top-partner-grid small { color:var(--muted);font-size:9px; }.top-partner-grid b { font-size:11px; }

/* Settings – modular appearance */
.settings-page-heading p { margin:5px 0 0;color:var(--muted);font-size:11px; }
.settings-anchor-nav { position:sticky;top:72px;z-index:15;display:flex;gap:4px;width:max-content;max-width:100%;margin:0 0 17px;padding:4px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.94);backdrop-filter:blur(10px);overflow:auto; }
.settings-anchor-nav a { padding:7px 10px;border-radius:8px;color:var(--muted);font-size:9px;font-weight:750;white-space:nowrap; }.settings-anchor-nav a:hover { color:var(--primary);background:var(--primary-soft); }
.settings-section { scroll-margin-top:130px; }
.settings-section .panel-heading>div { position:relative;padding-left:42px; }.settings-step { position:absolute;left:0;top:-2px;width:31px;height:31px;display:flex;align-items:center;justify-content:center;border-radius:9px;color:var(--primary);background:var(--primary-soft);font-size:9px;font-weight:850; }
.theme-color-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px; }.theme-color-grid label { padding:12px;border:1px solid var(--line);border-radius:12px;background:#fbfcfc; }.theme-color-grid input[type=color] { height:42px; }.theme-color-grid small { color:var(--muted);font-size:9px; }
.theme-preview { height:150px;display:grid;grid-template-columns:22% 1fr;margin-top:14px;overflow:hidden;border:1px solid var(--line);border-radius:13px;background:#f5f7f8; }.theme-preview-sidebar { background:var(--sidebar-bg); }.theme-preview-body { padding:18px;background:#fff; }.theme-preview-body>span { width:22%;height:7px;display:block;border-radius:999px;background:var(--primary); }.theme-preview-body>strong { display:block;margin:14px 0;font-size:15px; }.theme-preview-body>div { display:grid;grid-template-columns:repeat(3,1fr);gap:8px; }.theme-preview-body i { height:55px;border:1px solid var(--line);border-top:3px solid var(--primary);border-radius:9px;background:#fbfcfc; }
.pdf-settings-layout { display:grid;grid-template-columns:minmax(0,1.1fr) minmax(330px,.9fr);gap:18px;align-items:start; }.pdf-live-preview { position:sticky;top:130px;min-height:420px;padding:23px;border:1px solid var(--preview-line);border-radius:14px;color:var(--preview-text);background:#fff;box-shadow:0 8px 24px rgba(24,39,52,.06); }.preview-label { display:block;margin-bottom:14px;color:var(--preview-muted);font-size:8px;font-weight:850;text-transform:uppercase;letter-spacing:.1em; }.preview-doc-header { display:flex;justify-content:space-between;gap:14px;padding-bottom:14px;border-bottom:2px solid var(--preview-primary); }.preview-doc-header strong,.preview-doc-header small { display:block; }.preview-doc-header small { margin-top:3px;color:var(--preview-muted);font-size:8px; }.preview-doc-header h4 { margin:0;color:var(--preview-primary);font-size:17px; }.preview-doc-grid { display:grid;grid-template-columns:110px 1fr;gap:9px;margin-top:22px;padding:13px;border:1px solid var(--preview-line);border-radius:9px;font-size:9px; }.preview-doc-grid b { color:var(--preview-muted); }.preview-doc-footer { position:absolute;left:23px;right:23px;bottom:20px;padding-top:9px;border-top:1px solid var(--preview-line);color:var(--preview-muted);font-size:8px; }.pdf-visibility-options { display:flex;flex-wrap:wrap;gap:8px 14px;padding:11px;border:1px solid var(--line);border-radius:11px;background:#f8fafb; }.pdf-visibility-options label { display:flex;align-items:center;gap:6px; }.settings-savebar { position:sticky;bottom:10px;z-index:14;display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:18px;padding:10px 12px 10px 16px;border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.95);box-shadow:0 10px 35px rgba(24,39,52,.10);backdrop-filter:blur(10px); }.settings-savebar span { color:var(--muted);font-size:9px; }
.settings-secondary-actions { display:flex;gap:8px;flex-wrap:wrap;margin-top:12px; }

/* User module access */
.module-permission-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.module-permission-card { overflow:hidden;border:1px solid var(--line);border-radius:14px;background:#fff;transition:border-color .16s ease,box-shadow .16s ease; }
.module-permission-card.is-enabled { border-color:color-mix(in srgb,var(--primary) 42%,var(--line));box-shadow:0 8px 22px color-mix(in srgb,var(--primary) 8%,transparent); }
.module-access-switch { display:grid!important;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:10px;padding:13px!important;cursor:pointer; }
.module-access-icon { width:38px;height:38px;display:flex;align-items:center;justify-content:center;border-radius:11px;color:var(--primary);background:var(--primary-soft);font-weight:850; }.module-access-switch>span:nth-child(3) strong,.module-access-switch>span:nth-child(3) small { display:block; }.module-access-switch>span:nth-child(3) small { color:var(--muted);font-size:9px; }.module-detail-permissions { display:grid;gap:6px;padding:11px 13px 13px;border-top:1px solid var(--line);background:#fbfcfc; }.module-detail-permissions.is-disabled { opacity:.45; }.common-permission-block { margin-top:16px;padding-top:15px;border-top:1px solid var(--line); }

@media screen and (max-width: 1380px) {
    .module-overview-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .delivery-filter-bar { grid-template-columns:150px minmax(240px,1fr) minmax(140px,.5fr) minmax(120px,.4fr); }
    .segmented-filter { grid-column:1/3;width:max-content; }.delivery-filter-reset,.ajax-indicator { grid-row:2; }
    .delivery-week-board { grid-template-columns:repeat(7,minmax(145px,1fr));overflow-x:auto; }
    .stats-filter-row { grid-template-columns:repeat(3,minmax(130px,1fr)); }
}

@media screen and (max-width: 1100px) {
    .sidebar { width:var(--sidebar-width); }
    .main-column { width:100%;margin-left:0; }
    .topbar-context { display:none; }
    .module-overview-grid,.dashboard-kpis,.delivery-stats-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .dashboard-overview-row,.pdf-settings-layout { grid-template-columns:1fr; }
    .pdf-live-preview { position:relative;top:auto;min-height:340px; }
    .module-shortcuts { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .delivery-week-board { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible; }
    .delivery-day-column { border-right:1px solid var(--line);border-bottom:1px solid var(--line); }
    .delivery-day-list { min-height:150px; }
    .delivery-filter-bar { grid-template-columns:1fr 1fr; }.delivery-search-field { grid-column:1/-1; }.segmented-filter { grid-column:1/-1; }.ajax-indicator { grid-row:auto; }
    .delivery-summary-strip { grid-template-columns:1fr 1fr; }.summary-count { grid-column:1/-1;border-bottom:1px solid var(--line); }
    .stats-filter-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .module-permission-grid { grid-template-columns:1fr; }
}

@media screen and (max-width: 780px) {
    .topbar { min-height:64px;padding:9px 13px; }.topbar-brand-copy small,.topbar-date { display:none; }.topbar-brand-copy strong { max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
    .page-content { padding:18px 12px 28px; }
    .erp-page-heading,.dashboard-section-heading { align-items:stretch;flex-direction:column; }.erp-page-heading h2 { font-size:24px; }.erp-page-heading .btn,.dashboard-section-heading>.btn { width:100%; }
    .module-overview-grid,.dashboard-kpis,.delivery-stats-kpis,.debt-kpi-grid { grid-template-columns:1fr; }
    .dashboard-quick-grid,.module-shortcuts,.top-partner-grid { grid-template-columns:1fr; }
    .dashboard-module-switcher { width:100%; }.dashboard-module-switcher a { flex:1;text-align:center; }
    .delivery-week-toolbar { align-items:stretch;flex-direction:column; }.week-navigation { display:grid;grid-template-columns:36px 1fr 36px auto; }.view-mode-chip { width:max-content; }
    .delivery-week-board { grid-template-columns:1fr; }.delivery-day-column { border-right:0; }.delivery-day-list { min-height:120px; }
    .delivery-filter-bar { grid-template-columns:1fr; }.delivery-filter-bar>* { grid-column:1!important; }.segmented-filter { width:100%; }.segmented-filter button { flex:1; }
    .delivery-summary-strip { grid-template-columns:1fr; }.summary-count,.delivery-summary-cell { grid-column:1;border-right:0;border-bottom:1px solid var(--line);justify-content:flex-start; }.delivery-summary-cell:last-child { border-bottom:0; }
    .erp-modal { align-items:flex-end;padding:0; }.erp-modal-dialog { width:100%;max-height:94vh;border-radius:20px 20px 0 0; }.delivery-form-grid,.delivery-status-box { grid-template-columns:1fr; }.delivery-status-box label { grid-column:1; }.payment-choice { grid-template-columns:1fr 1fr; }
    .delivery-partner-search,.debt-filter-bar { grid-template-columns:1fr; }.partner-card { grid-template-columns:38px minmax(0,1fr); }.partner-actions { grid-column:1/-1;justify-content:flex-start;padding-left:50px; }.partner-editor { position:relative;top:auto; }
    .stats-filter-row { grid-template-columns:1fr; }.stats-filter-row .btn { width:100%; }.delivery-analytics-grid { grid-template-columns:1fr!important; }
    .theme-color-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.settings-anchor-nav { top:64px;width:100%; }.settings-section { scroll-margin-top:115px; }
    .module-permission-grid { grid-template-columns:1fr; }
}

@media screen and (max-width: 520px) {
    .module-overview-card { grid-template-columns:40px minmax(0,1fr) auto;padding:14px; }.module-card-icon { width:40px;height:40px; }
    .week-navigation { grid-template-columns:34px 1fr 34px; }.week-navigation>.btn { grid-column:1/-1; }.week-title { min-width:0; }
    .erp-modal-header,.erp-modal-body,.erp-modal-footer { padding-left:14px;padding-right:14px; }.erp-modal-footer { display:grid;grid-template-columns:1fr 1fr; }.modal-record-hint { grid-column:1/-1;margin-right:0; }.erp-modal-footer .btn { width:100%; }
    .theme-color-grid { grid-template-columns:1fr; }.pdf-live-preview { min-height:320px;padding:16px; }.preview-doc-footer { left:16px;right:16px; }
}
