:root {
    --ws-navy: #101b32;
    --ws-navy-light: #192844;
    --ws-navy-hover: #243653;
    --ws-primary: #2563eb;
    --ws-primary-soft: #eff6ff;
    --ws-bg: #f3f5f9;
    --ws-surface: #ffffff;
    --ws-text: #172033;
    --ws-muted: #718096;
    --ws-border: #e5eaf1;
    --ws-success: #15966b;
    --ws-warning: #d58b18;
    --ws-danger: #dc4c4c;
    --ws-radius: 12px;
    --ws-shadow: 0 2px 12px rgba(20, 35, 60, .055);
}

#enterprise-workspace[hidden] {
    display: none !important;
}

#enterprise-workspace {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background: var(--ws-bg);
    color: var(--ws-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.workspace-sidebar {
    width: 252px;
    min-width: 252px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--ws-navy);
    color: #d9e2f0;
    padding: 25px 16px 18px;
    transition: width .2s ease, min-width .2s ease;
    z-index: 20;
}

.workspace-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 30px;
    color: #fff;
}

.workspace-brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(145deg, #3478ef, #1747a3);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .2);
}

.workspace-brand strong,
.workspace-brand span {
    display: block;
    line-height: 1.45;
    letter-spacing: 1.2px;
}

.workspace-brand strong {
    font-size: 12px;
    font-weight: 800;
}

.workspace-brand span {
    color: #9eacc2;
    font-size: 10px;
    font-weight: 600;
}

.sidebar-section-label {
    padding: 0 12px 11px;
    color: #8292aa;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

#workspace-navigation {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.workspace-nav-link {
    width: 100%;
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #b8c5d8;
    text-align: left;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.workspace-nav-link:hover {
    background: var(--ws-navy-hover);
    color: #fff;
}

.workspace-nav-link.active {
    background: #244b85;
    color: #fff;
    box-shadow: inset 3px 0 #68a0ff;
}

.workspace-nav-icon {
    width: 20px;
    text-align: center;
    color: #91a9cb;
    font-size: 16px;
}

.workspace-nav-link.active .workspace-nav-icon {
    color: #fff;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 18px 10px 0;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #aab8ca;
    font-size: 10px;
}

.status-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #35c68c;
    box-shadow: 0 0 0 4px rgba(53, 198, 140, .12);
}

.sidebar-version {
    margin-top: 18px;
    color: #71829c;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
}

.workspace-main {
    min-width: 0;
    min-height: 100vh;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.workspace-topbar {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 30px;
    background: var(--ws-surface);
    border-bottom: 1px solid var(--ws-border);
}

.topbar-left,
.topbar-right,
.user-identity {
    display: flex;
    align-items: center;
}

.topbar-left {
    gap: 15px;
}

.topbar-right {
    gap: 22px;
}

.topbar-eyebrow {
    margin-bottom: 4px;
    color: #8793a6;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

#workspace-page-title {
    margin: 0;
    color: var(--ws-text);
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -.4px;
}

.icon-button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--ws-border);
    border-radius: 8px;
    background: #fff;
    color: #536176;
    font-size: 17px;
    cursor: pointer;
}

.icon-button:hover {
    background: #f5f7fb;
}

.user-identity {
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e9f0ff;
    color: #2458b5;
    font-size: 13px;
    font-weight: 800;
}

.user-identity-text strong,
.user-identity-text span {
    display: block;
}

.user-identity-text strong {
    color: #273449;
    font-size: 11px;
    font-weight: 750;
}

.user-identity-text span {
    margin-top: 3px;
    color: var(--ws-muted);
    font-size: 10px;
}

.signout-button {
    padding: 9px 13px;
    border: 1px solid var(--ws-border);
    border-radius: 8px;
    background: #fff;
    color: #536176;
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
}

.signout-button:hover {
    border-color: #f0b7b7;
    background: #fff7f7;
    color: var(--ws-danger);
}

.workspace-content {
    width: 100%;
    max-width: 1600px;
    flex: 1;
    margin: 0 auto;
    padding: 27px 30px 35px;
}

.workspace-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 13px 30px;
    border-top: 1px solid var(--ws-border);
    background: #fff;
    color: #98a2b2;
    font-size: 9px;
}

.workspace-loading {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--ws-muted);
    font-size: 12px;
}

.workspace-loader {
    width: 28px;
    height: 28px;
    border: 3px solid #dce5f3;
    border-top-color: var(--ws-primary);
    border-radius: 50%;
    animation: ws-spin .8s linear infinite;
}

