:root {
  --bg: #f1f1f1;
  --surface: #ffffff;
  --surface-2: #ededed;
  --ink: #202020;
  --muted: #686868;
  --line: #d5d5d5;
  --brand: #2f2f2f;
  --brand-2: #555555;
  --accent: #a73539;
  --accent-ink: #ffffff;
  --danger: #bd252b;
  --warning: #a66410;
  --shadow: 0 18px 50px rgba(0, 0, 0, .09);
  --radius: 18px;
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

[data-theme="dark"] {
  --bg: #171717;
  --surface: #222222;
  --surface-2: #2d2d2d;
  --ink: #f4f4f4;
  --muted: #aaaaaa;
  --line: #3c3c3c;
  --brand: #f2f2f2;
  --brand-2: #c5c5c5;
  --accent: #c6565a;
  --accent-ink: #ffffff;
  --shadow: 0 18px 50px rgba(0, 0, 0, .25);
}

[data-scheme="ocean"] { --bg:#eef4f8; --surface:#ffffff; --surface-2:#e2edf4; --ink:#173142; --muted:#5c7380; --line:#c9dbe5; --brand:#173c55; --brand-2:#356b86; }
[data-scheme="forest"] { --bg:#f0f4ef; --surface:#ffffff; --surface-2:#e4ece2; --ink:#213329; --muted:#617066; --line:#ccd9cc; --brand:#294b37; --brand-2:#54745e; }
[data-scheme="sunset"] { --bg:#f8f1ea; --surface:#fffdfb; --surface-2:#f1e4d8; --ink:#3d2a24; --muted:#806b61; --line:#e2d0c2; --brand:#633f35; --brand-2:#9a6754; }
[data-theme="dark"][data-scheme="ocean"] { --bg:#10212b; --surface:#172d39; --surface-2:#203b49; --ink:#edf8fd; --muted:#9db7c4; --line:#31505f; --brand:#d9f2ff; --brand-2:#9dccdf; }
[data-theme="dark"][data-scheme="forest"] { --bg:#142019; --surface:#1d2c22; --surface-2:#293a2e; --ink:#f0f7f1; --muted:#a7b9aa; --line:#3b5140; --brand:#e0f2e3; --brand-2:#afd0b5; }
[data-theme="dark"][data-scheme="sunset"] { --bg:#281c19; --surface:#342521; --surface-2:#46332c; --ink:#fff5ef; --muted:#cbb0a3; --line:#60463c; --brand:#ffe8dc; --brand-2:#dcb6a5; }
[data-scheme="purple"] { --bg:#f7f4fb; --surface:#fff; --surface-2:#eee7f7; --ink:#251d30; --muted:#71657e; --line:#d9cee5; --brand:#4c286d; --brand-2:#765096; --accent:#8b3fc0; }
[data-scheme="pink"] { --bg:#fff5f8; --surface:#fff; --surface-2:#fbe4ec; --ink:#351d26; --muted:#80616d; --line:#eccbd7; --brand:#6b2942; --brand-2:#a94c70; --accent:#d43f7b; }
[data-theme="dark"][data-scheme="purple"] { --bg:#1c1624; --surface:#281f32; --surface-2:#382945; --ink:#f8efff; --muted:#c0adcD; --line:#513c63; --brand:#f0dfff; --brand-2:#c99ce8; }
[data-theme="dark"][data-scheme="pink"] { --bg:#24171c; --surface:#321f27; --surface-2:#462a35; --ink:#fff0f5; --muted:#d0aab8; --line:#654052; --brand:#ffe0eb; --brand-2:#eea4c0; }

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, white); outline-offset: 3px; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 500; padding: 10px 14px; border-radius: 10px; color: var(--accent-ink); background: var(--accent); font-weight: 800; transform: translateY(-160%); transition: transform .15s ease; }
.skip-link:focus { transform: translateY(0); }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 1.08fr) minmax(340px, .92fr); }
.login-visual { background: linear-gradient(145deg, #1f1f1f 0%, #393939 72%, #555 100%); color: white; padding: clamp(34px, 6vw, 92px); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-visual::before { content: ""; position: absolute; width: 6px; height: 130%; right: 12%; top: -15%; background: var(--accent); transform: rotate(18deg); opacity: .55; }
.login-visual::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: rgba(255,255,255,.18); }
.brand { display: flex; gap: 12px; align-items: center; font-family: "Avenir Next", "Trebuchet MS", sans-serif; font-weight: 800; position: relative; z-index: 1; }
.brand-logo { display: block; width: 168px; height: 48px; object-fit: contain; object-position: left center; filter: invert(1); }
.brand::after { content: ""; width: 26px; height: 2px; background: var(--accent); opacity: .7; margin-left: 2px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 4px; color: #fff; background: #111; border-bottom: 4px solid var(--accent); font-size: 1.2rem; font-style: italic; font-weight: 900; transform: skew(-6deg); }
.brand-copy { display: grid; line-height: 1; letter-spacing: .04em; }
.brand-copy strong { font-size: 1.05rem; font-style: italic; letter-spacing: .09em; }
.brand-copy small { margin-top: 5px; color: inherit; opacity: .58; font-family: "Trebuchet MS", sans-serif; font-size: .62rem; font-style: normal; letter-spacing: .18em; }
.hero-copy { position: relative; z-index: 1; max-width: 670px; }
.hero-copy h1 { font: 800 clamp(2.5rem, 5.8vw, 5.7rem)/.98 "Avenir Next", "Trebuchet MS", sans-serif; letter-spacing: -.055em; margin: 18px 0 24px; }
.hero-copy p { max-width: 580px; font-size: 1.12rem; line-height: 1.6; color: rgba(255,255,255,.76); }
.transport-cue { display: inline-flex; align-items: center; gap: 9px; margin-top: 12px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: rgba(255,255,255,.78); font-size: .78rem; font-weight: 700; letter-spacing: .04em; }
.transport-cue span { width: 24px; height: 13px; border: 2px solid currentColor; border-radius: 3px; position: relative; }
.transport-cue span::before, .transport-cue span::after { content: ""; position: absolute; bottom: -5px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.transport-cue span::before { left: 3px; }
.transport-cue span::after { right: 3px; }
.login-panel { display: grid; place-items: center; padding: 34px; background: var(--surface); }
.login-card { width: min(430px, 100%); }
.login-card h2 { font: 800 2rem/1.1 "Avenir Next", "Trebuchet MS", sans-serif; margin: 14px 0 8px; }
.login-card form { margin-top: 30px; }
.text-button { display: block; margin: 10px 0 0 auto; padding: 4px 0; border: 0; color: var(--muted); background: transparent; font-size: .84rem; font-weight: 700; }
.text-button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.demo-note { margin-top: 18px; padding: 14px; border-radius: 14px; color: var(--muted); background: var(--surface-2); font-size: .9rem; line-height: 1.45; }
.login-legal { display: flex; justify-content: center; gap: 18px; margin-top: 18px; color: var(--muted); font-size: .82rem; }
.login-legal a:hover { color: var(--ink); }
.app-signature { margin-top: 12px; color: var(--muted); font-size: .72rem; text-align: center; }

.app-shell { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: fixed; width: 258px; height: 100vh; background: linear-gradient(180deg, #272727 0%, #353535 70%, #292929 100%); color: white; padding: 26px 18px; display: flex; flex-direction: column; z-index: 20; border-right: 1px solid #111; }
[data-navigation-theme="scheme"] .sidebar { background: linear-gradient(180deg, color-mix(in srgb,var(--brand) 92%,#111), color-mix(in srgb,var(--brand-2) 72%,#111)); border-right-color: color-mix(in srgb,var(--brand) 60%,#111); }
.sidebar .brand { padding: 0 10px 28px; }
.sidebar-route { display: flex; align-items: center; gap: 5px; padding: 0 14px 20px; opacity: .32; }
.sidebar-route span { width: 5px; height: 5px; border: 1px solid white; border-radius: 50%; }
.sidebar-route b { width: 46px; border-top: 1px dashed white; }
.nav-order-button { margin: -8px 8px 10px; padding: 7px 8px; border: 0; border-radius: 9px; color: rgba(255,255,255,.55); background: transparent; font-size: .72rem; font-weight: 700; text-align: left; }
.nav-order-button:hover { color: white; background: rgba(255,255,255,.08); }
.nav { display: grid; align-content: start; gap: 10px; overflow-y: auto; min-height: 0; padding-right: 2px; }
.nav-pinned { display: grid; gap: 4px; padding: 0 0 9px; border-bottom: 1px solid rgba(255,255,255,.1); }
.nav-section-label { display: flex; align-items: center; gap: 7px; padding: 0 12px 5px; color: rgba(255,255,255,.46); font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.nav-category { display: grid; gap: 3px; }
.nav-category-toggle { width: 100%; min-height: 30px; display: grid; grid-template-columns: 1fr auto 18px; align-items: center; gap: 6px; padding: 4px 9px 4px 12px; border: 0; border-radius: 9px; color: rgba(255,255,255,.52); background: transparent; text-align: left; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.nav-category-toggle:hover { color: white; background: rgba(255,255,255,.06); }
.nav-category.has-active > .nav-category-toggle { color: white; }
.nav-category-toggle small { min-width: 19px; padding: 2px 5px; border-radius: 999px; color: rgba(255,255,255,.48); background: rgba(255,255,255,.07); text-align: center; font-size: .6rem; }
.nav-chevron { display: grid; place-items: center; font-size: 1rem; transition: transform .16s ease; }
.nav-category.is-collapsed .nav-chevron { transform: rotate(-90deg); }
.nav-category-items { display: grid; gap: 3px; }
.nav-category-items[hidden] { display: none; }
.nav-item-row { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 30px; align-items: center; border-radius: 13px; }
.nav-page-button { width: 100%; min-width: 0; color: rgba(255,255,255,.7); background: transparent; border: 0; border-radius: 13px; padding: 10px 7px 10px 14px; text-align: left; display: flex; gap: 12px; align-items: center; font-weight: 600; }
.nav-item-row:hover { background: rgba(255,255,255,.08); }
.nav-item-row:hover .nav-page-button { color: #fff; }
.nav-page-button.active { color: #fff; background: rgba(255,255,255,.1); box-shadow: inset 3px 0 0 var(--accent); }
.nav-page-button.active::after { content: ""; margin-left: auto; width: 16px; height: 3px; border-radius: 1px; background: var(--accent); }
[data-navigation-theme="scheme"] .nav-page-button.active { background:rgba(255,255,255,.18);box-shadow:inset 3px 0 0 #fff }
[data-navigation-theme="scheme"] .nav-page-button.active::after { background:#fff }

.odometer-filters { margin-bottom:18px }
.odometer-table { display:grid;gap:8px }
.odometer-table article { display:grid;grid-template-columns:1.15fr .7fr .8fr 1.4fr auto;gap:14px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface) }
.odometer-table article>div { display:grid;gap:4px;min-width:0 }
.odometer-table small { color:var(--muted) }
.navigation-theme-option { margin:18px 0 }
.odometer-delete { display:none!important }
.odometer-bus-list { display:grid;gap:12px }
.odometer-bus { overflow:hidden;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:0 5px 18px rgba(0,0,0,.035) }
.odometer-bus>summary { display:grid;grid-template-columns:48px minmax(160px,1fr) minmax(160px,.7fr) auto 24px;gap:14px;align-items:center;padding:18px 20px;cursor:pointer;list-style:none }
.odometer-bus>summary::-webkit-details-marker { display:none }
.odometer-bus>summary:hover { background:color-mix(in srgb,var(--accent) 5%,var(--surface)) }
.odometer-bus[open]>summary { border-bottom:1px solid var(--line);background:var(--surface-2) }
.odometer-bus[open] .collapse-chevron { transform:rotate(180deg) }
.odometer-bus-icon { width:44px;height:44px;display:grid;place-items:center;border-radius:13px;color:#fff;background:var(--accent);font-size:1.1rem;font-weight:900 }
.odometer-bus summary>span { display:grid;gap:3px;min-width:0 }.odometer-bus summary small { color:var(--muted) }
.odometer-current { text-align:right }.odometer-current strong { font-size:1.15rem }
.odometer-bus-body { padding:14px }
.odometer-analysis { margin:0 0 20px }.odometer-analysis>.card-head { margin-bottom:12px }
.odometer-analysis-list { display:grid;gap:13px }.odometer-analysis-list>div { display:grid;grid-template-columns:minmax(150px,.8fr) minmax(180px,1.4fr) 100px;gap:14px;align-items:center }.odometer-analysis-list span { display:grid;gap:3px }.odometer-analysis-list small { color:var(--muted) }.odometer-analysis-list i { height:9px;overflow:hidden;border-radius:999px;background:var(--surface-2) }.odometer-analysis-list b { display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--accent),var(--brand-2)) }.odometer-analysis-list>div>strong { text-align:right }
@media (max-width:760px){.odometer-table article{grid-template-columns:1fr 1fr;padding:16px}.odometer-table article>div:nth-child(4),.odometer-table .row-actions{grid-column:1/-1}.odometer-table .btn{min-height:44px}.fleet-meter-grid{grid-template-columns:1fr}}
@media (max-width:760px){.odometer-bus>summary{grid-template-columns:44px 1fr 22px;padding:15px}.odometer-bus .odometer-current{grid-column:2;text-align:left}.odometer-bus>summary>.badge{grid-column:2}.odometer-bus>summary>.collapse-chevron{grid-column:3;grid-row:1}}
@media (max-width:760px){.odometer-analysis-list>div{grid-template-columns:1fr auto}.odometer-analysis-list i{grid-column:1/-1;grid-row:2}.odometer-analysis-list>div>strong{grid-column:2;grid-row:1}}
@media (max-width:760px){.analysis-toggle span{display:none}.analysis-toggle{padding:7px}.dashboard-layout.is-compact .stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-layout.is-compact .stat span:last-child{display:none}.dashboard-layout.is-compact .stat strong{font-size:1.35rem}.notification-primary{padding:14px}.notification-group+.notification-group{margin-top:12px}.notification-row{padding:12px 2px}.notification-row .badge{justify-self:start}.compact-toggle{min-height:38px}}
.nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-pin-toggle { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; color: rgba(255,255,255,.25); background: transparent; opacity: 0; }
.nav-item-row:hover .nav-pin-toggle,.nav-pin-toggle:focus-visible,.nav-pin-toggle.active { opacity: 1; }
.nav-pin-toggle:hover,.nav-pin-toggle.active { color: var(--accent); background: rgba(255,255,255,.08); }
.nav-item-row.is-pinned .nav-pin-toggle { color: var(--accent); }
.nav-icon { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 22px; text-align: center; font-size: 1.05rem; }
.nav-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-count { margin-left: auto; min-width: 21px; height: 21px; display: grid; place-items: center; padding: 0 5px; border-radius: 999px; color: white; background: var(--accent); font-size: .68rem; font-weight: 900; }
.nav-order-list { display: grid; gap: 8px; margin: 22px 0; padding: 0; list-style: none; }
.nav-order-row { min-height: 64px; display: grid; grid-template-columns: 22px 34px minmax(130px,1fr) auto auto auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: grab; transition: opacity .15s ease, border-color .15s ease, transform .15s ease; }
.nav-order-row:active { cursor: grabbing; }
.nav-order-row.dragging { opacity: .42; }
.nav-order-row.drag-over { border-color: var(--accent); transform: translateY(2px); }
.nav-order-row.is-hidden { opacity: .64; }
.nav-drag-handle { color: var(--muted); font-weight: 900; letter-spacing: -4px; }
.nav-order-icon { width: 26px; display: grid; place-items: center; color: var(--accent); font-size: 1.05rem; }
.nav-order-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-order-name { min-width: 0; display: grid; gap: 3px; }
.nav-order-name small { color: var(--muted); font-size: .68rem; }
.nav-pin-choice { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface); font-size: .72rem; font-weight: 800; }
.nav-pin-choice:hover,.nav-pin-choice.active { color: var(--accent-ink); border-color: color-mix(in srgb,var(--accent) 55%,var(--line)); background: var(--accent); }
.nav-order-actions { display: flex; gap: 2px; }
.nav-order-actions .icon-btn { min-width: 38px; min-height: 38px; border: 1px solid var(--line); background: var(--surface); }
.nav-order-actions .icon-btn:disabled { cursor: default; opacity: .3; }
.nav-visibility-toggle { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .76rem; font-weight: 700; cursor: pointer; }
.nav-visibility-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.nav-visibility-toggle input:disabled + span { opacity: .7; }
.user-card { margin-top: 0; border-top: 1px solid rgba(255,255,255,.12); padding: 16px 8px 0; display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; }
.sidebar-meta { margin-top: auto; padding: 14px 10px 8px; display: grid; gap: 3px; color: rgba(255,255,255,.43); font-size: .65rem; }
.sidebar-legal { margin-top: 0; padding: 8px 10px 12px; display: flex; gap: 14px; color: rgba(255,255,255,.52); font-size: .72rem; }
.sidebar-legal a:hover { color: white; }
.sidebar-legal + .user-card { margin-top: 0; }
.avatar { width: 38px; height: 38px; border-radius: 5px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.user-card small { color: rgba(255,255,255,.55); }
.user-card > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }.user-card strong,.user-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { border: 0; background: transparent; color: inherit; border-radius: 10px; padding: 9px; }
.icon-btn:hover { background: rgba(127,127,127,.12); }

.main { grid-column: 2; min-width: 0; }
.topbar { min-height: 82px; padding: 18px clamp(22px, 4vw, 54px); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); position: sticky; top: 0; backdrop-filter: blur(14px); z-index: 10; }
.topbar h2 { margin: 0; font: 700 1rem "Avenir Next", "Trebuchet MS", sans-serif; }
.topbar-title { display:flex;align-items:center;gap:12px;min-width:150px; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.global-search { position:relative; width:min(430px,38vw); display:flex; align-items:center; gap:8px; padding:0 11px; border:1px solid var(--line); border-radius:13px; background:var(--surface); }
.global-search:focus-within { border-color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 16%,transparent); }
.global-search > span { color:var(--accent);font-size:1.1rem; }
.global-search input { width:100%; min-width:80px; padding:10px 0; border:0; outline:0; color:var(--ink); background:transparent; }
.global-search kbd { padding:3px 6px; border:1px solid var(--line); border-radius:6px; color:var(--muted); background:var(--surface-2); font-size:.66rem; white-space:nowrap; }
.global-search-results { position:absolute; z-index:50; top:calc(100% + 9px); left:0; right:0; max-height:min(520px,70vh); overflow:auto; padding:8px; border:1px solid var(--line); border-radius:16px; background:var(--surface); box-shadow:var(--shadow); }
.global-search-head { display:flex;justify-content:space-between;padding:8px 9px;color:var(--muted);font-size:.72rem; }
.global-search-results button { width:100%; display:grid; grid-template-columns:70px 1fr; gap:2px 10px; padding:10px; border:0; border-radius:10px; color:var(--ink); background:transparent; text-align:left; }
.global-search-results button:hover,.global-search-results button:focus { background:var(--surface-2); }
.global-search-results button > span { grid-row:1 / span 2; align-self:center; color:var(--accent); font-size:.7rem; font-weight:800; text-transform:uppercase; }
.global-search-results button small { color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.global-search-empty { padding:25px 12px;text-align:center;color:var(--muted); }
.presence-button { min-height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); font-size: .78rem; font-weight: 800; }
.presence-button:hover { background: var(--surface-2); }
.online-dot { width: 9px; height: 9px; display: inline-block; flex: 0 0 9px; border-radius: 50%; background: #2d9b65; box-shadow: 0 0 0 4px color-mix(in srgb,#2d9b65 14%,transparent); }
.online-dot.offline { background: var(--muted); box-shadow: none; }
.install-app { min-height: 40px; padding-block: 8px; }
.notification-shortcut { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 11px; color: var(--ink); background: transparent; font-size: 1.35rem; }
.notification-shortcut:hover { background: var(--surface-2); }
.notification-shortcut span { position: absolute; right: -2px; top: -3px; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--bg); border-radius: 999px; color: white; background: var(--accent); font-size: .61rem; font-weight: 900; }
.mobile-menu { display: none; }
.content { padding: 34px clamp(22px, 4vw, 54px) 64px; max-width: 1560px; margin: auto; background-image: linear-gradient(135deg, transparent 0%, rgba(128,128,128,.055) 100%); min-height: calc(100vh - 82px); }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.page-head h1 { font: 800 clamp(2rem, 4vw, 3.5rem)/1.04 "Avenir Next", "Trebuchet MS", sans-serif; letter-spacing: -.045em; margin: 7px 0; }
.page-head p { margin: 0; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid #3c3c3c; border-radius: 12px; padding: 20px; box-shadow: 0 8px 28px rgba(0,0,0,.045); }
.stat:first-child { border-top-color: #777; }
.stat strong { display: block; font: 800 2rem "Avenir Next", "Trebuchet MS", sans-serif; margin-top: 12px; }
.stat span { color: var(--muted); font-size: .88rem; }
.stat .trend { color: var(--brand-2); font-size: .78rem; font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.card h3 { font: 700 1.05rem "Avenir Next", "Trebuchet MS", sans-serif; margin: 0; }
.card-sub { color: var(--muted); font-size: .86rem; margin-top: 4px; }

.btn { border: 0; border-radius: 13px; padding: 11px 17px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-bottom: 2px solid color-mix(in srgb, var(--accent) 72%, #111); }
[data-theme="dark"] .btn-primary { color: #ffffff; }
.btn-accent { color: var(--accent-ink); background: linear-gradient(135deg,var(--accent),color-mix(in srgb,var(--accent) 72%,var(--brand-2))); border: 1px solid color-mix(in srgb,var(--accent) 70%,var(--ink)); box-shadow:0 5px 16px color-mix(in srgb,var(--accent) 20%,transparent); }
.btn-accent:hover { filter:brightness(1.07);transform:translateY(-1px) }.btn-accent:active { transform:translateY(0);filter:brightness(.96) }.btn-accent:focus-visible { outline:3px solid color-mix(in srgb,var(--accent) 30%,transparent);outline-offset:3px }
.btn-soft { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label { font-size: .82rem; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea, .search { width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px; color: var(--ink); background: var(--bg); outline: none; }
.field input:focus, .field select:focus, .field textarea:focus, .search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }

.assignment-list { display: grid; gap: 10px; }
.assignment { display: grid; grid-template-columns: 76px minmax(120px, .9fr) minmax(150px, 1.2fr) minmax(110px, .8fr) auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 16px; }
.assignment:hover { background: var(--surface-2); }
.assignment.assignment-changed { border-color: color-mix(in srgb,var(--accent) 48%,var(--line)); box-shadow: inset 4px 0 0 var(--accent), 0 7px 22px color-mix(in srgb,var(--accent) 8%,transparent); }
.assignment-status { display: grid; justify-items: end; gap: 5px; }
.assignment-clickable { cursor: pointer; }
.assignment-clickable:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-2) 28%, transparent); outline-offset: 2px; }
.date-chip { background: var(--surface-2); border-left: 4px solid #737373; border-radius: 5px; padding: 9px; text-align: center; font-weight: 800; line-height: 1.1; }
.date-chip small { display: block; color: var(--muted); font-size: .7rem; margin-bottom: 4px; }
.assignment strong, .assignment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assignment small { display: block; color: var(--muted); margin-top: 4px; }
.badge { display: inline-flex; border-radius: 999px; padding: 6px 9px; font-size: .75rem; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: #e6e6e6; color: #333333; border-left: 3px solid #777; }
.badge.warn { background: #fff0cc; color: #85580a; }
.badge.changed { color: #8a2d31; background: color-mix(in srgb,var(--accent) 13%,var(--surface)); border: 1px solid color-mix(in srgb,var(--accent) 35%,var(--line)); }
.badge.owner { color: #6f4a06; background: #fff3cf; border: 1px solid #eac56a; }
[data-theme="dark"] .badge.ok { background: #363636; color: #f1f1f1; }
[data-theme="dark"] .badge.warn { background: #4b3819; color: #ffd782; }
[data-theme="dark"] .badge.changed { color: #ffb8bb; }
[data-theme="dark"] .badge.owner { color: #ffdf91; background: #3d3115; border-color: #725b20; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 16px; }

.resource-list { display: grid; gap: 9px; }
.resource-row { display: flex; gap: 10px; align-items: center; padding: 12px; background: var(--surface-2); border-radius: 13px; }
.resource-row > span:nth-child(2) { flex: 1; font-weight: 600; }
.resource-actions { display: flex; align-items: center; gap: 2px; }
.resource-actions .icon-btn { min-width: 38px; min-height: 38px; }
.dot { width: 10px; height: 10px; border-radius: 2px; background: #777; transform: rotate(45deg); }
.unassigned-card { margin-bottom: 18px; }
.unassigned-card > summary { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.unassigned-card > summary::-webkit-details-marker { display: none; }
.unassigned-card .collapse-chevron { color: var(--accent); font-size: 1.3rem; transition: transform .18s ease; }
.unassigned-card[open] .collapse-chevron { transform: rotate(180deg); }
.unassigned-content { padding-top: 18px; }
.filter-grid { display: grid; grid-template-columns: repeat(3,minmax(160px,1fr)); gap: 0 14px; }
.filter-query { grid-column: 1 / -1; }
.filter-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 16px; color: var(--muted); font-weight: 700; }
.active-filters { display: flex; flex-wrap: wrap; gap: 7px; min-height: 34px; }
.active-filters button { padding: 6px 9px; border: 1px solid color-mix(in srgb,var(--accent) 35%,var(--line)); border-radius: 999px; color: var(--ink); background: color-mix(in srgb,var(--accent) 9%,var(--surface)); font-size: .75rem; font-weight: 700; }
mark { padding: 1px 3px; border-radius: 4px; color: inherit; background: color-mix(in srgb,var(--accent) 28%,#fff1a8); }
.accent-card { margin-top: 20px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.accent-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.accent-picker input[type="color"] { width: 54px; height: 44px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.accent-picker output { min-width: 76px; font-family: ui-monospace,monospace; color: var(--muted); }
.appearance-card { margin-top:20px; }
.scheme-grid { display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:20px; }
.scheme-option { display:grid;gap:5px;padding:12px;border:1px solid var(--line);border-radius:14px;color:var(--ink);background:var(--surface);text-align:left; }
.scheme-option:hover,.scheme-option.active { border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 13%,transparent); }
.scheme-option i { height:34px;display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:3px;padding:4px;border-radius:8px;background:var(--surface-2); }
.scheme-option i span { border-radius:4px;background:var(--brand); }.scheme-option i span:nth-child(2){background:var(--accent)}.scheme-option i span:nth-child(3){background:var(--line)}
.scheme-option[data-scheme="standard"] i span:nth-child(1){background:#333}.scheme-option[data-scheme="standard"] i span:nth-child(2){background:#a73539}.scheme-option[data-scheme="standard"] i span:nth-child(3){background:#d5d5d5}
.scheme-option[data-scheme="ocean"] i span:nth-child(1){background:#173c55}.scheme-option[data-scheme="ocean"] i span:nth-child(2){background:#327da0}.scheme-option[data-scheme="ocean"] i span:nth-child(3){background:#c9dbe5}
.scheme-option[data-scheme="forest"] i span:nth-child(1){background:#294b37}.scheme-option[data-scheme="forest"] i span:nth-child(2){background:#4f825e}.scheme-option[data-scheme="forest"] i span:nth-child(3){background:#ccd9cc}
.scheme-option[data-scheme="sunset"] i span:nth-child(1){background:#633f35}.scheme-option[data-scheme="sunset"] i span:nth-child(2){background:#b45f48}.scheme-option[data-scheme="sunset"] i span:nth-child(3){background:#e2d0c2}
.scheme-option small { color:var(--muted); }
.audit-detail-row { display: block; }
.audit-detail-row > summary { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.audit-detail-row > summary::-webkit-details-marker { display: none; }
.change-table { margin: 14px 0 0 48px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.change-table > div { display: grid; grid-template-columns: minmax(110px,.7fr) 1fr 1fr; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); }
.change-table > div:first-child { border-top: 0; }
.change-head { background: var(--surface-2); font-size: .74rem; color: var(--muted); }
.audit-no-changes { margin: 10px 0 0 48px; color: var(--muted); font-size: .8rem; }
.unassigned-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 9px; }
.unassigned-driver { min-width: 0; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--surface-2); text-align: left; }
.unassigned-driver:not(:disabled):hover { border-color: color-mix(in srgb,var(--accent) 45%,var(--line)); background: color-mix(in srgb,var(--accent) 6%,var(--surface)); }
.unassigned-driver:disabled { cursor: default; }
.unassigned-driver > span:nth-child(2) { min-width: 0; display: grid; }
.unassigned-driver strong,.unassigned-driver small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unassigned-driver small { margin-top: 3px; color: var(--muted); }
.unassigned-driver b { color: var(--accent); font-size: .76rem; white-space: nowrap; }
.unassigned-complete { padding: 14px; border-radius: 12px; color: #246b47; background: color-mix(in srgb,#2d9b65 12%,var(--surface)); font-weight: 700; }
.vehicle-col { position: relative; padding-left: 25px; }
.vehicle-col::before { content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 10px; border: 1.5px solid var(--muted); border-radius: 3px; }
.vehicle-col::after { content: "••"; position: absolute; left: 2px; top: 7px; color: var(--muted); font-size: 8px; letter-spacing: 5px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .search { flex: 1; min-width: 220px; }
.segmented { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; }
.segmented button { border: 0; background: transparent; color: var(--muted); padding: 8px 12px; border-radius: 9px; font-weight: 700; }
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.08); }

.calendar-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.calendar-nav { display: flex; align-items: center; gap: 3px; }
.calendar-nav .icon-btn { font-size: 1.5rem; padding: 5px 11px; }
.calendar-period { margin-left: auto; text-transform: capitalize; }
.calendar-card { padding: 0; overflow: auto; }
.week-calendar { min-width: 1080px; display: grid; grid-template-columns: 68px repeat(7,minmax(138px,1fr)); grid-template-rows: 54px 1088px; }
.week-corner, .week-day-head { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.week-corner { display: grid; place-items: center; color: var(--muted); font-size: .7rem; border-right: 1px solid var(--line); }
.week-day-head { display: grid; place-items: center; align-content: center; gap: 2px; border-right: 1px solid var(--line); }
.week-day-head span { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.week-day-head.today strong { color: var(--accent); }
.time-axis { display: grid; grid-template-rows: repeat(17,64px); color: var(--muted); font-size: .68rem; border-right: 1px solid var(--line); }
.time-axis span { padding: 5px 8px 0 0; text-align: right; border-top: 1px solid var(--line); }
.week-day { position: relative; height: 1088px; border-right: 1px solid var(--line); background: var(--surface); }
.week-day.today { background: color-mix(in srgb,var(--accent) 3%,var(--surface)); }
.hour-line { display: block; height: 64px; border-top: 1px solid var(--line); }
.calendar-event { position: absolute; left: 5px; right: 5px; z-index: 3; min-height: 24px; overflow: hidden; padding: 6px 7px; border: 0; border-left: 4px solid var(--accent); border-radius: 8px; color: var(--ink); background: color-mix(in srgb,var(--accent) 14%,var(--surface)); text-align: left; box-shadow: 0 3px 9px rgba(0,0,0,.09); }
.calendar-event:hover { filter: brightness(.97); }
.calendar-event strong, .calendar-event span, .calendar-event small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event strong { font-size: .7rem; }
.calendar-event span { margin-top: 2px; font-size: .75rem; font-weight: 800; }
.calendar-event small { margin-top: 2px; font-size: .66rem; color: var(--muted); }
.calendar-event.draft, .month-event.draft { border-left-color: var(--warning); background: color-mix(in srgb,var(--warning) 16%,var(--surface)); }
.calendar-event.changed, .month-event.changed { box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--accent) 55%,transparent), 0 3px 9px rgba(0,0,0,.09); }
.calendar-event.changed small, .month-event.changed { color: var(--accent); font-weight: 800; }
.availability-block { position: absolute; left: 2px; right: 2px; z-index: 1; overflow: hidden; border-radius: 6px; pointer-events: none; opacity: .7; }
.availability-block span { padding: 3px 5px; display: block; overflow: hidden; font-size: .62rem; white-space: nowrap; }
.availability-block.available { border: 1px dashed #32805d; background: color-mix(in srgb,#32805d 10%,transparent); color: #236043; }
.availability-block.unavailable { border: 1px dashed var(--danger); background: color-mix(in srgb,var(--danger) 13%,transparent); color: var(--danger); }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 18px; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.calendar-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend-assignment { background: var(--accent); }.legend-available { border: 1px dashed #32805d; background: color-mix(in srgb,#32805d 15%,transparent); }.legend-unavailable { border: 1px dashed var(--danger); background: color-mix(in srgb,var(--danger) 15%,transparent); }.legend-draft { background: var(--warning); }
.month-calendar { min-width: 900px; display: grid; grid-template-columns: repeat(7,1fr); }
.month-weekday { padding: 12px; color: var(--muted); font-size: .72rem; font-weight: 800; text-align: center; border-bottom: 1px solid var(--line); }
.month-day { min-height: 132px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.month-day.outside { opacity: .45; }
.month-day.today .month-number { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: white; background: var(--accent); }
.month-number { display: block; margin-bottom: 6px; font-weight: 800; }
.month-events { display: grid; gap: 4px; }
.month-event { width: 100%; overflow: hidden; padding: 5px 6px; border: 0; border-left: 3px solid var(--accent); border-radius: 5px; color: var(--ink); background: color-mix(in srgb,var(--accent) 12%,var(--surface)); text-align: left; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }

.availability-list { display: grid; gap: 9px; }
.availability-row { display: grid; grid-template-columns: 120px minmax(220px,1.3fr) minmax(140px,1fr) auto; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.availability-row small { display: block; margin-top: 4px; color: var(--muted); }
.availability-status { padding: 7px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; text-align: center; }
.availability-status.available { color: #236043; background: color-mix(in srgb,#32805d 14%,var(--surface)); }
.availability-status.unavailable { color: var(--danger); background: color-mix(in srgb,var(--danger) 12%,var(--surface)); }
.availability-note-text { color: var(--muted); }
.version-pill { padding: 6px 9px; border-radius: 8px; background: var(--surface-2); font-weight: 800; }
.audit-card { margin-top: 20px; }
.audit-list { display: grid; }
.audit-row { display: grid; grid-template-columns: 36px minmax(200px,1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.audit-row:first-child { border-top: 0; }
.audit-row.audit-detail-row { display: block; }
.audit-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: color-mix(in srgb,var(--accent) 10%,var(--surface)); font-weight: 900; }
.audit-row small { display: block; margin-top: 3px; color: var(--muted); }
.audit-entity { color: var(--muted); font-size: .78rem; }

.notification-card { max-width: 940px; }
.notification-list { display: grid; }
.notification-row { width: 100%; display: grid; grid-template-columns: 12px minmax(180px,1fr) auto; gap: 14px; align-items: center; padding: 16px 4px; border: 0; border-top: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; }
.notification-row:first-child { border-top: 0; }
.notification-row:hover { background: var(--surface-2); }
.notification-row span:nth-child(2) { display: grid; gap: 5px; }
.notification-row small { color: var(--muted); line-height: 1.45; }
.notification-row time { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.notification-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.notification-row.unread .notification-dot { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb,var(--accent) 13%,transparent); }
.notification-row.unread strong { color: var(--accent); }
.notification-primary { max-width:none;margin-bottom:20px;border-color:color-mix(in srgb,var(--accent) 22%,var(--line)) }
.notification-group + .notification-group { margin-top:18px }.notification-group>h3 { display:flex;align-items:center;gap:8px;padding:8px 4px;color:var(--muted);font-size:.76rem;text-transform:uppercase;letter-spacing:.08em }.notification-group>h3 span { display:grid;place-items:center;min-width:22px;height:22px;border-radius:999px;background:var(--surface-2);font-size:.68rem }.priority-critical { border-left:3px solid var(--danger) }.priority-warning { border-left:3px solid var(--warning) }

.compact-toggle { display:inline-flex;align-items:center;gap:9px;padding:7px 10px;border:1px solid var(--line);border-radius:999px;background:var(--surface);font-size:.8rem;font-weight:800;white-space:nowrap }.compact-toggle input { appearance:none;width:34px;height:20px;margin:0;border-radius:999px;background:var(--line);position:relative;transition:.2s }.compact-toggle input::after { content:"";position:absolute;width:14px;height:14px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:.2s }.compact-toggle input:checked { background:var(--accent) }.compact-toggle input:checked::after { transform:translateX(14px) }.dashboard-layout.is-compact .stats { gap:9px;margin-bottom:13px }.dashboard-layout.is-compact .stat { padding:13px 15px }.dashboard-layout.is-compact .stat strong { margin-top:5px;font-size:1.55rem }.dashboard-layout.is-compact .card { padding:17px }.dashboard-layout.is-compact .card-head { margin-bottom:12px }.dashboard-layout.is-compact .unassigned-card { margin-bottom:13px }

#content:has(#backup-now)>.grid-2 { gap:24px;margin-bottom:24px }#content:has(#backup-now)>.card { margin-top:24px }#content:has(#backup-now) .backup-actions,#content:has(#backup-now) .export-actions { gap:12px;margin-top:20px }#content:has(#backup-now) .backup-warning { display:block;margin-top:13px;line-height:1.5 }

.utilization-stats { grid-template-columns: repeat(3,1fr); }
.utilization-list { display: grid; }
.utilization-row { display: grid; grid-template-columns: 38px minmax(180px,1fr) minmax(180px,2fr) 65px 85px; gap: 14px; align-items: center; padding: 15px 0; border-top: 1px solid var(--line); }
.utilization-row:first-child { border-top: 0; }
.utilization-row small { display: block; margin-top: 4px; color: var(--muted); }
.utilization-rank { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); background: var(--surface-2); font-size: .75rem; font-weight: 800; }
.utilization-meter { height: 12px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.utilization-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#777,var(--accent)); }
.utilization-row > span:last-child { color: var(--muted); font-size: .82rem; text-align: right; }
.reset-request-card { margin-bottom: 20px; border-color: color-mix(in srgb,var(--warning) 45%,var(--line)); }
.reset-request-list { display: grid; }
.reset-request-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.reset-request-row:first-child { border-top: 0; }
.reset-request-row small { display: block; margin-top: 4px; color: var(--muted); }
.user-resource-row { flex-wrap: wrap; }
.protected-note { color: var(--muted); font-size: .78rem; font-weight: 800; }
.owner-notice { border-left: 4px solid var(--warning); }

.role-access-card { display: grid; gap: 5px; margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.role-access-card > small { color: var(--muted); }
.role-check-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 10px; }
.role-check-grid label { display: flex; gap: 9px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.role-check-grid input { margin-top: 3px; accent-color: var(--accent); }
.role-check-grid span { display: grid; gap: 3px; }
.role-check-grid small { color: var(--muted); font-size: .68rem; line-height: 1.35; }
.feature-admin-card { margin-top: 20px; }
.feature-admin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.feature-permission { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-2); }
.module-switch { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px; cursor: pointer; }
.module-switch > span { display: grid; gap: 4px; }
.module-switch small { color: var(--muted); line-height: 1.4; }
.module-switch input { position: absolute; opacity: 0; pointer-events: none; }
.module-switch i { width: 46px; height: 26px; flex: 0 0 auto; border-radius: 999px; background: #aaa; position: relative; transition: .2s; }
.module-switch i::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.25); transition: .2s; }
.module-switch input:checked + i { background: #444; }
.module-switch input:checked + i::after { transform: translateX(20px); }
.module-role-options { padding: 0 15px 15px; border-top: 1px solid var(--line); }
.role-label { display: block; padding-top: 12px; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.expense-rate-fields { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.settings-save { margin-top: 20px; }
.settings-info { margin: 10px 0 0; }
.save-confirmation { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; padding: 15px 17px; border: 1px solid color-mix(in srgb,#2d9b65 45%,var(--line)); border-radius: 15px; color: #236043; background: color-mix(in srgb,#2d9b65 10%,var(--surface)); box-shadow: 0 8px 24px color-mix(in srgb,#2d9b65 8%,transparent); }
.save-confirmation > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: white; background: #2d9b65; font-weight: 900; }
.save-confirmation div { display: grid; gap: 3px; }.save-confirmation small { opacity: .8; }

.presence-scope { margin-top: -8px; }
.presence-list { display: grid; margin: 18px 0; }
.presence-row { display: grid; grid-template-columns: 14px 38px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.presence-row:first-child { border-top: 0; }.presence-row small { display: block; margin-top: 3px; color: var(--muted); }

.template-list { display: grid; margin: 18px 0; }
.template-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.template-row:first-child { border-top: 0; }.template-row small { display: block; margin-top: 4px; color: var(--muted); }
.template-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: color-mix(in srgb,var(--accent) 11%,var(--surface)); font-weight: 900; }
.template-actions { display: flex; gap: 4px; align-items: center; }
.template-applied, .change-notice { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 13px 15px; border-radius: 13px; background: var(--surface-2); }
.template-applied > span { color: var(--accent); font-size: 1.3rem; }.template-applied div, .change-notice { display: grid; gap: 3px; }.template-applied small, .change-notice span { color: var(--muted); }
.change-notice { border-left: 4px solid var(--accent); color: var(--accent); }

.chat-shell { min-height: 620px; display: grid; grid-template-columns: 270px minmax(0,1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.chat-contacts { border-right: 1px solid var(--line); background: var(--surface-2); }
.chat-contacts-head { display: grid; gap: 3px; padding: 18px; border-bottom: 1px solid var(--line); }
.chat-contacts-head small { color: var(--muted); }
.chat-contact { width: 100%; display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; }
.chat-contact:hover, .chat-contact.active { background: var(--surface); }
.chat-contact > span:nth-child(2) { display: grid; gap: 3px; }
.chat-contact small { color: var(--muted); }
.chat-contact b { min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 999px; color: white; background: var(--accent); font-size: .68rem; }
.chat-conversation { min-width: 0; display: grid; grid-template-rows: auto minmax(300px,1fr) auto; }
.chat-header { display: flex; gap: 11px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-header div { display: grid; gap: 3px; }.chat-header small { color: var(--muted); }
.chat-messages { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 22px; background: color-mix(in srgb,var(--surface-2) 58%,var(--surface)); }
.chat-bubble { width: fit-content; max-width: min(72%,560px); padding: 11px 13px; border-radius: 16px; background: var(--surface); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.chat-bubble.mine { align-self: flex-end; color: white; background: #353535; border-bottom-right-radius: 4px; }
.chat-bubble.theirs { align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-bubble p { margin: 0; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-bubble time { display: block; margin-top: 6px; color: inherit; opacity: .65; font-size: .64rem; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.chat-form textarea { resize: none; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--bg); outline: none; }
.chat-form textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb,var(--brand-2) 14%,transparent); }
.chat-readonly { padding: 16px; border-top: 1px solid var(--line); color: var(--muted); background: var(--surface-2); font-size: .84rem; text-align: center; }
.avatar-presence { position: relative; overflow: visible; }
.presence-indicator { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border: 2px solid var(--surface); border-radius: 50%; background: #999; }
.presence-indicator.online { background: #28a66a; box-shadow: 0 0 0 2px color-mix(in srgb,#28a66a 18%,transparent); }
.presence-indicator.offline { background: #9aa09d; }

.ticket-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
.ticket-list { display: grid; gap: 16px; }
.ticket-card { display: grid; gap: 15px; }
.ticket-card.urgent { border-left: 4px solid var(--danger); }
.ticket-card-head h3 { margin: 8px 0 4px; }
.ticket-card-head small { color: var(--muted); }
.ticket-card > p, .ticket-owner-note p { margin: 0; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ticket-priority { color: var(--muted); font-size: .72rem; font-weight: 800; }
.ticket-priority.high { color: #a96712; }.ticket-priority.urgent { color: var(--danger); }
.ticket-owner-note { padding: 14px 16px; border-left: 3px solid var(--accent); border-radius: 10px; background: var(--surface-2); }
.ticket-owner-note strong { display: block; margin-bottom: 6px; }
.ticket-update-form { display: grid; grid-template-columns: minmax(170px,.4fr) minmax(260px,1fr) auto; gap: 12px; align-items: end; padding-top: 14px; border-top: 1px solid var(--line); }
.ticket-update-form .field { margin: 0; }.ticket-update-form .btn { margin-bottom: 1px; }

.modal-wrap { position: fixed; inset: 0; background: rgba(8,18,14,.55); display: grid; place-items: center; padding: 20px; z-index: 100; backdrop-filter: blur(5px); }
.modal { width: min(640px, 100%); max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 24px; padding: 26px; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
body.modal-open { overflow: hidden; }
.modal-head { display: flex; align-items: start; justify-content: space-between; margin-bottom: 20px; }
.modal-head h2 { font: 800 1.5rem "Avenir Next", "Trebuchet MS", sans-serif; margin: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 22px; }
.detail-grid > div { display: grid; gap: 5px; padding: 14px; border-radius: 12px; background: var(--surface-2); }
.detail-grid span { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.detail-grid small { color: var(--muted); }
.detail-note { grid-column: 1/-1; }
.detail-note p { margin: 0; line-height: 1.55; white-space: pre-wrap; }
.response-actions { margin-top:18px; padding:16px; border:1px solid var(--line); border-radius:16px; background:var(--surface-2); }
.response-actions > strong { display:block; margin-bottom:8px; }
.secret-code { margin:16px 0; padding:16px; border:1px dashed var(--accent); border-radius:12px; background:var(--surface-2); font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-weight:800; letter-spacing:.08em; overflow-wrap:anywhere; user-select:all; }
.setup-steps { color:var(--muted); line-height:1.6; padding-left:22px; }
.recovery-code-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:18px 0; }
.recovery-code-grid code { padding:12px; border-radius:10px; background:var(--surface-2); text-align:center; font-weight:800; user-select:all; }
.toast-wrap { position: fixed; right: 24px; bottom: 24px; display: grid; gap: 10px; z-index: 200; }
.toast { background: var(--ink); color: var(--surface); padding: 13px 17px; border-radius: 13px; box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
.toast.error { background: var(--danger); color: white; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.notice { padding: 14px 16px; border: 1px solid #eac56a; background: #fff6da; color: #6f4a06; border-radius: 14px; margin-bottom: 18px; }
[data-theme="dark"] .notice { background: #3d3115; color: #ffdf91; border-color: #725b20; }
.timeline { display: grid; }
.timeline-row { display: grid; grid-template-columns: 80px 18px 1fr; gap: 10px; min-height: 58px; }
.timeline-line { position: relative; }
.timeline-line::before { content: ""; position: absolute; left: 8px; top: 15px; bottom: -10px; width: 2px; background: var(--line); }
.timeline-row:last-child .timeline-line::before { display: none; }
.timeline-line::after { content: ""; position: absolute; left: 4px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.money { font: 800 1.6rem "Avenir Next", "Trebuchet MS", sans-serif; color: var(--brand-2); }

.owner-access-badge { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid color-mix(in srgb,var(--accent) 34%,var(--line)); border-radius: 999px; color: var(--accent); background: color-mix(in srgb,var(--accent) 8%,var(--surface)); font-size: .76rem; font-weight: 900; white-space: nowrap; }
.analytics-hero { min-height: 190px; display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 18px; padding: clamp(24px,4vw,42px); overflow: hidden; position: relative; border-radius: 24px; color: white; background: linear-gradient(128deg,#202020 0%,#343434 62%,#5a292b 135%); box-shadow: 0 22px 52px rgba(0,0,0,.17); }
.analytics-hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -95px; top: -110px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 38px rgba(255,255,255,.025),0 0 0 78px rgba(255,255,255,.018); }
.analytics-hero > div:first-child { max-width: 780px; position: relative; z-index: 1; }
.analytics-hero-kicker { display: block; margin-bottom: 13px; color: #e29a9d; font-size: .72rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.analytics-hero h2 { max-width: 720px; margin: 0; font: 800 clamp(1.55rem,3vw,2.65rem)/1.12 "Avenir Next", "Trebuchet MS", sans-serif; letter-spacing: -.035em; }
.analytics-hero p { margin: 16px 0 0; color: rgba(255,255,255,.62); font-size: .85rem; }
.analytics-hero-mark { height: 92px; display: flex; align-items: end; gap: 9px; padding-right: 28px; position: relative; z-index: 1; }
.analytics-hero-mark span { width: 12px; border-radius: 7px 7px 2px 2px; background: linear-gradient(#d7787c,#a73539); box-shadow: 0 8px 24px rgba(167,53,57,.35); }
.analytics-hero-mark span:nth-child(1) { height: 34%; }.analytics-hero-mark span:nth-child(2) { height: 57%; }.analytics-hero-mark span:nth-child(3) { height: 43%; }.analytics-hero-mark span:nth-child(4) { height: 90%; }
.analytics-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.analytics-kpi { min-height: 174px; display: flex; flex-direction: column; padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 10px 32px rgba(0,0,0,.055); }
.analytics-kpi-icon { width: 35px; height: 35px; display: grid; place-items: center; margin-bottom: 15px; border-radius: 11px; color: var(--accent); background: color-mix(in srgb,var(--accent) 10%,var(--surface)); font-weight: 900; }
.analytics-kpi > span:not(.analytics-delta) { color: var(--muted); font-size: .78rem; font-weight: 800; }
.analytics-kpi > strong { margin: 6px 0 auto; font: 800 2rem "Avenir Next", "Trebuchet MS", sans-serif; letter-spacing: -.03em; }
.analytics-section-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 38px 0 18px; }.analytics-section-title h2 { margin: 6px 0; font: 800 clamp(1.5rem,2.5vw,2.2rem) "Avenir Next", "Trebuchet MS", sans-serif; letter-spacing: -.035em; }.analytics-section-title p { margin: 0; color: var(--muted); }
.usage-kpi { border-top: 3px solid color-mix(in srgb,var(--accent) 72%,#333); }.usage-kpi > strong { font-size: clamp(1.55rem,2.5vw,2rem); }
.analytics-delta { margin-top: 13px; font-size: .69rem; font-weight: 800; }.analytics-delta.positive { color: #23815a; }.analytics-delta.negative { color: var(--danger); }.analytics-delta.neutral { color: var(--muted); }
.analytics-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-bottom: 18px; }
.analytics-grid-main { grid-template-columns: minmax(0,1.65fr) minmax(270px,.55fr); }
.analytics-grid-bottom { grid-template-columns: minmax(300px,.8fr) minmax(0,1.2fr); }
.analytics-chart-card { min-width: 0; overflow: hidden; }.analytics-chart-total { color: var(--accent); font-weight: 900; }
.analytics-chart-wrap { min-width: 0; }.analytics-line-chart { width: 100%; height: auto; overflow: visible; }
.analytics-line-chart line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 7; }.analytics-line-chart polyline { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }.analytics-line-chart .chart-area { fill: color-mix(in srgb,var(--accent) 11%,transparent); stroke: none; }.analytics-line-chart circle { fill: var(--surface); stroke: var(--accent); stroke-width: 4; }
.analytics-axis { display: grid; grid-template-columns: repeat(6,1fr); padding: 0 1px; color: var(--muted); font-size: .68rem; font-weight: 800; text-align: center; text-transform: uppercase; }
.analytics-status-card { display: grid; place-items: center; align-content: start; }.analytics-status-card .card-head { width: 100%; }
.analytics-donut { --value: 0; width: 172px; aspect-ratio: 1; display: grid; place-items: center; margin: 8px auto 25px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--value)*1%),var(--surface-2) 0); position: relative; box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--line) 50%,transparent); }
.analytics-donut::after { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 7px 20px rgba(0,0,0,.08); }.analytics-donut > div { display: grid; place-items: center; position: relative; z-index: 1; }.analytics-donut strong { font: 800 2rem "Avenir Next", "Trebuchet MS", sans-serif; }.analytics-donut span { color: var(--muted); font-size: .7rem; }
.analytics-legend { width: 100%; display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }.analytics-legend span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .72rem; }.analytics-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }.analytics-legend i.muted-dot { background: var(--surface-2); border: 1px solid var(--line); }.analytics-legend strong { color: var(--ink); }
.analytics-ranking,.analytics-vehicle-list { display: grid; }.analytics-rank-row { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }.analytics-rank-row:first-child,.analytics-vehicle-row:first-child { border-top: 0; }.analytics-rank { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); background: var(--surface-2); font-size: .73rem; font-weight: 900; }.analytics-rank-row > div { min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; }.analytics-rank-row > div strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.analytics-rank-row > div span { grid-column: 1/-1; height: 5px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }.analytics-rank-row > div i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }.analytics-rank-row small { color: var(--muted); }.analytics-rank-row > b { font-size: .77rem; white-space: nowrap; }
.analytics-vehicle-row { display: grid; grid-template-columns: minmax(150px,1fr) minmax(110px,.7fr) 44px; gap: 13px; align-items: center; padding: 15px 0; border-top: 1px solid var(--line); }.analytics-vehicle-row > div:first-child { display: grid; gap: 4px; }.analytics-vehicle-row small { color: var(--muted); }.analytics-vehicle-meter { height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }.analytics-vehicle-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#6e6e6e,var(--accent)); }.analytics-vehicle-row > b { text-align: right; }
.weekday-chart { min-height: 220px; display: grid; grid-template-columns: repeat(7,1fr); gap: 9px; align-items: end; }.weekday-chart > div { height: 190px; display: grid; grid-template-rows: 1fr auto auto; gap: 6px; place-items: center; }.weekday-chart > div > span { width: min(28px,70%); height: 100%; display: flex; align-items: end; overflow: hidden; border-radius: 8px 8px 3px 3px; background: var(--surface-2); }.weekday-chart i { width: 100%; min-height: 3px; display: block; border-radius: inherit; background: linear-gradient(180deg,var(--accent),#5b5b5b); }.weekday-chart strong { font-size: .72rem; }.weekday-chart small { color: var(--muted); font-weight: 800; }
.operations-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }.operations-grid > div { min-height: 105px; display: flex; flex-direction: column; justify-content: space-between; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }.operations-grid span { color: var(--muted); font-size: .76rem; line-height: 1.3; }.operations-grid strong { font: 800 1.65rem "Avenir Next", "Trebuchet MS", sans-serif; }.operations-grid .signal-warn { border-color: color-mix(in srgb,var(--accent) 35%,var(--line)); background: color-mix(in srgb,var(--accent) 6%,var(--surface)); }.operations-grid .signal-warn strong { color: var(--accent); }
.analytics-usage-grid { grid-template-columns: minmax(0,1.1fr) minmax(320px,.9fr); }
.usage-day-chart { min-height: 240px; display: grid; grid-template-columns: repeat(14,1fr); gap: 7px; align-items: end; }.usage-day-chart > div { height: 210px; display: grid; grid-template-rows: 1fr auto 16px; gap: 5px; place-items: center; }.usage-day-chart > div > span { width: min(24px,78%); height: 100%; display: flex; align-items: end; border-radius: 7px 7px 2px 2px; background: var(--surface-2); overflow: hidden; }.usage-day-chart i { width: 100%; min-height: 3px; display: block; border-radius: inherit; background: linear-gradient(180deg,#c85b60,var(--accent)); }.usage-day-chart strong { font-size: .68rem; }.usage-day-chart small { color: var(--muted); font-size: .58rem; white-space: nowrap; }.usage-chart-note { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--muted); font-size: .68rem; }.usage-chart-note span { display: inline-flex; align-items: center; gap: 6px; }.usage-chart-note i { width: 9px; height: 9px; border-radius: 3px; background: var(--accent); }
.usage-module-list { display: grid; }.usage-module-row { display: grid; grid-template-columns: 32px minmax(0,1fr) 38px; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }.usage-module-row:first-child { border-top: 0; }.usage-module-row > div { min-width: 0; display: grid; grid-template-columns: 1fr; gap: 5px; }.usage-module-row > div > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.usage-module-row > div > span { height: 5px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }.usage-module-row > div i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--accent),#707070); }.usage-module-row small { color: var(--muted); }.usage-module-row > b { text-align: right; }
.usage-users-card { margin-bottom: 18px; }.usage-user-list { display: grid; }.usage-user-row { display: grid; grid-template-columns: 38px minmax(180px,1.4fr) repeat(4,minmax(95px,.7fr)); gap: 15px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }.usage-user-row:first-child { border-top: 0; }.usage-user-row > div { min-width: 0; display: grid; gap: 4px; }.usage-user-row > div small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }.usage-user-row > span:not(.avatar) { display: grid; gap: 5px; }.usage-user-row > span small { color: var(--muted); font-size: .65rem; }.usage-user-row > span strong { font-size: .82rem; }
.settings-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--line); }
.settings-row:last-child { border: 0; }
.settings-row > span:first-child { display: grid; gap: 3px; }
.feature-toggle { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px; margin: 18px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); cursor: pointer; }
.feature-toggle span { display: grid; gap: 3px; }
.feature-toggle small { color: var(--muted); }
.feature-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.feature-toggle i { width: 46px; height: 26px; flex: 0 0 auto; border-radius: 999px; background: #aaa; position: relative; transition: .2s; }
.feature-toggle i::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.25); transition: .2s; }
.feature-toggle input:checked + i { background: #444; }
.feature-toggle input:checked + i::after { transform: translateX(20px); }
.export-panel { max-width: 780px; }
.export-controls { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 20px; align-items: end; }
.export-controls .field { margin: 0; }
.export-actions { display: flex; gap: 10px; padding-bottom: 1px; }
.export-preview { margin-top: 20px; }
.print-sheet { display: none; }
.mobile-quick-actions { display: none; }
.head-actions, .row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.push-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.push-card > div { display: grid; gap: 4px; }
.notification-type-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.notification-row.priority-critical { border-left: 4px solid var(--danger); }
.notification-row.priority-warning { border-left: 4px solid #d78b18; }
.assignment-actions { display: flex; align-items: center; gap: 5px; }
.bulk-check { width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; }
.bulk-check input { position: absolute; opacity: 0; }
.bulk-check span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: transparent; }
.bulk-check input:checked + span { color: white; border-color: var(--accent); background: var(--accent); }
.bulk-action-bar { position: sticky; z-index: 8; bottom: 18px; display: none; align-items: center; justify-content: flex-end; gap: 10px; margin: 16px auto 0; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.bulk-action-bar.visible { display: flex; }
.bulk-action-bar strong { margin-right: auto; }
.filter-hidden { display: none !important; }
.weekday-picker { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.weekday-picker legend { padding: 0 6px; font-weight: 800; }
.weekday-picker label { display: inline-flex; margin: 4px; cursor: pointer; }
.weekday-picker input { position: absolute; opacity: 0; }
.weekday-picker label span { min-width: 42px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; text-align: center; font-weight: 800; }
.weekday-picker input:checked + span { color: white; border-color: var(--accent); background: var(--accent); }
.weekday-picker small { display: block; margin-top: 8px; }
.fleet-stats { grid-template-columns: repeat(3,1fr); }
.fleet-meter-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; }
.meter-card { display: grid; gap: 5px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.meter-card > span, .meter-card > small { color: var(--muted); }
.meter-card > strong { font-size: 1.45rem; }
.meter-card > strong small { font-size: .75rem; font-weight: 700; }
.fleet-event-list, .compact-table, .backup-list { display: grid; }
.fleet-event { display: grid; grid-template-columns: 42px minmax(0,1fr) auto auto; gap: 14px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); }
.fleet-event:last-child { border-bottom: 0; }
.fleet-event.blocking { border-left: 3px solid var(--accent); padding-left: 13px; }
.assignment-conflict { box-shadow: inset 3px 0 0 #c46b3d; }
.fleet-event > div:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.fleet-event small { display: block; color: var(--muted); }
.event-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); font-weight: 900; }
.compact-table > div { display: grid; grid-template-columns: minmax(130px,1fr) auto auto minmax(100px,1fr) 36px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.compact-table > div:last-child { border-bottom: 0; }.compact-table small { color: var(--muted); }
.check-line { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.check-line input { margin-top: 3px; accent-color: var(--accent); }.check-line span { display: grid; gap: 3px; }.check-line small { color: var(--muted); }
.file-button { cursor: pointer; }
.backup-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.backup-warning { display: block; margin-top: 10px; line-height: 1.45; }
.legal-shell { min-height: 100vh; background: var(--bg); }
.legal-header { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 22px; padding: 16px clamp(20px, 5vw, 72px); background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.legal-brand img { display: block; width: 150px; height: 42px; object-fit: contain; object-position: left center; }
.legal-header nav { display: flex; align-items: center; gap: 18px; }
.legal-header nav > a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 700; }
.legal-content { width: min(880px, calc(100% - 36px)); margin: 0 auto; padding: 60px 0 90px; }
.legal-content section { scroll-margin-top: 100px; padding-bottom: 60px; }
.legal-content section + section { padding-top: 60px; border-top: 1px solid var(--line); }
.legal-content h1 { margin: 10px 0 18px; font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -.045em; }
.legal-content h2 { margin: 34px 0 8px; font-size: 1.12rem; }
.legal-content p, .legal-content address { color: var(--muted); line-height: 1.72; font-style: normal; }
.legal-content a { color: var(--ink); text-underline-offset: 3px; }
.legal-lead { max-width: 720px; font-size: 1.15rem; }
.legal-note { margin-top: 36px; padding: 18px; border-left: 4px solid #777; background: var(--surface); color: var(--muted); line-height: 1.6; }
.legal-footer { padding: 24px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); font-size: .82rem; }

.onboarding-modal { text-align: center; padding: 8px 6px 2px; }
.onboarding-progress { display: flex; justify-content: center; gap: 7px; margin-bottom: 26px; }
.onboarding-progress span { width: 38px; height: 5px; border-radius: 10px; background: var(--line); }
.onboarding-progress span.active { background: var(--accent); }
.onboarding-icon { display: grid; place-items: center; width: 78px; height: 78px; margin: 0 auto 22px; border-radius: 24px; background: color-mix(in srgb,var(--accent) 16%,var(--surface)); color: var(--accent); font-size: 2.1rem; font-weight: 900; }
.onboarding-modal h2 { margin: 8px 0 10px; font-size: clamp(1.7rem,4vw,2.35rem); }
.onboarding-text { max-width: 590px; margin: 0 auto 22px; color: var(--muted); line-height: 1.65; }
.onboarding-change-list { display: grid; gap: 10px; max-width: 590px; margin: 0 auto 26px; padding: 0; text-align: left; list-style: none; }
.onboarding-change-list li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 12px 14px; border-radius: 13px; background: var(--surface-2); line-height: 1.45; }
.onboarding-change-list span { color: var(--accent); font-weight: 900; }
.onboarding-actions { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.onboarding-actions > span { color: var(--muted); font-size: .8rem; font-weight: 700; }
.release-timeline { display: grid; gap: 16px; }
.release-card { display: grid; grid-template-columns: minmax(150px,.32fr) 1fr; gap: 28px; position: relative; overflow: hidden; }
.release-card.latest { border-color: color-mix(in srgb,var(--accent) 45%,var(--line)); }
.release-card.latest::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.release-version { display: flex; flex-wrap: wrap; align-content: start; align-items: center; gap: 8px; }
.release-version time { width: 100%; color: var(--muted); font-size: .82rem; }
.release-card h2 { margin: 0 0 12px; font-size: 1.2rem; }
.release-card ul { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.5; }
.onboarding-admin-toggle { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }

@media (max-width: 1050px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .analytics-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .analytics-grid-main,.analytics-grid-bottom,.analytics-usage-grid { grid-template-columns: 1fr; }
  .usage-user-row { grid-template-columns: 38px minmax(160px,1fr) repeat(2,minmax(95px,.6fr)); }.usage-user-row > span:nth-last-child(-n+2) { grid-row: 2; }.usage-user-row > span:nth-last-child(2) { grid-column: 3; }.usage-user-row > span:last-child { grid-column: 4; }
  .grid-3 { grid-template-columns: 1fr; }
  .assignment { grid-template-columns: 70px 1fr 1fr auto; }
  .assignment .route-col { display: none; }
}
@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { min-height: 38vh; padding: 28px; }
  .hero-copy h1 { font-size: 2.6rem; }
  .hero-copy p { display: none; }
  .login-panel { padding: 30px 22px; }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .main { margin: 0; }
  .mobile-menu { display: inline-flex; }
  .topbar { padding: 14px 18px; min-height: 68px; }
  .presence-button span:last-child { display: none; }
  .presence-button { padding: 0 14px; }
  .install-app { display: none; }
  .content { padding: 26px 16px 50px; }
  .content { padding-bottom: 100px; }
  .mobile-quick-actions { position: fixed; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; z-index: 12; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 7px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb,var(--surface) 94%,transparent); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
  .mobile-quick-actions button { display: grid; justify-items: center; gap: 2px; padding: 7px 4px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: .72rem; font-weight: 800; }
  .mobile-quick-actions span { font-size: 1.2rem; line-height: 1; }
  .page-head { align-items: start; flex-direction: column; }
  .page-actions { width: 100%; justify-content: stretch; }.page-actions .btn { flex: 1; }
  .stats, .grid-2 { grid-template-columns: 1fr; }
  .analytics-hero-mark { display: none; }
  .analytics-kpis,.analytics-grid { grid-template-columns: 1fr; }
  .analytics-kpi { min-height: 155px; }
  .analytics-vehicle-row { grid-template-columns: 1fr 44px; }.analytics-vehicle-meter { grid-column: 1/-1; grid-row: 2; }
  .operations-grid { grid-template-columns: 1fr 1fr; }
  .usage-day-chart { gap: 3px; overflow: hidden; }.usage-day-chart > div > span { width: min(18px,82%); }.usage-day-chart small { font-size: .52rem; }
  .usage-user-row { grid-template-columns: 38px 1fr 1fr; gap: 10px; }.usage-user-row > div { grid-column: 2/-1; }.usage-user-row > span:not(.avatar) { padding: 9px; border-radius: 10px; background: var(--surface-2); }.usage-user-row > span:nth-last-child(-n+2),.usage-user-row > span:nth-last-child(2),.usage-user-row > span:last-child { grid-row: auto; grid-column: auto; }.usage-users-card .owner-access-badge { display: none; }
  .utilization-stats { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .assignment { grid-template-columns: 62px 1fr auto; }
  .assignment .vehicle-col { display: none; }
  .card { padding: 18px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-note { grid-column: auto; }
  .export-controls { grid-template-columns: 1fr; }
  .export-actions { flex-direction: column; }
  .calendar-period { width: 100%; margin-left: 0; }
  .availability-row { grid-template-columns: 1fr auto; }
  .availability-status, .availability-note-text { grid-column: 1; width: fit-content; }
  .availability-row .icon-btn { grid-column: 2; grid-row: 1; }
  .audit-row { grid-template-columns: 36px 1fr; }
  .audit-entity { grid-column: 2; }
  .notification-row { grid-template-columns: 12px 1fr; }
  .notification-row time { grid-column: 2; }
  .utilization-row { grid-template-columns: 38px 1fr auto; }
  .utilization-meter { grid-column: 2 / -1; grid-row: 2; }
  .utilization-row > span:last-child { grid-column: 3; grid-row: 1; }
  .reset-request-row { grid-template-columns: 36px 1fr; }
  .reset-request-row .btn { grid-column: 2; justify-self: start; }
  .role-check-grid { grid-template-columns: 1fr; }
  .feature-admin-grid { grid-template-columns: 1fr; }
  .chat-shell { min-height: 700px; grid-template-columns: 1fr; grid-template-rows: auto minmax(520px,1fr); }
  .chat-contacts { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-contacts-head { min-width: 130px; border-right: 1px solid var(--line); border-bottom: 0; }
  .chat-contact { min-width: 190px; border-right: 1px solid var(--line); border-bottom: 0; }
  .chat-bubble { max-width: 88%; }
  .ticket-stats { grid-template-columns: 1fr 1fr; }
  .ticket-update-form { grid-template-columns: 1fr; align-items: stretch; }
  .fleet-stats { grid-template-columns: 1fr; }
  .fleet-event { grid-template-columns: 38px 1fr auto; }.fleet-event .row-actions { grid-column: 2 / -1; }
  .compact-table > div { grid-template-columns: 1fr auto 36px; }.compact-table > div span:nth-of-type(2),.compact-table > div small { grid-column: 1 / -1; }
  .push-card { align-items: stretch; flex-direction: column; }
  .notification-type-grid { grid-template-columns: 1fr; }
  .bulk-action-bar { bottom: calc(92px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .template-row { grid-template-columns: 38px 1fr; }.template-actions { grid-column: 2; flex-wrap: wrap; }
  .legal-header { align-items: flex-start; }
  .legal-header nav { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
  .legal-header nav > a:not(.btn) { display: none; }
  .onboarding-actions { grid-template-columns: 1fr 1fr; }.onboarding-actions > span { display: none; }
  .release-card { grid-template-columns: 1fr; gap: 15px; }
  .nav-pin-toggle { color: rgba(255,255,255,.5); opacity: 1; }
  .nav-order-row { grid-template-columns: 18px 28px minmax(90px,1fr) auto; gap: 7px; }
  .nav-pin-choice { grid-column: 3; grid-row: 2; justify-self: start; }
  .nav-visibility-toggle { grid-column: 3; grid-row: 3; }
  .nav-order-actions { grid-column: 4; grid-row: 1 / span 3; }
  .unassigned-list { grid-template-columns: 1fr; }
  .global-search { order:3;width:100%; }
  .topbar { flex-wrap:wrap;gap:10px; }
  .scheme-grid { grid-template-columns:1fr 1fr; }
  .filter-grid { grid-template-columns: 1fr; }
  .filter-query { grid-column: auto; }
  .filter-summary,.accent-card { align-items: stretch; flex-direction: column; }
  .change-table { margin-left: 0; overflow-x: auto; }
  .change-table > div { min-width: 520px; }
}

@media print {
  @page { size: A4 portrait; margin: 0; }
  .sidebar, .topbar, .screen-only, .modal-wrap, .toast-wrap, .no-print, .mobile-quick-actions { display: none !important; }
  .main { grid-column: 1; }
  .content { padding: 0; max-width: none; min-height: 0; background: none; }
  body { background: white; color: black; }
  .print-sheet { display: block !important; box-sizing: border-box; min-height: 297mm; padding: 14mm 14mm 20mm; color: #171717; background: #fff; font-family: "Trebuchet MS", Arial, sans-serif; }
  .print-header { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-bottom: 15px; border-bottom: 2px solid #292929; }
  .print-header img { width: 172px; height: auto; }
  .print-header div { text-align: right; }
  .print-kicker { display: block; margin-bottom: 3px; color: #9b3034; font-size: 7pt; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
  .print-header h1 { margin: 0; font-size: 24pt; line-height: 1; }
  .print-header p { margin: 5px 0 0; color: #5d5d5d; font-size: 9.5pt; }
  .print-meta { display: grid; grid-template-columns: 1.25fr 1.1fr .45fr .75fr; gap: 0; margin: 17px 0 20px; padding: 12px 0; border-top: 1px solid #d7d7d7; border-bottom: 1px solid #d7d7d7; }
  .print-meta div { display: grid; gap: 3px; }
  .print-meta div + div { padding-left: 13px; border-left: 1px solid #ddd; }
  .print-meta span { color: #666; font-size: 8pt; text-transform: uppercase; letter-spacing: .05em; }
  .print-meta strong { font-size: 11pt; }
  .expense-print-meta { grid-template-columns: 1.35fr .45fr .55fr .55fr .8fr; }
  .expense-print-meta div:last-child strong { color: #9b3034; }
  .odometer-print-meta { grid-template-columns:1.4fr .45fr .45fr 1fr; }
  .odometer-print-vehicle { margin:0 0 14mm;break-inside:avoid;page-break-inside:avoid; }
  .odometer-print-vehicle + .odometer-print-vehicle { padding-top:2mm; }
  .odometer-print-vehicle>header { display:flex;justify-content:space-between;align-items:end;gap:20px;margin:0 0 8px;padding:9px 11px;border-left:4px solid #9b3034;background:#f2f2f2;break-after:avoid; }
  .odometer-print-vehicle h2 { margin:0 0 2px;font-size:14pt }.odometer-print-vehicle header span { color:#666;font-size:8pt }.odometer-print-vehicle header>div:last-child { display:grid;gap:2px;text-align:right }.odometer-print-vehicle header>div:last-child strong { font-size:13pt }
  .odometer-print-table { font-size:8pt;table-layout:fixed }.odometer-print-table th:nth-child(1){width:17%}.odometer-print-table th:nth-child(2){width:16%}.odometer-print-table th:nth-child(3){width:20%}.odometer-print-table th:nth-child(4){width:18%}.odometer-print-table th:nth-child(5){width:29%}.odometer-print-table td{padding:8px 7px}
  .print-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 9.5pt; }
  .print-table thead { display: table-header-group; }
  .print-table th { padding: 9px 8px; text-align: left; color: #fff; background: #2c2c2c; font-size: 8pt; text-transform: uppercase; letter-spacing: .04em; }
  .print-table th:nth-child(1) { width: 29%; }
  .print-table th:nth-child(2) { width: 23%; }
  .print-table th:nth-child(3) { width: 20%; }
  .print-table th:nth-child(4) { width: 28%; }
  .print-table.all-plan th:nth-child(1) { width: 17%; }
  .print-table.all-plan th:nth-child(2) { width: 25%; }
  .print-table.all-plan th:nth-child(3) { width: 20%; }
  .print-table.all-plan th:nth-child(4) { width: 18%; }
  .print-table.all-plan th:nth-child(5) { width: 20%; }
  .print-table tbody tr:nth-child(even) { background: #f6f6f6; }
  .print-table td { padding: 12px 8px; vertical-align: top; border-bottom: 1px solid #d1d1d1; line-height: 1.4; overflow-wrap: anywhere; }
  .print-table td span { color: #555; font-size: 8.5pt; }
  .print-table .print-status { display: inline-block; margin-top: 4px; padding: 2px 5px; border: 1px solid #aaa; border-radius: 10px; font-size: 7pt; font-weight: 700; }
  .expense-print-table th:nth-child(1) { width: 18%; }
  .expense-print-table th:nth-child(2) { width: 28%; }
  .expense-print-table th:nth-child(3) { width: 23%; }
  .expense-print-table th:nth-child(4) { width: 18%; }
  .expense-print-table th:nth-child(5) { width: 13%; text-align: right; }
  .expense-print-table tfoot { display: table-row-group; }
  .expense-print-table tfoot td { padding: 12px 8px; border-top: 2px solid #292929; border-bottom: 0; font-size: 10pt; font-weight: 900; }
  .print-money { text-align: right; white-space: nowrap; }
  .expense-rate-note { margin-top: 18px; padding: 10px 12px; border-left: 3px solid #9b3034; color: #555; background: #f5f5f5; font-size: 8pt; line-height: 1.45; break-inside: avoid; }
  .print-table tr { break-inside: avoid; }
  .print-empty { padding: 40px; text-align: center; border: 1px solid #ccc; }
  .print-footer { position: fixed; bottom: 10mm; left: 14mm; right: 14mm; display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; border-top: 1px solid #bbb; color: #666; font-size: 7.5pt; }
}
/* Sitzungs-, Update- und Wartungsmanagement */
.login-remember{margin:4px 0 16px}.security-settings-grid{margin-top:18px}.maintenance-settings{margin:18px 0}.system-block{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at top left,rgba(193,137,61,.18),transparent 40%),var(--bg)}.system-block-card{width:min(560px,100%);text-align:center;padding:clamp(28px,6vw,56px);border-radius:28px;background:var(--surface);box-shadow:var(--shadow);border:1px solid var(--border)}.system-block-card h1{font-size:clamp(2rem,7vw,3.5rem);margin:.35rem 0 1rem}.system-block-card p{font-size:1.08rem;line-height:1.65;color:var(--muted)}.system-block-card .notice{margin:22px 0;text-align:left}.system-block-card .btn{margin-top:20px}.system-block-card .text-button{display:block;margin:14px auto 0}.system-icon{width:64px;height:64px;display:grid;place-items:center;margin:0 auto 18px;border-radius:20px;background:var(--soft);font-size:1.8rem}
