:root {
    --green: #99ca51;
    --green-dark: #78ad35;
    --orange: #f9ae32;
    --navy: #192938;
    --text: #263746;
    --muted: #87939e;
    --line: #e9edf0;
    --canvas: #f5f7f8;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--text);
    background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 3; display: flex; width: 250px; flex-direction: column; padding: 27px 16px 18px; color: #fff; background: var(--navy); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px 35px; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: var(--navy); background: var(--green); font-family: Manrope, sans-serif; font-size: 23px; font-weight: 800; }
.brand strong { display: block; font-size: 18px; letter-spacing: 1.4px; }
.brand small { display: block; margin-top: 3px; color: #9cabb7; font-size: 10px; line-height: 1.45; }
.navigation { display: flex; flex-direction: column; gap: 5px; }
.nav-caption { padding: 0 12px 9px; color: #8c9ca9; font-size: 10px; font-weight: 700; letter-spacing: 1.25px; }
.nav-caption-spaced { margin-top: 25px; }
.nav-link { display: flex; min-height: 43px; align-items: center; gap: 12px; padding: 0 12px; border-radius: 8px; color: #c0cbd3; font-size: 13px; transition: background .15s, color .15s; }
.nav-link:hover { color: #fff; background: #263c4d; }
.nav-link.active { color: #fff; background: #2a4050; box-shadow: inset 3px 0 var(--green); }
.nav-link.active .nav-icon { color: var(--green); }
.nav-icon { width: 18px; color: #a6b3bd; font-size: 17px; text-align: center; }
.sidebar-footer { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 15px 9px 0; border-top: 1px solid #344655; color: #adbac4; font-size: 11px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px #99ca5126; }
.main-content { min-height: 100vh; margin-left: 250px; }
.topbar { position: sticky; top: 0; z-index: 2; display: flex; height: 68px; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--line); background: #fff; }
.breadcrumb { color: #8b969f; font-size: 12px; }
.breadcrumb span { padding: 0 8px; color: #c4cbd0; }
.user-chip { display: flex; align-items: center; gap: 9px; color: #52616e; font-size: 12px; font-weight: 600; }
.user-avatar { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; color: var(--navy); background: #e9f2dc; font-size: 13px; font-weight: 700; }
.page-content { max-width: 1500px; margin: 0 auto; padding: 32px 34px 45px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.eyebrow { margin: 0 0 7px; color: var(--green-dark); font-size: 9px; font-weight: 700; letter-spacing: 1.4px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; color: var(--navy); font-size: 25px; letter-spacing: -.5px; }
.muted { margin: 0; color: var(--muted); font-size: 12px; }
.date-pill { padding: 9px 13px; border: 1px solid var(--line); border-radius: 7px; color: #667580; background: #fff; font-size: 11px; }
.date-pill span { padding-right: 5px; color: var(--green-dark); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.stat-card, .panel { border: 1px solid #edf0f2; border-radius: 10px; background: #fff; box-shadow: 0 3px 12px #19293808; }
.stat-card { position: relative; min-height: 146px; overflow: hidden; padding: 17px 17px 15px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: #73808b; font-size: 11px; font-weight: 500; }
.stat-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; font-size: 15px; }
.stat-icon.green { color: #6c9d2c; background: #eef6e3; }.stat-icon.orange { color: #d78c14; background: #fff4e0; }.stat-icon.blue { color: #57879c; background: #e9f4f8; }.stat-icon.red { color: #c66d5d; background: #fff0ed; }
.stat-card > strong { display: block; margin-top: 8px; color: var(--navy); font-size: 27px; letter-spacing: -.8px; }
.stat-card > small { display: block; margin-top: 4px; color: #9aa4ac; font-size: 9px; }
.positive { color: #6c9d2c; }.neutral { color: #7d8992; }.negative { color: #d47c44; }
.mini-bars { position: absolute; right: 15px; bottom: 17px; display: flex; height: 37px; align-items: end; gap: 4px; opacity: .8; }
.mini-bars i { width: 6px; border-radius: 3px 3px 0 0; background: #a9d26c; }
.orange-bars i { background: #f7bd61; }.blue-bars i { background: #94c2d1; }.red-bars i { background: #e9a097; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); gap: 15px; margin-top: 16px; }
.panel { padding: 19px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.panel-heading h2 { margin: 0 0 5px; color: var(--navy); font-size: 14px; font-weight: 700; }
.panel-heading p { margin: 0; color: #99a3aa; font-size: 10px; }
.chart-legend { display: flex; align-items: center; gap: 6px; padding-top: 4px; color: #82909a; font-size: 10px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.chart-wrap { display: flex; height: 183px; gap: 10px; }
.y-axis { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 25px; color: #a2abb2; font-size: 9px; }
.chart-area { position: relative; flex: 1; margin: 3px 4px 0 0; }
.grid-lines { position: absolute; inset: 0 0 25px; display: flex; flex-direction: column; justify-content: space-between; }
.grid-lines i { border-top: 1px dashed #edf0f1; }
.chart-area svg { position: absolute; inset: 0 0 25px; width: 100%; height: calc(100% - 25px); overflow: visible; }
.x-axis { position: absolute; right: 0; bottom: 0; left: 0; display: flex; justify-content: space-between; color: #9ba5ac; font-size: 9px; }
.fleet-panel { min-width: 0; }
.icon-button { padding: 0 4px; border: 0; color: #87939d; background: none; font-size: 21px; line-height: 16px; }
.donut-wrap { display: grid; place-items: center; padding: 1px 0 17px; }
.donut { display: grid; width: 132px; height: 132px; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) 0 75%, var(--orange) 75% 89%, #dfe5e8 89% 100%); }
.donut::before { position: absolute; width: 91px; height: 91px; border-radius: 50%; background: #fff; content: ''; }
.donut > div { z-index: 1; text-align: center; }
.donut strong { display: block; color: var(--navy); font-size: 23px; }
.donut span { display: block; margin-top: 1px; color: #98a2aa; font-size: 9px; }
.legend-list { display: grid; gap: 11px; }
.legend-list > div, .legend-list > div > span { display: flex; align-items: center; }
.legend-list > div { justify-content: space-between; color: #77838d; font-size: 10px; }
.legend-list > div > span { gap: 7px; }
.legend-list b { color: #52616c; font-size: 10px; }
.legend-list b small { margin-left: 7px; color: #a3acb2; font-size: 9px; font-weight: 400; }
.legend-list i { width: 7px; height: 7px; border-radius: 50%; }
.legend-green { background: var(--green); }.legend-orange { background: var(--orange); }.legend-grey { background: #dfe5e8; }
.activity-panel { margin-top: 16px; }
.text-link { color: #6e9d39; font-size: 10px; font-weight: 600; }
.text-link span { padding-left: 3px; font-size: 14px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 0 12px 11px; border-bottom: 1px solid #edf0f2; color: #98a2a9; font-size: 9px; font-weight: 600; letter-spacing: .45px; white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid #f0f2f3; color: #677580; font-size: 11px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td strong { color: #354654; font-size: 11px; }
.badge { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 20px; font-size: 9px; font-weight: 600; }
.badge-green { color: #628e2e; background: #eef6e5; }.badge-orange { color: #bd7d1b; background: #fff4df; }.badge-grey { color: #78838b; background: #eef1f3; }
.dashboard-note { margin: 12px 0 0; color: #a0a9af; font-size: 9px; text-align: right; }
.button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; font-size: 11px; font-weight: 600; transition: filter .15s, background .15s; }
.button:hover { filter: brightness(.97); }
.button-primary { color: #fff; background: var(--navy); }
.button-primary span { color: var(--green); font-size: 16px; }
.button-light { border-color: #e4e9ec; color: #687681; background: #fff; }
.data-panel { padding: 19px 0 5px; }
.data-panel > .panel-heading { padding: 0 19px; }
.data-panel th:first-child, .data-panel td:first-child { padding-left: 19px; }
.data-panel th:last-child, .data-panel td:last-child { padding-right: 19px; }
.actions-heading { text-align: right; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.row-actions form { display: inline; }
.action-link { padding: 0; border: 0; color: #618d32; background: transparent; cursor: pointer; font-size: 10px; font-weight: 600; }
.danger-link { color: #bf6d60; }
.empty-state { padding: 36px 12px; color: #97a1a8; text-align: center; }
.form-panel { max-width: 850px; }
.form-panel .panel-heading { padding-bottom: 15px; border-bottom: 1px solid #edf0f2; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; }
.form-field { display: flex; flex-direction: column; gap: 7px; color: #566571; font-size: 11px; font-weight: 600; }
.form-field input, .form-field select { width: 100%; height: 39px; padding: 0 11px; border: 1px solid #dfe5e8; border-radius: 6px; outline: none; color: #354654; background: #fff; font-size: 11px; font-weight: 400; }
.form-field input:focus, .form-field select:focus { border-color: #9ac85c; box-shadow: 0 0 0 3px #99ca511f; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; padding-top: 17px; border-top: 1px solid #edf0f2; }
.alert { margin-bottom: 17px; padding: 12px 14px; border: 1px solid transparent; border-radius: 7px; font-size: 11px; line-height: 1.6; }
.alert ul { margin: 0; padding-left: 17px; }
.alert-success { border-color: #dcebc9; color: #557a2d; background: #f3f8ec; }
.alert-error { border-color: #f1d6d1; color: #a65448; background: #fff5f3; }
@media (max-width: 1100px) {
    .sidebar { width: 220px; }
    .main-content { margin-left: 220px; }
    .page-content { padding-right: 22px; padding-left: 22px; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .sidebar { position: static; width: auto; padding: 14px; }
    .brand { padding: 0 5px 13px; }
    .brand-mark { width: 36px; height: 36px; }
    .navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
    .nav-caption { grid-column: 1 / -1; padding: 9px 8px 3px; }
    .nav-caption-spaced { margin-top: 0; }
    .nav-link { min-height: 37px; padding: 0 8px; font-size: 11px; }
    .sidebar-footer { display: none; }
    .main-content { margin-left: 0; }
    .topbar { height: 54px; padding: 0 17px; }
    .page-content { padding: 22px 15px 32px; }
    .page-heading { align-items: flex-start; }
    .page-heading .button { flex-shrink: 0; padding: 0 9px; font-size: 10px; }
    .stats-grid { gap: 9px; }
    .stat-card { min-height: 130px; padding: 13px; }
    .stat-top { font-size: 10px; }
    .dashboard-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
    .activity-panel { margin-top: 10px; }
    .form-grid { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 390px) {
    .user-chip > span:last-child { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card > small { font-size: 8px; }
    .mini-bars { right: 10px; gap: 3px; }
    .mini-bars i { width: 5px; }
}