@keyframes ws-spin {
    to { transform: rotate(360deg); }
}

.workspace-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 23px;
}

.workspace-page-heading h2 {
    margin: 0;
    color: var(--ws-text);
    font-size: 18px;
    font-weight: 750;
}

.workspace-page-heading p {
    margin: 6px 0 0;
    color: var(--ws-muted);
    font-size: 11px;
    line-height: 1.6;
}

.workspace-button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--ws-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.workspace-button:hover {
    background: #1d4ed8;
}

.workspace-button.secondary {
    border-color: var(--ws-border);
    background: #fff;
    color: #536176;
}

.workspace-button.danger {
    background: var(--ws-danger);
}

.workspace-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 22px;
}

.workspace-kpi {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius);
    background: #fff;
    box-shadow: var(--ws-shadow);
}

.workspace-kpi-label {
    color: var(--ws-muted);
    font-size: 10px;
    font-weight: 650;
}

.workspace-kpi-value {
    margin-top: 10px;
    color: var(--ws-text);
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.7px;
}

.workspace-kpi-note {
    margin-top: 5px;
    color: #929daf;
    font-size: 9px;
}

.workspace-panel {
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius);
    background: #fff;
    box-shadow: var(--ws-shadow);
}

.workspace-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 19px;
    border-bottom: 1px solid var(--ws-border);
}

.workspace-panel-header h3 {
    margin: 0;
    color: #263449;
    font-size: 12px;
    font-weight: 750;
}

.workspace-panel-body {
    padding: 18px 19px;
}

.workspace-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--ws-border);
}

.workspace-input,
.workspace-select,
.workspace-textarea {
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid #dfe5ee;
    border-radius: 7px;
    outline: none;
    background: #fff;
    color: #263449;
    font: inherit;
    font-size: 11px;
}

.workspace-input:focus,
.workspace-select:focus,
.workspace-textarea:focus {
    border-color: #75a1f5;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .09);
}

.workspace-search {
    width: min(300px, 100%);
}

.workspace-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.workspace-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.workspace-table th {
    padding: 12px 15px;
    background: #f8f9fc;
    color: #778398;
    text-align: left;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .45px;
    text-transform: uppercase;
}

.workspace-table td {
    padding: 13px 15px;
    border-top: 1px solid #edf0f5;
    color: #445168;
    font-size: 10px;
}

.workspace-table tbody tr:hover {
    background: #fafbfd;
}

.workspace-empty,
.workspace-error {
    padding: 35px 18px;
    color: var(--ws-muted);
    text-align: center;
    font-size: 11px;
}

.workspace-error {
    color: var(--ws-danger);
}

.workspace-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 20px;
    background: #eef2f7;
    color: #64748b;
    font-size: 9px;
    font-weight: 750;
}

.workspace-badge.success {
    background: #e8f7f0;
    color: #12845c;
}

.workspace-badge.warning {
    background: #fff5df;
    color: #a66b0c;
}

.workspace-badge.danger {
    background: #fff0f0;
    color: #c43e3e;
}

.workspace-action-link {
    padding: 5px 8px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--ws-primary);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.workspace-action-link:hover {
    background: var(--ws-primary-soft);
}

.workspace-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 20, 38, .58);
}

.workspace-modal {
    width: min(620px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 20px 70px rgba(0, 0, 0, .25);
}

.workspace-modal-header,
.workspace-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ws-border);
}

.workspace-modal-header h3 {
    margin: 0;
    color: var(--ws-text);
    font-size: 14px;
}

.workspace-modal-footer {
    justify-content: flex-end;
    border-top: 1px solid var(--ws-border);
    border-bottom: 0;
}

.workspace-modal-body {
    padding: 20px;
}

.workspace-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.workspace-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.workspace-form-field.full {
    grid-column: 1 / -1;
}

.workspace-form-field label {
    color: #536176;
    font-size: 10px;
    font-weight: 700;
}

.workspace-form-field input,
.workspace-form-field select,
.workspace-form-field textarea {
    width: 100%;
}

.workspace-notice {
    margin-bottom: 15px;
    padding: 11px 13px;
    border: 1px solid #dbe8ff;
    border-radius: 8px;
    background: #f3f7ff;
    color: #355b99;
    font-size: 10px;
    line-height: 1.5;
}

