:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #16243b;
  background: #f3f5f9;
  font-size: 16px;
  font-weight: 400;
  --ink: #16243b;
  --muted: #54647c;
  --nav: #121c31;
  --line: #e2e8f0;
  --accent: #ffc845;
  --green: #197355;
  --shadow: 0 2px 4px #17294706;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
#finance-print { display: none; }
button, input, select, textarea { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; }
:focus-visible { outline: 3px solid #3872d4; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 2.35vw, 2.1rem); font-weight: 740; letter-spacing: -.045em; line-height: 1.15; }
h2 { font-size: 1.13rem; font-weight: 700; letter-spacing: -.022em; }
h3 { font-size: 1rem; }
p { line-height: 1.52; }
.icon { width: 19px; height: 19px; flex: 0 0 auto; vertical-align: middle; }
.muted { color: var(--muted); }
.secondary { font-size: .875rem; color: var(--muted); }
.shell { min-height: 100vh; display: grid; grid-template-columns: 246px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; overflow: auto; display: flex; flex-direction: column; background: var(--nav); color: #eaf0fb; padding: 26px 15px 18px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; }
.brand-mark { display: grid; place-items: center; width: 41px; height: 41px; flex: 0 0 auto; border-radius: 11px; background: var(--accent); color: #172239; box-shadow: 0 3px 14px #f6b83420; }
.brand-mark .icon { width: 24px; height: 24px; }
.brand-name { display: block; font-size: 1.02rem; font-weight: 760; letter-spacing: -.025em; line-height: 1.25; }
.brand-subtitle { display: block; font-size: .76rem; color: #aebbd0; line-height: 1.4; margin-top: 3px; }
.sidebar nav { flex: 1; }
.nav-group { margin: 31px 0 0; }
.nav-label { padding: 0 11px; margin-bottom: 10px; color: #9aa9c1; text-transform: uppercase; font-size: .75rem; font-weight: 680; letter-spacing: .1em; }
.nav-link { position: relative; text-decoration: none; display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 11px; min-height: 43px; margin: 3px 0; color: #b8c6dc; font-size: .9rem; font-weight: 570; border-radius: 7px; }
.nav-link:hover { background: #ffffff0c; color: white; }
.nav-link[aria-current="page"] { background: #253047; color: #fff; }
.nav-link[aria-current="page"]::before { content: ""; position: absolute; left: 0; width: 3px; height: 22px; border-radius: 4px; background: var(--accent); }
.nav-link[aria-current="page"] .icon { color: var(--accent); }
.nav-count { margin-left: auto; padding: 2px 6px; border-radius: 5px; color: #dae3f5; background: #ffffff16; font-size: .75rem; }
.sidebar-bottom { border-top: 1px solid #ffffff1c; padding: 15px 6px 0; margin-top: 25px; }
.sidebar-profile { display: flex; align-items: center; gap: 10px; }
.sidebar-profile .account-text { flex: 1; min-width: 0; }
.account-text strong, .account-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-text strong { font-size: .88rem; font-weight: 650; }
.account-text span { font-size: .75rem; color: #aebbd0; margin-top: 3px; }
.avatar { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 auto; font-size: .78rem; font-weight: 750; color: #3d5481; background: #eaf0fb; border-radius: 50%; }
.sidebar .avatar { background: #303e58; color: #e9effe; }
.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border-bottom: 1px solid var(--line); min-height: 65px; padding: 9px clamp(17px, 2.5vw, 36px); }
.breadcrumb, .top-left, .top-actions { display: flex; align-items: center; gap: 11px; min-width: 0; }
.breadcrumb { font-size: .875rem; color: var(--muted); gap: 9px; }
.breadcrumb .icon { width: 16px; height: 16px; }
.breadcrumb strong { color: var(--ink); font-weight: 650; }
.top-actions { justify-content: flex-end; }
.notification-bell { position: relative; text-decoration: none; }
.notification-bell[aria-current="page"] { color: #315b96; background: #edf2fa; }
.bell-counter { position: absolute; top: -4px; right: -5px; min-width: 18px; padding: 2px 4px; border-radius: 10px; color: #1f2b3d; background: var(--accent); font-size: .67rem; font-weight: 800; line-height: 1.12; text-align: center; border: 1px solid white; }
.role-chip { font-size: .82rem; color: #435678; background: #eef2f9; border-radius: 6px; padding: 6px 10px; font-weight: 650; white-space: nowrap; }
.menu-toggle { display: none !important; }
.content { padding: 27px clamp(17px, 2.5vw, 36px) 40px; max-width: 1800px; margin: auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 22px; }
.page-head p { margin-top: 6px; color: var(--muted); }
.date-chip { display: inline-flex; align-items: center; gap: 7px; color: #43516a; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; white-space: nowrap; font-size: .875rem; box-shadow: var(--shadow); }
.date-chip .icon { width: 16px; height: 16px; }
.hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: 194px; margin-bottom: 20px; border-radius: 13px; color: white; background: #101d34; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0 0 0 42%; z-index: -2; background: url("/assets/fleet-blueprint.png") right 39% center / cover no-repeat; opacity: .83; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #101d34 1%, #101d34 39%, #101d34d9 51%, #101d3416 79%), linear-gradient(0deg,#101d34b0,transparent 30%,transparent 74%,#101d3450); }
.hero-body { padding: 24px 26px; max-width: min(620px, 68%); }
.hero h2 { font-size: clamp(1.33rem, 2.3vw, 1.95rem); margin-bottom: 6px; letter-spacing: -.041em; line-height: 1.12; }
.hero p { color: #c4d0e5; font-size: .875rem; max-width: 450px; margin-bottom: 15px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.button, .icon-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; text-decoration: none; border: 1px solid var(--line); background: #fff; color: #233651; min-height: 37px; padding: 7px 12px; border-radius: 7px; font-size: .875rem; font-weight: 650; white-space: nowrap; }
.button:hover, .icon-button:hover { background: #f2f5fa; border-color: #cbd6e7; }
.button .icon { width: 17px; height: 17px; }
.button.primary { background: var(--accent); color: #20293a; border-color: var(--accent); }
.button.primary:hover { background: #ffd66d; border-color: #ffd66d; }
.button.dark-outline { background: #24334cb0; color: #e8effd; border-color: #ffffff38; }
.button.dark-outline:hover { background: #334661; }
.button.danger { background: #fff3f2; color: #a03232; border-color: #f3d2d1; }
.button.text, .icon-button { background: transparent; border-color: transparent; }
.button.text { padding-right: 4px; color: #365d9b; }
.button.text:hover { text-decoration: underline; }
.icon-button { padding: 6px; min-width: 34px; min-height: 34px; }
.sidebar .icon-button { color: #b8c6db; }
.sidebar .icon-button:hover { color: white; border-color: transparent; background: #ffffff12; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin-bottom: 20px; }
.metric { display: flex; flex-direction: column; gap: 8px; text-align: left; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 0; padding: 14px 15px 13px; }
.metric:hover { border-color: #9cb0ce; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); }
.metric-top > .icon { width: 15px; height: 15px; color: #8493aa; }
.metric-icon, .row-icon { display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; width: 37px; height: 37px; background: #eaf0fd; color: #3662a6; }
.metric-icon.amber { background: #fff2d8; color: #9b641c; }
.metric-icon.violet { background: #f0ebfc; color: #7658ad; }
.metric-icon.green { background: #e4f4ed; color: #258361; }
.metric-label { color: #495a73; font-size: .875rem; font-weight: 620; margin-top: 1px; }
.metric-value { font-size: 1.85rem; font-weight: 750; line-height: 1; letter-spacing: -.05em; }
.metric-caption { font-size: .8rem; color: var(--muted); line-height: 1.3; }
.overview { display: grid; grid-template-columns: minmax(0, 1.95fr) minmax(265px, 1fr); gap: 16px; align-items: start; }
.overview.single-column { grid-template-columns: minmax(0, 1fr); }
.side-panels { display: grid; gap: 16px; }
.panel { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 15px 16px; }
.panel-head p { font-size: .875rem; color: var(--muted); margin-top: 3px; }
.finance-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 10px; margin: 0; padding: 0 16px 14px; }
.finance-totals > div { background: #f5f7fb; border: 1px solid var(--line); border-radius: 7px; padding: 9px 12px; }
.finance-totals dt { color: var(--muted); font-size: .8rem; }
.finance-totals dd { font-weight: 750; margin: 3px 0 0; font-variant-numeric: tabular-nums; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; white-space: nowrap; }
th { text-align: left; color: #4e6078; font-weight: 660; background: #f6f8fc; border-block: 1px solid #e8edf4; }
th, td { padding: 10px 13px; }
th:first-child, td:first-child { padding-left: 16px; }
th:last-child, td:last-child { padding-right: 16px; }
td { border-bottom: 1px solid #edf0f5; }
.payment-update { display: grid; justify-items: start; gap: 3px; white-space: normal; }
.payment-note { max-width: 32ch; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 216px), 1fr)); gap: 8px; padding: 0 15px 15px; }
.vehicle-card { display: grid; grid-template-rows: auto 1fr auto; gap: 5px; min-width: 0; padding: 8px 9px; text-align: left; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.vehicle-card:hover { background: #f5f8fd; border-color: #c9d8ea; }
.vehicle-card-top { display: grid; grid-template-columns: 25px minmax(0, 1fr) 15px; gap: 6px; align-items: center; }
.vehicle-card-top strong { font-size: .91rem; overflow-wrap: anywhere; }
.vehicle-card-top .row-icon { width: 25px; height: 25px; border-radius: 5px; }
.vehicle-card-top .icon { width: 15px; height: 15px; }
.vehicle-card-details { display: grid; align-content: start; gap: 2px; overflow-wrap: anywhere; }
.vehicle-card-details strong { font-size: .83rem; font-weight: 650; }
.vehicle-card .secondary { font-size: .76rem; }
.vehicle-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; }
.vehicle-card-foot .badge { white-space: normal; }
.request-groups { display: grid; gap: 8px; padding: 8px 16px 15px; }
.dialog-request-groups { padding: 8px 0 0; }
.request-group { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; gap: 8px; align-items: center; text-align: left; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.request-group:hover { background: #f5f8fd; border-color: #c9d8ea; }
.request-group .cell-title { min-width: 0; overflow-wrap: anywhere; }
.request-group > span { text-align: right; }
.group-cost { display: block; margin-top: 4px; }
.combined-cost { display: grid; gap: 8px; }
.combined-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 8rem); align-items: center; gap: 8px; }
.combined-row label { display: flex; align-items: baseline; gap: 4px; font-size: .875rem; }
.combined-row input[type="checkbox"] { min-height: auto; }
.combined-row input[type="number"] { width: 100%; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfe; }
.cell-title { display: flex; align-items: center; gap: 9px; }
.cell-title strong { display: block; font-weight: 710; color: #20324e; }
.cell-title small { display: block; margin-top: 2px; font-size: .77rem; color: #5a6b84; }
.mobile-local-body { display: none; }
.row-icon { height: 31px; width: 31px; border-radius: 7px; background: #eef2f9; color: #516e9b; }
.row-icon .icon { width: 17px; height: 17px; }
.badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; color: #4d5e76; background: #eef1f6; padding: 4px 8px; line-height: 1.2; border-radius: 5px; font-size: .8rem; font-weight: 650; white-space: nowrap; }
.badge.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.good { color: #156344; background: #e6f5ed; }
.badge.warn { color: #885011; background: #fff1d9; }
.badge.bad { color: #a53638; background: #feebec; }
.badge.info { color: #325e9f; background: #eaf1fd; }
.badge.purple { color: #61469c; background: #f0ebfb; }
.panel-foot { border-top: 1px solid var(--line); padding: 11px 16px; font-size: .82rem; color: var(--muted); }
.pager { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.pager .button { min-height: 31px; padding: 4px 9px; }
.amount { font-variant-numeric: tabular-nums; font-weight: 680; }
.visually-hidden { position: absolute; overflow: hidden; width: 1px; height: 1px; clip-path: inset(50%); white-space: nowrap; }
.access-guide { margin-top: 16px; padding: 13px 16px; }
.access-guide summary { cursor: pointer; font-size: .9rem; font-weight: 680; }
.access-guide p { margin-top: 8px; }
.notification-tip { border-top: 0; border-bottom: 1px solid var(--line); }
.notification-list { margin: 0; padding: 0; list-style: none; }
.notification-list li + li { border-top: 1px solid var(--line); }
.notice { display: flex; align-items: flex-start; width: 100%; gap: 12px; padding: 13px 15px; text-align: left; border: 0; background: white; color: var(--ink); }
.notice:hover { background: #f5f8fe; }
.notice.unread { background: #f0f5ff; }
.notice:focus-visible { outline-offset: -3px; }
.notice-copy { flex: 1; min-width: 0; display: grid; gap: 4px; }
.notice-copy strong { font-size: .94rem; }
.notice-message { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.notice time { color: var(--muted); font-size: .77rem; }
.unread-dot { width: 8px; height: 8px; margin-top: 6px; flex: none; border-radius: 50%; background: #3d6caa; }
.mail-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(240px, 1fr); gap: 16px; align-items: start; }
.mail-layout .dialog-body { padding-top: 5px; }
.mail-layout .dialog-actions { flex-wrap: wrap; }
.mail-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 3px 16px 13px; }
.mail-totals div { padding: 8px 6px; text-align: center; border-radius: 7px; background: #f1f5fb; }
.mail-totals dt { color: var(--muted); font-size: .78rem; }
.mail-totals dd { margin: 3px 0 0; font-size: 1.25rem; font-weight: 720; }
.mail-coverage, .mail-failures { margin: 0 16px 14px; }
.mail-failures { padding-top: 10px; border-top: 1px solid var(--line); }
.mail-failures ul { padding-left: 19px; font-size: .875rem; overflow-wrap: anywhere; }
.mail-failures li + li { margin-top: 6px; }
.mail-failures li span { display: block; color: var(--muted); }
.workflow { margin: 0; padding: 0 15px 6px; list-style: none; }
.workflow li + li { border-top: 1px solid #ecf0f5; }
.workflow a { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 10px 0; }
.workflow a:hover strong { color: #3866a6; }
.workflow .metric-icon { width: 34px; height: 34px; }
.workflow .metric-icon .icon { width: 17px; height: 17px; }
.workflow .step { flex: 1; min-width: 0; }
.workflow strong { display: block; font-weight: 690; font-size: .875rem; margin-bottom: 2px; }
.workflow small { display: block; font-size: .76rem; color: var(--muted); }
.step-count { background: #f1f4f9; border-radius: 5px; padding: 3px 7px; font-size: .82rem; font-weight: 670; }
.activity { list-style: none; margin: 0; padding: 0 16px 10px; }
.activity li { display: grid; grid-template-columns: 29px minmax(0,1fr); gap: 9px; padding: 9px 0; }
.activity li + li { border-top: 1px solid #edf0f5; }
.activity .row-icon { width: 27px; height: 27px; }
.activity .row-icon .icon { width: 15px; height: 15px; }
.activity strong { display: block; font-size: .875rem; }
.activity p { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.activity time { display: block; margin-top: 2px; font-size: .76rem; color: #576a86; }
.empty { text-align: center; color: var(--muted); padding: 36px 14px; white-space: normal; }
.empty strong { display: block; color: #314461; font-size: 1rem; margin: 7px 0 4px; }
.empty .icon { width: 25px; height: 25px; }
.empty .button { margin-top: 11px; }
.empty.compact { text-align: left; padding: 0 16px 17px; font-size: .875rem; }
.filters { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; padding: 15px 16px; }
.report-actions { margin-inline-start: auto; }
.spares-summary { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 8px 20px; padding: 0 16px 12px; }
.spares-summary p { margin-top: 3px; }
.spares-summary #spare-total { margin-inline-start: 4px; font-variant-numeric: tabular-nums; }
.spares-table { max-height: 64vh; }
.spares-table table { min-width: 650px; white-space: normal; }
.spares-table thead th { position: sticky; top: 0; z-index: 1; }
.spares-table tbody th { min-width: 230px; background: transparent; color: var(--ink); font-weight: 550; }
.spares-table input { width: 7.5rem; min-height: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.spares-table .amount { white-space: nowrap; }
.search { position: relative; width: min(330px, 100%); }
.search .icon { position: absolute; top: 10px; left: 10px; color: #607591; width: 17px; height: 17px; }
.search input { width: 100%; padding-left: 33px; }
input, select, textarea { border: 1px solid #cfd9e8; border-radius: 7px; background: #fff; color: #182943; min-height: 39px; padding: 7px 10px; font-size: .9rem; }
select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23516684' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"); background-position: right 9px center; background-repeat: no-repeat; background-size: 15px; }
textarea { resize: vertical; min-height: 86px; }
.mobile-overlay { display: none; }
.loading { padding: 34px; color: var(--muted); }
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.12fr 1fr; background: #fff; }
.auth-cover { display: flex; flex-direction: column; min-height: 100%; position: relative; isolation: isolate; overflow: hidden; padding: clamp(25px, 4.5vw, 70px); color: white; background: #101d34; }
.auth-cover::before { content: ""; position: absolute; z-index: -2; inset: 25% 0 0; background: url("/assets/fleet-blueprint.png") center / cover no-repeat; opacity: .86; }
.auth-cover::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg,#101d34 16%,#101d34db 35%,#101d3400 70%,#101d34a0); }
.auth-cover .brand { padding: 0; }
.auth-intro { margin-top: clamp(40px, 12vh, 126px); max-width: 510px; }
.auth-intro h1 { font-size: clamp(2.45rem, 5.05vw, 4.6rem); font-weight: 730; letter-spacing: -.063em; line-height: .99; }
.auth-intro p { max-width: 390px; margin-top: 17px; color: #c6d2e8; }
.auth-main { display: grid; place-items: center; padding: 30px; }
.auth-panel { width: min(100%, 400px); }
.auth-panel h2 { font-size: 1.8rem; letter-spacing: -.045em; }
.auth-panel > p { margin: 5px 0 23px; color: var(--muted); }
.auth-panel .button { width: 100%; min-height: 43px; }
.auth-form { display: grid; gap: 14px; }
.auth-form .form-error:not(:empty) { margin: 0; }
.auth-footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
dialog { padding: 0; width: min(690px, calc(100% - 26px)); max-height: calc(100dvh - 28px); border: 1px solid #dce5f2; border-radius: 12px; color: var(--ink); box-shadow: 0 21px 80px #15244036; overflow: auto; }
dialog::backdrop { background: #0b172b80; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 14px 19px; }
.dialog-head h2 { font-size: 1.23rem; }
.dialog-body { padding: 17px 19px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding: 13px 19px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: grid; gap: 4px; align-content: start; font-size: .875rem; font-weight: 660; }
.field > input, .field > textarea, .field > select { font-weight: 400; width: 100%; }
.field .hint { color: var(--muted); font-size: .8rem; font-weight: 400; }
.quotation-field { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.quotation-field legend { padding-inline: 4px; font-weight: 660; font-size: .875rem; }
.quotation-field label.button { cursor: pointer; }
.quotation-field label.button:focus-within { outline: 3px solid #3872d4; outline-offset: 3px; }
.quotation-field .button[hidden] { display: none; }
.quotation-field p { margin-top: 6px; overflow-wrap: anywhere; }
.quotation-preview { display: inline-grid; gap: 4px; justify-items: start; font-size: .875rem; }
.quotation-preview img { display: block; max-width: 100%; max-height: 230px; border: 1px solid var(--line); border-radius: 6px; }
.field.wide, .form-error { grid-column: 1 / -1; }
.fields > .wide, .permission-editor { grid-column: 1 / -1; }
.permission-editor { min-inline-size: 0; margin: 5px 0 1px; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 8px; }
.permission-editor legend { padding-inline: 4px; font-weight: 700; }
.permission-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 9px; align-items: start; }
.permission-group { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; }
.permission-group[hidden] { display: none; }
.permission-group h3 { font-size: .875rem; margin: 0 0 2px; }
.permission-option { display: flex; gap: 7px; align-items: flex-start; padding: 4px 0; cursor: pointer; font-size: .875rem; line-height: 1.35; }
.permission-option[hidden] { display: none; }
.permission-option input { width: 16px; height: 16px; min-height: 0; padding: 0; margin: 1px 0 0; flex: none; accent-color: #385f98; }
dialog[open]:has(.permission-editor) { display: flex; flex-direction: column; overflow: hidden; }
dialog:has(.permission-editor) form { display: flex; flex-direction: column; min-height: 0; }
dialog:has(.permission-editor) .dialog-body { overflow: auto; }
dialog:has(.permission-editor) :is(.dialog-head, .dialog-actions) { flex-shrink: 0; }
.form-error:not(:empty) { color: #982d30; background: #feeeee; padding: 8px 10px; border-radius: 6px; margin: 0 0 10px; font-size: .875rem; }
.form-error:empty { display: none; }
.record-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 0; }
.record-details div { min-width: 0; }
.record-details .wide { grid-column: 1 / -1; }
.record-details dt { color: var(--muted); font-size: .82rem; margin-bottom: 3px; }
.record-details dd { margin: 0; font-size: .94rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.detail-section { border-top: 1px solid var(--line); margin-top: 17px; padding-top: 14px; }
.detail-section h3 { margin-bottom: 8px; }
.document-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.document-heading h3 { margin-bottom: 0; }
.vehicle-documents { display: grid; gap: 7px; }
.vehicle-documents article { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.document-note { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; }
.detail-section .activity { padding: 0; }
.detail-section .activity p { white-space: pre-wrap; }
.detail-list { display: grid; gap: 5px; }
.detail-list .button { justify-content: flex-start; white-space: normal; }
.detail-list .payment-update { margin: 5px 0 8px 12px; }
#toast { position: fixed; z-index: 4; bottom: 16px; right: 16px; max-width: min(390px, calc(100% - 32px)); color: white; background: #1c2c46; box-shadow: 0 6px 26px #0c162846; border-radius: 8px; font-size: .875rem; }
#toast:not(:empty) { padding: 11px 14px; }
#toast.error { background: #842d33; }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 214px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  .overview { grid-template-columns: minmax(0, 1fr); }
  .side-panels { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  .mail-layout { grid-template-columns: minmax(0, 1fr); }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 3; width: 242px; transform: translateX(-100%); visibility: hidden; transition: transform .18s ease, visibility .18s; }
  .shell.menu-open .sidebar { transform: translateX(0); visibility: visible; }
  .shell.menu-open .mobile-overlay { display: block; position: fixed; z-index: 2; inset: 0; background: #101d3470; border: 0; }
  .menu-toggle { display: inline-flex !important; }
  .topbar { min-height: 57px; }
  .content { padding-top: 21px; }
  .auth { grid-template-columns: 1fr; min-height: 100dvh; grid-template-rows: auto 1fr; }
  .auth-cover { min-height: 222px; padding: 20px; }
  .auth-intro { margin-top: 24px; max-width: 350px; }
  .auth-intro h1 { font-size: 2.15rem; }
  .auth-intro p { display: none; }
  .auth-cover::before { inset: 0 0 0 30%; opacity: .7; }
  .auth-cover::after { background: linear-gradient(90deg,#101d34 10%,#101d34c0 46%,#101d3400 100%); }
}
@media (max-width: 540px) {
  .vehicle-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 155px), 1fr)); padding-inline: 9px; }
  .vehicle-card { gap: 4px; padding: 7px; }
  .vehicle-card-top { grid-template-columns: 21px minmax(0, 1fr) 12px; gap: 4px; }
  .vehicle-card-top .row-icon { width: 21px; height: 21px; }
  .vehicle-card-top .icon { width: 12px; height: 12px; }
  .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .metric { padding: 11px; }
  .side-panels { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 190px; }
  .hero::before { inset: 0; opacity: .49; }
  .hero::after { background: linear-gradient(90deg,#101d34 4%,#101d34d4 55%,#101d3476 100%); }
  .hero-body { padding: 19px; max-width: 100%; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 9px; }
  .top-actions .avatar, .breadcrumb .crumb-root, .breadcrumb .crumb-divider { display: none; }
  .fields { grid-template-columns: 1fr; }
  .permission-groups { grid-template-columns: 1fr; }
  .auth-main { padding: 23px; }
  .search { width: 100%; }
  .fleet-preview table { white-space: normal; }
  .fleet-preview :is(th, td):nth-child(2) { display: none; }
  .fleet-preview :is(th, td):last-child { padding-inline: 0 8px; }
  .fleet-preview .badge { white-space: normal; }
  .fleet-preview .badge::before { flex: 0 0 auto; }
  .fleet-preview .cell-title { align-items: flex-start; }
  .fleet-preview .mobile-local-body { display: block; padding-left: 40px; margin-top: 2px; font-size: .77rem; color: var(--muted); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

@page finance-report { size: A4 landscape; margin: 12mm; }
@media print {
  .finance-printing { min-width: 0; background: #fff; color: #000; }
  .finance-printing > :not(#finance-print) { display: none !important; }
  .finance-printing #finance-print { display: block; page: finance-report; font-size: 9pt; }
  #finance-print header { margin-bottom: 10pt; }
  #finance-print h1 { font-size: 18pt; margin-bottom: 3pt; }
  #finance-print .finance-totals { padding: 0 0 8pt; }
  #finance-print table { width: 100%; table-layout: fixed; border-collapse: collapse; white-space: normal; }
  #finance-print thead { display: table-header-group; }
  #finance-print tr { break-inside: avoid; }
  #finance-print th, #finance-print td { padding: 4pt; border: 1px solid #bbb; vertical-align: top; overflow-wrap: anywhere; }
  #finance-print th:nth-child(2) { width: 14%; }
  #finance-print .report-notes { width: 17%; }
  #finance-print td { white-space: pre-wrap; }
}
