:root {
  color-scheme: dark;
  --bg: #081419;
  --panel: #0e1c22;
  --panel-2: #13252c;
  --panel-3: #172d35;
  --line: #243b43;
  --text: #f4f6f7;
  --muted: #91a2a8;
  --orange: #e85117;
  --orange-2: #ff6a2c;
  --green: #24b47e;
  --yellow: #efa63b;
  --red: #e45454;
  --blue: #4ca5d9;
  --shadow: 0 18px 60px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { font-family: "Segoe UI", Arial, sans-serif; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.titlebar {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #071116;
  border-bottom: 1px solid #15262d;
  -webkit-app-region: drag;
  user-select: none;
}
.titlebar-brand { display: flex; align-items: center; gap: 9px; padding-left: 14px; color: #c8d2d6; font-size: 13px; font-weight: 600; }
.titlebar-brand svg { width: 25px; fill: none; stroke: var(--orange-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.window-controls { height: 100%; display: flex; -webkit-app-region: no-drag; }
.window-controls button { width: 48px; height: 100%; border: 0; background: transparent; color: #c5d0d4; font-size: 17px; }
.window-controls button:hover { background: #1a2a30; }
.window-controls .close:hover { background: #c42b1c; color: white; }

.login-view {
  position: relative;
  height: calc(100vh - 42px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(30, 67, 76, .3), transparent 36%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.014) 0, rgba(255,255,255,.014) 1px, transparent 1px, transparent 5px),
    linear-gradient(135deg, #0a171c, #0c2229 58%, #071419);
}
.login-view::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,11,14,.58), transparent 35%, transparent 65%, rgba(4,11,14,.58)); }
.login-truck { position: absolute; width: 82%; max-width: 1180px; opacity: .09; transform: translateY(90px); }
.login-truck svg { width: 100%; fill: none; stroke: #9bb3bb; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.login-card {
  position: relative;
  z-index: 2;
  width: 455px;
  padding: 38px 42px 28px;
  border: 1px solid #34464d;
  border-radius: 6px;
  background: linear-gradient(160deg, rgba(14,24,29,.98), rgba(9,17,21,.98));
  box-shadow: var(--shadow);
  text-align: center;
}
.login-accent { position: absolute; top: -1px; left: -1px; right: -1px; height: 4px; border-radius: 6px 6px 0 0; background: var(--orange); }
.truck-mark { height: 82px; margin-bottom: 8px; }
.truck-mark svg { height: 100%; fill: none; stroke: #f1f4f5; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.truck-mark svg path { filter: drop-shadow(0 7px 0 rgba(232,81,23,.9)); }
.login-card h1 { margin: 4px 0 7px; font-size: 33px; font-weight: 400; letter-spacing: .2px; }
.login-subtitle { margin: 0; color: #99a8ad; letter-spacing: 2.1px; font-size: 12px; }
.login-divider { width: 92px; height: 1px; background: #2a383e; margin: 24px auto 19px; }
.login-card h2 { margin: 0 0 18px; font-size: 19px; font-weight: 600; }
.input-wrap { height: 52px; margin: 0 0 13px; display: flex; align-items: center; border: 1px solid #2c3b41; border-radius: 4px; background: rgba(255,255,255,.015); transition: .18s; }
.input-wrap:focus-within { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(232,81,23,.12); }
.field-icon { width: 52px; color: #adbbc0; font-size: 20px; }
.field-svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.input-wrap input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: white; font-size: 15px; }
.input-wrap input::placeholder { color: #74858b; }
.eye-button { width: 48px; height: 100%; border: 0; background: transparent; color: #9aa9ae; }
.eye-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.form-error { min-height: 18px; margin: 0 0 6px; color: #ff8277; font-size: 13px; text-align: left; }
.primary-button { border: 0; border-radius: 5px; background: linear-gradient(90deg, #d9430c, #ef5b1d); color: white; font-weight: 650; box-shadow: 0 6px 20px rgba(232,81,23,.18); }
.primary-button:hover { filter: brightness(1.08); }
.login-button { width: 100%; height: 49px; font-size: 15px; }
.secure-note { margin: 21px 0 0; color: #86979d; font-size: 13px; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 8px; }
.secure-note svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { height: calc(100vh - 42px); display: grid; grid-template-columns: 256px 1fr; }
.sidebar { display: flex; flex-direction: column; background: #0a171d; border-right: 1px solid #1c3037; padding: 23px 15px 17px; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 9px 25px; }
.mini-logo { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: rgba(232,81,23,.12); }
.mini-logo svg { width: 30px; fill: none; stroke: var(--orange-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-brand strong, .sidebar-brand span { display: block; }
.sidebar-brand strong { font-size: 18px; }
.sidebar-brand span { color: var(--muted); font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; }
.main-nav { display: grid; gap: 6px; }
.nav-item { height: 48px; display: flex; align-items: center; gap: 13px; padding: 0 15px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #9eafb5; text-align: left; }
.nav-item .nav-icon { width: 23px; height: 23px; display: grid; place-items: center; color: #758990; }
.nav-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: #11232a; color: white; }
.nav-item.active { background: linear-gradient(90deg, rgba(232,81,23,.2), rgba(232,81,23,.07)); border-color: rgba(232,81,23,.22); color: white; }
.nav-item.active .nav-icon { color: var(--orange-2); }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 11px; padding: 15px 10px 2px; border-top: 1px solid #1b2e35; }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { font-size: 13px; }
.sidebar-footer small { margin-top: 2px; color: #71858c; font-size: 11px; }
.offline-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(36,180,126,.12); }

.workspace { min-width: 0; overflow: hidden; background: #f4f6f7; color: #132229; }
.workspace-header { height: 94px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid #dfe5e7; background: white; }
.workspace-header h1 { margin: 0 0 4px; font-size: 25px; }
.workspace-header p { margin: 0; color: #718087; font-size: 13px; }
.page-root { height: calc(100% - 94px); padding: 26px 32px 34px; overflow: auto; }
.page-root::-webkit-scrollbar { width: 10px; }
.page-root::-webkit-scrollbar-thumb { border: 3px solid #f4f6f7; border-radius: 10px; background: #b8c4c8; }
.header-button, .secondary-button, .danger-button { min-height: 40px; padding: 0 17px; border-radius: 6px; font-weight: 600; }
.header-button { border: 0; background: var(--orange); color: white; }
.secondary-button { border: 1px solid #cbd5d8; background: white; color: #25363d; }
.danger-button { border: 1px solid #efcaca; background: #fff6f6; color: #bc3434; }
.icon-button { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid #d5dddf; border-radius: 6px; background: white; color: #43545a; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.kpi-card { min-height: 125px; display: flex; align-items: center; gap: 16px; padding: 22px; border: 1px solid #e0e6e8; border-radius: 11px; background: white; box-shadow: 0 5px 18px rgba(35,55,64,.05); }
.kpi-icon { width: 51px; height: 51px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #eef5f6; color: #168fa0; font-size: 23px; }
.kpi-icon.orange { background: #fff0e9; color: var(--orange); }
.kpi-icon.red { background: #ffeded; color: var(--red); }
.kpi-icon.blue { background: #eaf3fb; color: #237db6; }
.kpi-value { display: block; color: #132b34; font-size: 28px; font-weight: 750; white-space: nowrap; }
.kpi-label { display: block; margin-top: 4px; color: #738187; font-size: 13px; }
.dashboard-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; margin-top: 18px; }
.panel { border: 1px solid #dee5e7; border-radius: 11px; background: white; box-shadow: 0 5px 18px rgba(35,55,64,.045); overflow: hidden; }
.panel-header { min-height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 21px; border-bottom: 1px solid #edf0f1; }
.panel-header h2 { margin: 0; font-size: 16px; }
.panel-link { border: 0; background: transparent; color: #e45117; font-size: 13px; font-weight: 600; }
.event-list, .activity-list { padding: 5px 20px 11px; }
.event-row, .activity-row { display: grid; align-items: center; min-height: 65px; border-bottom: 1px solid #edf0f1; }
.event-row:last-child, .activity-row:last-child { border-bottom: 0; }
.event-row { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; }
.event-symbol { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 8px; background: #eff5f6; color: #2c6673; }
.event-row strong, .event-row small, .activity-row strong, .activity-row small { display: block; }
.event-row strong, .activity-row strong { font-size: 13px; }
.event-row small, .activity-row small { margin-top: 4px; color: #7b898e; font-size: 12px; }
.event-due { text-align: right; font-size: 12px; font-weight: 700; }
.event-due.critical { color: var(--red); }
.event-due.warning { color: #d48317; }
.event-due.good { color: var(--green); }
.activity-row { grid-template-columns: minmax(0, 1fr) 120px 100px; gap: 14px; }
.activity-row .money, .activity-row time { text-align: right; font-size: 12px; }
.activity-row .money { font-weight: 700; }
.empty-state { padding: 45px 20px; color: #829096; text-align: center; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.search-box { width: min(420px, 55%); height: 42px; padding: 0 14px; border: 1px solid #d7dfe2; border-radius: 7px; background: white; color: #192a30; outline: none; }
.search-box:focus { border-color: #e76a38; box-shadow: 0 0 0 3px rgba(232,81,23,.1); }
.filter-select { height: 42px; min-width: 130px; padding: 0 12px; border: 1px solid #d7dfe2; border-radius: 7px; background: white; color: #192a30; }
.data-table-wrap { border: 1px solid #dfe5e7; border-radius: 10px; background: white; overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.fleet-table { min-width: 1060px; }
.maintenance-table { min-width: 1420px; }
.maintenance-table th:last-child, .maintenance-table td:last-child,
.maintenance-table th:nth-last-child(2), .maintenance-table td:nth-last-child(2) { position: sticky; z-index: 2; }
.maintenance-table th:last-child, .maintenance-table td:last-child { right: 0; min-width: 55px; }
.maintenance-table th:nth-last-child(2), .maintenance-table td:nth-last-child(2) { right: 55px; min-width: 105px; box-shadow: -8px 0 14px rgba(4, 12, 15, .18); }
.maintenance-table th:last-child, .maintenance-table th:nth-last-child(2) { background: #14272e; }
.maintenance-table td:last-child, .maintenance-table td:nth-last-child(2) { background: #0f2026; }
.fleet-table th:last-child, .fleet-table td:last-child { position: sticky; right: 0; box-shadow: -8px 0 14px rgba(4, 12, 15, .18); }
.fleet-table th:last-child { background: #14272e; }
.fleet-table td:last-child { background: #0f2026; }
.data-table th { height: 46px; padding: 0 13px; background: #f7f9fa; border-bottom: 1px solid #dfe5e7; color: #5d6d73; font-size: 11px; letter-spacing: .4px; text-align: left; text-transform: uppercase; }
.data-table td { height: 58px; padding: 8px 13px; border-bottom: 1px solid #edf1f2; color: #27383e; font-size: 12.5px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfc; }
.comments-cell { min-width: 230px; line-height: 1.35; }
.invoice-number-cell { min-width: 105px; color: #dbe5e8; font-weight: 650; white-space: nowrap; }
.invoice-button { min-width: 82px; height: 31px; padding: 0 9px; border: 1px dashed #3b525b; border-radius: 5px; background: #102229; color: #93a7ae; font-size: 10px; white-space: nowrap; }
.invoice-button:hover { border-color: #e85a22; color: #ff7138; }
.invoice-button.has-invoice { border-style: solid; border-color: rgba(36,180,126,.28); background: rgba(36,180,126,.09); color: #55d19e; }
.plate { font-weight: 750; color: #122a33; letter-spacing: .4px; }
.muted { color: #809097; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; min-height: 27px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.status-badge.good { background: #eaf8f2; color: #197850; }
.status-badge.good::before { background: var(--green); }
.status-badge.warning { background: #fff5e6; color: #9d6415; }
.status-badge.warning::before { background: var(--yellow); }
.status-badge.critical { background: #ffeded; color: #a93737; }
.status-badge.critical::before { background: var(--red); }
.status-badge.neutral { background: #edf2f3; color: #65757b; }
.status-badge.neutral::before { background: #8fa0a6; }

.cost-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .6fr); gap: 18px; }
.bar-list { padding: 18px 22px 22px; }
.bar-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) 90px; align-items: center; gap: 13px; min-height: 43px; }
.bar-label { font-size: 12px; font-weight: 650; }
.bar-track { height: 12px; border-radius: 99px; background: #edf1f2; overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e64c15, #f47c48); }
.bar-value { text-align: right; font-size: 12px; font-weight: 700; }
.year-list { padding: 13px 20px 20px; }
.year-row { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid #edf0f1; font-size: 13px; }
.year-row:last-child { border-bottom: 0; }
.year-row strong { font-size: 15px; }

.document-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.document-card { padding: 19px; border: 1px solid #dee5e7; border-radius: 10px; background: white; }
.document-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.document-card h3 { margin: 0; font-size: 15px; }
.document-list { display: grid; gap: 8px; }
.document-item { min-width: 0; display: flex; gap: 6px; }
.document-row { min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px; padding: 8px 9px; border: 1px solid #e3e9eb; border-radius: 6px; background: #f9fbfb; color: #34464c; text-align: left; font-size: 12px; }
.document-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-type { flex: 0 0 auto; min-width: 27px; padding: 4px 3px; border-radius: 4px; background: #29404a; color: #c7d5da; font-size: 7px; font-weight: 800; text-align: center; }
.document-type.pdf { background: #d94817; color: white; }
.document-menu { flex: 0 0 36px; border: 1px solid #e3e9eb; border-radius: 6px; background: #f9fbfb; color: #64767c; font-weight: 800; letter-spacing: 1px; }
.document-menu:hover { color: #e85a22; }
.small-add { border: 0; background: #fff1ea; color: #d54913; border-radius: 6px; padding: 7px 9px; font-weight: 700; }

.document-action-summary { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid #294048; border-radius: 7px; background: #0c1d23; }
.document-action-summary .document-type { min-width: 40px; padding: 9px 4px; font-size: 9px; }
.document-action-summary strong, .document-action-summary small { display: block; }
.document-action-summary strong { max-width: 360px; overflow: hidden; color: #eef3f5; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.document-action-summary small { margin-top: 3px; color: #80939a; font-size: 10px; }
.document-action-list { display: grid; gap: 7px; margin-top: 14px; }
.document-action-list button { display: grid; gap: 2px; padding: 11px 13px; border: 1px solid #293e46; border-radius: 7px; background: #102229; color: #dce5e8; text-align: left; }
.document-action-list button:hover { border-color: #46616b; background: #152b33; }
.document-action-list button strong { font-size: 12px; }
.document-action-list button span { color: #83969d; font-size: 10px; }
.document-action-list button.danger { border-color: rgba(228,84,84,.28); color: #ff8d8d; }
.document-action-list button.danger:hover { background: rgba(228,84,84,.1); }
.delete-document-warning { padding: 15px; border: 1px solid rgba(228,84,84,.34); border-radius: 7px; background: rgba(228,84,84,.08); }
.delete-document-warning strong { color: #f3f6f7; }
.delete-document-warning p { margin: 7px 0 0; color: #b2c0c4; font-size: 12px; line-height: 1.45; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-card { padding: 22px; border: 1px solid #dee5e7; border-radius: 10px; background: white; }
.company-settings { grid-column: 1 / -1; }
.company-actions { display: flex; align-items: end; }
.settings-card h2 { margin: 0 0 7px; font-size: 17px; }
.settings-card p { margin: 0 0 18px; color: #6f7f85; font-size: 13px; line-height: 1.55; }
.path-box { padding: 11px 12px; border-radius: 6px; background: #f0f4f5; color: #53666d; font-family: Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }
.backup-settings { grid-column: 1 / -1; }
.backup-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.backup-heading p { margin-bottom: 0; }
.backup-active { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(36,180,126,.25); border-radius: 99px; background: rgba(36,180,126,.08); color: #55d19e; font-size: 10px; font-weight: 700; }
.backup-active i { width: 7px; height: 7px; border-radius: 50%; background: #31c58b; box-shadow: 0 0 0 4px rgba(49,197,139,.1); }
.backup-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 14px; }
.backup-overview > div { padding: 12px; border: 1px solid #273d45; border-radius: 7px; background: rgba(255,255,255,.015); }
.backup-overview span, .backup-overview strong { display: block; }
.backup-overview span { color: #7f9299; font-size: 10px; }
.backup-overview strong { margin-top: 5px; color: #e9f0f2; font-size: 12px; }
.backup-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.backup-path { margin-top: 11px; }
.backup-history { margin-top: 18px; }
.backup-history h3 { margin: 0 0 9px; color: #dce5e8; font-size: 12px; }
.backup-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #20343b; }
.backup-row strong, .backup-row small { display: block; }
.backup-row strong { color: #dce5e8; font-size: 11px; }
.backup-row small { margin-top: 3px; color: #7f9299; font-size: 9px; }
.backup-kind { padding: 5px 6px; border-radius: 99px; background: rgba(76,165,217,.1); color: #76bddf; font-size: 8px; font-weight: 750; text-align: center; text-transform: uppercase; }
.backup-kind.manual { background: rgba(232,81,23,.11); color: #ff7138; }
.backup-kind.safety { background: rgba(239,166,59,.11); color: #efb35b; }
.restore-backup { padding: 7px 9px; border: 1px solid #30454d; border-radius: 5px; background: #122229; color: #bfcdd1; font-size: 10px; }
.restore-backup:hover { border-color: #49646e; color: white; }
.restore-warning { padding: 15px; border: 1px solid rgba(239,166,59,.34); border-radius: 7px; background: rgba(239,166,59,.07); }
.restore-warning strong, .restore-warning span { display: block; }
.restore-warning strong { color: #f2f6f7; }
.restore-warning p { margin: 8px 0; color: #c5d0d3; font-size: 12px; line-height: 1.5; }
.restore-warning span { color: #efb35b; font-size: 10px; }

.modal-root { position: fixed; z-index: 20; inset: 42px 0 0; display: grid; place-items: center; padding: 30px; background: rgba(4,12,15,.68); backdrop-filter: blur(3px); }
.modal { width: min(760px, 92vw); max-height: calc(100vh - 110px); overflow: auto; border: 1px solid #dce3e5; border-radius: 12px; background: white; color: #17282e; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.modal.small { width: min(510px, 92vw); }
.modal-header { min-height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 23px; border-bottom: 1px solid #e8edef; }
.modal-header h2 { margin: 0; font-size: 19px; }
.modal-close { width: 34px; height: 34px; border: 0; border-radius: 6px; background: #f0f3f4; color: #59696f; font-size: 21px; }
.modal-body { padding: 22px 23px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-field { display: grid; gap: 7px; }
.form-field.full, .form-grid > .full { grid-column: 1 / -1; }
.form-field label { color: #53636a; font-size: 12px; font-weight: 650; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #d4dde0; border-radius: 6px; background: white; color: #17282e; outline: none; }
.form-field textarea { min-height: 82px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #e56734; box-shadow: 0 0 0 3px rgba(232,81,23,.1); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 17px 23px; border-top: 1px solid #e8edef; }
.detail-banner { display: flex; align-items: center; gap: 16px; margin-bottom: 19px; padding: 17px; border-radius: 8px; background: #f3f7f8; }
.detail-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 10px; background: #e7edef; color: #31545f; font-size: 27px; }
.detail-banner h3, .detail-banner p { margin: 0; }
.detail-banner h3 { font-size: 18px; }
.detail-banner p { margin-top: 4px; color: #718188; font-size: 12px; }
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-bottom: 18px; }
.detail-stat { padding: 13px; border: 1px solid #e1e7e9; border-radius: 7px; }
.detail-stat span, .detail-stat strong { display: block; }
.detail-stat span { color: #77868c; font-size: 11px; }
.detail-stat strong { margin-top: 5px; font-size: 14px; }
.detail-stat small { display: block; margin-top: 5px; color: #91a4aa; font-size: 11px; }
.deadline-cell { min-width: 104px; display: grid; justify-items: start; gap: 6px; }
.deadline-cell > strong { color: #d9e3e6; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.regulatory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin: 0 0 18px; }
.regulatory-card { display: grid; justify-items: start; gap: 7px; padding: 13px; border: 1px solid #263b43; border-radius: 7px; background: rgba(255,255,255,.015); }
.regulatory-card > span:first-child { color: #81949b; font-size: 11px; }
.regulatory-card > strong { color: #edf3f5; font-size: 13px; }
.modal-error { min-height: 18px; margin: 10px 0 0; color: #c93d34; font-size: 12px; }
.form-help { margin: 0; color: #82969d; font-size: 12px; line-height: 1.45; }
.maintenance-invoice-link { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 12px; border: 1px solid #2a4149; border-radius: 7px; background: #0c1d23; }
.maintenance-invoice-link strong, .maintenance-invoice-link span { display: block; }
.maintenance-invoice-link strong { color: #e5edef; font-size: 12px; }
.maintenance-invoice-link span { margin-top: 3px; color: #7f9299; font-size: 10px; }
.invoice-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.invoice-summary > div { padding: 11px 12px; border: 1px solid #294048; border-radius: 7px; background: #0c1d23; }
.invoice-summary span, .invoice-summary strong { display: block; }
.invoice-summary span { color: #7f9299; font-size: 9px; text-transform: uppercase; }
.invoice-summary strong { margin-top: 5px; color: #edf3f5; font-size: 12px; }
.invoice-files { margin-top: 16px; }
.invoice-files h3 { margin: 0 0 9px; color: #dce5e8; font-size: 12px; }
.invoice-empty { display: grid; gap: 4px; padding: 23px; border: 1px dashed #30474f; border-radius: 7px; color: #879aa1; text-align: center; }
.invoice-empty strong { color: #bfccd0; font-size: 12px; }
.invoice-empty span { font-size: 10px; }

.toast { position: fixed; z-index: 50; right: 25px; bottom: 24px; max-width: 390px; padding: 13px 17px; border-radius: 7px; background: #10232a; color: white; box-shadow: 0 12px 35px rgba(0,0,0,.3); font-size: 13px; opacity: 0; transform: translateY(15px); pointer-events: none; transition: .23s; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1240px) {
  .app-shell { grid-template-columns: 215px 1fr; }
  .sidebar { padding-inline: 10px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .document-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .cost-layout { grid-template-columns: 1fr; }
}

/* Thème Horizon Logistics : continuité visuelle du login dans toute l'application */
.workspace {
  color: #eef3f5;
  background:
    radial-gradient(circle at 78% 8%, rgba(32, 74, 85, .18), transparent 36%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.009) 0, rgba(255,255,255,.009) 1px, transparent 1px, transparent 5px),
    linear-gradient(145deg, #09171c, #0b1d23 57%, #071419);
}
.workspace-header {
  border-bottom-color: #1d3037;
  background: rgba(8, 20, 25, .93);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
}
.workspace-header h1 { color: #f4f7f8; font-weight: 650; }
.workspace-header p { color: #83969d; }
.page-root::-webkit-scrollbar-thumb { border-color: #0a191f; background: #31464e; }

.header-button {
  background: linear-gradient(90deg, #d9430c, #ef5b1d);
  box-shadow: 0 6px 18px rgba(232, 81, 23, .16);
}
.header-button:hover, .secondary-button:hover, .icon-button:hover { filter: brightness(1.1); }
.secondary-button {
  border-color: #30454d;
  background: #122229;
  color: #dce5e8;
}
.danger-button {
  border-color: rgba(228, 84, 84, .38);
  background: rgba(228, 84, 84, .1);
  color: #ff8d8d;
}
.icon-button {
  border-color: #30434a;
  background: #112128;
  color: #afbec3;
}

.kpi-card, .panel, .data-table-wrap, .document-card, .settings-card {
  border-color: #21363e;
  background: linear-gradient(150deg, rgba(17, 32, 38, .98), rgba(11, 24, 29, .98));
  box-shadow: 0 11px 30px rgba(0, 0, 0, .19);
}
.kpi-card { position: relative; overflow: hidden; }
.kpi-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(232,81,23,.45), transparent);
  opacity: .55;
}
.kpi-icon { background: rgba(76, 165, 217, .11); color: #62b9e8; }
.kpi-icon.orange { background: rgba(232, 81, 23, .13); color: #ff6a2c; }
.kpi-icon.red { background: rgba(228, 84, 84, .12); color: #f06b6b; }
.kpi-icon.blue { background: rgba(76, 165, 217, .11); color: #62b9e8; }
.kpi-value { color: #f5f8f9; }
.kpi-label { color: #82949a; }

.panel-header { border-bottom-color: #21343b; }
.panel-header h2, .document-card h3, .settings-card h2 { color: #f1f5f6; }
.panel-link { color: #ff6a2c; }
.event-row, .activity-row { border-bottom-color: #1e3138; }
.event-symbol { background: #162b33; color: #70aeba; }
.event-row strong, .activity-row strong, .activity-row .money, .activity-row time { color: #e5edef; }
.event-row small, .activity-row small, .empty-state { color: #7e9198; }

.search-box, .filter-select {
  border-color: #2b4048;
  background: #0e2026;
  color: #edf3f5;
}
.search-box::placeholder { color: #70848b; }
.search-box:focus, .filter-select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232,81,23,.11);
  outline: 0;
}
.data-table th {
  border-bottom-color: #294048;
  background: #14272e;
  color: #90a1a7;
}
.data-table td { border-bottom-color: #1c3037; color: #ccd7da; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.plate { color: #f2f6f7; }
.muted { color: #7f9299; }
.status-badge.good { background: rgba(36,180,126,.12); color: #55d19e; }
.status-badge.warning { background: rgba(239,166,59,.12); color: #f1b75f; }
.status-badge.critical { background: rgba(228,84,84,.13); color: #f27b7b; }
.status-badge.neutral { background: rgba(143,160,166,.12); color: #9fadb2; }

.bar-label, .bar-value, .year-row { color: #dbe4e7; }
.bar-track { background: #1a2f36; }
.year-row { border-bottom-color: #1f333a; }
.document-row {
  border-color: #273c44;
  background: #102229;
  color: #c7d3d7;
}
.document-row:hover { border-color: #3c535c; background: #142a31; }
.document-menu { border-color: #273c44; background: #102229; color: #8da0a6; }
.document-menu:hover { border-color: #3c535c; background: #142a31; color: #ff7138; }
.small-add { background: rgba(232,81,23,.13); color: #ff7138; }
.settings-card p { color: #83969d; }
.path-box { background: #0b1b21; color: #9db0b6; border: 1px solid #20343b; }

.modal {
  border-color: #30444c;
  background: linear-gradient(155deg, #102128, #0b191e);
  color: #edf3f5;
}
.modal-header, .modal-actions { border-color: #24383f; }
.modal-header h2 { color: #f4f7f8; }
.modal-close { background: #172a31; color: #a9b8bd; }
.modal-close:hover { background: #20363e; color: white; }
.form-field label { color: #a4b3b8; }
.form-field input, .form-field select, .form-field textarea {
  border-color: #2c424a;
  background: #0b1c22;
  color: #eff4f5;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: #687c83; }
.detail-banner { background: #13272e; border: 1px solid #253b43; }
.detail-icon { background: #1b343c; color: #7bbbc7; }
.detail-banner p, .detail-stat span { color: #81949b; }
.detail-stat { border-color: #263b43; background: rgba(255,255,255,.015); }
.modal-error { color: #ff8178; }

input[type="date"] { color-scheme: dark; }
select option { background: #102128; color: #eef3f5; }

/* Adaptation web / PWA */
.web-mode .window-controls { display: none; }
.web-mode .titlebar { -webkit-app-region: initial; }
.web-mode .titlebar-brand { margin: 0 auto 0 2px; }
.web-mode .sidebar-footer .offline-dot { background: #32d9a0; box-shadow: 0 0 0 4px rgba(50,217,160,.1); }

.web-upload-layer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 10, 13, .82);
  backdrop-filter: blur(8px);
}

.web-upload-card {
  position: relative;
  width: min(560px, 100%);
  padding: 30px;
  border: 1px solid #2a4650;
  border-top: 4px solid #ed571b;
  border-radius: 14px;
  background: linear-gradient(145deg, #12272e, #09191f);
  box-shadow: 0 26px 80px rgba(0,0,0,.62);
  text-align: center;
}

.web-upload-card h2 { margin: 6px 0 6px; color: #f5fafb; }
.web-upload-card > p { margin: 0 0 22px; color: #8fa6ad; }
.web-upload-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: #e95418; color: white; font-weight: 900; font-size: 13px; }
.web-upload-close { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 8px; background: #173039; color: #dfeaec; font-size: 24px; cursor: pointer; }
.web-upload-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.web-upload-option { min-height: 130px; padding: 20px; border: 1px solid #31505b; border-radius: 11px; background: #10262d; color: #eaf2f4; text-align: left; cursor: pointer; transition: .18s ease; }
.web-upload-option:hover { transform: translateY(-2px); border-color: #e75a21; background: #173039; }
.web-upload-option strong,.web-upload-option span { display: block; }
.web-upload-option strong { margin-bottom: 8px; color: #fff; font-size: 16px; }
.web-upload-option span { color: #91a8af; line-height: 1.45; }
.web-upload-option.phone { box-shadow: inset 3px 0 #e95418; }
.web-upload-state { display: grid; justify-items: center; gap: 12px; color: #a9bcc1; line-height: 1.45; }
.web-upload-state > strong { color: #f4f8f9; font-size: 17px; }
.web-upload-state > span { max-width: 420px; }
.web-upload-state a { color: #ff7b45; }
.web-qr-wrap { padding: 9px; border-radius: 12px; background: #fff; box-shadow: 0 10px 30px #0005; }
.web-qr-wrap img { display: block; width: min(240px, 58vw); height: auto; }
.web-waiting { margin-top: 3px; padding: 10px 14px; border-radius: 9px; background: #0d2229; color: #ffc45e; }
.web-upload-spinner { display: inline-block; width: 15px; height: 15px; margin-right: 7px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: web-spin .7s linear infinite; vertical-align: -2px; }
.web-upload-success { padding: 20px; border-radius: 10px; background: #0c3a30; color: #42dda5; font-size: 17px; font-weight: 800; }
@keyframes web-spin { to { transform: rotate(360deg); } }

@media (max-width: 680px) {
  .web-upload-layer { padding: 12px; }
  .web-upload-card { padding: 26px 18px 20px; }
  .web-upload-options { grid-template-columns: 1fr; }
  .web-upload-option { min-height: 104px; }
}