@media (max-width: 1050px) {
    .workspace-sidebar {
        width: 220px;
        min-width: 220px;
    }

    .workspace-content {
        padding: 22px 20px 30px;
    }

    .workspace-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    #enterprise-workspace {
        display: block;
    }

    .workspace-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: 252px;
        min-width: 252px;
        transform: translateX(-100%);
        transition: transform .2s ease;
        box-shadow: 12px 0 30px rgba(0, 0, 0, .16);
    }

    #enterprise-workspace.sidebar-open .workspace-sidebar {
        transform: translateX(0);
    }

    .workspace-topbar {
        min-height: 70px;
        padding: 10px 14px;
    }

    .topbar-right {
        gap: 10px;
    }

    .user-identity-text {
        display: none;
    }

    .signout-button {
        padding: 8px 9px;
    }

    .workspace-content {
        padding: 19px 13px 25px;
    }

    .workspace-footer {
        padding: 12px 14px;
        font-size: 8px;
    }

    .workspace-kpi-grid {
        gap: 10px;
    }

    .workspace-kpi {
        padding: 14px;
    }

    .workspace-kpi-value {
        font-size: 21px;
    }

    .workspace-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 390px) {
    .topbar-eyebrow {
        font-size: 8px;
    }

    #workspace-page-title {
        font-size: 16px;
    }

    .workspace-kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== ENTERPRISE FLEET CONTROL CENTER ===== */

.workspace-topbar {
    background: #101b32;
    border-bottom: 1px solid #263653;
}
.workspace-topbar #workspace-page-title,
.workspace-topbar .user-identity-text strong { color: #fff; }
.workspace-topbar .topbar-eyebrow,
.workspace-topbar .user-identity-text span { color: #9aabc4; }
.workspace-topbar .user-avatar {
    background: #263d62; color: #fff; border: 1px solid #405779;
}
.workspace-topbar .icon-button,
.workspace-topbar .signout-button {
    background: #1b2b46; border-color: #344866; color: #fff;
}
.workspace-content { max-width: none; padding: 25px 28px 30px; }

.workspace-nav-item {
    width: 100%; min-height: 43px; display: flex; align-items: center;
    gap: 12px; padding: 0 12px; border: 0; border-radius: 8px;
    background: transparent; color: #b8c5d8; text-align: left;
    font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.workspace-nav-item:hover { background: #243653; color: #fff; }
.workspace-nav-item.active {
    background: #244b85; color: #fff; box-shadow: inset 3px 0 #68a0ff;
}
.nav-icon { width: 20px; text-align: center; font-size: 16px; }

.fleet-dashboard { width: 100%; max-width: 1800px; margin: 0 auto; }
.fleet-dashboard-heading {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 15px; margin-bottom: 20px;
}
.fleet-eyebrow {
    margin-bottom: 5px; color: #64748b; font-size: 9px;
    font-weight: 800; letter-spacing: 1.3px;
}
.fleet-dashboard-heading h2 {
    margin: 0; color: #172033; font-size: 21px;
    font-weight: 800; letter-spacing: -.5px;
}
.fleet-dashboard-heading p,
.fleet-panel-header p {
    margin: 5px 0 0; color: #8290a3; font-size: 10px;
}
.fleet-dashboard-date { color: #718096; font-size: 10px; }

.fleet-kpi-grid {
    display: grid; grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 15px; margin-bottom: 19px;
}
.fleet-kpi-card, .fleet-panel {
    min-width: 0; border: 1px solid #e5eaf1; border-radius: 11px;
    background: #fff; box-shadow: 0 2px 10px rgba(20,35,60,.045);
}
.fleet-kpi-card { padding: 16px 18px; }
.fleet-kpi-heading {
    display: flex; align-items: center; justify-content: space-between;
    color: #718096; font-size: 10px; font-weight: 650;
}
.fleet-kpi-icon {
    width: 31px; height: 31px; display: grid; place-items: center;
    border-radius: 9px; font-size: 15px;
}
.fleet-kpi-icon.blue { background: #eaf1ff; color: #3473df; }
.fleet-kpi-icon.green { background: #e8f7f0; color: #15966b; }
.fleet-kpi-icon.orange { background: #fff5e5; color: #d58b18; }
.fleet-kpi-icon.red { background: #fff0f0; color: #dc4c4c; }
.fleet-kpi-value {
    margin-top: 9px; color: #172033; font-size: 27px;
    font-weight: 800; letter-spacing: -.8px;
}
.fleet-kpi-description { margin-top: 4px; color: #96a0af; font-size: 9px; }

.fleet-main-grid {
    display: grid; grid-template-columns: minmax(0,1.8fr) minmax(270px,.85fr);
    gap: 17px; margin-bottom: 17px;
}
.fleet-panel { overflow: hidden; }
.fleet-panel-header {
    min-height: 61px; display: flex; align-items: center;
    justify-content: space-between; gap: 12px; padding: 12px 16px;
    border-bottom: 1px solid #edf0f5;
}
.fleet-panel-header h3 {
    margin: 0; color: #263449; font-size: 12px; font-weight: 750;
}
.fleet-live-label {
    display: flex; align-items: center; gap: 7px; color: #15966b;
    font-size: 8px; font-weight: 800; letter-spacing: .6px;
}
.fleet-live-label span {
    width: 7px; height: 7px; border-radius: 50%; background: #15966b;
}
.fleet-map-area {
    position: relative; min-height: 330px; display: grid;
    place-items: center; background: #e9eef3;
}
.fleet-map-empty { max-width: 270px; padding: 20px; text-align: center; }
.fleet-map-empty-icon { margin-bottom: 10px; color: #5279b4; font-size: 35px; }
.fleet-map-empty strong,
.fleet-map-empty span,
.fleet-map-empty small { display: block; }
.fleet-map-empty strong { color: #34445b; font-size: 13px; }
.fleet-map-empty span {
    margin-top: 7px; color: #6e7e92; font-size: 10px; line-height: 1.6;
}
.fleet-map-empty small { margin-top: 12px; color: #8290a3; font-size: 9px; }
.fleet-map-footer {
    min-height: 39px; display: flex; align-items: center; flex-wrap: wrap;
    gap: 15px; padding: 8px 15px; border-top: 1px solid #edf0f5;
    color: #718096; font-size: 9px;
}
.fleet-dot {
    width: 7px; height: 7px; display: inline-block;
    margin-right: 5px; border-radius: 50%;
}
.fleet-dot.online { background: #15966b; }
.fleet-dot.delayed { background: #d58b18; }
.fleet-dot.offline { background: #dc4c4c; }
.fleet-map-count { margin-left: auto; color: #98a2b2; }

.fleet-panel-counter {
    min-width: 23px; padding: 4px 7px; border-radius: 12px;
    background: #f0f3f8; color: #64748b; text-align: center;
    font-size: 9px; font-weight: 750;
}
.fleet-empty-state {
    min-height: 240px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 20px;
    text-align: center;
}
.fleet-empty-icon { margin-bottom: 10px; color: #a5b1c2; font-size: 26px; }
.fleet-empty-state strong { color: #45546a; font-size: 11px; }
.fleet-empty-state p {
    max-width: 190px; color: #98a2b2; font-size: 9px; line-height: 1.5;
}

.fleet-lower-grid {
    display: grid;
    grid-template-columns: minmax(190px,.8fr) minmax(300px,1.5fr) minmax(220px,.9fr);
    gap: 17px;
}
.fleet-status-content {
    min-height: 180px; display: flex; align-items: center;
    justify-content: center; gap: 17px; padding: 15px;
}
.fleet-donut-empty {
    width: 112px; height: 112px; flex: 0 0 112px;
    display: grid; place-items: center; border: 13px solid #e9edf3;
    border-radius: 50%;
}
.fleet-donut-inner { display: flex; flex-direction: column; align-items: center; }
.fleet-donut-inner strong { color: #34445b; font-size: 19px; }
.fleet-donut-inner span { color: #8b97a8; font-size: 8px; }
.fleet-status-legend {
    display: flex; flex-direction: column; gap: 13px;
    color: #718096; font-size: 9px;
}
.fleet-status-legend span { white-space: nowrap; }
.fleet-status-legend b { margin-left: 8px; color: #34445b; }

.fleet-table-wrap { overflow-x: auto; }
.fleet-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.fleet-table th {
    padding: 12px 13px; background: #f8f9fc; color: #778398;
    text-align: left; font-size: 8px; font-weight: 800;
    letter-spacing: .4px; text-transform: uppercase;
}
.fleet-table td {
    padding: 18px 13px; border-top: 1px solid #edf0f5;
    color: #8290a3; font-size: 9px;
}
.fleet-table-empty { text-align: center; }

.fleet-system-list { padding: 8px 15px; }
.fleet-system-list div {
    min-height: 37px; display: flex; align-items: center;
    justify-content: space-between; gap: 8px;
    border-bottom: 1px solid #f0f2f6; color: #657389; font-size: 9px;
}
.fleet-system-list div:last-child { border-bottom: 0; }
.fleet-system-list b { font-size: 8px; font-weight: 750; }
.system-ok { color: #15966b; }
.system-pending { color: #d58b18; }

@media (max-width: 1100px) {
    .fleet-lower-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .fleet-recent-panel { grid-column: 1 / -1; grid-row: 1; }
}
@media (max-width: 800px) {
    .fleet-main-grid { grid-template-columns: 1fr; }
    .fleet-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px) {
    .fleet-dashboard-heading { align-items: flex-start; flex-direction: column; }
    .fleet-lower-grid { grid-template-columns: 1fr; }
    .fleet-recent-panel { grid-column: auto; }
    .fleet-map-area { min-height: 260px; }
    .fleet-status-content { justify-content: flex-start; }
}


/* Dashboard API integration */
.fleet-dashboard-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.fleet-refresh-button {
    border: 1px solid #dce3ed;
    border-radius: 6px;
    background: #fff;
    color: #34445b;
    padding: 7px 11px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}
.fleet-refresh-button:hover { background: #f3f6fa; }
.fleet-demo-notice {
    margin: 0 0 15px;
    padding: 9px 12px;
    border: 1px solid #f1dfb9;
    border-radius: 7px;
    background: #fffaf0;
    color: #82652d;
    font-size: 9px;
}
.fleet-demo-notice span {
    margin-right: 9px;
    color: #a66e13;
    font-weight: 800;
    letter-spacing: .6px;
}
#fleet-live-map { width: 100%; min-height: 330px; z-index: 1; }
.fleet-donut-hole {
    position: absolute;
    inset: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
}
.fleet-donut-hole strong { color: #34445b; font-size: 19px; }
.fleet-donut-hole span { color: #8b97a8; font-size: 8px; }
.fleet-status-badge {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 10px;
    font-size: 8px;
    font-weight: 750;
    white-space: nowrap;
}
.fleet-status-badge.online { background: #e8f7f0; color: #15966b; }
.fleet-status-badge.delayed { background: #fff5e5; color: #b77916; }
.fleet-status-badge.offline { background: #fff0f0; color: #dc4c4c; }
.fleet-activity-list { max-height: 390px; overflow-y: auto; padding: 5px 14px; }
.fleet-activity-item {
    display: flex;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid #edf0f5;
}
.fleet-activity-item:last-child { border-bottom: 0; }
.fleet-activity-marker {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
}
.fleet-activity-marker.event { background: #eaf1ff; color: #3473df; }
.fleet-activity-marker.incident { background: #fff0f0; color: #dc4c4c; }
.fleet-activity-detail { min-width: 0; }
.fleet-activity-title { color: #34445b; font-size: 10px; font-weight: 750; }
.fleet-activity-detail p {
    margin: 4px 0;
    color: #718096;
    font-size: 9px;
    line-height: 1.4;
}
.fleet-activity-detail small { color: #98a2b2; font-size: 8px; }
.fleet-table td strong { display: block; color: #34445b; font-size: 9px; }
.fleet-table td small { display: block; margin-top: 3px; color: #98a2b2; font-size: 8px; }
.fleet-data-error { padding: 15px; color: #dc4c4c; font-size: 10px; }
.fleet-system-list .fleet-status-badge { flex: 0 0 auto; }
@media (max-width: 520px) {
    .fleet-dashboard-actions { align-items: flex-start; flex-direction: column; }
}

/* ===== DASHBOARD FIT-TO-SCREEN LAYOUT ===== */
@media (min-width: 1101px) {
    #enterprise-workspace:has(.fleet-dashboard) {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    #enterprise-workspace:has(.fleet-dashboard) .workspace-sidebar {
        height: 100%;
        min-height: 0;
        overflow-y: auto;
    }

    #enterprise-workspace:has(.fleet-dashboard) .workspace-main {
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    #enterprise-workspace:has(.fleet-dashboard) .workspace-topbar {
        min-height: 68px;
        flex: 0 0 68px;
        padding: 8px 24px;
    }

    #enterprise-workspace:has(.fleet-dashboard) .workspace-content {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        padding: 10px 18px 12px;
    }

    .fleet-dashboard {
        height: 100%;
        min-height: 0;
        display: grid;
        grid-template-rows: auto auto auto minmax(0, 1.5fr) minmax(0, 1fr);
        gap: 9px;
    }

    .fleet-dashboard-heading {
        align-items: center;
        margin: 0;
        gap: 10px;
    }

    .fleet-dashboard-heading h2 {
        font-size: 18px;
    }

    .fleet-dashboard-heading p {
        margin-top: 3px;
    }

    .fleet-demo-notice {
        margin: 0;
        padding: 6px 10px;
    }

    .fleet-kpi-grid {
        gap: 10px;
        margin: 0;
    }

    .fleet-kpi-card {
        padding: 9px 13px;
    }

    .fleet-kpi-icon {
        width: 26px;
        height: 26px;
    }

    .fleet-kpi-value {
        margin-top: 4px;
        font-size: 23px;
    }

    .fleet-kpi-description {
        margin-top: 2px;
    }

    .fleet-main-grid {
        min-height: 0;
        gap: 10px;
        margin: 0;
    }

    .fleet-main-grid > .fleet-panel,
    .fleet-lower-grid > .fleet-panel {
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .fleet-panel-header {
        min-height: 44px;
        flex: 0 0 auto;
        padding: 7px 12px;
    }

    .fleet-map-panel #fleet-live-map {
        flex: 1 1 auto;
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    .fleet-map-footer {
        min-height: 30px;
        flex: 0 0 auto;
        padding: 5px 12px;
    }

    .fleet-activity-list {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        padding: 2px 12px;
    }

    .fleet-activity-item {
        padding: 7px 0;
    }

    .fleet-activity-marker {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
    }

    .fleet-lower-grid {
        min-height: 0;
        gap: 10px;
    }

    .fleet-status-content {
        flex: 1 1 auto;
        min-height: 0;
        gap: 10px;
        padding: 7px;
    }

    .fleet-donut-empty {
        width: 82px;
        height: 82px;
        flex-basis: 82px;
        border-width: 10px;
    }

    .fleet-donut-hole {
        inset: 10px;
    }

    .fleet-donut-hole strong {
        font-size: 16px;
    }

    .fleet-status-legend {
        gap: 8px;
        font-size: 8px;
    }

    .fleet-recent-panel .fleet-table-wrap {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
    }

    .fleet-table th,
    .fleet-table td {
        padding: 7px 8px;
    }

    .fleet-system-list {
        padding: 4px 10px;
    }

    .fleet-system-list div {
        min-height: 27px;
    }

    .fleet-empty-state {
        min-height: 0;
        flex: 1 1 auto;
        padding: 10px;
    }
}

/* ===== COMPACT DASHBOARD HEADER ===== */
@media (min-width: 1101px) {
    .fleet-dashboard {
        grid-template-rows: auto minmax(0, 1.8fr) minmax(0, 1fr);
        gap: 10px;
    }

    .fleet-dashboard-heading,
    .fleet-demo-notice {
        display: none !important;
    }

    .fleet-kpi-grid {
        margin-top: 0;
        margin-bottom: 0;
    }

    .fleet-main-grid {
        margin-top: 0;
        margin-bottom: 0;
    }
}

/* ===== DASHBOARD TYPOGRAPHY ENHANCEMENT ===== */

/* Navigation */
.workspace-nav-item {
    font-size: 13px;
}

.workspace-topbar .topbar-eyebrow {
    font-size: 10px;
}

.workspace-topbar .user-identity-text {
    font-size: 12px;
}

/* Dashboard headings and controls */
.fleet-dashboard-heading h2 {
    font-size: 21px;
}

.fleet-dashboard-heading p,
.fleet-dashboard-date {
    font-size: 11px;
}

.fleet-refresh-button {
    font-size: 11px;
}

/* KPI cards */
.fleet-kpi-heading {
    font-size: 12px;
}

.fleet-kpi-value {
    font-size: 27px;
}

.fleet-kpi-description {
    font-size: 10px;
}

/* Main panels */
.fleet-panel-header h3 {
    font-size: 14px;
}

.fleet-panel-header p {
    font-size: 11px;
}

.fleet-live-label {
    font-size: 9px;
}

.fleet-panel-counter {
    font-size: 10px;
}

/* Map and activity */
.fleet-map-footer {
    font-size: 10px;
}

.fleet-activity-title {
    font-size: 12px;
}

.fleet-activity-detail p {
    font-size: 10px;
    line-height: 1.5;
}

.fleet-activity-detail small {
    font-size: 9px;
}

/* Fleet status */
.fleet-status-legend {
    font-size: 10px;
}

.fleet-status-legend b {
    font-size: 10px;
}

.fleet-donut-hole strong {
    font-size: 20px;
}

.fleet-donut-hole span {
    font-size: 9px;
}

/* Recent vehicles table */
.fleet-table th {
    font-size: 9px;
}

.fleet-table td {
    font-size: 10px;
}

.fleet-table td strong {
    font-size: 10px;
}

.fleet-table td small {
    font-size: 9px;
}

/* System status */
.fleet-system-list div {
    font-size: 10px;
}

.fleet-system-list b {
    font-size: 9px;
}

.fleet-status-badge {
    font-size: 9px;
}

/* ===== ILLUSTRATED KPI CARDS ===== */
.fleet-kpi-card {
    position: relative;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    min-height: 112px;
    overflow: hidden;
    padding: 12px 15px 25px;
}

.fleet-kpi-illustration {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.fleet-kpi-illustration svg {
    width: 45px;
    height: 45px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fleet-kpi-illustration.blue {
    color: #1672ed;
    background: #edf4ff;
}

.fleet-kpi-illustration.green {
    color: #25b84d;
    background: #eefaf1;
}

.fleet-kpi-illustration.orange {
    color: #f59b17;
    background: #fff7e9;
}

.fleet-kpi-illustration.red {
    color: #ed555d;
    background: #fff0f1;
}

.fleet-kpi-content {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.fleet-kpi-heading {
    display: block;
    color: #536176;
    font-size: 12px;
    font-weight: 650;
}

.fleet-kpi-value {
    margin-top: 3px;
    font-size: 29px;
    line-height: 1.1;
}

.fleet-kpi-description {
    margin-top: 4px;
    font-size: 9px;
}

.fleet-kpi-sparkline {
    position: absolute;
    z-index: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 27px;
    overflow: visible;
    pointer-events: none;
}

.fleet-kpi-sparkline-area {
    fill: currentColor;
    opacity: .10;
}

.fleet-kpi-sparkline-line {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.fleet-kpi-sparkline.blue { color: #438bfa; }
.fleet-kpi-sparkline.green { color: #22c77a; }
.fleet-kpi-sparkline.orange { color: #f5a12b; }
.fleet-kpi-sparkline.red { color: #f16a75; }

@media (max-width: 700px) {
    .fleet-kpi-card {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 8px;
        min-height: 96px;
        padding: 10px 8px 22px;
    }

    .fleet-kpi-illustration {
        width: 40px;
        height: 40px;
    }

    .fleet-kpi-illustration svg {
        width: 32px;
        height: 32px;
    }

    .fleet-kpi-value {
        font-size: 23px;
    }
}

/* ===== 3D KPI IMAGE PRESENTATION ===== */
.fleet-kpi-card {
    grid-template-columns: 78px minmax(0, 1fr);
}

.fleet-kpi-illustration {
    width: 78px;
    height: 78px;
    border-radius: 0;
    background: transparent !important;
    overflow: visible;
}

.fleet-kpi-illustration img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 5px rgba(20, 35, 60, .16));
}

@media (max-width: 700px) {
    .fleet-kpi-card {
        grid-template-columns: 50px minmax(0, 1fr);
    }

    .fleet-kpi-illustration {
        width: 50px;
        height: 50px;
    }
}

/* ===== APPLICATION-WIDE READABLE TYPOGRAPHY ===== */
#enterprise-workspace,
#enterprise-workspace * {
    font-family: Arial, Helvetica, sans-serif;
}

#enterprise-workspace button,
#enterprise-workspace input,
#enterprise-workspace select,
#enterprise-workspace textarea {
    font-family: Arial, Helvetica, sans-serif;
}

/* ===== APPLICATION-WIDE READABILITY UPGRADE ===== */

/* General workspace text */
#enterprise-workspace {
    font-size: 14px !important;
    line-height: 1.5;
}

#enterprise-workspace p,
#enterprise-workspace label,
#enterprise-workspace th,
#enterprise-workspace td,
#enterprise-workspace input,
#enterprise-workspace select,
#enterprise-workspace textarea,
#enterprise-workspace button {
    font-size: 13px !important;
}

/* Main headings */
#enterprise-workspace h1 {
    font-size: 25px !important;
}

#enterprise-workspace h2 {
    font-size: 21px !important;
}

#enterprise-workspace h3 {
    font-size: 16px !important;
}

/* Sidebar and top navigation */
#enterprise-workspace .workspace-nav-item {
    font-size: 14px !important;
    min-height: 45px;
}

#enterprise-workspace .workspace-topbar {
    font-size: 13px !important;
}

#enterprise-workspace .user-identity-text,
#enterprise-workspace .topbar-eyebrow {
    font-size: 12px !important;
}

/* KPI cards */
#enterprise-workspace .fleet-kpi-heading {
    font-size: 13px !important;
}

#enterprise-workspace .fleet-kpi-value {
    font-size: 30px !important;
}

#enterprise-workspace .fleet-kpi-description {
    font-size: 11px !important;
}

/* Dashboard panels */
#enterprise-workspace .fleet-panel-header h3 {
    font-size: 15px !important;
}

#enterprise-workspace .fleet-panel-header p {
    font-size: 12px !important;
}

/* Activity feed */
#enterprise-workspace .fleet-activity-title {
    font-size: 13px !important;
}

#enterprise-workspace .fleet-activity-detail p {
    font-size: 12px !important;
}

#enterprise-workspace .fleet-activity-detail small {
    font-size: 10px !important;
}

/* Recent vehicles and tables */
#enterprise-workspace .fleet-table th {
    font-size: 11px !important;
}

#enterprise-workspace .fleet-table td,
#enterprise-workspace .fleet-table td strong {
    font-size: 12px !important;
}

#enterprise-workspace .fleet-table td small {
    font-size: 10px !important;
}

/* Fleet status and system status */
#enterprise-workspace .fleet-status-legend,
#enterprise-workspace .fleet-system-list div {
    font-size: 12px !important;
}

#enterprise-workspace .fleet-status-badge,
#enterprise-workspace .fleet-system-list b {
    font-size: 11px !important;
}

/* Secondary information */
#enterprise-workspace .fleet-map-footer,
#enterprise-workspace .fleet-dashboard-date,
#enterprise-workspace .fleet-refresh-button,
#enterprise-workspace .workspace-footer {
    font-size: 11px !important;
}


/* ===== REFERENCE SIDEBAR NAVIGATION ===== */
.workspace-nav-item {
    min-height: 47px;
    gap: 13px;
    padding: 0 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px !important;
    font-weight: 600;
}

.nav-icon {
    width: 22px;
    min-width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.workspace-nav-item.module-unavailable:disabled {
    opacity: 1;
    color: #b8c5d8;
    cursor: not-allowed;
}

.workspace-nav-item.active .nav-icon svg {
    stroke-width: 2.2;
}

/* ===== TOPBAR DATE AND LIVE NAIROBI CLOCK ===== */
.workspace-datetime {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 18px;
    border-right: 1px solid #344866;
    color: #e5edf8;
    white-space: nowrap;
    font-size: 13px;
}

.workspace-datetime-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.datetime-icon {
    color: #a9bfdc;
    font-size: 19px;
}

.workspace-datetime strong {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 850px) {
    .workspace-datetime {
        gap: 9px;
        padding: 0 9px;
        font-size: 11px;
    }

    .workspace-datetime strong {
        font-size: 11px;
    }
}

@media (max-width: 520px) {
    .workspace-datetime {
        gap: 5px;
        padding: 0 6px;
    }

    .workspace-datetime-item:first-child {
        display: none;
    }
}

/* ===== ENLARGED FLEET STATUS DISPLAY ===== */
@media (min-width: 1101px) {
    .fleet-lower-grid {
        grid-template-columns:
            minmax(230px, .95fr)
            minmax(300px, 1.5fr)
            minmax(220px, .9fr);
    }

    .fleet-status-content {
        gap: 16px;
        padding: 10px;
    }

    .fleet-donut-empty {
        width: 120px;
        height: 120px;
        flex: 0 0 120px;
    }

    .fleet-donut-hole {
        inset: 13px;
    }

    .fleet-donut-hole strong {
        font-size: 23px !important;
    }

    .fleet-donut-hole span {
        font-size: 11px !important;
    }

    .fleet-status-legend {
        gap: 14px;
        font-size: 14px !important;
    }

    .fleet-status-legend span {
        font-size: 14px !important;
    }

    .fleet-status-legend b {
        font-size: 14px !important;
        margin-left: 8px;
    }
}

/* ===== OFFICIAL SAFETRAQ DASHBOARD SIDEBAR LOGO ===== */

.workspace-brand {
    justify-content: center;
    padding: 0 4px 26px;
}

.workspace-safetraq-logo {
    display: block;
    width: 100%;
    max-width: 230px;
    height: auto;
    object-fit: contain;
    border-radius: 9px;
}



/* Dashboard map: compact header to maximise map space */
#enterprise-workspace .fleet-map-panel .fleet-map-header {
    min-height: 42px;
    padding: 7px 16px;
}
