:root {
    --bg-primary: #061a2d;
    --bg-primary-soft: #0c2440;
    --bg-secondary: #0f2d42;
    --bg-panel: #112b3e;
    --bg-panel-strong: #122f45;
    --bg-field: #17364d;
    --bg-field-strong: #1d405d;
    --bg-highlight: rgba(120, 211, 255, 0.14);
    --glass-border: rgba(151, 202, 233, 0.22);
    --glass-border-strong: rgba(151, 202, 233, 0.35);
    --glass-highlight: rgba(255,255,255,0.08);
    --text-primary: #eef9ff;
    --text-secondary: #d9edf9;
    --text-muted: #afc7d9;
    --text-strong: #f8fdff;
    --accent: #7ad8ff;
    --accent-strong: #48b7ff;
    --accent-soft: rgba(122, 216, 255, 0.12);
    --success: #6ee7b7;
    --success-strong: #4fe1a1;
    --warning: #f7d57c;
    --danger: #ff7d7d;
    --danger-strong: #ff5a5a;
    --info: #79d0ff;
    --shadow-glass: none;
    --shadow-soft: 0 8px 20px rgba(3, 10, 17, 0.18);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --blur-sm: 0px;
    --blur-md: 0px;
    --blur-lg: 0px;
    --transition-fast: 150ms ease;
    --transition-base: 220ms ease;
    --transition-slow: 280ms ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Inter, "SF Pro Display", Arial, sans-serif;
    background: linear-gradient(180deg, #eafaf0 0%, #f5fbf7 100%);
    color: #1f2937;
    line-height: 1.5;
}

body::before,
body::after {
    content: none;
}

body > * {
    position: relative;
    z-index: 1;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
.btn,
.primary-button,
.secondary-button,
.filter-pill,
.inline-mark-read {
    transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base), border-color var(--transition-base), opacity var(--transition-base);
}

button:hover,
.btn:hover,
.primary-button:hover,
.secondary-button:hover,
.filter-pill:hover,
.inline-mark-read:hover {
    transform: translateY(-1px);
}

button:active,
.btn:active,
.primary-button:active,
.secondary-button:active,
.filter-pill:active,
.inline-mark-read:active {
    transform: translateY(0) scale(0.98);
}

.glass,
.glass-card,
.glass-panel,
.glass-floating,
.glass-modal,
article,
.form-card,
.table-section,
.notification-center-header,
.notification-center-controls,
.notification-center-item,
.notification-center-empty,
.dashboard-panel,
.stat-card,
.section-card,
.analysis-filter-card,
.app-sidebar,
.app-topbar,
.notifications-panel,
.maintenance-notification,
.filters-card,
.modal-card,
.warning-panel {
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass,
    .glass-card,
    .glass-panel,
    .glass-floating,
    .glass-modal,
    article,
    .form-card,
    .table-section,
    .notification-center-header,
    .notification-center-controls,
    .notification-center-item,
    .notification-center-empty,
    .dashboard-panel,
    .stat-card,
    .section-card,
    .analysis-filter-card,
    .app-sidebar,
    .app-topbar,
    .notifications-panel,
    .maintenance-notification,
    .filters-card,
    .modal-card,
    .warning-panel {
        background: rgba(12, 25, 36, 0.97);
    }
}

.version-page {
    display: grid;
    gap: 16px;
}

.version-hero,
.version-entry {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.version-hero {
    align-items: center;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 26px;
    min-height: 220px;
    overflow: hidden;
    padding: 24px 28px;
}

.version-hero-art {
    position: relative;
    min-height: 210px;
    display: grid;
    place-items: center;
}

.version-hero-art::before {
    content: "";
    position: absolute;
    width: 280px;
    height: 180px;
    border-radius: 45% 55% 40% 60%;
    background: #dcfce7;
    opacity: 0.75;
}

.version-monitor {
    position: relative;
    width: 170px;
    height: 122px;
    border: 12px solid #12814a;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 22px 28px rgba(15, 23, 42, 0.14);
    display: grid;
    place-items: center;
}

.version-monitor::after {
    content: "";
    position: absolute;
    bottom: -48px;
    width: 92px;
    height: 16px;
    border-radius: 999px;
    background: #cbd5e1;
}

.version-monitor span {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #22c55e;
    color: #ffffff;
    font-size: 34px;
    font-weight: 900;
}

.version-gear {
    position: absolute;
    right: 42px;
    bottom: 42px;
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #22c55e;
    color: #ffffff;
    font-size: 36px;
}

.version-hero-copy > span {
    color: #16a34a;
    display: block;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.version-hero-copy h1 {
    margin: 12px 0 14px;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1;
}

.version-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.version-badges strong,
.version-timeline strong,
.version-timeline em {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    color: #166534;
    display: inline-flex;
    padding: 8px 12px;
    font-size: 13px;
}

.version-hero-copy p {
    max-width: 720px;
    margin: 0;
    color: #475569;
    font-size: 17px;
    line-height: 1.45;
}

.version-entry {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 22px;
    padding: 22px;
}

.version-timeline {
    position: relative;
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 16px;
    padding-top: 18px;
    text-align: center;
}

.version-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: -34px;
    left: 24px;
    width: 4px;
    border-radius: 999px;
    background: #86efac;
}

.version-dot {
    position: absolute;
    top: 18px;
    left: 13px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 8px #dcfce7;
}

.version-timeline strong {
    font-size: 18px;
    font-weight: 900;
}

.version-timeline span {
    color: #64748b;
    font-size: 14px;
    font-weight: 800;
}

.version-timeline em {
    font-style: normal;
    font-weight: 900;
    padding: 6px 10px;
    font-size: 12px;
}

.version-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 14px;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.version-card section + section {
    border-left: 1px solid #dbeafe;
    padding-left: 18px;
}

.version-card h2 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 17px;
}

.version-card ul {
    margin: 0;
    padding-left: 18px;
    color: #475569;
    font-size: 14px;
    line-height: 1.55;
}

.version-card li::marker {
    color: #16a34a;
}

.notification-center-page {
    display: grid;
    gap: 20px;
    padding: 24px;
}

.notification-center-header,
.notification-center-controls,
.notification-center-item,
.notification-center-empty {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.notification-center-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
}

.eyebrow {
    color: #16a34a;
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.notification-center-header h1 {
    margin: 0;
    font-size: 30px;
}

.notification-center-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.filter-pill,
.inline-mark-read {
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.2s ease;
}

.primary-button,
.secondary-button {
    min-height: 42px;
    padding: 0 16px;
    text-decoration: none;
    border: 1px solid #dbeafe;
    cursor: pointer;
}

.primary-button {
    background: #0f766e;
    color: #fff;
}

.secondary-button {
    background: #f8fafc;
    color: #0f172a;
}

.notification-center-controls {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
}

.notification-filter-group,
.notification-category-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    min-height: 38px;
    padding: 0 12px;
    text-decoration: none;
}

.filter-pill.active {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.notification-center-list {
    display: grid;
    gap: 14px;
}

.notification-center-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
}

.notification-center-item.unread {
    border-color: #86efac;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.notification-center-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #ecfdf5;
    display: grid;
    place-items: center;
    font-size: 22px;
}

.notification-center-content {
    min-width: 0;
}

.notification-center-topline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}

.notification-center-topline strong {
    color: #0f172a;
    font-size: 18px;
}

.notification-center-topline span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.notification-center-content p {
    margin: 0;
    color: #475569;
    line-height: 1.55;
}

.notification-action-link {
    display: inline-block;
    margin-top: 12px;
    color: #0f766e;
    font-weight: 700;
    text-decoration: none;
}

.inline-mark-read {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    min-height: 38px;
    padding: 0 12px;
    cursor: pointer;
}

.notification-center-empty {
    padding: 36px 20px;
    text-align: center;
}

.notification-center-empty span {
    display: inline-grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #dcfce7;
    color: #166534;
    font-size: 30px;
    font-weight: 900;
    margin-bottom: 10px;
}

.notification-center-empty h2 {
    margin: 0 0 8px;
    color: #0f172a;
}

.notification-center-empty p {
    margin: 0;
    color: #475569;
}

@media (max-width: 1100px) {
    .version-hero,
    .version-entry,
    .version-card {
        grid-template-columns: 1fr;
    }

    .version-card section + section {
        border-left: 0;
        border-top: 1px solid #dbeafe;
        padding: 22px 0 0;
    }

    .notification-center-item {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .inline-mark-read {
        grid-column: 2;
        justify-self: start;
    }
}

@media (max-width: 760px) {
    .version-hero,
    .version-entry {
        padding: 22px;
    }

    .version-hero {
        gap: 18px;
    }

    .version-hero-copy p,
    .version-card ul {
        font-size: 16px;
    }

    .version-timeline {
        align-items: start;
        justify-items: start;
        padding-left: 42px;
        text-align: left;
    }
}

/* Liquid glass visual system ------------------------------------------------ */
:root {
    --liquid-ink: #102438;
    --liquid-muted: #52687b;
    --liquid-cyan: #37c8db;
    --liquid-mint: #2ec487;
    --liquid-surface: rgba(255, 255, 255, 0.50);
    --liquid-surface-strong: rgba(255, 255, 255, 0.68);
    --liquid-edge: rgba(255, 255, 255, 0.76);
    --liquid-shadow: 0 18px 44px rgba(43, 77, 101, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body,
.app-shell-body {
    color: var(--liquid-ink) !important;
    background:
        radial-gradient(circle at 11% 7%, rgba(132, 236, 215, 0.72), transparent 25rem),
        radial-gradient(circle at 92% 12%, rgba(126, 205, 255, 0.68), transparent 28rem),
        radial-gradient(circle at 72% 88%, rgba(200, 174, 255, 0.48), transparent 27rem),
        linear-gradient(135deg, #dff8f3 0%, #e9f4ff 48%, #f4edff 100%) !important;
    background-attachment: fixed !important;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: 0;
    border-radius: 999px;
    filter: blur(2px);
    pointer-events: none;
}

body::before {
    width: 26vw;
    height: 26vw;
    right: -8vw;
    bottom: 4vh;
    background: rgba(131, 227, 246, 0.30);
}

body::after {
    width: 18vw;
    height: 18vw;
    left: 20vw;
    bottom: -9vw;
    background: rgba(143, 243, 196, 0.25);
}

.app-shell-body header.app-topbar {
    background: rgba(255, 255, 255, 0.48) !important;
    border-bottom: 1px solid var(--liquid-edge) !important;
    box-shadow: 0 10px 32px rgba(37, 83, 101, 0.10), inset 0 -1px rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(24px) saturate(155%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(155%) !important;
}

.app-shell-body header.app-topbar:hover { background: rgba(255, 255, 255, 0.58) !important; }

.app-sidebar {
    background: linear-gradient(165deg, rgba(15, 64, 68, 0.88), rgba(17, 80, 92, 0.72)) !important;
    border-right: 1px solid rgba(221, 255, 250, 0.32) !important;
    box-shadow: 12px 0 38px rgba(22, 74, 82, 0.18), inset -1px 0 rgba(255, 255, 255, 0.10) !important;
    backdrop-filter: blur(28px) saturate(135%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(135%) !important;
}

.app-sidebar::before {
    background: radial-gradient(circle at 15% 6%, rgba(174, 255, 242, 0.30), transparent 26%), linear-gradient(145deg, rgba(255,255,255,0.10), transparent 48%) !important;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(231, 255, 251, 0.16) !important;
    border-color: rgba(220, 255, 249, 0.34) !important;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.19), 0 8px 18px rgba(3, 39, 46, 0.15) !important;
}

.topbar-search,
.notifications-panel,
.notification-toast {
    background: rgba(255, 255, 255, 0.56) !important;
    border-color: var(--liquid-edge) !important;
    box-shadow: var(--liquid-shadow) !important;
    backdrop-filter: blur(20px) saturate(145%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(145%) !important;
}

.topbar-search input,
.topbar-user,
.menu-button,
.notification-button { color: var(--liquid-ink) !important; }

.dashboard-heading h1,
.dashboard-heading p { color: var(--liquid-ink) !important; }

.dashboard-heading p { color: var(--liquid-muted) !important; }

.dashboard-page .dashboard-panel,
.dashboard-page .stat-card,
.dashboard-page .panel-title,
.dashboard-page .reminder-row,
.dashboard-page .appointment-row,
.dashboard-page .chart-card,
.dashboard-page .service-table-panel,
.dashboard-page .panel-list,
.dashboard-page .notification-center-item,
.dashboard-page .filters-card,
.dashboard-page .table-section,
.dashboard-page .analysis-filter-card,
.dashboard-page .warning-panel,
.dashboard-page article,
.dashboard-page section,
.app-shell-body .form-card,
.app-shell-body .table-section,
.app-shell-body .filters-card,
.app-shell-body .modal-card,
.app-shell-body .section-card,
.app-shell-body .notification-center-header,
.app-shell-body .notification-center-controls,
.app-shell-body .notification-center-item,
.app-shell-body .analysis-filter-card,
.app-shell-body .warning-panel {
    background: var(--liquid-surface) !important;
    color: var(--liquid-ink) !important;
    border-color: var(--liquid-edge) !important;
    box-shadow: var(--liquid-shadow) !important;
    backdrop-filter: blur(22px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
}

.dashboard-page .panel-title h2,
.dashboard-page strong,
.dashboard-page .stat-card strong,
.dashboard-page .stat-card span,
.dashboard-page .reminder-row strong,
.dashboard-page .appointment-row strong,
.dashboard-page td,
.dashboard-page th,
.dashboard-page .empty-state,
.dashboard-page .appointment-row span,
.dashboard-page .reminder-row span,
.dashboard-page .dashboard-date,
.dashboard-page .month-bar strong,
.dashboard-page .month-bar small,
.dashboard-page .chart-legend div,
.dashboard-page .dashboard-type-filters label,
.dashboard-page .dashboard-date-filters label { color: var(--liquid-ink) !important; }

.dashboard-page .reminder-row span,
.dashboard-page .appointment-row span,
.stat-card small,
.dashboard-page .month-bar small { color: var(--liquid-muted) !important; }

.dashboard-page table,
.dashboard-page th,
.dashboard-page td,
.dashboard-page .table-section th,
.dashboard-page .table-section td,
.dashboard-page .analysis-table th,
.dashboard-page .analysis-table td,
.dashboard-page .role-permissions-table th,
.dashboard-page .role-permissions-table td,
.dashboard-page .daily-input-table th,
.dashboard-page .daily-input-table td {
    background: rgba(255, 255, 255, 0.30) !important;
    color: var(--liquid-ink) !important;
}

.dashboard-date,
.stat-icon {
    background: rgba(255, 255, 255, 0.44) !important;
    border-color: rgba(255, 255, 255, 0.74) !important;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.85), 0 8px 18px rgba(42, 95, 112, 0.10) !important;
}

input,
select,
textarea,
.btn.secondary,
.secondary-button,
.btn-secondary,
.filter-pill {
    background: rgba(255, 255, 255, 0.48) !important;
    color: var(--liquid-ink) !important;
    border-color: rgba(255, 255, 255, 0.80) !important;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.88) !important;
}

input:focus,
select:focus,
textarea:focus {
    background: rgba(255, 255, 255, 0.72) !important;
    border-color: rgba(55, 200, 219, 0.65) !important;
    box-shadow: 0 0 0 4px rgba(55, 200, 219, 0.16), inset 0 1px rgba(255, 255, 255, 0.88) !important;
}

button,
.btn,
.primary-button {
    background: linear-gradient(135deg, rgba(45, 193, 151, 0.94), rgba(47, 179, 213, 0.90)) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.50) !important;
    box-shadow: 0 10px 20px rgba(28, 143, 149, 0.20), inset 0 1px rgba(255, 255, 255, 0.38) !important;
}

.dashboard-page .panel-title a,
.dashboard-page .panel-title span,
.dashboard-page .panel-footer-link,
.dashboard-page .outline-action,
.dashboard-page .icon-action { color: #087c84 !important; }

.dashboard-appointment-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 18px;
}

.dashboard-appointment-tabs .appointment-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.18);
    color: var(--liquid-ink, #0f172a);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: inset 0 1px rgba(255,255,255,0.4), 0 8px 20px rgba(15, 23, 42, 0.05);
}

.dashboard-appointment-tabs .appointment-tab span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.12);
    color: var(--liquid-ink, #0f172a);
    font-size: 10px;
}

.dashboard-appointment-tabs .appointment-tab.active {
    background: rgba(15, 118, 110, 0.16);
    border-color: rgba(15, 118, 110, 0.28);
}

@media (max-width: 760px) {
    .dashboard-appointment-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .dashboard-appointment-tabs .appointment-tab {
        white-space: nowrap;
    }
}

.donut-chart::after,
.dashboard-page .donut-chart::after { background: rgba(244, 253, 253, 0.78) !important; }

.login-container {
    position: relative;
    max-width: 440px;
    margin: min(16vh, 130px) auto;
    padding: 34px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 28px;
    box-shadow: var(--liquid-shadow);
    backdrop-filter: blur(26px) saturate(150%);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
}

.login-container h1,
.login-container label,
.login-container small,
.login-container a { color: var(--liquid-ink) !important; }

@media (max-width: 760px) {
    body::before { width: 70vw; height: 70vw; }
    .app-shell-body main { padding: 92px 16px 24px !important; }
    .login-container { margin: 9vh 16px; padding: 26px; }
}

.fuel-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.fuel-ranking-list {
    display: grid;
    gap: 10px;
}

.fuel-ranking-row {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    padding: 12px 14px;
}

.fuel-ranking-row span {
    color: #0f766e;
    font-weight: 700;
}

.fuel-monthly-bars {
    margin-top: 10px;
}

.fuel-dashboard {
    display: grid;
    gap: 18px;
}

.fuel-dashboard-header {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
}

.fuel-title {
    align-items: center;
    display: flex;
    gap: 14px;
}

.fuel-title > span {
    color: #0f172a;
    font-size: 30px;
}

.fuel-title h1 {
    margin: 0;
    font-size: 30px;
}

.fuel-title p {
    margin: 6px 0 0;
    color: #475569;
}

.fuel-dashboard-filters,
.fuel-import-form {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.fuel-dashboard-filters label,
.fuel-import-form label {
    display: grid;
    gap: 8px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
}

.fuel-dashboard-filters select,
.fuel-dashboard-filters input,
.fuel-import-form input {
    min-height: 42px;
    min-width: 170px;
    border: 1px solid #d8dee9;
    border-radius: 8px;
    background: #fff;
}

.fuel-date-range {
    display: flex;
    gap: 8px;
}

.fuel-dashboard-filters button {
    width: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 8px;
}

.fuel-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 10px;
}

.fuel-kpi,
.fuel-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.fuel-kpi {
    align-items: center;
    display: flex;
    gap: 14px;
    min-height: 118px;
    padding: 16px;
    min-width: 0;
    overflow: hidden;
}

.fuel-kpi > span {
    width: 58px;
    height: 58px;
    border-radius: 999px;
    color: #fff;
    display: grid;
    font-size: 24px;
    font-weight: 900;
    place-items: center;
}

.fuel-kpi-blue > span { background: #1f76d2; }
.fuel-kpi-green > span { background: #2fa45a; }
.fuel-kpi-purple > span { background: #8750c8; }
.fuel-kpi-orange > span { background: #f97316; }
.fuel-kpi-teal > span { background: #0ea5a8; }
.fuel-kpi-yellow > span { background: #f6b719; }

.fuel-kpi small,
.fuel-kpi em {
    color: #475569;
    display: block;
    font-style: normal;
}

.fuel-kpi small {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.fuel-kpi strong {
    display: block;
    margin: 8px 0;
    color: #0f172a;
    font-size: clamp(22px, 1.6vw, 28px);
    line-height: 1;
    overflow-wrap: anywhere;
}

.fuel-chart-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.fuel-panel {
    padding: 18px;
}

.fuel-panel h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.fuel-legend {
    margin: 0 0 10px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.fuel-legend::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 4px;
    margin-right: 8px;
    border-radius: 999px;
    vertical-align: middle;
}

.fuel-blue::before { background: #1f76d2; }
.fuel-green::before { background: #229954; }
.fuel-purple::before { background: #7e4cc2; }

.fuel-line-chart {
    width: 100%;
    min-height: 170px;
    background: repeating-linear-gradient(to bottom, transparent 0 34px, #e5e7eb 35px 36px);
}

.fuel-line-chart polyline {
    fill: none;
    stroke: #1f76d2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.fuel-line-chart.green polyline { stroke: #229954; }
.fuel-line-chart.purple polyline { stroke: #7e4cc2; }

.fuel-vehicle-consumption {
    display: grid;
    gap: 12px;
}

.fuel-vehicle-row {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(170px, 0.9fr) minmax(180px, 1.4fr) 120px 140px;
    gap: 14px;
}

.fuel-vehicle-row strong,
.fuel-vehicle-row span {
    display: block;
}

.fuel-vehicle-row strong {
    color: #0f172a;
}

.fuel-vehicle-row span {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.fuel-vehicle-track {
    height: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: #e0f2fe;
}

.fuel-vehicle-track em {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: linear-gradient(90deg, #1f76d2, #22c55e);
}

.fuel-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.95fr);
    gap: 12px;
    align-items: start;
}

.fuel-side-stack {
    display: grid;
    gap: 12px;
}

.fuel-ranking-table {
    min-width: 820px;
}

.fuel-ranking-panel {
    min-width: 0;
    overflow-x: auto;
}

.fuel-ranking-table th,
.fuel-ranking-table td {
    padding: 10px 8px;
    white-space: nowrap;
}

.fuel-rank-number {
    background: #dcfce7;
    border-radius: 6px;
    color: #15803d;
    display: inline-grid;
    font-weight: 900;
    height: 28px;
    place-items: center;
    width: 28px;
}

.fuel-center-button {
    display: flex;
    justify-content: center;
    width: min(240px, 100%);
    margin: 18px auto 0;
    padding: 12px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 800;
    text-decoration: none;
}

.fuel-product-chart {
    align-items: center;
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 20px;
}

.fuel-donut {
    width: 150px;
    height: 150px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    position: relative;
}

.fuel-donut::after {
    content: "";
    position: absolute;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: #fff;
}

.fuel-donut strong,
.fuel-donut span {
    position: relative;
    z-index: 1;
    grid-column: 1;
    grid-row: 1;
}

.fuel-donut strong {
    margin-top: -12px;
    color: #0f172a;
    font-size: 20px;
}

.fuel-donut span {
    margin-top: 34px;
    color: #475569;
    font-size: 12px;
}

.fuel-product-legend {
    display: grid;
    gap: 12px;
}

.fuel-product-legend div {
    align-items: center;
    display: grid;
    grid-template-columns: 12px minmax(80px, 1fr) auto;
    gap: 8px;
    min-width: 0;
}

.fuel-product-legend strong {
    white-space: nowrap;
}

.fuel-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
}

.fuel-dot.blue { background: #1f76d2; }
.fuel-dot.purple { background: #7e4cc2; }

.fuel-station-bars {
    display: grid;
    gap: 12px;
}

.fuel-station-row {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 1fr) 82px;
    gap: 10px;
    font-size: 13px;
}

.fuel-station-row div {
    height: 20px;
    background: #eff6ff;
}

.fuel-station-row em {
    display: block;
    height: 100%;
    background: #1f76d2;
}

.fuel-month-bars {
    align-items: end;
    display: grid;
    grid-template-columns: repeat(var(--month-count, 6), minmax(56px, 1fr));
    gap: 14px;
    min-height: 190px;
}

.fuel-month-bar {
    display: grid;
    gap: 8px;
    text-align: center;
}

.fuel-month-bar div {
    align-items: end;
    display: flex;
    justify-content: center;
    height: 120px;
}

.fuel-month-bar span {
    width: 28px;
    min-height: 6px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, #60a5fa, #1f76d2);
}

.fuel-month-bar strong,
.fuel-month-bar small {
    color: #475569;
    font-size: 12px;
}

.fuel-import-panel {
    scroll-margin-top: 90px;
}

@media (max-width: 760px) {
    .fuel-ranking-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}

/* Executive fuel dashboard: scoped to this module so other pages keep their styling. */
.fuel-dashboard-analysis {
    --fuel-forest: #14532d;
    --fuel-mint: #f0fdf4;
    --fuel-border: #d7e8dc;
    gap: 14px;
}
.fuel-dashboard-analysis .fuel-dashboard-header { align-items: center; gap: 16px; flex-wrap: wrap; }
.fuel-dashboard-analysis .fuel-title { gap: 10px; }
.fuel-dashboard-analysis .fuel-title > span { display:grid; place-items:center; width:38px; height:38px; border-radius:11px; background:var(--fuel-mint); color:var(--fuel-forest); font-size:20px; }
.fuel-dashboard-analysis .fuel-title h1 { color:var(--fuel-forest); font-size:24px; }
.fuel-dashboard-analysis .fuel-title p { margin-top:3px; font-size:13px; }
.fuel-dashboard-analysis .fuel-dashboard-filters { gap:8px; }
.fuel-dashboard-analysis .fuel-dashboard-filters label { gap:4px; color:#475569; font-size:11px; }
.fuel-dashboard-analysis .fuel-dashboard-filters select,
.fuel-dashboard-analysis .fuel-dashboard-filters input { min-width:135px; min-height:36px; padding:6px 9px; border-color:var(--fuel-border); border-radius:8px; }
.fuel-dashboard-analysis .fuel-dashboard-filters button { min-height:36px; width:38px; }
.fuel-dashboard-analysis .fuel-kpi-grid { grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; }
.fuel-dashboard-analysis .fuel-kpi,
.fuel-dashboard-analysis .fuel-panel { border:1px solid var(--fuel-border); border-radius:11px; box-shadow:0 3px 12px rgba(20,83,45,.05); }
.fuel-dashboard-analysis .fuel-kpi { min-height:92px; padding:12px; gap:10px; }
.fuel-dashboard-analysis .fuel-kpi > span { flex:0 0 36px; width:36px; height:36px; background:var(--fuel-mint); color:var(--fuel-forest); font-size:16px; }
.fuel-dashboard-analysis .fuel-kpi small { font-size:10px; color:#64748b; }
.fuel-dashboard-analysis .fuel-kpi strong { margin:5px 0 3px; color:#163b2a; font-size:clamp(16px,1.25vw,22px); }
.fuel-dashboard-analysis .fuel-kpi em { font-size:11px; }
.fuel-dashboard-analysis .fuel-chart-grid { grid-template-columns:minmax(0,1.65fr) repeat(2,minmax(0,1fr)); gap:10px; }
.fuel-dashboard-analysis .fuel-panel { padding:14px; min-width:0; }
.fuel-dashboard-analysis .fuel-panel h2 { margin-bottom:10px; color:var(--fuel-forest); font-size:15px; }
.fuel-dashboard-analysis .fuel-line-chart { display:block; min-height:0; height:170px; background:repeating-linear-gradient(to bottom,transparent 0 41px,#e9f0eb 42px 43px); }
.fuel-dashboard-analysis .fuel-line-chart polyline { stroke:#15803d; stroke-width:2.5; }
.fuel-dashboard-analysis .fuel-line-chart.green polyline { stroke:#0f766e; }
.fuel-dashboard-analysis .fuel-line-chart.purple polyline { stroke:#64748b; }
.fuel-dashboard-analysis .fuel-blue::before { background:#15803d; }
.fuel-dashboard-analysis .fuel-green::before { background:#0f766e; }
.fuel-dashboard-analysis .fuel-purple::before { background:#64748b; }
.fuel-dashboard-analysis .fuel-empty-state { grid-column:1/-1; display:grid; gap:5px; place-content:center; min-height:150px; padding:18px; text-align:center; color:#475569; background:#f8fcf9; border:1px dashed var(--fuel-border); border-radius:11px; }
.fuel-dashboard-analysis .fuel-empty-state strong { color:var(--fuel-forest); }
.fuel-dashboard-analysis .fuel-vehicle-row { grid-template-columns:minmax(140px,.9fr) minmax(120px,1.4fr) 90px 110px; gap:10px; }
.fuel-dashboard-analysis .fuel-vehicle-track { height:10px; background:var(--fuel-mint); }
.fuel-dashboard-analysis .fuel-vehicle-track em { background:#4ade80; }
.fuel-dashboard-analysis .fuel-station-row div { border-radius:99px; background:var(--fuel-mint); overflow:hidden; }
.fuel-dashboard-analysis .fuel-station-row em { background:#4ade80; }
.fuel-dashboard-analysis .fuel-month-bar span { background:#4ade80; }
.fuel-dashboard-analysis .fuel-analysis-section { display:grid; gap:10px; }
.fuel-dashboard-analysis .fuel-analysis-heading h2 { margin:0; color:var(--fuel-forest); font-size:19px; }
.fuel-dashboard-analysis .fuel-analysis-heading p { margin:3px 0 0; color:#64748b; font-size:12px; }
.fuel-dashboard-analysis .fuel-analysis-vehicle-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; align-items:stretch; }
.fuel-dashboard-analysis .fuel-analysis-vehicle-grid .fuel-panel { padding:12px; }
.fuel-dashboard-analysis .fuel-analysis-vehicle-grid .fuel-panel h3 { margin:0 0 8px; color:var(--fuel-forest); font-size:14px; }
.fuel-dashboard-analysis .fuel-analysis-table-wrap { width:100%; overflow-x:auto; }
.fuel-dashboard-analysis .fuel-analysis-table { width:100%; min-width:360px; border-collapse:collapse; font-size:12px; }
.fuel-dashboard-analysis .fuel-analysis-table th,
.fuel-dashboard-analysis .fuel-analysis-table td { padding:7px 5px; border-bottom:1px solid #edf3ef; text-align:left; white-space:nowrap; }
.fuel-dashboard-analysis .fuel-analysis-table th { color:#64748b; font-size:10px; font-weight:800; text-transform:uppercase; }
.fuel-dashboard-analysis .fuel-analysis-table tbody tr:last-child td { border-bottom:0; }
.fuel-dashboard-analysis .fuel-analysis-table td.numeric,
.fuel-dashboard-analysis .fuel-analysis-table th.numeric { text-align:right; font-variant-numeric:tabular-nums; }
.fuel-dashboard-analysis .fuel-analysis-table td:nth-child(2) { color:#334155; font-weight:700; }
.fuel-dashboard-analysis .fuel-analysis-rank { display:inline-grid; width:21px; height:21px; place-items:center; border-radius:6px; background:var(--fuel-mint); color:var(--fuel-forest); font-size:10px; font-weight:800; }
.fuel-dashboard-analysis .fuel-analysis-empty { display:grid; align-content:center; justify-items:center; gap:4px; min-height:88px; padding:8px; text-align:center; }
.fuel-dashboard-analysis .fuel-analysis-empty > span { color:#6b9a7c; font-size:17px; }
.fuel-dashboard-analysis .fuel-analysis-empty strong { color:#334155; font-size:12px; }
.fuel-dashboard-analysis .fuel-analysis-empty small { color:#64748b; font-size:11px; }
.fuel-dashboard-analysis .fuel-rank-number { color:var(--fuel-forest); background:var(--fuel-mint); }
@media (max-width:1100px) {
    .fuel-dashboard-analysis .fuel-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .fuel-dashboard-analysis .fuel-chart-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .fuel-dashboard-analysis .fuel-chart-grid .fuel-panel:first-child { grid-column:1/-1; }
    .fuel-dashboard-analysis .fuel-analysis-vehicle-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
    .fuel-dashboard-analysis .fuel-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .fuel-dashboard-analysis .fuel-chart-grid { grid-template-columns:1fr; }
    .fuel-dashboard-analysis .fuel-analysis-vehicle-grid { grid-template-columns:1fr; }
    .fuel-dashboard-analysis .fuel-chart-grid .fuel-panel:first-child { grid-column:auto; }
    .fuel-dashboard-analysis .fuel-dashboard-filters { display:grid; grid-template-columns:1fr 1fr; width:100%; }
    .fuel-dashboard-analysis .fuel-dashboard-filters label:first-child { grid-column:1/-1; }
    .fuel-dashboard-analysis .fuel-date-range input { min-width:0; width:100%; }
    .fuel-dashboard-analysis .fuel-vehicle-row { grid-template-columns:1fr auto; }
    .fuel-dashboard-analysis .fuel-vehicle-track { grid-column:1/-1; grid-row:2; }
}
@media (max-width:420px) {
    .fuel-dashboard-analysis .fuel-kpi { align-items:flex-start; flex-direction:column; }
    .fuel-dashboard-analysis .fuel-kpi strong { overflow-wrap:anywhere; }
}
header {
    background: #90EE90;
    padding: 14px 24px;
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
header:hover {
    background: rgba(144, 238, 144, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(144, 238, 144, 0.3);
}
.navbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.navbar a {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}
.navbar a:hover {
    color: #FFFFFF;
    background: rgba(34, 139, 34, 0.8);
    backdrop-filter: blur(5px);
    transform: translateY(-2px);
}
main {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 16px;
}

.with-header main {
    padding-top: 80px;
}

.no-header main {
    padding-top: 24px;
}
h1, h2 {
    color: #228B22;
}
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}
article, .form-card, .table-section {
    background: #FFFFFF;
    border: 1px solid #F0FFF0;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(144, 238, 144, 0.1);
    padding: 20px;
    transition: all 0.3s ease;
}
article:hover, .form-card:hover, .table-section:hover {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(144, 238, 144, 0.2);
    border-color: #90EE90;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.section-header h2 {
    margin: 0;
}

.export-form {
    margin: 0;
}

.export-form button {
    width: auto;
    margin: 0;
    white-space: nowrap;
}

.analysis-section {
    overflow: hidden;
}

.analysis-section:hover {
    transform: none;
}

.analysis-section .section-header {
    align-items: flex-start;
    border-bottom: 1px solid #E5F6E5;
    padding-bottom: 14px;
}

.analysis-section .section-header h2 {
    line-height: 1.2;
}

.analysis-filter-card {
    background: #F8FFF8;
    border-color: #D7F5D7;
    padding: 12px 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.analysis-filter-card:hover {
    transform: none;
}

.analysis-filter-form {
    gap: 8px;
}

.analysis-filter-form .filter-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 14px;
    align-items: end;
}

.analysis-filter-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.analysis-filter-field-wide {
    grid-column: span 2;
}

.analysis-filter-form .analysis-filter-field input,
.analysis-filter-form .analysis-filter-field select {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 38px;
    padding: 8px 10px;
    font-size: 14px;
}

.analysis-filter-form label,
.analysis-filter-form .filter-label {
    font-size: 14px;
    line-height: 1.2;
}

.analysis-toggle-row {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.analysis-filter-form .checkbox-filter {
    background: #FFFFFF;
    border: 1px solid #D7F5D7;
    border-radius: 7px;
    min-height: 38px;
    padding: 0 10px;
    justify-content: flex-start;
}

.analysis-filter-form button,
.analysis-filter-form .btn-secondary {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 14px;
}

.analysis-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 2px;
}

.analysis-filter-actions button,
.analysis-filter-actions .btn-secondary {
    margin: 0;
    width: auto;
}

#daily_mto_type_filters {
    grid-template-columns: auto repeat(3, minmax(150px, 1fr));
    align-items: center;
}

.analysis-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #D7F5D7;
    border-radius: 8px;
    background: #FFFFFF;
}

.analysis-chart-panel {
    margin: 16px 0;
    padding: 18px;
    border: 1px solid #D7F5D7;
    border-radius: 8px;
    background: #FFFFFF;
}

.analysis-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.analysis-chart-header h3 {
    margin: 0;
    color: #111827;
    font-size: 18px;
}

.analysis-chart-header span {
    color: #15803D;
    font-weight: 800;
}

.analysis-pie-layout {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
}

.analysis-pie-chart {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
}

.analysis-pie-chart::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #FFFFFF;
}

.analysis-pie-chart strong,
.analysis-pie-chart span {
    position: relative;
    z-index: 1;
    grid-column: 1;
    grid-row: 1;
}

.analysis-pie-chart strong {
    margin-top: -12px;
    color: #111827;
    font-size: 28px;
}

.analysis-pie-chart span {
    margin-top: 36px;
    color: #6B7280;
    font-weight: 700;
}

.analysis-pie-legend {
    display: grid;
    gap: 10px;
}

.analysis-pie-legend div {
    display: grid;
    grid-template-columns: 14px minmax(140px, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    color: #374151;
}

.analysis-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.analysis-pie-legend strong {
    color: #111827;
}

.analysis-pie-legend em {
    min-width: 52px;
    color: #6B7280;
    font-style: normal;
    text-align: right;
}

.analysis-table {
    margin-top: 0;
    table-layout: auto;
    width: max-content;
    min-width: 100%;
}

.analysis-table-news {
    min-width: 1680px;
}

.analysis-table-appointments,
.analysis-table-maintenance {
    min-width: 1200px;
}

.analysis-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(10, 24, 36, 0.9);
    color: var(--text-strong);
    border-bottom: 1px solid rgba(197, 228, 255, 0.2);
    font-size: 13px;
    text-transform: uppercase;
}

.analysis-table th,
.analysis-table td {
    padding: 10px 12px;
    vertical-align: top;
    overflow-wrap: normal;
    word-break: normal;
}

.analysis-table td {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.35;
}

.analysis-table-news th:nth-child(10),
.analysis-table-news td:nth-child(10),
.analysis-table-news th:nth-child(12),
.analysis-table-news td:nth-child(12) {
    min-width: 280px;
}

.analysis-table-news th:nth-child(1),
.analysis-table-news th:nth-child(2),
.analysis-table-news td:nth-child(1),
.analysis-table-news td:nth-child(2) {
    min-width: 118px;
}

.analysis-table-news th:nth-child(3),
.analysis-table-news td:nth-child(3) {
    min-width: 92px;
}

.analysis-table-news th:nth-child(4),
.analysis-table-news td:nth-child(4) {
    min-width: 120px;
}

.analysis-table-news th:nth-child(5),
.analysis-table-news td:nth-child(5),
.analysis-table-news th:nth-child(6),
.analysis-table-news td:nth-child(6),
.analysis-table-news th:nth-child(7),
.analysis-table-news td:nth-child(7),
.analysis-table-news th:nth-child(8),
.analysis-table-news td:nth-child(8),
.analysis-table-news th:nth-child(11),
.analysis-table-news td:nth-child(11) {
    min-width: 110px;
}

@media (max-width: 720px) {
    .analysis-section .section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .export-form button {
        width: 100%;
    }

    .analysis-filter-form .filter-row {
        grid-template-columns: 1fr;
    }

    .analysis-filter-form .filter-row button,
    .analysis-filter-form .btn-secondary {
        width: 100%;
        margin-left: 0;
        text-align: center;
    }

    .analysis-summary {
        grid-template-columns: 1fr;
    }

    .analysis-pie-layout,
    .analysis-pie-legend div {
        grid-template-columns: 1fr;
    }

    .analysis-pie-chart {
        justify-self: center;
    }
}
label {
    display: block;
    margin: 12px 0 6px;
    font-weight: 600;
}
input, select, textarea, button {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #90EE90;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}
input:focus, select:focus, textarea:focus {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border-color: #32CD32;
    box-shadow: 0 0 10px rgba(50, 205, 50, 0.3);
    transform: scale(1.02);
}
.maintenance-hint {
    display: none;
    margin-top: 10px;
    padding: 10px 14px;
    background: #F0FFF0;
    border: 1px solid #90EE90;
    border-radius: 8px;
    color: #228B22;
    font-weight: 600;
    transition: all 0.3s ease;
}
.maintenance-hint:hover {
    background: rgba(240, 255, 240, 0.9);
    backdrop-filter: blur(5px);
    transform: scale(1.02);
    box-shadow: 0 5px 10px rgba(144, 238, 144, 0.2);
}
.clickable-field {
    cursor: pointer;
}
.clickable-field input {
    cursor: text;
}
button {
    margin-top: 16px;
    background: #32CD32;
    color: #ffffff;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}
button:hover {
    background: #228B22;
    backdrop-filter: blur(5px);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(50, 205, 50, 0.3);
}
.btn {
    display: inline-block;
    padding: 8px 16px;
    background: #32CD32;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn:hover {
    background: rgba(50, 205, 50, 0.8);
    backdrop-filter: blur(5px);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(50, 205, 50, 0.3);
}
.btn-small {
    padding: 4px 8px;
    font-size: 12px;
    margin-left: 8px;
}
.permission-mode {
    display: inline-block;
    margin-left: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #F0FFF0;
    color: #166534;
    font-size: 12px;
    font-weight: 700;
}
.permissions-panel {
    margin: 18px 0 4px;
    padding: 16px;
    border: 1px solid #D7F5D7;
    border-radius: 8px;
    background: #F8FFF8;
}
.permissions-panel legend {
    padding: 0 8px;
    color: #145214;
    font-size: 18px;
    font-weight: 800;
}
.permission-help,
.permission-mode-note {
    margin: 6px 0 12px;
    color: #4B5563;
    line-height: 1.4;
}
.permission-mode-note {
    color: #166534;
    font-weight: 700;
}
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}
.permission-section {
    min-width: 0;
}
.permission-section h3 {
    margin: 0 0 8px;
    color: #145214;
    font-size: 16px;
}
.permission-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: flex-start;
    margin: 8px 0;
    padding: 10px;
    border: 1px solid #D7F5D7;
    border-radius: 8px;
    background: #FFFFFF;
}
.permission-option input {
    width: auto;
    margin-top: 2px;
    transform: none;
}
.permission-option strong,
.permission-option small {
    display: block;
}
.permission-option strong {
    color: #111827;
}
.permission-option small {
    margin-top: 3px;
    color: #6B7280;
    line-height: 1.35;
}
.role-permissions-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #D7F5D7;
    border-radius: 8px;
    background: #FFFFFF;
}
.role-permissions-table {
    min-width: 760px;
    margin-top: 0;
}
.role-permissions-table th {
    background: rgba(10, 24, 36, 0.9);
    color: var(--text-strong);
}
.role-permissions-table th,
.role-permissions-table td {
    vertical-align: middle;
    color: var(--text-primary);
}
.role-permissions-table td:first-child {
    min-width: 320px;
}
.role-permissions-table td:first-child strong,
.role-permissions-table td:first-child span {
    display: block;
}
.role-permissions-table td:first-child span {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.35;
}
.permission-group-row th {
    background: #E5F6E5;
    color: #166534;
    font-size: 14px;
    text-transform: uppercase;
}
.role-permission-check {
    text-align: center;
}
.role-permission-check input {
    width: 20px;
    height: 20px;
    margin: 0;
    transform: none;
}
.role-permission-check input:disabled {
    cursor: not-allowed;
    accent-color: #16A34A;
}
.btn-workshop {
    background: #f59e0b;
    color: #ffffff;
}
.btn-workshop:hover {
    background: #d97706;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    color: var(--text-primary);
    background: rgba(9, 19, 30, 0.52);
}
th, td {
    padding: 12px;
    border-bottom: 1px solid rgba(197, 228, 255, 0.16);
    text-align: left;
    color: var(--text-primary);
    background: transparent;
    transition: all 0.3s ease;
}

th {
    color: var(--text-strong) !important;
    font-weight: 700;
}

td {
    color: var(--text-primary) !important;
}

.app-shell-body th,
.app-shell-body td,
.analysis-table th,
.analysis-table td,
.role-permissions-table th,
.role-permissions-table td,
.daily-input-table th,
.daily-input-table td,
.daily-history-table th,
.daily-history-table td,
.editable-plan-table th,
.editable-plan-table td,
.table-section th,
.table-section td {
    color: var(--text-primary) !important;
}

.app-shell-body th,
.analysis-table th,
.role-permissions-table th,
.daily-input-table th,
.daily-history-table th,
.editable-plan-table th,
.table-section th {
    background: rgba(13, 27, 39, 0.92) !important;
    color: var(--text-strong) !important;
}

table.maintenance-table {
    border-collapse: separate;
    border-spacing: 0;
}

table.maintenance-table tbody tr {
    border-bottom: 1px solid rgba(34, 139, 34, 0.12);
}

table.maintenance-table tbody tr:nth-child(odd) td {
    background: rgba(255, 255, 255, 0.03);
}

table.maintenance-table tbody tr:hover td {
    background: rgba(122, 216, 255, 0.08);
    transform: none;
}

.daily-table-wrapper {
    overflow-x: auto;
}

.system-add-form,
.excel-upload-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.system-add-form label {
    margin: 0;
}

.system-add-form input,
.excel-upload-form input {
    flex: 1;
    min-width: 240px;
    margin: 0;
}

.system-add-form button,
.excel-upload-form button {
    width: auto;
    margin: 0;
}

.daily-news-entry-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    padding: 14px;
    color: #0f172a;
}

.daily-news-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.daily-news-header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 156px;
    min-width: 156px;
    min-height: 34px;
    padding: 8px 12px;
    margin: 0;
    text-align: center;
}

.daily-news-modal-content {
    width: min(96vw, 1280px);
    max-width: none;
    margin: 5vh auto;
    text-align: left;
    box-sizing: border-box;
}

.daily-news-modal-content h2 {
    margin-top: 0;
}

.daily-news-modal-content .daily-news-entry-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 8px;
}

.daily-news-modal-content .daily-news-field,
.daily-news-modal-content .daily-news-actions {
    min-width: 0;
}

.daily-news-modal-content .daily-news-actions {
    gap: 8px;
}

.daily-news-modal-content .daily-news-actions button,
.daily-news-modal-content .daily-news-actions .btn {
    margin: 0;
}

.daily-news-edit-card {
    width: min(100%, 1500px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.daily-news-edit-card .daily-news-entry-form {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.daily-news-edit-card .daily-news-field,
.daily-news-edit-card .daily-news-actions {
    min-width: 0;
}

.daily-news-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.daily-news-field label {
    margin: 0;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

.daily-news-field input,
.daily-news-field select,
.daily-news-field textarea {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
    padding: 8px 10px;
    font-size: 14px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 8px;
}

.daily-news-field input,
.daily-news-field select {
    height: 38px;
}

.daily-news-field textarea {
    min-height: 84px;
    resize: vertical;
}

.daily-news-field-wide {
    grid-column: span 2;
}

.daily-news-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    grid-column: span 2;
}

.daily-news-actions button {
    width: auto;
    min-height: 38px;
    margin: 0;
    padding: 8px 16px;
}

.daily-input-table,
.daily-history-table {
    min-width: 1640px;
    color: #0f172a;
}

.daily-input-table th,
.daily-input-table td,
.daily-history-table th,
.daily-history-table td {
    vertical-align: top;
    color: #0f172a !important;
}

.daily-history-table thead th {
    background: rgba(15, 23, 42, 0.92) !important;
    color: #f8fafc !important;
}

.daily-history-table tbody td {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #0f172a !important;
}

.daily-input-table input,
.daily-input-table select,
.daily-input-table textarea {
    width: 100%;
    min-width: 120px;
    box-sizing: border-box;
    margin: 0;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.38);
}

.daily-input-table textarea {
    min-width: 190px;
    resize: vertical;
}

.daily-input-table button {
    width: auto;
    margin: 0;
}

.daily-history-table td {
    vertical-align: top;
    white-space: normal;
    color: #0f172a !important;
}

.table-section {
    background: rgba(255, 255, 255, 0.58) !important;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    color: #0f172a !important;
}

.table-section h2,
.table-section h1,
.section-header h2,
.section-header h1,
.table-section label,
.table-section th,
.table-section td,
.table-section p,
.table-section span,
.table-section a {
    color: #0f172a !important;
}

@media (max-width: 900px) {
    .daily-news-entry-form {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .daily-news-modal-content .daily-news-entry-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .daily-news-edit-card .daily-news-entry-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .daily-news-field-wide,
    .daily-news-actions {
        grid-column: span 2;
    }
}

@media (max-width: 620px) {
    .daily-news-entry-form {
        grid-template-columns: 1fr;
    }

    .daily-news-edit-card .daily-news-entry-form {
        grid-template-columns: 1fr;
    }

    .daily-news-field-wide,
    .daily-news-actions {
        grid-column: span 1;
    }

    .daily-news-actions button {
        width: 100%;
    }
}

.editable-plan-wrapper {
    overflow-x: auto;
    margin-top: 12px;
}

.editable-plan-table {
    min-width: 760px;
}

.editable-plan-table th:first-child,
.editable-plan-table td:first-child {
    width: 56px;
    text-align: center;
    font-weight: 700;
}

.editable-plan-table input {
    width: 100%;
    min-width: 120px;
    box-sizing: border-box;
    padding: 7px 8px;
    font-size: 13px;
}

tr:hover td {
    background: rgba(240, 255, 240, 0.5);
    backdrop-filter: blur(2px);
    transform: scale(1.01);
}
th {
    background: #F0FFF0;
    color: #228B22;
    font-weight: 600;
}
.flash-container {
    margin-bottom: 16px;
}
.flash {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
}
.flash.success {
    background: #d1fae5;
    color: #065f46;
}
.flash.warning {
    background: #fef3c7;
    color: #92400e;
}
.due {
    color: #b91c1c;
    font-weight: 700;
}
footer {
    text-align: center;
    padding: 18px 16px;
    color: #666666;
    background: #F0FFF0;
    transition: all 0.3s ease;
}

footer p {
    margin: 4px 0;
}

footer a {
    color: #228B22;
    font-weight: 700;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer:hover {
    background: rgba(240, 255, 240, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: 0 -5px 15px rgba(144, 238, 144, 0.2);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
#completeModal {
    position: absolute;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    overflow: visible;
    background-color: transparent;
}
#completeModal .modal-content {
    margin: 0;
    width: 320px;
    max-width: 90vw;
}
.modal.show {
    display: block;
}
.modal-content {
    background-color: rgba(255, 255, 255, 0.95);
    margin: 15% auto;
    padding: 20px;
    border: 2px solid #90EE90;
    width: 80%;
    max-width: 400px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(144, 238, 144, 0.3);
    transition: all 0.3s ease;
}

.appointment-modal-content {
    max-width: 520px;
    width: 90%;
    text-align: left;
}

.appointment-selection-modal {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.appointment-selection-modal.show {
    display: flex;
}

.appointment-selection-modal-content {
    position: relative;
    width: min(92vw, 440px);
    max-width: 440px;
    margin: 0;
    padding: 20px 18px 16px;
}

.appointment-selection-modal-content .close,
.appointment-selection-modal-content .close:hover,
.appointment-selection-modal-content .close:focus {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    float: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #475569;
    font-size: 24px;
    line-height: 1;
    box-shadow: none;
}

.appointment-selection-modal-content h2 {
    margin: 0 0 14px;
    font-size: 1.25rem;
}

.appointment-selection-modal-content .modal-body {
    gap: 10px;
}

.appointment-selection-modal-content .modal-actions {
    margin-top: 4px;
}

.appointment-selection-modal-content .modal-actions .btn {
    margin: 4px 0;
    padding: 9px 16px;
    min-width: 120px;
}

.appointment-details-modal-content {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.appointment-details-modal-content .readonly-field,
.appointment-details-modal-content input,
.appointment-details-modal-content textarea {
    min-height: 36px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.appointment-details-modal-content textarea {
    resize: vertical;
}

.appointment-details-modal-content label {
    font-size: 0.92rem;
}

.appointment-details-modal-content .modal-field,
.appointment-details-modal-content .appointment-field {
    gap: 5px;
}

.modal-body {
    display: grid;
    gap: 16px;
}

.modal-field,
.appointment-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-field[hidden],
.appointment-field[hidden] {
    display: none !important;
}

.readonly-field {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    background: #F8FAFC;
    color: #111827;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.pending-maintenance-section p {
    margin: 0;
    color: #111827;
    font-weight: 700;
    line-height: 1.35;
}

.pending-maintenance-detail {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #BBF7D0;
    border-radius: 10px;
    background: #F0FDF4;
    color: #166534;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.35;
}

.pending-maintenance-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.pending-maintenance-option {
    min-height: 48px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    background: #F8FAFC;
    color: #111827;
    font-weight: 800;
    cursor: pointer;
}

.pending-maintenance-option input {
    position: static;
    flex: 0 0 auto;
    min-width: 20px;
    max-width: 20px;
    width: 20px;
    min-height: 20px;
    max-height: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    accent-color: #16A34A;
}

.pending-maintenance-option span {
    flex: 0 0 auto;
    min-width: 24px;
    text-align: center;
    line-height: 1;
}

.pending-maintenance-option:has(input:checked) {
    border-color: #16A34A;
    background: #DCFCE7;
    color: #166534;
}

.field-error {
    margin: 8px 0 0;
    color: #DC2626;
    font-size: 0.9rem;
    font-weight: 800;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.modal-actions .btn {
    min-width: 140px;
}
.modal-content:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px rgba(144, 238, 144, 0.4);
}
.close {
    color: #666666;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close:hover,
.close:focus {
    color: #000000;
    text-decoration: none;
}
.modal button {
    margin: 10px 5px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
#confirmDelete {
    background: #dc2626;
    color: white;
}

/* Estilos para citas */
.filter-card {
    background: #F0FFF0;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #90EE90;
    transition: all 0.3s ease;
}
.filter-card:hover {
    background: rgba(240, 255, 240, 0.9);
    backdrop-filter: blur(8px);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(144, 238, 144, 0.2);
}

.filter-form {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.filter-form label,
.filter-row label {
    margin: 0;
    white-space: nowrap;
}

.filter-label {
    font-weight: 600;
    white-space: nowrap;
}

.filter-form input,
.filter-form select,
.filter-row input,
.filter-row select {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
    margin: 0;
}

.filter-form button,
.filter-row button {
    width: auto;
    margin: 0;
    white-space: nowrap;
}

.checkbox-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 41px;
}

.checkbox-filter input {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
}

.btn-secondary {
    background: #6b7280;
    display: inline-block;
    margin-left: 8px;
    color: #FFFFFF;
    border-radius: 8px;
    padding: 10px 12px;
    text-decoration: none;
    white-space: nowrap;
}

.analysis-filter-form {
    gap: 14px;
}

.analysis-filter-form .filter-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 14px;
    align-items: end;
}

.analysis-filter-form label,
.analysis-filter-form .filter-label {
    font-size: 14px;
    line-height: 1.2;
}

.analysis-filter-form input,
.analysis-filter-form select {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 38px;
    padding: 8px 10px;
    font-size: 14px;
}

.analysis-filter-form .checkbox-filter {
    min-height: 38px;
    padding: 0 10px;
    gap: 8px;
}

.analysis-filter-form .checkbox-filter input {
    width: auto;
    height: auto;
    padding: 0;
}

.analysis-filter-form button,
.analysis-filter-form .btn-secondary {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 14px;
}

.analysis-filter-form #daily_mto_type_filters {
    margin-top: 0;
    grid-template-columns: auto repeat(3, minmax(150px, 1fr));
}

@media (max-width: 720px) {
    .analysis-filter-form .filter-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .analysis-filter-field-wide {
        grid-column: span 1;
    }
}

.analysis-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.analysis-summary div {
    background: #F0FFF0;
    border: 1px solid #90EE90;
    border-radius: 8px;
    padding: 14px;
}

.analysis-summary strong {
    display: block;
    color: #228B22;
    font-size: 24px;
}

.analysis-summary span {
    color: #374151;
    font-weight: 600;
}

.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.appointment-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: #FFFFFF;
    border: 1px solid #E6F5E6;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 12px 24px rgba(34, 139, 34, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.metric-card strong {
    font-size: 28px;
    color: #174c24;
}

.metric-card span {
    color: #4b5563;
    font-weight: 600;
}

.metric-card-today {
    border-color: #4ade80;
}

.metric-card-pending {
    border-color: #fbbf24;
}

.metric-card-overdue {
    border-color: #f87171;
}

.metric-card-week {
    border-color: #60a5fa;
}

.appointment-group-card {
    background: #FFFFFF;
    border: 1px solid #E5F7E5;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 12px 30px rgba(34, 139, 34, 0.06);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.group-title {
    font-size: 18px;
    color: #166534;
    font-weight: 700;
}

.group-count {
    color: #4b5563;
    font-weight: 600;
}

.group-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.appointment-card {
    position: relative;
    background: #FCFFFC;
    border: 1px solid #E7F6E7;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 24px rgba(34, 139, 34, 0.08);
    transition: all 0.3s ease;
}

.appointment-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(34, 139, 34, 0.12);
}

.appointment-card.overdue {
    border-color: #fecaca;
    background: #fff1f1;
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.appointment-header h3 {
    margin: 0;
    color: #14532d;
    font-size: 16px;
    line-height: 1.3;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.overdue {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.appointment-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.meta-item strong {
    display: block;
    color: #166534;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.meta-item span {
    color: #4b5563;
    font-size: 14px;
}

.appointment-description {
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #d9f7d9;
    border-radius: 14px;
}

.appointment-description strong {
    display: block;
    margin-bottom: 8px;
    color: #166534;
    font-size: 13px;
}

.appointment-description p {
    margin: 0;
    color: #334155;
    line-height: 1.6;
}

.appointment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-edit,
.btn-complete {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
}

.btn-delete {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: white;
    border: none;
}

.btn-edit:hover,
.btn-complete:hover,
.btn-delete:hover {
    transform: translateY(-1px);
}

@media (max-width: 960px) {
    .appointment-metrics {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}

@media (max-width: 640px) {
    .appointment-metrics,
    .group-cards {
        grid-template-columns: 1fr;
    }
}

.scrollable-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scrollable-content {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 8px;
}

.scrollable-content::-webkit-scrollbar {
    width: 8px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: rgba(34, 139, 34, 0.4);
    border-radius: 8px;
}

.scrollable-content ul {
    margin: 0;
    padding-left: 1rem;
}

.scrollable-content p {
    margin: 0;
}

.workshop-inline {
    display: inline-block;
    margin-left: 8px;
    color: #666666;
    font-size: 0.9rem;
    font-weight: 600;
}

.appointment-card {
    position: relative;
    background: #FFFFFF;
    border: 2px solid #F0FFF0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(144, 238, 144, 0.1);
    transition: all 0.3s ease;
}

.appointment-card .complete-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #90EE90;
    border-radius: 12px;
    padding: 16px;
    width: 280px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.15);
    text-align: left;
}

.appointment-card .complete-modal h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1rem;
}

.appointment-card .complete-modal p {
    margin: 8px 0;
    font-size: 0.95rem;
}

.appointment-card .complete-modal .modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
}

.appointment-card:hover {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(144, 238, 144, 0.25);
    border-color: #90EE90;
}

.appointment-card.completed {
    background: #F0FFF0;
    border-color: #90EE90;
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid #F0FFF0;
    padding-bottom: 12px;
}

.appointment-header h3 {
    margin: 0;
    color: #228B22;
    font-size: 16px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.appointment-dates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 12px 0;
    padding: 12px 0;
}

.date-item {
    display: flex;
    flex-direction: column;
}

.date-item strong {
    color: #228B22;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.date-item span {
    color: #666666;
    font-size: 14px;
}

.date-item .rescheduled-date,
.appointment-workshop .rescheduled-date {
    display: block;
    color: #228B22;
    font-weight: 700;
    margin-top: 4px;
}

.appointment-description {
    margin: 12px 0;
    padding: 12px;
    background: #F0FFF0;
    border-left: 4px solid #32CD32;
    border-radius: 4px;
}

.appointment-description p {
    margin: 0;
    color: #333333;
    line-height: 1.5;
}

.login-container {
    max-width: 420px;
    margin: 32px auto;
    padding: 24px;
    background: #FFFFFF;
    border: 1px solid #d9f2df;
    border-radius: 16px;
    box-shadow: 0 18px 38px rgba(34, 139, 34, 0.12);
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-form .form-group {
    display: grid;
    gap: 8px;
}

.login-form label {
    margin: 0;
    font-weight: 700;
    color: #1f2937;
}

.login-form input {
    border: 1px solid #90EE90;
    background: #fff;
    color: #111827;
}

.login-form button {
    width: 100%;
    background: linear-gradient(180deg, #32CD32 0%, #22a722 100%);
    color: #fff;
    border: none;
}

.appointment-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.btn-edit,
.btn-complete {
    background: #32CD32;
    transition: all 0.3s ease;
}

.btn-edit:hover,
.btn-complete:hover {
    background: rgba(50, 205, 50, 0.8);
    backdrop-filter: blur(5px);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(50, 205, 50, 0.3);
}

.btn-delete {
    background: #dc2626;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: rgba(220, 38, 38, 0.8);
    backdrop-filter: blur(5px);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.3);
}

.inline-action-form {
    display: inline-block;
    margin: 0 0 0 6px;
}

.inline-action-form button {
    margin: 0;
}

.vehicle-actions-bar {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.vehicle-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 116px;
    min-width: 116px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.2;
    margin-top: 0;
    text-align: center;
    white-space: normal;
}

.vehicle-modal-content {
    max-width: 520px;
    text-align: left;
}

.vehicle-modal-content h2 {
    margin-top: 0;
}

.vehicle-modal-content form {
    display: grid;
    gap: 10px;
}

.vehicle-modal-content .modal-actions {
    margin-top: 8px;
    justify-content: flex-end;
}

.vehicle-modal-content .modal-actions button,
.vehicle-modal-content .modal-actions .btn {
    margin-top: 0;
}

#cancelDelete {
    background: #6b7280;
    color: white;
}

/* App shell and dashboard */
.app-shell-body {
    background: linear-gradient(180deg, #eef3f1 0%, #f5f7f6 100%) !important;
    color: #0f172a !important;
}

.app-shell-body header.app-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: auto;
    height: 76px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(90deg, #1ea66d 0%, #2ca974 100%);
    border: 1px solid rgba(255,255,255,0.15);
    border-top: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: 0 10px 20px rgba(27, 122, 83, 0.18);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 1100;
}

.app-shell-body header.app-topbar:hover {
    background: rgba(9, 19, 30, 0.58);
    box-shadow: 0 18px 38px rgba(3, 8, 14, 0.24);
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    padding: 20px 14px 12px;
    color: var(--text-strong);
    background: linear-gradient(180deg, #123b2d 0%, #0d2d24 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 0;
    border-top: 0;
    border-bottom: 0;
    border-radius: 0 28px 28px 0;
    box-shadow: 0 10px 30px rgba(9, 30, 21, 0.2);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: hidden;
}

.app-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 8%, rgba(122, 216, 255, 0.18), transparent 18%),
        linear-gradient(180deg, rgba(255,255,255,0.06), transparent 20%, rgba(0,0,0,0.10));
    pointer-events: none;
}

.sidebar-brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px 18px;
}

.brand-mark {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 16px;
    background: rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 10px 22px rgba(5, 12, 20, 0.22);
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-brand strong,
.sidebar-user strong {
    display: block;
    color: var(--text-strong);
    letter-spacing: 0.02em;
}

.sidebar-brand span,
.sidebar-user span {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 12px;
}

.sidebar-nav {
    position: relative;
    display: grid;
    gap: 6px;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 6px 10px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
    transition: background var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(138, 214, 255, 0.10);
    border-color: rgba(122, 216, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 26px rgba(8, 18, 24, 0.2);
    color: var(--text-strong);
    transform: translateX(2px);
}

.sidebar-nav a span {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    color: var(--text-secondary);
}

.sidebar-nav a span svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.sidebar-group {
    display: grid;
    gap: 6px;
}

.sidebar-group-toggle em {
    margin-left: auto;
    font-style: normal;
    color: var(--text-muted);
}

.sidebar-subnav {
    display: none;
    gap: 4px;
    padding: 4px 0 4px 42px;
}

.sidebar-group.open .sidebar-subnav {
    display: grid;
}

.sidebar-subnav a {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.sidebar-subnav a:hover,
.sidebar-subnav a.active-sub {
    background: rgba(122, 216, 255, 0.08);
    color: var(--text-strong);
}

.sidebar-user {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding: 14px 10px 4px;
    border-top: 1px solid rgba(255,255,255,0.09);
    background: linear-gradient(180deg, transparent, rgba(1, 9, 14, 0.12));
}

.user-avatar,
.topbar-user span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(122, 216, 255, 0.33), rgba(255,255,255,0.88));
    color: #0f2030;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(360px, 35vw);
    margin-left: auto;
    height: 42px;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: rgba(11, 22, 32, 0.36);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.topbar-search input {
    width: 100%;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: var(--text-strong);
    font-size: 14px;
}

.topbar-search input::placeholder {
    color: rgba(175, 199, 217, 0.92);
}

.topbar-search input:focus {
    outline: none;
    box-shadow: none;
}

input, select, textarea, .form-control, .form-select, .form-input {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(197, 228, 255, 0.24);
}

label,
th,
td,
strong,
span,
p,
li,
small {
    color: inherit;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.notifications-menu {
    position: relative;
}

.notification-button {
    position: relative;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(11, 22, 32, 0.32);
    color: var(--text-strong);
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.notification-button strong {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #7ad8ff, #48b7ff);
    color: #061b2d;
    font-size: 10px;
    font-weight: 800;
}

.notification-icon {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.notifications-panel {
    position: absolute;
    top: calc(100% + 16px);
    right: 0;
    width: min(390px, calc(100vw - 32px));
    padding: 8px;
    border-radius: 20px;
    background: rgba(9, 19, 30, 0.82);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
    box-shadow: var(--shadow-glass);
    z-index: 1300;
}

.notifications-list {
    display: grid;
    gap: 10px;
    max-height: min(430px, calc(100vh - 180px));
    overflow-y: auto;
}

.maintenance-notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(11, 22, 32, 0.44);
    border: 1px solid rgba(160, 210, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.notification-toast {
    border-left: 4px solid rgba(122, 216, 255, 0.75);
    pointer-events: auto;
}

.appointment-notification {
    border-left-color: rgba(141, 211, 255, 0.85);
}

.maintenance-notification-copy strong,
.maintenance-notification-copy span {
    display: block;
}

.maintenance-notification-copy strong {
    color: var(--text-strong);
    font-size: 13px;
}

.maintenance-notification-copy span {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 12px;
}

/* Keep the maintenance toast stack compact without changing the notification
   center cards or the existing dismiss/hide actions. */
.notification-toasts {
    position: fixed;
    top: 84px;
    right: 18px;
    z-index: 1200;
    display: grid;
    gap: 8px;
    width: min(430px, calc(100vw - 36px));
    max-height: min(300px, calc(100vh - 108px));
    overflow-y: auto;
    padding: 2px 6px 6px 2px;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

.notification-toasts .maintenance-notification {
    align-items: center;
    gap: 9px;
    min-height: 0;
    padding: 8px 10px;
    border-radius: 12px;
}

.notification-toasts .maintenance-notification-icon {
    display: grid;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.14);
    color: #a16207;
    font-size: 12px;
    font-weight: 800;
}

.notification-toasts .maintenance-notification-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.notification-toasts .maintenance-notification-copy strong {
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.35;
}

.notification-toasts .maintenance-notification-copy span {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.3;
}

.notification-toasts .notification-hide,
.notification-toasts .notification-dismiss {
    flex: 0 0 26px;
    width: 26px;
    min-width: 26px;
    height: 26px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.notification-toasts .notification-hide {
    background: rgba(22, 140, 153, 0.12) !important;
    color: #176b71 !important;
}

.notification-toasts .notification-dismiss {
    background: rgba(239, 68, 68, 0.10) !important;
    color: #b42318 !important;
}

.notification-toasts-hidden {
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
}

@media (max-width: 600px) {
    .notification-toasts {
        top: 72px;
        right: 10px;
        width: calc(100vw - 20px);
        max-height: min(240px, calc(100vh - 88px));
    }

    .notification-toasts .maintenance-notification {
        gap: 7px;
        padding: 7px 8px;
    }
}

.notification-button:hover,
.notification-button:focus-visible,
.topbar-user:hover {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 18px rgba(5, 12, 20, 0.18);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-strong);
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: background var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}

.topbar-user-copy {
    display: grid;
    gap: 2px;
}

.topbar-user-copy strong {
    font-size: 13px;
}

.topbar-user-copy small {
    color: var(--text-secondary);
    font-size: 11px;
}

.app-shell-body main {
    max-width: none;
    margin: 0;
    padding: 100px 28px 32px 28px;
}

.app-shell-body footer {
    margin-left: 0;
}

.app-shell-body.sidebar-collapsed .app-sidebar {
    transform: translateX(-104%) scale(0.985);
}

.app-shell-body.sidebar-collapsed main,
.app-shell-body.sidebar-collapsed footer {
    margin-left: 0;
}

.dashboard-page {
    display: grid;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 4px;
}

.dashboard-heading h1 {
    margin: 0 0 6px;
    color: #111827;
    font-size: clamp(2rem, 2.6vw, 2.7rem);
}

.dashboard-heading p {
    margin: 0;
    color: #475569;
}

.dashboard-page .dashboard-panel,
.dashboard-page .stat-card,
.dashboard-page .panel-title,
.dashboard-page .reminder-row,
.dashboard-page .appointment-row,
.dashboard-page .chart-card,
.dashboard-page .service-table-panel,
.dashboard-page .panel-list,
.dashboard-page .notification-center-item,
.dashboard-page .filters-card,
.dashboard-page .table-section,
.dashboard-page .analysis-filter-card,
.dashboard-page .warning-panel,
.dashboard-page article,
.dashboard-page section {
    background: var(--bg-panel) !important;
    color: var(--text-strong) !important;
    border-color: var(--glass-border) !important;
    box-shadow: var(--shadow-soft) !important;
}

.dashboard-page .panel-title h2,
.dashboard-page .panel-title a,
.dashboard-page .panel-title span,
.dashboard-page strong,
.dashboard-page .stat-card strong,
.dashboard-page .stat-card span,
.dashboard-page .reminder-row strong,
.dashboard-page .appointment-row strong,
.dashboard-page td,
.dashboard-page th,
.dashboard-page .empty-state,
.dashboard-page .status-pill,
.dashboard-page .appointment-row span,
.dashboard-page .reminder-row span,
.dashboard-page .dashboard-date,
.dashboard-page .notification-center-item,
.dashboard-page .table-section,
.dashboard-page .analysis-filter-card,
.dashboard-page .warning-panel,
.dashboard-page .panel-title summary,
.dashboard-page .chart-card .panel-title span,
.dashboard-page .chart-card .panel-title h2,
.dashboard-page .chart-card .panel-title summary,
.dashboard-page .month-bar strong,
.dashboard-page .month-bar small,
.dashboard-page .chart-legend div,
.dashboard-page .dashboard-type-filters label,
.dashboard-page .dashboard-date-filters label {
    color: var(--text-strong) !important;
}

.dashboard-page .chart-card,
.dashboard-page .dashboard-panel,
.dashboard-page .stat-card {
    background: var(--bg-panel) !important;
    border-color: var(--glass-border) !important;
}

.dashboard-page .bar-track span {
    background: linear-gradient(180deg, rgba(126, 219, 255, 1), rgba(92, 185, 255, 0.72)) !important;
}

.dashboard-page .donut-chart::after {
    background: rgba(8, 19, 29, 0.92) !important;
}

.dashboard-page .status-pill {
    background: rgba(148, 163, 184, 0.12) !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    color: #0f172a !important;
}

.dashboard-page .status-pill.danger {
    background: rgba(255, 125, 125, 0.12) !important;
    color: #b91c1c !important;
    border-color: rgba(255, 125, 125, 0.3) !important;
}

.dashboard-page .status-pill.warning {
    background: rgba(247, 213, 124, 0.12) !important;
    color: #a16207 !important;
    border-color: rgba(247, 213, 124, 0.28) !important;
}

.dashboard-page table,
.dashboard-page th,
.dashboard-page td,
.dashboard-page .table-section th,
.dashboard-page .table-section td,
.dashboard-page .analysis-table th,
.dashboard-page .analysis-table td,
.dashboard-page .role-permissions-table th,
.dashboard-page .role-permissions-table td,
.dashboard-page .daily-input-table th,
.dashboard-page .daily-input-table td {
    background: rgba(255,255,255,0.22) !important;
    color: #0f172a !important;
}

.dashboard-page .panel-title a,
.dashboard-page .panel-title span,
.dashboard-page .panel-footer-link,
.dashboard-page .outline-action,
.dashboard-page .icon-action {
    color: #0f766e !important;
}

.dashboard-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: rgba(11, 22, 32, 0.4);
    color: var(--text-strong);
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.dashboard-stats,
.dashboard-charts {
    display: grid;
    gap: 18px;
}

.dashboard-stats {
    grid-template-columns: repeat(4, minmax(200px, 1fr));
}

.dashboard-charts {
    grid-template-columns: 1.1fr 1.3fr 1fr;
}

.stat-card,
.dashboard-panel,
.notification-center-header,
.notification-center-controls,
.notification-center-item,
.notification-center-empty,
.analysis-filter-card,
.form-card,
.table-section,
.warning-panel,
section,
article,
.filters-card {
    background: rgba(11, 22, 32, 0.42);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(var(--blur-md));
    -webkit-backdrop-filter: blur(var(--blur-md));
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 18px;
    text-decoration: none;
}

.stat-card:hover,
.dashboard-panel:hover,
.notification-center-header:hover,
.analysis-filter-card:hover,
.form-card:hover,
.table-section:hover,
.warning-panel:hover {
    transform: translateY(-1px);
    border-color: var(--glass-border-strong);
    box-shadow: 0 18px 36px rgba(4, 12, 20, 0.27);
}

.stat-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(122, 216, 255, 0.18), rgba(255,255,255,0.1));
    border: 1px solid rgba(122, 216, 255, 0.28);
}

.stat-green .stat-icon { color: #8fe4c5; }
.stat-red .stat-icon { color: #ff9d9d; }
.stat-blue .stat-icon { color: #98d5ff; }
.stat-workshop .stat-icon { color: #a6efc8; }

.stat-card strong {
    display: block;
    color: var(--text-strong);
    font-size: clamp(1.8rem, 2vw, 2.3rem);
    line-height: 1;
}

.stat-card span,
.stat-card small,
.stat-card a {
    display: block;
    margin-top: 6px;
}

.stat-card span {
    color: var(--text-strong);
    font-weight: 700;
}

.stat-card small {
    color: var(--text-secondary);
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: 0.95fr 1fr;
    gap: 18px;
}

.dashboard-panel {
    overflow: hidden;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 60px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(154, 198, 228, 0.12);
}

.panel-title h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.05rem;
}

.panel-title a,
.panel-title span,
.panel-title summary,
.panel-footer-link {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.reminder-row,
.appointment-row {
    display: grid;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(154, 198, 228, 0.12);
}

.reminder-row {
    grid-template-columns: minmax(140px, 1fr) 92px minmax(110px, 0.8fr) auto auto;
}

.appointment-row {
    grid-template-columns: 28px minmax(180px, 1fr) 92px auto;
}

.reminder-row strong,
.appointment-row strong {
    display: block;
    color: var(--text-strong);
}

.reminder-row span,
.appointment-row span {
    color: var(--text-secondary);
    font-size: 13px;
}

.status-pill {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.status-pill.danger {
    background: rgba(255, 125, 125, 0.12);
    color: #ffacac;
    border: 1px solid rgba(255, 125, 125, 0.3);
}

.status-pill.warning {
    background: rgba(247, 213, 124, 0.12);
    color: #f8d880;
    border: 1px solid rgba(247, 213, 124, 0.3);
}

.outline-action,
.icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(122, 216, 255, 0.25);
    border-radius: 10px;
    color: var(--text-strong);
    background: rgba(122, 216, 255, 0.08);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.panel-footer-link {
    display: block;
    padding: 14px 18px 18px;
    text-align: center;
}

.empty-state {
    margin: 0;
    padding: 18px;
    color: var(--text-secondary);
}

.chart-card {
    min-height: 250px;
}

.maintenance-summary-chart,
.chart-legend {
    display: grid;
    gap: 18px;
}

.maintenance-summary-chart {
    grid-template-columns: 160px 1fr;
    padding: 20px 18px;
}

.donut-chart {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(#6ee7b7 0 var(--completed), #f7d57c var(--completed) calc(var(--completed) + var(--upcoming)), #ff7d7d calc(var(--completed) + var(--upcoming)) 100%);
    position: relative;
}

.donut-chart::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.donut-chart strong,
.donut-chart span {
    position: relative;
    z-index: 1;
    grid-column: 1;
    grid-row: 1;
}

.donut-chart strong {
    margin-top: -12px;
    color: #0f172a;
    font-size: 28px;
}

.donut-chart span {
    margin-top: 34px;
    color: #475569;
}

.chart-legend div {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    align-items: center;
    gap: 10px;
    color: #0f172a;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.legend-dot.green { background: #6ee7b7; }
.legend-dot.yellow { background: #f7d57c; }
.legend-dot.red { background: #ff7d7d; }

.monthly-bars {
    display: grid;
    grid-template-columns: repeat(var(--month-count, 6), minmax(54px, 1fr));
    align-items: end;
    gap: 16px;
    padding: 20px 18px 14px;
    min-height: 180px;
}

.month-bar {
    display: grid;
    justify-items: center;
    gap: 6px;
}

.bar-track {
    width: 100%;
    height: 118px;
    display: flex;
    align-items: end;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.bar-track span {
    width: 100%;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, rgba(126, 219, 255, 1), rgba(92, 185, 255, 0.72));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.month-bar strong,
.month-bar small {
    color: #0f172a;
}

.dashboard-type-filters label,
.dashboard-date-filters label {
    color: #0f172a;
}

input,
select,
textarea,
button {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(160, 210, 255, 0.18);
    background: rgba(13, 29, 40, 0.42);
    color: var(--text-strong);
    transition: border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base), transform var(--transition-base);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(122, 216, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(122, 216, 255, 0.12);
    background: rgba(16, 32, 44, 0.56);
}

button,
.btn,
.btn-secondary,
.primary-button,
.secondary-button,
.filter-pill,
.inline-mark-read {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(122, 216, 255, 0.25);
    background: linear-gradient(135deg, rgba(72, 183, 255, 0.28), rgba(122, 216, 255, 0.12));
    color: var(--text-strong);
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.btn.secondary,
.secondary-button,
.btn-secondary,
.filter-pill {
    background: rgba(13, 29, 40, 0.42);
    color: var(--text-strong);
}

.btn.danger {
    background: linear-gradient(135deg, rgba(255, 125, 125, 0.18), rgba(255, 125, 125, 0.08));
    border-color: rgba(255, 125, 125, 0.26);
    color: #ffc0c0;
}

.btn-small {
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
}

button:hover,
.btn:hover,
.btn-secondary:hover,
.primary-button:hover,
.secondary-button:hover,
.filter-pill:hover,
.inline-mark-read:hover {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 12px 22px rgba(7, 16, 24, 0.2);
}

@media (max-width: 1100px) {
    .dashboard-stats,
    .dashboard-main-grid,
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .dashboard-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-shell-body main {
        padding: 96px 16px 20px;
    }

    .topbar-search {
        order: 3;
        width: 100%;
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.app-shell-body .topbar-search input {
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.app-shell-body .topbar-search input:focus {
    border: 0;
    box-shadow: none;
}

/* Unified application pages */
.app-shell-body main > h1 {
    margin: 0 0 20px;
    color: #111827;
    font-size: 28px;
    letter-spacing: 0;
}

.app-shell-body h2 {
    color: #111827;
}

.app-shell-body .form-card,
.app-shell-body .table-section,
.app-shell-body article {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    padding: 20px;
    margin-bottom: 20px;
}

.app-shell-body .form-card:hover,
.app-shell-body .table-section:hover,
.app-shell-body article:hover {
    transform: none;
    background: #FFFFFF;
    border-color: #D1D5DB;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: none;
}

.app-shell-body .form-card h2,
.app-shell-body .table-section h2,
.app-shell-body article h2 {
    margin-top: 0;
    color: #111827;
    font-size: 18px;
}

.app-shell-body .section-header {
    min-height: 48px;
    align-items: center;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 14px;
}

.app-shell-body .section-header h2 {
    color: #111827;
    font-size: 18px;
}

.app-shell-body label {
    color: #374151;
    font-size: 14px;
    font-weight: 700;
}

.app-shell-body input,
.app-shell-body select,
.app-shell-body textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #D8DEE9;
    border-radius: 8px;
    background: #FFFFFF;
    color: #111827;
    font-size: 14px;
}

.app-shell-body input:focus,
.app-shell-body select:focus,
.app-shell-body textarea:focus {
    border-color: #22C55E;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
    transform: none;
    backdrop-filter: none;
}

.app-shell-body .form-card form {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 12px 16px;
}

.app-shell-body .form-card form label {
    margin: 6px 0 6px;
}

.app-shell-body .form-card form textarea,
.app-shell-body .form-card form button,
.app-shell-body .form-card form .maintenance-hint,
.app-shell-body .form-card form .input-group {
    grid-column: 1 / -1;
}

.app-shell-body .input-group label {
    margin-bottom: 6px;
}

.app-shell-body button,
.app-shell-body .btn {
    border-radius: 7px;
    background: #16A34A;
    color: #FFFFFF;
    border: 0;
    font-weight: 800;
    box-shadow: none;
}

.app-shell-body button:hover,
.app-shell-body .btn:hover {
    background: #15803D;
    transform: none;
    box-shadow: none;
    backdrop-filter: none;
}

.app-shell-body .btn.secondary,
.app-shell-body .btn-secondary {
    background: #F3F4F6;
    color: #374151;
    border: 1px solid #D1D5DB;
    border-radius: 7px;
    padding: 9px 12px;
    text-decoration: none;
    font-weight: 800;
}

.app-shell-body .btn.secondary:hover,
.app-shell-body .btn-secondary:hover {
    background: #E5E7EB;
}

.app-shell-body a.audit-link {
    display: inline-block;
    margin-left: 0.6rem;
    color: #1D4ED8;
    font-weight: 700;
    text-decoration: none;
}

.app-shell-body a.audit-link:hover {
    text-decoration: underline;
}

.app-shell-body tr.highlight-row {
    background: #F8FAFC;
}

.app-shell-body .btn-small {
    min-height: 28px;
    padding: 5px 10px;
    margin-left: 0;
    line-height: 1.2;
}

.app-shell-body .btn-delete,
.app-shell-body button.danger,
.app-shell-body #confirmDelete {
    background: #DC2626;
    color: #FFFFFF;
}

.app-shell-body .btn-delete:hover,
.app-shell-body button.danger:hover,
.app-shell-body #confirmDelete:hover {
    background: #B91C1C;
}

.app-shell-body .filter-card {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: none;
}

.app-shell-body .filter-card:hover {
    transform: none;
    box-shadow: none;
    background: #F8FAFC;
    backdrop-filter: none;
}

.app-shell-body .filter-form {
    gap: 10px;
}

.app-shell-body .filter-row,
.app-shell-body .filter-form {
    align-items: center;
}

.app-shell-body .filter-form:not(.analysis-filter-form) {
    flex-direction: row;
    flex-wrap: wrap;
}

.app-shell-body .filter-form input,
.app-shell-body .filter-form select {
    max-width: 210px;
    min-width: 150px;
}

.app-shell-body .vehicle-history-filter {
    justify-content: flex-end;
}

.app-shell-body .vehicle-history-filter .filter-actions {
    display: inline-flex;
    gap: 8px;
}

.app-shell-body .vehicle-history-filter .filter-actions button,
.app-shell-body .vehicle-history-filter .filter-actions .btn {
    width: auto;
    min-width: 92px;
    margin: 0;
}

.app-shell-body .checkbox-filter {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 7px;
    padding: 0 10px;
}

.app-shell-body table {
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 12px;
    background: rgba(9, 19, 30, 0.6);
    color: var(--text-primary);
}

.app-shell-body th {
    background: rgba(13, 27, 39, 0.92);
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(197, 228, 255, 0.18);
}

.app-shell-body th,
.app-shell-body td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(197, 228, 255, 0.18);
    color: var(--text-primary);
    transition: none;
}

.app-shell-body tr:hover td,
.app-shell-body table.maintenance-table tbody tr:hover td {
    background: rgba(122, 216, 255, 0.08);
    transform: none;
    backdrop-filter: none;
}

.app-shell-body table.maintenance-table tbody tr:nth-child(odd) td {
    background: rgba(255, 255, 255, 0.025);
}

.app-shell-body table.maintenance-table tbody tr:nth-child(odd):hover td {
    background: rgba(122, 216, 255, 0.08);
}

.app-shell-body .appointments-list {
    display: grid;
    gap: 14px;
}

.app-shell-body .appointment-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.app-shell-body .appointment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.app-shell-body .appointment-header h3 {
    margin: 0;
    color: #111827;
}

.app-shell-body .appointment-dates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.app-shell-body .date-item,
.app-shell-body .appointment-description,
.app-shell-body .appointment-workshop {
    color: #374151;
}

.app-shell-body .date-item {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: 7px;
    padding: 10px;
}

.app-shell-body .status-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.app-shell-body .status-badge.completed {
    background: #DCFCE7;
    color: #15803D;
}

.app-shell-body .status-badge.pending {
    background: #FEF3C7;
    color: #B45309;
}

.app-shell-body .rescheduled-date {
    display: block;
    margin-top: 4px;
    color: #2563EB;
    font-size: 12px;
    font-weight: 700;
}

.app-shell-body .modal-content {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.app-shell-body .modal-content:hover {
    transform: none;
}

.app-shell-body .modal-content.daily-news-modal-content {
    width: calc(100vw - 96px);
    max-width: 1500px;
    min-width: min(1080px, calc(100vw - 96px));
    margin: 120px auto 32px;
}

.app-shell-body .daily-news-modal-content .daily-news-entry-form {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

@media (max-width: 900px) {
    .app-shell-body .modal-content.daily-news-modal-content {
        width: calc(100vw - 32px);
        min-width: 0;
        margin: 16px auto;
    }

    .app-shell-body .daily-news-modal-content .daily-news-entry-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .app-shell-body .daily-news-modal-content .daily-news-entry-form {
        grid-template-columns: 1fr;
    }
}

.app-shell-body .maintenance-hint {
    background: #F0FDF4;
    border-color: #BBF7D0;
    color: #166534;
}

.app-shell-body .search-container input {
    max-width: 360px;
}

.app-shell-body .inline-action-form button {
    margin: 0;
}

.app-shell-body .appointment-form-card .appointment-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 18px 16px;
}

.app-shell-body .appointment-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.app-shell-body .appointment-field-full,
.app-shell-body .appointment-form > button,
.app-shell-body .appointment-form .maintenance-hint {
    grid-column: 1 / -1;
}

    /* Appointment cards design override for appointments page */
    .app-shell-body .appointments-page .appointments-list {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .app-shell-body .appointments-page .appointment-group-card {
        background: #FFFFFF;
        border: 1px solid #E5F7E5;
        border-radius: 20px;
        padding: 20px;
        box-shadow: 0 12px 30px rgba(34, 139, 34, 0.06);
    }

    .app-shell-body .appointments-page .group-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        margin-bottom: 18px;
    }

    .app-shell-body .appointments-page .group-title {
        font-size: 18px;
        color: #166534;
        font-weight: 700;
    }

    .app-shell-body .appointments-page .group-count {
        color: #4b5563;
        font-weight: 600;
    }

    .app-shell-body .appointments-page .group-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
        justify-content: center;
        justify-items: center;
        gap: 18px;
    }

    .app-shell-body .appointments-page .appointment-group-card {
        max-width: 1180px;
        margin: 0 auto;
    }

    .app-shell-body .appointments-page .appointment-card {
        background: #FFFFFF;
        border: 1px solid #E7F6E7;
        border-left: 5px solid #22c55e;
        border-radius: 18px;
        padding: 18px;
        box-shadow: 0 14px 30px rgba(34, 139, 34, 0.08);
        transition: transform 0.25s ease, box-shadow 0.25s ease;
        display: flex;
        flex-direction: column;
        gap: 14px;
        width: 100%;
        max-width: 320px;
        min-height: auto;
    }

    .app-shell-body .appointments-page .appointment-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 22px 42px rgba(34, 139, 34, 0.14);
    }

    .app-shell-body .appointments-page .appointment-card.overdue {
        border-color: #f87171;
        background: #fff1f1;
    }

    .app-shell-body .appointments-page .appointment-card.completed {
        background: #f0fdf4;
        border-color: #a7f3d0;
    }

    .app-shell-body .appointments-page .appointment-card-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .app-shell-body .appointments-page .appointment-time {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 8px 10px;
        border-radius: 999px;
        border: 1px solid #d1fae5;
        background: #f0fdf4;
        color: #166534;
        font-size: 12px;
        font-weight: 700;
    }

    .app-shell-body .appointments-page .appointment-card-title h3 {
        margin: 0;
        color: #14532d;
        font-size: 17px;
        line-height: 1.2;
        font-weight: 700;
    }

    .app-shell-body .appointments-page .appointment-card-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
    }

    .app-shell-body .appointments-page .meta-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 7px 12px;
        border-radius: 999px;
        border: 1px solid #d1fae5;
        background: #f0fdf4;
        color: #14532d;
        font-size: 12px;
        font-weight: 700;
    }

    .app-shell-body .appointments-page .appointment-note {
        background: #F8FEF8;
        border: 1px solid #d9f7d9;
        border-radius: 14px;
        padding: 16px 18px;
        color: #334155;
        line-height: 1.6;
        min-height: 72px;
    }

    .app-shell-body .appointments-page .appointment-card-footer {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
    }

    .app-shell-body .appointments-page .appointment-card-footer .icon-button {
        width: 46px;
        height: 46px;
    }

    .app-shell-body .appointments-page .icon-button {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        border: 1px solid #d1fae5;
        background: #FFFFFF;
        color: #166534;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        cursor: pointer;
        text-decoration: none;
        transition: background 0.2s ease, transform 0.2s ease;
    }

    .app-shell-body .appointments-page .icon-button:hover {
        background: #ecfdf5;
        transform: translateY(-1px);
    }

    .app-shell-body .appointments-page .icon-action-form {
        display: inline-flex;
    }

    .app-shell-body .appointments-page .status-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 96px;
        padding: 8px 12px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 700;
    }

    .app-shell-body .appointments-page .status-badge.pending {
        background: #fef3c7;
        color: #92400e;
    }

    .app-shell-body .appointments-page .status-badge.overdue {
        background: #fee2e2;
        color: #991b1b;
    }

    .app-shell-body .appointments-page .status-badge.completed {
        background: #d1fae5;
        color: #065f46;
    }

    @media (max-width: 960px) {
        .app-shell-body .appointments-page .group-cards {
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        }
    }

    @media (max-width: 640px) {
        .app-shell-body .appointments-page .appointment-metrics,
        .app-shell-body .appointments-page .group-cards {
            grid-template-columns: 1fr;
        }
    }


.app-shell-body .appointment-form button {
    margin-top: 6px;
}

/* Reschedule appointment form */
.app-shell-body .reschedule-appointment-card {
    padding: 24px;
}

.app-shell-body .reschedule-current-summary {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #E5E7EB;
}

.app-shell-body .reschedule-current-summary h2,
.app-shell-body .reschedule-current-summary p {
    margin: 0;
}

.app-shell-body .form-card .reschedule-appointment-form {
    gap: 18px 20px;
}

.app-shell-body .form-card .reschedule-appointment-form .reschedule-field.input-group,
.app-shell-body .form-card .reschedule-appointment-form .reschedule-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    grid-column: auto;
}

.app-shell-body .form-card .reschedule-appointment-form .reschedule-field-full,
.app-shell-body .form-card .reschedule-appointment-form .reschedule-actions {
    grid-column: 1 / -1;
}

.app-shell-body .form-card .reschedule-appointment-form .reschedule-field label {
    margin: 0;
    line-height: 1.3;
}

.app-shell-body .form-card .reschedule-appointment-form .reschedule-field input {
    min-height: 52px;
}

.app-shell-body .form-card .reschedule-appointment-form .reschedule-field textarea {
    min-height: 92px;
}

.app-shell-body .reschedule-actions {
    display: grid;
    grid-template-columns: 1fr minmax(220px, 0.5fr);
    gap: 14px;
}

.app-shell-body .reschedule-actions button,
.app-shell-body .reschedule-actions .btn {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 18px;
    box-sizing: border-box;
}

@media (max-width: 760px) {
    .app-shell-body .form-card form {
        grid-template-columns: 1fr;
    }

    .app-shell-body .form-card .reschedule-appointment-form,
    .app-shell-body .reschedule-actions {
        grid-template-columns: 1fr;
    }

    .app-shell-body .form-card .reschedule-appointment-form .reschedule-field.input-group,
    .app-shell-body .form-card .reschedule-appointment-form .reschedule-field {
        grid-column: 1 / -1;
    }

    .app-shell-body .appointment-form-card .appointment-form {
        grid-template-columns: 1fr;
    }

    .app-shell-body .filter-form:not(.analysis-filter-form),
    .app-shell-body .filter-row {
        align-items: stretch;
        flex-direction: column;
    }

    .app-shell-body .filter-form input,
    .app-shell-body .filter-form select,
    .app-shell-body .filter-form button,
    .app-shell-body .filter-form .btn-secondary {
        max-width: none;
        width: 100%;
    }
}

/* Appointments dashboard redesign */
.app-shell-body .appointments-dashboard {
    --appointments-green: #16A34A;
    --appointments-green-dark: #15803D;
    --appointments-yellow: #F59E0B;
    --appointments-red: #EF4444;
    --appointments-blue: #3B82F6;
    --appointments-purple: #8B5CF6;
    --appointments-text: #111827;
    --appointments-muted: #6B7280;
    --appointments-border: #E5E7EB;
    --appointments-panel-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    display: grid;
    gap: 22px;
    max-width: 1760px;
    margin: 0 auto;
}

.app-shell-body .appointments-top-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: start;
}

.app-shell-body .appointments-dashboard .appointment-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 24px;
    margin: 0;
}

.app-shell-body .appointment-metric-card {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 118px;
    margin: 0;
    padding: 18px 22px;
    border: 1px solid var(--appointments-border);
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: var(--appointments-panel-shadow);
    box-sizing: border-box;
}

.app-shell-body .appointment-metric-card:hover {
    transform: none;
    border-color: #D1D5DB;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.09);
}

.app-shell-body .appointment-metric-card .metric-icon {
    flex: 0 0 auto;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 34px;
    font-weight: 800;
}

.app-shell-body .appointment-metric-card strong {
    display: block;
    color: var(--appointments-text);
    font-size: 38px;
    line-height: 0.95;
}

.app-shell-body .appointment-metric-card span {
    display: block;
    margin-top: 8px;
    color: var(--appointments-text);
    font-size: 18px;
    font-weight: 800;
}

.app-shell-body .appointment-metric-card small,
.app-shell-body .appointment-metric-card a {
    display: block;
    margin-top: 10px;
    color: var(--appointments-muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.app-shell-body .metric-card-today .metric-icon {
    background: #DCFCE7;
    color: var(--appointments-green);
}

.app-shell-body .metric-card-today a {
    color: var(--appointments-green);
}

.app-shell-body .metric-card-pending .metric-icon {
    background: #FEF3C7;
    color: var(--appointments-yellow);
}

.app-shell-body .metric-card-overdue .metric-icon {
    background: #FEE2E2;
    color: var(--appointments-red);
}

.app-shell-body .metric-card-week .metric-icon {
    background: #DBEAFE;
    color: var(--appointments-blue);
}

.app-shell-body .appointment-create-card {
    position: relative;
    z-index: 20;
    justify-self: end;
}

.app-shell-body .appointment-create-card[open] {
    grid-column: 1 / -1;
    justify-self: stretch;
}

.app-shell-body .appointment-create-card summary {
    min-width: 188px;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 22px;
    border-radius: 7px;
    background: linear-gradient(180deg, #22C55E, #16A34A);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.24);
}

.app-shell-body .appointment-create-card summary::-webkit-details-marker {
    display: none;
}

.app-shell-body .appointment-create-card summary span {
    font-size: 24px;
    line-height: 1;
}

.app-shell-body .appointment-create-panel {
    width: min(820px, 100%);
    margin-top: 14px;
    margin-left: auto;
    padding: 20px;
    border: 1px solid var(--appointments-border);
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.14);
}

.app-shell-body .appointment-create-panel h2 {
    margin: 0 0 16px;
    color: var(--appointments-text);
    font-size: 18px;
}

.app-shell-body .appointment-create-panel .appointment-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
}

.app-shell-body .appointment-create-panel .appointment-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-shell-body .appointment-create-panel .appointment-field-full,
.app-shell-body .appointment-create-panel .maintenance-hint,
.app-shell-body .appointment-create-panel .appointment-form button {
    grid-column: 1 / -1;
}

.app-shell-body .appointments-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.app-shell-body .appointment-view-tabs,
.app-shell-body .appointment-week-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-shell-body .appointment-view-tab,
.app-shell-body .week-nav-button,
.app-shell-body .week-range-button {
    min-height: 58px;
    margin: 0;
    border: 1px solid var(--appointments-border);
    border-radius: 8px;
    background: #FFFFFF;
    color: #374151;
    box-shadow: var(--appointments-panel-shadow);
    text-decoration: none;
    font-weight: 900;
}

.app-shell-body .appointment-view-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 28px;
    font-size: 18px;
}

.app-shell-body .appointment-view-tab.active {
    border-color: #22C55E;
    color: #16A34A;
    box-shadow: inset 0 0 0 1px #22C55E, var(--appointments-panel-shadow);
}

.app-shell-body .week-nav-button {
    width: 58px;
    display: grid;
    place-items: center;
    color: #1F2937;
}

.app-shell-body .week-nav-button.today {
    width: auto;
    padding: 0 20px;
    color: #2563EB;
}

.app-shell-body .week-range-button {
    min-width: min(660px, 44vw);
    padding: 0 30px;
    color: var(--appointments-text);
    text-align: left;
    font-size: 20px;
}

.app-shell-body .appointment-view-tab:hover,
.app-shell-body .week-nav-button:hover,
.app-shell-body .week-range-button:hover {
    background: #FFFFFF;
    border-color: #CBD5E1;
    color: var(--appointments-text);
}

.app-shell-body .appointments-filter-card {
    margin: 0;
    padding: 22px;
    border: 1px solid var(--appointments-border);
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: var(--appointments-panel-shadow);
}

.app-shell-body .appointments-filter-card:hover {
    background: #FFFFFF;
    border-color: var(--appointments-border);
    box-shadow: var(--appointments-panel-shadow);
}

.app-shell-body .appointments-dashboard .appointments-filter-form {
    display: grid;
    grid-template-columns: 1.05fr 1.05fr 1.1fr 1fr 1fr auto;
    gap: 22px;
    align-items: end;
}

.app-shell-body .appointment-filter-field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.app-shell-body .appointments-dashboard .appointment-filter-field input,
.app-shell-body .appointments-dashboard .appointment-filter-field select {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    color: var(--appointments-text);
    font-size: 16px;
}

.app-shell-body .appointments-filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-shell-body .appointments-filter-actions button,
.app-shell-body .appointments-filter-actions .btn-secondary {
    min-width: 126px;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 20px;
    border-radius: 7px;
    font-size: 17px;
    font-weight: 900;
}

.app-shell-body .appointments-filter-actions button {
    background: linear-gradient(180deg, #22C55E, #16A34A);
}

.app-shell-body .appointments-filter-actions .btn-secondary {
    background: #FFFFFF;
    color: #1F2937;
    border: 1px solid var(--appointments-border);
}

.app-shell-body .appointments-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 24px;
    align-items: start;
}

.app-shell-body .appointments-list-panel,
.app-shell-body .appointments-calendar-panel,
.app-shell-body .appointments-side-card {
    border: 1px solid var(--appointments-border);
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: var(--appointments-panel-shadow);
}

.app-shell-body .appointments-list-panel,
.app-shell-body .appointments-calendar-panel {
    overflow: hidden;
}

.app-shell-body .appointments-calendar-panel[hidden],
.app-shell-body .appointments-list-panel[hidden] {
    display: none;
}

.app-shell-body .appointments-calendar-header {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 24px;
    border-bottom: 1px solid var(--appointments-border);
}

.app-shell-body .appointments-calendar-header h2 {
    margin: 0;
    color: var(--appointments-text);
    font-size: 22px;
}

.app-shell-body .appointments-calendar-header span {
    color: var(--appointments-green);
    font-size: 24px;
}

.app-shell-body .appointments-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    padding: 24px;
}

.app-shell-body .appointments-calendar-weekday {
    color: #475569;
    text-align: center;
    font-size: 14px;
    font-weight: 900;
}

.app-shell-body .appointments-calendar-day {
    position: relative;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #FFFFFF;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: none;
}

.app-shell-body .appointments-calendar-day:disabled {
    cursor: default;
    opacity: 1;
}

.app-shell-body .appointments-calendar-day.outside-month {
    opacity: 0.36;
}

.app-shell-body .appointments-calendar-day.scheduled,
.app-shell-body .appointments-calendar-day.has-appointments {
    border-color: #22C55E;
    background: #DCFCE7;
    color: #166534;
}

.app-shell-body .appointments-calendar-day.today,
.app-shell-body .appointments-calendar-day.is-today {
    border-color: #FACC15;
    background: #FEF3C7;
    color: #92400E;
}

.app-shell-body .appointments-calendar-day.overdue,
.app-shell-body .appointments-calendar-day.has-overdue {
    border-color: #EF4444;
    background: #FEE2E2;
    color: #991B1B;
}

.app-shell-body .appointments-calendar-day.selected-day {
    outline: 3px solid #2563EB;
    outline-offset: 2px;
}

.app-shell-body .appointments-calendar-day.is-holiday {
    box-shadow: inset 0 -4px 0 #2563EB;
}

.app-shell-body .appointments-calendar-day.is-sunday {
    box-shadow: inset 0 -4px 0 #CBD5E1;
}

.app-shell-body .appointments-calendar-day.is-holiday.is-sunday {
    box-shadow: inset 0 -4px 0 #2563EB, inset 0 -8px 0 #CBD5E1;
}

.app-shell-body .appointments-calendar-day small {
    position: absolute;
    right: 8px;
    bottom: 6px;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(22, 101, 52, 0.12);
    font-size: 12px;
}

.app-shell-body .appointments-calendar-day-details {
    margin: 0 24px 24px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #F8FAFC;
    overflow: hidden;
}

.app-shell-body .appointments-calendar-day-details[hidden],
.app-shell-body .calendar-day-appointments[hidden] {
    display: none;
}

.app-shell-body .calendar-day-details-header {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    border-bottom: 1px solid #E2E8F0;
    background: #FFFFFF;
}

.app-shell-body .calendar-day-details-header h3 {
    margin: 0;
    color: #111827;
    font-size: 17px;
}

.app-shell-body .calendar-day-details-close {
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #475569;
    font-size: 26px;
    line-height: 1;
}

.app-shell-body .calendar-day-appointments {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.app-shell-body .calendar-day-appointment {
    margin: 0;
    padding: 14px;
    border: 1px solid #E2E8F0;
    border-left: 4px solid #22C55E;
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: none;
}

.app-shell-body .calendar-day-appointment.appointment-status-overdue {
    border-left-color: #EF4444;
}

.app-shell-body .calendar-day-appointment.appointment-status-confirmed {
    border-left-color: #22C55E;
}

.app-shell-body .calendar-day-appointment.appointment-status-pending {
    border-left-color: #FACC15;
}

.app-shell-body .calendar-day-appointment.appointment-status-rescheduled {
    border-left-color: #8B5CF6;
}

.app-shell-body .calendar-day-appointment div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.app-shell-body .calendar-day-appointment strong {
    color: #111827;
    font-size: 17px;
}

.app-shell-body .calendar-day-appointment span {
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

.app-shell-body .calendar-day-appointment p {
    margin: 6px 0 0;
    color: #334155;
    line-height: 1.35;
}

.app-shell-body .appointments-calendar-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    padding: 0 24px 24px;
}

.app-shell-body .appointments-calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #1F2937;
    font-weight: 800;
}

.app-shell-body .calendar-dot {
    width: 18px;
    height: 18px;
    border-radius: 999px;
}

.app-shell-body .calendar-dot.scheduled {
    background: #22C55E;
}

.app-shell-body .calendar-dot.today {
    background: #FACC15;
}

.app-shell-body .calendar-dot.overdue {
    background: #EF4444;
}

.app-shell-body .calendar-dot.holiday {
    background: #2563EB;
}

.app-shell-body .calendar-dot.sunday {
    background: #E5E7EB;
    border: 1px solid #CBD5E1;
}

.app-shell-body .appointments-panel-header,
.app-shell-body .side-card-header {
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
    border-bottom: 1px solid var(--appointments-border);
}

.app-shell-body .appointments-panel-header h2,
.app-shell-body .side-card-header h2,
.app-shell-body .appointments-side-card h2 {
    margin: 0;
    color: var(--appointments-text);
    font-size: 19px;
}

.app-shell-body .side-card-header span {
    color: var(--appointments-green);
    font-size: 24px;
}

.app-shell-body .appointments-dashboard .appointments-list {
    display: grid;
    gap: 0;
}

.app-shell-body .appointment-date-group {
    margin: 0;
    padding: 24px;
    border: 0;
    border-bottom: 1px solid var(--appointments-border);
    border-radius: 0;
    box-shadow: none;
}

.app-shell-body .appointment-date-group:last-child {
    border-bottom: 0;
}

.app-shell-body .appointment-date-group:hover {
    transform: none;
    border-color: var(--appointments-border);
    box-shadow: none;
}

.app-shell-body .appointments-dashboard .group-header,
.app-shell-body .group-heading,
.app-shell-body .group-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-shell-body .appointments-dashboard .group-header {
    justify-content: space-between;
    margin-bottom: 18px;
}

.app-shell-body .group-calendar-icon {
    color: #475569;
    font-size: 22px;
}

.app-shell-body .group-heading h3 {
    margin: 0;
    color: var(--appointments-text);
    font-size: 22px;
}

.app-shell-body .appointments-dashboard .group-count {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 13px;
    border-radius: 999px;
    background: #DCFCE7;
    color: #16A34A;
    font-size: 14px;
    font-weight: 900;
}

.app-shell-body .group-day-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 18px;
    border: 1px solid var(--appointments-border);
    border-radius: 7px;
    color: #1F2937;
    background: #FFFFFF;
    text-decoration: none;
    font-weight: 900;
}

.app-shell-body .group-collapse-button {
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #334155;
    font-size: 20px;
}

.app-shell-body .group-collapse-button:hover {
    background: #F8FAFC;
}

.app-shell-body .appointments-dashboard .group-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(230px, 1fr));
    gap: 24px;
    justify-content: stretch;
    justify-items: stretch;
}

.app-shell-body .appointments-dashboard .appointment-card {
    --appointment-accent: var(--appointments-green);
    min-height: 224px;
    max-width: none;
    width: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 18px 24px 16px;
    border: 1px solid var(--appointments-border);
    border-top: 4px solid var(--appointment-accent);
    border-left: 4px solid var(--appointment-accent);
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.app-shell-body .appointments-dashboard .appointment-card:hover {
    transform: translateY(-2px);
    border-color: #D1D5DB;
    border-top-color: var(--appointment-accent);
    border-left-color: var(--appointment-accent);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.09);
}

.app-shell-body .appointment-accent-green {
    --appointment-accent: var(--appointments-green);
}

.app-shell-body .appointment-accent-yellow {
    --appointment-accent: var(--appointments-yellow);
}

.app-shell-body .appointment-accent-blue {
    --appointment-accent: var(--appointments-blue);
}

.app-shell-body .appointment-accent-purple {
    --appointment-accent: var(--appointments-purple);
}

.app-shell-body .appointment-status-overdue {
    --appointment-accent: var(--appointments-red);
}

.app-shell-body .timeline-item.appointment-status-pending {
    --appointment-accent: var(--appointments-yellow);
}

.app-shell-body .appointment-status-confirmed {
    --appointment-accent: var(--appointments-green);
}

.app-shell-body .appointment-status-rescheduled {
    --appointment-accent: var(--appointments-purple);
}

.app-shell-body .timeline-item.appointment-status-completed {
    --appointment-accent: var(--appointments-blue);
}

.app-shell-body .appointments-dashboard .appointment-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-shell-body .appointment-time-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 0 9px;
    border: 1px solid var(--appointments-border);
    border-radius: 999px;
    background: #F8FAFC;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

.app-shell-body .appointments-dashboard .status-badge {
    min-width: auto;
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.app-shell-body .appointments-dashboard .status-badge.pending {
    background: #FEF3C7;
    color: #D97706;
}

.app-shell-body .appointments-dashboard .status-badge.confirmed {
    background: #DCFCE7;
    color: #16A34A;
}

.app-shell-body .appointments-dashboard .status-badge.overdue {
    background: #FEE2E2;
    color: #DC2626;
}

.app-shell-body .appointments-dashboard .status-badge.completed {
    background: #DBEAFE;
    color: #2563EB;
}

.app-shell-body .appointments-dashboard .status-badge.rescheduled {
    background: #F3E8FF;
    color: #7E22CE;
}

.app-shell-body .appointments-dashboard .appointment-card-title h3 {
    margin: 4px 0 0;
    color: var(--appointments-text);
    font-size: 21px;
    line-height: 1.2;
}

.app-shell-body .appointment-vehicle-plate {
    display: inline-block;
    margin-left: 5px;
    color: #64748B;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    vertical-align: baseline;
}

.app-shell-body .appointment-workshop-line {
    margin: 0;
    color: #475569;
    font-size: 15px;
    font-weight: 700;
}

.app-shell-body .appointments-dashboard .appointment-note {
    flex: 1;
    min-height: 44px;
    margin: 2px 0 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1F2937;
    font-size: 16px;
    line-height: 1.45;
}

.app-shell-body .appointment-request-meta {
    display: grid;
    gap: 5px;
    padding: 10px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 9px;
    background: #F8FAFC;
}

.app-shell-body .appointment-request-meta span,
.app-shell-body .appointment-response-button small {
    color: #64748B;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.app-shell-body .appointment-request-meta strong {
    color: #1F2937;
    font-size: 14px;
    font-weight: 900;
}

.app-shell-body .appointment-response-button {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 2px;
    padding: 10px 13px;
    border: 1px solid #BBF7D0 !important;
    border-radius: 9px;
    background: #F0FDF4 !important;
    color: #166534 !important;
    text-align: left;
    box-shadow: none;
}

.app-shell-body .appointment-response-button span {
    font-size: 14px;
    font-weight: 900;
}

.app-shell-body .appointment-response-button small {
    max-width: 48%;
    color: inherit;
    opacity: 0.78;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-shell-body .appointment-response-button.is-pending {
    border-color: #FDE68A !important;
    background: #FFFBEB !important;
    color: #92400E !important;
}

.app-shell-body .appointment-response-button.has-response {
    border-color: #BBF7D0 !important;
    background: #F0FDF4 !important;
    color: #166534 !important;
}

.app-shell-body .appointment-response-button:hover {
    border-color: #86EFAC !important;
    background: #ECFDF5 !important;
    color: #166534 !important;
    transform: none;
}

.app-shell-body .appointment-response-button.is-pending:hover {
    border-color: #FACC15 !important;
    background: #FEF3C7 !important;
    color: #92400E !important;
}

.app-shell-body .appointments-dashboard .appointment-card-footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 12px;
    margin-top: auto;
}

.app-shell-body .appointments-dashboard .icon-action-form {
    display: contents;
}

.app-shell-body .appointments-dashboard .icon-button {
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--appointments-border);
    border-radius: 8px;
    background: #FFFFFF;
    color: #334155;
    font-size: 26px;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
}

.app-shell-body .appointments-dashboard .icon-button:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

.app-shell-body .appointments-dashboard .complete-icon-button {
    background: #F0FDF4;
    color: #16A34A;
}

.app-shell-body .appointments-dashboard .pdf-icon-button {
    background: #EFF6FF;
    color: #2563EB;
    font-size: 14px;
    font-weight: 900;
}

.app-shell-body .appointments-dashboard .danger-icon-button {
    color: #DC2626;
}

.app-shell-body .workshop-response-modal-content {
    max-width: 640px;
}

.app-shell-body .workshop-response-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.app-shell-body .workshop-response-field {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #F8FAFC;
}

.app-shell-body .workshop-response-field-full {
    grid-column: 1 / -1;
}

.app-shell-body .workshop-response-field span {
    color: #64748B;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.app-shell-body .workshop-response-field strong {
    color: #111827;
    font-size: 16px;
}

.app-shell-body .workshop-response-value.has-response {
    color: #16A34A;
}

.app-shell-body .workshop-response-value.pending {
    color: #B45309;
}

.app-shell-body .workshop-response-pending-notice {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid #FDE68A;
    border-radius: 10px;
    background: #FFFBEB;
    color: #92400E;
    font-weight: 800;
}

.app-shell-body .workshop-response-register-section form {
    margin: 0;
}

.app-shell-body .workshop-response-register-section button {
    width: 100%;
    min-height: 48px;
    margin: 0;
    border-radius: 8px;
    background: linear-gradient(180deg, #22C55E, #16A34A);
    font-weight: 900;
}

.app-shell-body .manual-page {
    display: grid;
    gap: 22px;
}

.app-shell-body .manual-hero {
    padding: 28px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: var(--appointments-panel-shadow, 0 10px 24px rgba(15, 23, 42, 0.06));
}

.app-shell-body .manual-hero span {
    color: #16A34A;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-shell-body .manual-hero h1 {
    margin: 8px 0;
    color: #111827;
    font-size: 32px;
}

.app-shell-body .manual-hero p {
    max-width: 760px;
    margin: 0;
    color: #475569;
    line-height: 1.55;
}

.app-shell-body .manual-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.app-shell-body .manual-index {
    position: sticky;
    top: 90px;
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: var(--appointments-panel-shadow, 0 10px 24px rgba(15, 23, 42, 0.06));
}

.app-shell-body .manual-index a {
    padding: 10px 12px;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-weight: 800;
}

.app-shell-body .manual-index a:hover {
    background: #F0FDF4;
    color: #166534;
}

.app-shell-body .manual-content {
    display: grid;
    gap: 16px;
}

.app-shell-body .manual-section {
    margin: 0;
    padding: 22px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: var(--appointments-panel-shadow, 0 10px 24px rgba(15, 23, 42, 0.06));
    scroll-margin-top: 90px;
}

.app-shell-body .manual-section h2 {
    margin: 0 0 12px;
    color: #111827;
    font-size: 22px;
}

.app-shell-body .manual-section p {
    margin: 0 0 12px;
    color: #475569;
    line-height: 1.55;
}

.app-shell-body .manual-section ol {
    margin: 0;
    padding-left: 22px;
}

.app-shell-body .manual-section li {
    margin: 8px 0;
    color: #334155;
    line-height: 1.5;
}

.app-shell-body .maintenance-detail-page {
    display: grid;
    gap: 22px;
}

.app-shell-body .maintenance-detail-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: var(--appointments-panel-shadow, 0 10px 24px rgba(15, 23, 42, 0.06));
}

.app-shell-body .maintenance-detail-hero span {
    color: #16A34A;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-shell-body .maintenance-detail-hero h1 {
    margin: 6px 0;
    color: #111827;
    font-size: 30px;
}

.app-shell-body .maintenance-detail-hero p {
    margin: 0;
    color: #475569;
    font-weight: 800;
}

.app-shell-body .maintenance-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 16px;
}

.app-shell-body .maintenance-summary-card {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 18px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: var(--appointments-panel-shadow, 0 10px 24px rgba(15, 23, 42, 0.06));
}

.app-shell-body .maintenance-summary-card span {
    color: #64748B;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-shell-body .maintenance-summary-card strong {
    color: #111827;
    font-size: 20px;
}

.app-shell-body .maintenance-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.app-shell-body .historical-record-button { background: var(--accent); }
.app-shell-body .vehicle-record-page { display: grid; gap: 20px; }
.app-shell-body .vehicle-record-hero,
.app-shell-body .vehicle-record-panel,
.app-shell-body .vehicle-record-overview article,
.app-shell-body .vehicle-record-metrics article { border: 1px solid var(--glass-border); border-radius: 16px; background: var(--glass-bg); box-shadow: var(--shadow-glass); }
.app-shell-body .vehicle-record-hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 26px; }
.app-shell-body .vehicle-record-hero > div:first-child > span { color: var(--accent); font-size: 13px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.app-shell-body .vehicle-record-hero h1 { margin: 7px 0; color: var(--text-primary); }
.app-shell-body .vehicle-record-hero p { margin: 0; color: var(--text-secondary); font-weight: 700; }
.app-shell-body .vehicle-record-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.app-shell-body .vehicle-record-overview, .app-shell-body .vehicle-record-metrics { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; }
.app-shell-body .vehicle-record-overview article, .app-shell-body .vehicle-record-metrics article { display: grid; gap: 7px; padding: 17px; }
.app-shell-body .vehicle-record-overview span, .app-shell-body .vehicle-record-metrics span { color: var(--text-muted); font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.app-shell-body .vehicle-record-overview strong, .app-shell-body .vehicle-record-metrics strong { color: var(--text-primary); font-size: 19px; }
.app-shell-body .vehicle-record-panel { padding: 22px; }
.app-shell-body .vehicle-record-panel h2 { margin: 0 0 16px; color: var(--text-primary); font-size: 20px; }
.app-shell-body .vehicle-record-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 22px; }
.app-shell-body .vehicle-record-filters label { display: grid; gap: 6px; color: var(--text-secondary); font-size: 13px; font-weight: 800; }
.app-shell-body .vehicle-record-filters select { min-width: 170px; }
.app-shell-body .vehicle-record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.app-shell-body .record-row { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid rgba(83, 107, 122, .14); }
.app-shell-body .record-row:last-child { border-bottom: 0; padding-bottom: 0; }
.app-shell-body .record-row strong { color: var(--text-primary); }.app-shell-body .record-row span, .app-shell-body .record-row p { margin: 0; color: var(--text-secondary); font-size: 14px; }.app-shell-body .record-row a { color: var(--accent-strong); font-size: 13px; font-weight: 800; }
.app-shell-body .vehicle-record-empty { margin: 0; color: var(--text-secondary); }
.app-shell-body .vehicle-record-timeline { position: relative; display: grid; }.app-shell-body .vehicle-record-event { display: grid; grid-template-columns: 100px 28px 1fr; gap: 13px; padding: 14px 0; border-bottom: 1px solid rgba(83, 107, 122, .14); }.app-shell-body .vehicle-record-event time { color: var(--text-secondary); font-size: 13px; font-weight: 800; }.app-shell-body .vehicle-record-event i { font-style: normal; }.app-shell-body .vehicle-record-event strong { color: var(--text-primary); }.app-shell-body .vehicle-record-event p { margin: 7px 0; color: var(--text-secondary); }.app-shell-body .vehicle-record-event a { color: var(--accent-strong); font-size: 13px; font-weight: 800; }
.app-shell-body .record-badge { display: inline-block; margin-left: 8px; padding: 3px 7px; border-radius: 999px; background: rgba(22, 125, 150, .13); color: var(--accent-strong); font-size: 11px; font-weight: 900; }

@media (max-width: 900px) { .app-shell-body .vehicle-record-overview, .app-shell-body .vehicle-record-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }.app-shell-body .vehicle-record-grid { grid-template-columns: 1fr; }.app-shell-body .vehicle-record-hero { align-items: stretch; flex-direction: column; } }
@media (max-width: 560px) { .app-shell-body .vehicle-record-overview, .app-shell-body .vehicle-record-metrics { grid-template-columns: 1fr; }.app-shell-body .vehicle-record-nav .btn { width: 100%; }.app-shell-body .vehicle-record-event { grid-template-columns: 76px 22px 1fr; gap: 8px; }.app-shell-body .vehicle-record-panel, .app-shell-body .vehicle-record-hero { padding: 17px; } }

.app-shell-body .maintenance-complete-card,
.app-shell-body .maintenance-message-card {
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: var(--appointments-panel-shadow, 0 10px 24px rgba(15, 23, 42, 0.06));
    overflow: hidden;
}

.app-shell-body .maintenance-complete-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 18px;
    padding: 22px;
}

.app-shell-body .maintenance-form-field {
    display: grid;
    gap: 8px;
}

.app-shell-body .maintenance-form-field-full,
.app-shell-body .maintenance-form-actions {
    grid-column: 1 / -1;
}

.app-shell-body .maintenance-form-actions button {
    width: 100%;
    min-height: 52px;
    margin: 0;
}

.app-shell-body .maintenance-message-card {
    padding: 18px;
}

.app-shell-body .maintenance-message-card p,
.app-shell-body .maintenance-empty-state {
    margin: 0;
    color: #475569;
    font-weight: 800;
}

.app-shell-body .maintenance-history-section {
    margin: 0;
    overflow: hidden;
}

.app-shell-body .maintenance-history-table-wrap {
    overflow-x: auto;
}

.app-shell-body .maintenance-history-section table {
    margin: 0;
}

.app-shell-body .appointments-empty-state {
    margin: 0;
    padding: 24px;
    color: var(--appointments-muted);
}

.app-shell-body .appointments-side-panel {
    display: grid;
    gap: 16px;
}

.app-shell-body .appointments-side-card {
    overflow: hidden;
    padding-bottom: 18px;
}

.app-shell-body .appointments-side-card > h2 {
    padding: 22px 24px 10px;
}

.app-shell-body .today-timeline {
    position: relative;
    display: grid;
    gap: 0;
    padding: 8px 24px 10px;
}

.app-shell-body .today-timeline::before {
    content: "";
    position: absolute;
    top: 28px;
    bottom: 28px;
    left: 91px;
    width: 2px;
    background: #CBD5E1;
}

.app-shell-body .timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 52px 22px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 0;
}

.app-shell-body .timeline-item time {
    color: var(--appointments-text);
    font-weight: 900;
}

.app-shell-body .timeline-marker {
    position: relative;
    z-index: 1;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    border: 3px solid #FFFFFF;
    border-radius: 999px;
    background: var(--appointment-accent, var(--appointments-green));
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.app-shell-body .timeline-copy {
    padding-bottom: 18px;
    border-bottom: 1px solid #EEF2F7;
}

.app-shell-body .timeline-item:last-child .timeline-copy {
    border-bottom: 0;
}

.app-shell-body .timeline-copy strong,
.app-shell-body .timeline-copy span,
.app-shell-body .timeline-copy p {
    display: block;
}

.app-shell-body .timeline-copy strong {
    color: var(--appointments-text);
    font-size: 17px;
}

.app-shell-body .timeline-copy span {
    margin-top: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.app-shell-body .timeline-copy p {
    margin: 10px 0 0;
    color: #4B5563;
    line-height: 1.45;
}

.app-shell-body .side-empty-state {
    margin: 0;
    padding: 22px 24px;
    color: var(--appointments-muted);
}

.app-shell-body .side-full-button,
.app-shell-body .quick-actions-list a {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 24px;
    border: 1px solid var(--appointments-border);
    border-radius: 8px;
    background: #FFFFFF;
    color: #1F2937;
    text-decoration: none;
    font-weight: 900;
}

.app-shell-body .appointment-status-legend {
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 12px 24px 0;
    list-style: none;
}

.app-shell-body .appointment-status-legend li {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #1F2937;
    font-weight: 700;
}

.app-shell-body .appointments-dashboard .legend-dot {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    border-radius: 999px;
}

.app-shell-body .legend-dot.pending {
    background: #FBBF24;
}

.app-shell-body .legend-dot.confirmed {
    background: #22C55E;
}

.app-shell-body .legend-dot.overdue {
    background: #EF4444;
}

.app-shell-body .legend-dot.completed {
    background: #3B82F6;
}

.app-shell-body .legend-dot.rescheduled {
    background: #8B5CF6;
}

.app-shell-body .quick-actions-list {
    display: grid;
    gap: 14px;
    padding-top: 12px;
}

.app-shell-body .quick-actions-list a {
    justify-content: flex-start;
    gap: 18px;
    background: #F8FAFC;
}

.app-shell-body .quick-actions-list a span {
    width: 28px;
    text-align: center;
    color: #475569;
    font-size: 22px;
}

@media (max-width: 1420px) {
    .app-shell-body .appointments-dashboard .appointment-metrics {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .app-shell-body .appointments-content-grid {
        grid-template-columns: 1fr;
    }

    .app-shell-body .appointments-side-panel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .app-shell-body .manual-layout {
        grid-template-columns: 1fr;
    }

    .app-shell-body .manual-index {
        position: static;
    }

    .app-shell-body .maintenance-summary-grid,
    .app-shell-body .maintenance-complete-form {
        grid-template-columns: 1fr;
    }

    .app-shell-body .maintenance-detail-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .app-shell-body .appointments-top-row,
    .app-shell-body .appointments-toolbar {
        grid-template-columns: 1fr;
    }

    .app-shell-body .appointments-top-row,
    .app-shell-body .appointments-toolbar,
    .app-shell-body .appointment-week-nav {
        align-items: stretch;
    }

    .app-shell-body .appointment-create-card {
        justify-self: stretch;
    }

    .app-shell-body .appointment-create-card summary {
        width: 100%;
    }

    .app-shell-body .appointment-week-nav,
    .app-shell-body .appointments-toolbar {
        flex-wrap: wrap;
    }

    .app-shell-body .week-range-button {
        min-width: 260px;
        flex: 1 1 320px;
    }

    .app-shell-body .appointments-dashboard .appointments-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-shell-body .appointments-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .app-shell-body .appointments-dashboard .group-cards,
    .app-shell-body .appointments-side-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .app-shell-body .appointments-dashboard {
        gap: 16px;
    }

    .app-shell-body .appointments-dashboard .appointment-metrics,
    .app-shell-body .appointments-dashboard .appointments-filter-form,
    .app-shell-body .appointments-dashboard .group-cards,
    .app-shell-body .appointments-side-panel,
    .app-shell-body .workshop-response-summary,
    .app-shell-body .appointment-create-panel .appointment-form {
        grid-template-columns: 1fr;
    }

    .app-shell-body .appointments-toolbar,
    .app-shell-body .appointment-view-tabs,
    .app-shell-body .appointment-week-nav,
    .app-shell-body .appointments-filter-actions,
    .app-shell-body .appointments-dashboard .group-header,
    .app-shell-body .group-heading,
    .app-shell-body .group-header-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .app-shell-body .appointment-view-tab,
    .app-shell-body .week-nav-button,
    .app-shell-body .week-nav-button.today,
    .app-shell-body .week-range-button,
    .app-shell-body .appointments-filter-actions button,
    .app-shell-body .appointments-filter-actions .btn-secondary {
        width: 100%;
    }

    .app-shell-body .appointment-metric-card {
        min-height: auto;
    }

    .app-shell-body .appointment-date-group {
        padding: 18px;
    }

    .app-shell-body .appointment-response-button {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-shell-body .appointment-response-button small {
        max-width: 100%;
        text-align: left;
        white-space: normal;
    }

    .app-shell-body .group-heading {
        gap: 8px;
    }

    .app-shell-body .today-timeline::before {
        left: 76px;
    }
}

/* Final visual layer: deliberately last so legacy page rules cannot override it. */
:root {
    --bg-primary: #edf5f7;
    --bg-secondary: #dfeef2;
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-bg-strong: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(255, 255, 255, 0.82);
    --glass-highlight: rgba(255, 255, 255, 0.92);
    --text-primary: #172b3a;
    --text-secondary: #536b7a;
    --text-muted: #718795;
    --accent: #167d96;
    --accent-strong: #0c647c;
    --shadow-glass: 0 12px 34px rgba(36, 75, 91, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    --blur-sm: 10px;
    --blur-md: 18px;
    --blur-lg: 24px;
}

body.app-shell-body,
body.no-header {
    background:
        radial-gradient(55rem 42rem at -10% -15%, rgba(129, 215, 205, 0.42), transparent 60%),
        radial-gradient(48rem 38rem at 105% 12%, rgba(148, 205, 236, 0.34), transparent 65%),
        linear-gradient(135deg, #edf7f7 0%, #e6eff6 52%, #f1f4f8 100%) !important;
    color: var(--text-primary) !important;
}

.app-shell-body header.app-topbar {
    height: 68px;
    padding: 0 28px 0 308px;
    background: rgba(247, 252, 252, 0.68) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 6px 22px rgba(34, 77, 92, 0.08) !important;
}

.app-sidebar {
    width: 264px;
    padding: 18px 12px 12px;
    background: linear-gradient(165deg, rgba(13, 50, 65, 0.95), rgba(19, 75, 86, 0.89)) !important;
    border-radius: 0 24px 24px 0;
    box-shadow: 10px 0 32px rgba(15, 58, 70, 0.16), inset -1px 0 rgba(255, 255, 255, 0.13) !important;
}

.app-shell-body main { padding: 100px 30px 34px 294px; }
.app-shell-body footer { margin-left: 264px; }
.app-shell-body.sidebar-collapsed header.app-topbar { padding-left: 28px; }
.app-shell-body.sidebar-collapsed main { padding-left: 30px; }
.app-shell-body.sidebar-collapsed footer { margin-left: 0; }

.topbar-search {
    width: min(410px, 36vw);
    height: 40px;
    background: rgba(255, 255, 255, 0.82) !important;
    border-color: rgba(215, 231, 235, 0.95) !important;
    box-shadow: inset 0 1px 1px rgba(255,255,255,.96), 0 3px 10px rgba(34, 77, 92, .05) !important;
}

.menu-button,
.notification-button,
.topbar-user {
    background: rgba(255, 255, 255, 0.65) !important;
    border-color: rgba(217, 233, 237, 0.95) !important;
    color: var(--text-primary) !important;
}

.dashboard-page { width: 100%; max-width: none; gap: 18px; }
.dashboard-heading { padding: 2px 2px 4px; }
.dashboard-heading h1 { color: #173244 !important; font-size: clamp(1.9rem, 2.5vw, 2.55rem); letter-spacing: -0.035em; }
.dashboard-heading p { color: var(--text-secondary) !important; }

.dashboard-page .dashboard-panel,
.dashboard-page .stat-card,
.dashboard-page .chart-card,
.dashboard-page .service-table-panel,
.dashboard-page .table-section,
.dashboard-page .filters-card,
.dashboard-page .analysis-filter-card,
.app-shell-body .form-card,
.app-shell-body .section-card,
.app-shell-body .filters-card,
.app-shell-body .table-section,
.app-shell-body .modal-card,
.app-shell-body .notification-center-header,
.app-shell-body .notification-center-controls,
.app-shell-body .notification-center-item,
.app-shell-body .appointments-dashboard .appointment-card,
.app-shell-body .appointments-dashboard .appointment-date-group,
.app-shell-body .appointments-dashboard .appointment-metric-card {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--shadow-glass) !important;
    backdrop-filter: blur(var(--blur-md)) saturate(125%) !important;
    -webkit-backdrop-filter: blur(var(--blur-md)) saturate(125%) !important;
}

.dashboard-page .stat-card {
    min-height: 136px;
    border-radius: 20px;
    padding: 22px 20px;
}

.dashboard-page .dashboard-panel,
.dashboard-page .chart-card,
.dashboard-page .service-table-panel { border-radius: 20px; }

.dashboard-page .panel-title,
.dashboard-page .reminder-row,
.dashboard-page .appointment-row,
.dashboard-page .panel-list {
    background: transparent !important;
    border-color: rgba(151, 184, 194, 0.22) !important;
    box-shadow: none !important;
}

.dashboard-page .panel-title h2,
.dashboard-page strong,
.dashboard-page .stat-card strong,
.dashboard-page .stat-card span,
.dashboard-page .reminder-row strong,
.dashboard-page .appointment-row strong,
.dashboard-page td,
.dashboard-page th,
.dashboard-page .empty-state,
.dashboard-page .appointment-row span,
.dashboard-page .reminder-row span,
.dashboard-page .dashboard-date,
.dashboard-page .month-bar strong,
.dashboard-page .month-bar small,
.dashboard-page .chart-legend div,
.dashboard-page .dashboard-type-filters label,
.dashboard-page .dashboard-date-filters label { color: var(--text-primary) !important; }

.dashboard-page .reminder-row span,
.dashboard-page .appointment-row span,
.dashboard-page .stat-card small,
.dashboard-page .month-bar small { color: var(--text-secondary) !important; }

.dashboard-page .stat-icon {
    color: var(--accent) !important;
    background: linear-gradient(145deg, rgba(230, 251, 247, 0.92), rgba(215, 237, 249, 0.82)) !important;
    border-color: rgba(184, 224, 226, 0.92) !important;
}

.dashboard-page .stat-red .stat-icon { color: #c45d5d !important; }
.dashboard-page .stat-workshop .stat-icon { color: #418d73 !important; }

.dashboard-page .dashboard-date,
.dashboard-page .status-pill,
.dashboard-page .outline-action,
.dashboard-page .icon-action {
    background: rgba(255, 255, 255, 0.57) !important;
    border-color: rgba(206, 225, 230, 0.92) !important;
    color: var(--accent-strong) !important;
}

.dashboard-page .status-pill.danger {
    background: rgba(251, 226, 226, 0.72) !important;
    border-color: rgba(227, 170, 170, 0.66) !important;
    color: #a74343 !important;
}

.dashboard-page .status-pill.warning { color: #946717 !important; }

.dashboard-page table,
.dashboard-page th,
.dashboard-page td,
.dashboard-page .table-section th,
.dashboard-page .table-section td,
.dashboard-page .analysis-table th,
.dashboard-page .analysis-table td {
    background: transparent !important;
    color: var(--text-primary) !important;
    border-color: rgba(151, 184, 194, 0.18) !important;
}

.dashboard-page th { background: rgba(224, 240, 243, 0.62) !important; }
.dashboard-page tbody tr:hover td { background: rgba(255, 255, 255, 0.44) !important; }

input, select, textarea, .form-control, .form-select, .form-input {
    background: rgba(255, 255, 255, 0.72) !important;
    color: var(--text-primary) !important;
    border-color: rgba(201, 220, 226, 0.95) !important;
}

input::placeholder, textarea::placeholder { color: #8ba0ab !important; }
input:focus, select:focus, textarea:focus {
    border-color: rgba(22, 125, 150, 0.62) !important;
    box-shadow: 0 0 0 3px rgba(22, 125, 150, 0.12) !important;
}

button, .btn, .primary-button {
    background: linear-gradient(135deg, #168c99, #177391) !important;
    border-color: rgba(255,255,255,.52) !important;
    color: #fff !important;
}

.btn-secondary, .secondary-button, .filter-pill, .btn.secondary {
    background: rgba(255,255,255,.70) !important;
    color: var(--accent-strong) !important;
    border-color: rgba(201, 220, 226, .95) !important;
}

.notifications-panel,
.maintenance-notification,
.notification-toast {
    background: var(--glass-bg-strong) !important;
    color: var(--text-primary) !important;
    border-color: var(--glass-border) !important;
    box-shadow: var(--shadow-glass) !important;
}

.maintenance-notification-copy strong { color: var(--text-primary) !important; }
.maintenance-notification-copy span { color: var(--text-secondary) !important; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .dashboard-page .dashboard-panel, .dashboard-page .stat-card, .app-shell-body .form-card, .app-shell-body .table-section { background: rgba(255,255,255,.94) !important; }
}

@media (max-width: 900px) {
    .app-shell-body header.app-topbar { padding: 0 16px; }
    .app-shell-body main { padding: 88px 16px 24px; }
    .app-shell-body footer { margin-left: 0; }
}

/* Let these main workspaces use the available viewport width at reduced zoom. */
.app-shell-body .appointments-dashboard {
    width: 100%;
    max-width: none;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Shared pages: vehicles, maintenance, analysis, news, audit, users and settings. */
.app-shell-body main > h1 {
    margin: 0 0 20px;
    color: #173244;
    font-size: clamp(1.85rem, 2.45vw, 2.5rem);
    letter-spacing: -0.035em;
}

.app-shell-body .section-header,
.app-shell-body .vehicle-actions-bar,
.app-shell-body .daily-news-header-actions,
.app-shell-body .daily-news-actions,
.app-shell-body .analysis-summary,
.app-shell-body .analysis-chart-panel,
.app-shell-body .audit-filter-panel {
    color: var(--text-primary);
}

.app-shell-body .section-header p,
.app-shell-body .permission-help,
.app-shell-body .filter-label,
.app-shell-body .analysis-chart-header p { color: var(--text-secondary) !important; }

.app-shell-body .table-section,
.app-shell-body .form-card,
.app-shell-body .analysis-filter-card,
.app-shell-body .analysis-chart-panel,
.app-shell-body .analysis-summary,
.app-shell-body .dashboard-panel.audit-filter-panel,
.app-shell-body .warning-panel {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 20px !important;
    box-shadow: var(--shadow-glass) !important;
    color: var(--text-primary) !important;
    backdrop-filter: blur(var(--blur-md)) saturate(125%) !important;
    -webkit-backdrop-filter: blur(var(--blur-md)) saturate(125%) !important;
}

.app-shell-body .table-section,
.app-shell-body .form-card,
.app-shell-body .analysis-filter-card { padding: 22px 24px; }

.app-shell-body .table-section h2,
.app-shell-body .form-card h2,
.app-shell-body .analysis-chart-panel h2,
.app-shell-body .analysis-summary h2,
.app-shell-body .section-header h2 { color: var(--text-primary) !important; }

.app-shell-body .table-section table,
.app-shell-body .form-card table,
.app-shell-body .analysis-table,
.app-shell-body .role-permissions-table,
.app-shell-body .daily-history-table,
.app-shell-body .maintenance-table,
.app-shell-body .audit-table {
    width: 100%;
    color: var(--text-primary) !important;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid rgba(190, 215, 221, 0.66);
    border-radius: 14px;
    background: rgba(255,255,255,.30) !important;
}

.app-shell-body .table-section th,
.app-shell-body .table-section td,
.app-shell-body .form-card th,
.app-shell-body .form-card td,
.app-shell-body .analysis-table th,
.app-shell-body .analysis-table td,
.app-shell-body .role-permissions-table th,
.app-shell-body .role-permissions-table td,
.app-shell-body .maintenance-table th,
.app-shell-body .maintenance-table td,
.app-shell-body .daily-history-table th,
.app-shell-body .daily-history-table td,
.app-shell-body .audit-table th,
.app-shell-body .audit-table td {
    color: var(--text-primary) !important;
    background: transparent !important;
    border-color: rgba(157, 187, 196, 0.25) !important;
}

.app-shell-body .table-section thead th,
.app-shell-body .form-card thead th,
.app-shell-body .analysis-table thead th,
.app-shell-body .role-permissions-table thead th,
.app-shell-body .maintenance-table thead th,
.app-shell-body .daily-history-table thead th,
.app-shell-body .audit-table thead th {
    background: rgba(218, 237, 240, 0.76) !important;
    color: #294757 !important;
    font-size: .76rem;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.app-shell-body .table-section tbody tr:hover > td,
.app-shell-body .analysis-table tbody tr:hover > td,
.app-shell-body .role-permissions-table tbody tr:hover > td,
.app-shell-body .maintenance-table tbody tr:hover > td,
.app-shell-body .daily-history-table tbody tr:hover > td,
.app-shell-body .audit-table tbody tr:hover > td { background: rgba(255,255,255,.56) !important; }

.app-shell-body .permission-group-row th {
    background: rgba(205, 232, 235, 0.58) !important;
    color: #245469 !important;
}

.app-shell-body .table-section td .btn,
.app-shell-body .table-section td button,
.app-shell-body .form-card td .btn,
.app-shell-body .form-card td button,
.app-shell-body .inline-action-form button,
.app-shell-body .vehicle-actions-bar .btn,
.app-shell-body .daily-news-actions .btn,
.app-shell-body .daily-news-header-actions .btn {
    width: auto !important;
    min-height: 34px;
    padding: 0 12px;
}

.app-shell-body .inline-action-form { display: inline-flex; margin: 2px 4px 2px 0; }

.app-shell-body .vehicle-actions-bar,
.app-shell-body .daily-news-header-actions,
.app-shell-body .daily-news-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin: 0 0 20px;
}

.app-shell-body .table-sort-button {
    width: auto;
    min-height: 0;
    padding: 0;
    color: inherit !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    font: inherit;
}

.app-shell-body .modal {
    background: rgba(12, 30, 40, .34) !important;
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.app-shell-body .modal-content,
.app-shell-body .vehicle-modal-content,
.app-shell-body .daily-news-modal-content {
    background: rgba(250, 254, 254, .91) !important;
    border: 1px solid rgba(255,255,255,.92) !important;
    border-radius: 22px !important;
    box-shadow: 0 24px 64px rgba(20, 56, 67, .25), inset 0 1px rgba(255,255,255,.95) !important;
    color: var(--text-primary) !important;
}

.app-shell-body .due { color: #b44949 !important; font-weight: 800; }

@media (max-width: 760px) {
    .app-shell-body .table-section, .app-shell-body .form-card, .app-shell-body .analysis-filter-card { padding: 18px 16px; }
    .app-shell-body .vehicle-actions-bar, .app-shell-body .daily-news-header-actions, .app-shell-body .daily-news-actions { justify-content: stretch; }
    .app-shell-body .vehicle-actions-bar .btn, .app-shell-body .daily-news-header-actions .btn { flex: 1 1 180px; }
}

/* Green identity palette: final color override for every shared surface. */
:root {
    --bg-primary: #edf8f1;
    --bg-secondary: #def1e5;
    --glass-bg: rgba(255, 255, 255, 0.74);
    --glass-bg-strong: rgba(252, 255, 253, 0.90);
    --glass-border: rgba(255, 255, 255, 0.86);
    --text-primary: #173b2d;
    --text-secondary: #5c7869;
    --text-muted: #789181;
    --accent: #27865c;
    --accent-strong: #166541;
    --shadow-glass: 0 12px 34px rgba(31, 92, 61, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

body.app-shell-body,
body.no-header {
    background:
        radial-gradient(55rem 42rem at -10% -15%, rgba(150, 228, 182, 0.44), transparent 60%),
        radial-gradient(48rem 38rem at 105% 12%, rgba(189, 235, 193, 0.38), transparent 65%),
        linear-gradient(135deg, #effaf2 0%, #e5f3e9 52%, #f4f8f3 100%) !important;
}

.app-shell-body header.app-topbar {
    background: rgba(249, 254, 250, 0.72) !important;
    box-shadow: 0 6px 22px rgba(31, 88, 57, 0.08) !important;
}

.app-sidebar {
    background: linear-gradient(165deg, rgba(20, 79, 52, 0.96), rgba(27, 105, 67, 0.90)) !important;
    box-shadow: 10px 0 32px rgba(21, 76, 50, 0.16), inset -1px 0 rgba(255, 255, 255, 0.14) !important;
}

.topbar-search {
    border-color: rgba(207, 231, 215, 0.96) !important;
    box-shadow: inset 0 1px 1px rgba(255,255,255,.96), 0 3px 10px rgba(32, 91, 58, .05) !important;
}

.menu-button,
.notification-button,
.topbar-user { border-color: rgba(208, 231, 216, .96) !important; }

.dashboard-heading h1,
.app-shell-body main > h1 { color: #183e2e !important; }

.dashboard-page .stat-icon {
    color: var(--accent) !important;
    background: linear-gradient(145deg, rgba(232, 250, 238, .94), rgba(213, 240, 220, .86)) !important;
    border-color: rgba(182, 224, 194, .95) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.9), 0 8px 18px rgba(35, 105, 65, .09) !important;
}

.dashboard-page .stat-red .stat-icon { color: #b65b57 !important; }
.dashboard-page .stat-workshop .stat-icon { color: #2b8052 !important; }

.dashboard-page .dashboard-date,
.dashboard-page .status-pill,
.dashboard-page .outline-action,
.dashboard-page .icon-action {
    border-color: rgba(195, 224, 204, .94) !important;
    color: var(--accent-strong) !important;
}

.dashboard-page th,
.app-shell-body .table-section thead th,
.app-shell-body .form-card thead th,
.app-shell-body .analysis-table thead th,
.app-shell-body .role-permissions-table thead th,
.app-shell-body .maintenance-table thead th,
.app-shell-body .daily-history-table thead th,
.app-shell-body .audit-table thead th {
    background: rgba(216, 239, 222, 0.80) !important;
    color: #285641 !important;
}

.app-shell-body .table-section table,
.app-shell-body .form-card table,
.app-shell-body .analysis-table,
.app-shell-body .role-permissions-table,
.app-shell-body .daily-history-table,
.app-shell-body .maintenance-table,
.app-shell-body .audit-table { border-color: rgba(179, 215, 190, .72) !important; }

.app-shell-body .table-section th,
.app-shell-body .table-section td,
.app-shell-body .form-card th,
.app-shell-body .form-card td,
.app-shell-body .analysis-table th,
.app-shell-body .analysis-table td,
.app-shell-body .role-permissions-table th,
.app-shell-body .role-permissions-table td,
.app-shell-body .maintenance-table th,
.app-shell-body .maintenance-table td,
.app-shell-body .daily-history-table th,
.app-shell-body .daily-history-table td,
.app-shell-body .audit-table th,
.app-shell-body .audit-table td { border-color: rgba(129, 173, 144, .22) !important; }

.app-shell-body .permission-group-row th { background: rgba(208, 236, 216, .66) !important; color: #286044 !important; }

input:focus, select:focus, textarea:focus {
    border-color: rgba(39, 134, 92, .62) !important;
    box-shadow: 0 0 0 3px rgba(39, 134, 92, .12) !important;
}

button, .btn, .primary-button {
    background: linear-gradient(135deg, #2f9766, #1d784e) !important;
    box-shadow: 0 10px 20px rgba(31, 124, 75, .18), inset 0 1px rgba(255,255,255,.38) !important;
}

.btn-secondary, .secondary-button, .filter-pill, .btn.secondary {
    color: var(--accent-strong) !important;
    border-color: rgba(195, 222, 202, .96) !important;
}

/* Overlay navigation: the menu never changes the page layout. */
.app-shell-body header.app-topbar {
    padding: 0 28px !important;
    gap: 16px;
}

.app-shell-body main {
    padding: 100px 30px 34px !important;
    transition: none !important;
}

.app-shell-body footer,
.app-shell-body.sidebar-collapsed footer { margin-left: 0 !important; }

.app-shell-body.sidebar-collapsed main { padding-left: 30px !important; }

.app-sidebar {
    z-index: 1200;
    transition: transform 220ms ease, box-shadow 220ms ease !important;
}

.app-shell-body.sidebar-collapsed .app-sidebar {
    transform: translateX(-104%) !important;
}

.menu-button {
    width: 42px !important;
    min-width: 42px;
    height: 42px;
    min-height: 42px !important;
    flex: 0 0 42px;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 12px !important;
    font-size: 18px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.72) !important;
    color: #1d5138 !important;
    box-shadow: 0 3px 10px rgba(28, 84, 53, 0.08), inset 0 1px rgba(255,255,255,.9) !important;
}

.menu-button:hover,
.menu-button:focus-visible {
    background: rgba(233, 249, 238, 0.96) !important;
    border-color: rgba(133, 197, 153, .84) !important;
    box-shadow: 0 0 0 3px rgba(47, 151, 102, .12), inset 0 1px rgba(255,255,255,.9) !important;
}

@media (max-width: 900px) {
    .app-shell-body main,
    .app-shell-body.sidebar-collapsed main { padding: 88px 16px 24px !important; }
    .app-shell-body header.app-topbar { padding: 0 16px !important; }
}

/* Viewport modal layer: always floats above the application, never in a section. */
.app-shell-body .modal:not(#completeModal) {
    position: fixed !important;
    inset: 0 !important;
    z-index: 5000 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    padding: 24px !important;
    overflow: auto !important;
    background: rgba(18, 47, 35, 0.30) !important;
    backdrop-filter: blur(10px) saturate(88%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(88%) !important;
}

.app-shell-body .modal:not(#completeModal).show,
.app-shell-body .modal:not(#completeModal)[style*="display: block"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.app-shell-body .modal:not(#completeModal) .modal-content,
.app-shell-body .modal:not(#completeModal) .modal-content.daily-news-modal-content {
    position: relative;
    width: min(920px, 100%) !important;
    min-width: 0 !important;
    max-width: 100% !important;
    max-height: calc(100vh - 48px);
    margin: auto !important;
    overflow: auto;
    background: rgba(251, 255, 252, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.95) !important;
    border-radius: 22px !important;
    box-shadow: 0 28px 80px rgba(17, 65, 40, 0.28), inset 0 1px rgba(255,255,255,.95) !important;
}

.app-shell-body .modal:not(#completeModal) .modal-content.daily-news-modal-content { width: min(1500px, 100%) !important; }
.app-shell-body .modal:not(#completeModal) .modal-content:hover { transform: none !important; }

.app-shell-body .modal:not(#completeModal) .close {
    position: sticky;
    z-index: 1;
    top: 0;
    float: right;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    margin: -4px -4px 0 12px;
    border-radius: 10px;
    color: #173b2d;
    background: rgba(231, 247, 236, .82);
}

@media (max-width: 620px) {
    .app-shell-body .modal:not(#completeModal) { padding: 14px !important; }
    .app-shell-body .modal:not(#completeModal) .modal-content,
    .app-shell-body .modal:not(#completeModal) .modal-content.daily-news-modal-content { max-height: calc(100vh - 28px); border-radius: 18px !important; }
}

/* Header search and dashboard charts: compact, readable and non-overlapping. */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.app-shell-body .topbar-search {
    width: min(520px, 42vw) !important;
    height: 46px;
    gap: 10px;
    padding: 0 16px;
    border-radius: 15px;
}

.app-shell-body .topbar-search > span {
    display: grid;
    flex: 0 0 18px;
    width: 18px;
    place-items: center;
    color: #24724d;
    font-size: 20px;
    line-height: 1;
}

.app-shell-body .topbar-search input {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    line-height: 1.2;
}

.app-shell-body .topbar-search input::placeholder { color: #8aa99a !important; opacity: 1; }

.maintenance-summary-chart {
    align-items: center;
    min-height: 188px;
}

.chart-legend {
    align-content: center;
    grid-template-rows: repeat(3, auto);
}

.chart-legend div { min-height: 32px; }

.daily-news-chart-card .dashboard-chart-filter {
    display: grid;
    gap: 12px;
    padding: 16px 18px 4px;
}

.daily-news-chart-card .dashboard-date-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.daily-news-chart-card .dashboard-date-filters label {
    display: grid;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
}

.daily-news-chart-card .dashboard-type-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.daily-news-chart-card .dashboard-type-filters label {
    display: inline-flex;
    align-items: center;
    width: auto;
    min-height: 32px;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid rgba(181, 216, 192, .85);
    border-radius: 999px;
    background: rgba(239, 250, 243, .72);
    color: #286042 !important;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.daily-news-chart-card .dashboard-type-filters input {
    width: 15px;
    height: 15px;
    min-height: 0;
    margin: 0;
    accent-color: #27865c;
}

.daily-news-chart-card .dashboard-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.daily-news-chart-card .dashboard-filter-actions button,
.daily-news-chart-card .dashboard-filter-actions .btn-secondary {
    width: auto;
    min-height: 36px;
    padding: 0 14px;
}

.daily-news-bars {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px;
    min-height: 170px;
    padding-top: 14px;
}

.daily-news-bars .month-bar { min-width: 0; }
.daily-news-bars .month-bar small {
    display: block;
    width: 100%;
    min-height: 30px;
    overflow-wrap: anywhere;
    text-align: center;
    font-size: 10px;
    line-height: 1.2;
}

.daily-news-bars .bar-track { height: 108px; }

@media (max-width: 760px) {
    .app-shell-body .topbar-search { width: min(100%, 420px) !important; }
    .daily-news-chart-card .dashboard-date-filters { grid-template-columns: 1fr; }
    .daily-news-chart-card .dashboard-filter-actions { align-items: stretch; flex-direction: column; }
    .daily-news-chart-card .dashboard-filter-actions button, .daily-news-chart-card .dashboard-filter-actions .btn-secondary { width: 100%; }
}

/* Chart headers share the same high-contrast green used by service tables. */
.dashboard-page .chart-card .panel-title h2,
.dashboard-page .dashboard-panel .panel-title h2,
.dashboard-page .chart-card .panel-title span,
.dashboard-page .chart-card .panel-title summary,
.dashboard-page .chart-card .panel-title a {
    color: #285641 !important;
}

.dashboard-page .chart-card .panel-title {
    border-bottom-color: rgba(128, 176, 143, 0.26) !important;
}

.dashboard-page .chart-card .panel-title summary {
    padding: 6px 10px;
    border-radius: 9px;
    background: rgba(224, 242, 229, 0.78);
}

/* Sidebar: restrained dark glass with accessible text contrast. */
.app-sidebar {
    background:
        radial-gradient(26rem 18rem at 4% 0%, rgba(163, 229, 207, 0.20), transparent 66%),
        linear-gradient(160deg, rgba(29, 55, 54, 0.91), rgba(25, 47, 48, 0.84)) !important;
    border-right-color: rgba(239, 255, 249, 0.28) !important;
    box-shadow: 12px 0 38px rgba(16, 35, 37, 0.20), inset -1px 0 rgba(255,255,255,.12) !important;
    backdrop-filter: blur(28px) saturate(115%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(115%) !important;
}

.app-sidebar::before {
    background:
        linear-gradient(145deg, rgba(255,255,255,.10), transparent 42%),
        radial-gradient(circle at 16% 7%, rgba(174, 255, 226, .16), transparent 24%) !important;
}

.sidebar-brand strong,
.sidebar-user strong { color: #f7fffb !important; }

.sidebar-brand span,
.sidebar-user span { color: rgba(224, 242, 234, 0.78) !important; }

.sidebar-nav a,
.sidebar-nav a span,
.sidebar-group-toggle em {
    color: rgba(237, 249, 243, 0.88) !important;
}

.sidebar-nav a {
    border-color: transparent !important;
    text-shadow: 0 1px 1px rgba(5, 20, 20, .18);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(255,255,255,.20), rgba(198, 240, 222, .11)) !important;
    border-color: rgba(236, 255, 247, .34) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.28), 0 9px 20px rgba(6, 22, 23, .16) !important;
}

.sidebar-nav a:hover span,
.sidebar-nav a.active span,
.sidebar-nav a:hover em,
.sidebar-nav a.active em { color: #bbf2d4 !important; }

.sidebar-subnav a {
    color: rgba(222, 240, 232, .76) !important;
    font-weight: 650;
}

.sidebar-subnav a:hover,
.sidebar-subnav a.active-sub {
    color: #ffffff !important;
    background: rgba(237, 255, 247, .12) !important;
}

.sidebar-user {
    border-top-color: rgba(235, 255, 245, .14) !important;
    background: linear-gradient(180deg, transparent, rgba(3, 18, 19, .16)) !important;
}

.user-avatar {
    background: linear-gradient(135deg, #d9f7e8, #b7e5d1) !important;
    color: #1a4536 !important;
    box-shadow: inset 0 1px rgba(255,255,255,.96), 0 6px 16px rgba(0,0,0,.14) !important;
}

.app-shell-body .km-import-review {
    display: grid;
    gap: 16px;
    margin: 0 0 22px;
    padding: 20px;
    border: 1px solid rgba(201, 220, 226, .95);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 12px 30px rgba(27, 68, 77, .09);
}

.app-shell-body .km-import-review-header,
.app-shell-body .km-import-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.app-shell-body .km-import-review-header h2 {
    margin: 2px 0 6px;
    color: #173244;
    overflow-wrap: anywhere;
}

.app-shell-body .km-import-review-header p {
    margin: 0;
    color: #526b79;
}

.app-shell-body .km-import-review-header .km-import-eyebrow {
    color: #147d62;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.app-shell-body .km-import-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 10px;
}

.app-shell-body .km-import-summary > div {
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid rgba(215, 231, 235, .95);
    border-radius: 12px;
    background: rgba(248, 252, 252, .9);
}

.app-shell-body .km-import-summary span { color: #526b79; font-size: 12px; }
.app-shell-body .km-import-summary strong { color: #173244; font-size: 22px; }
.app-shell-body .km-import-summary .success strong { color: #15803d; }
.app-shell-body .km-import-summary .warning strong { color: #b45309; }

.app-shell-body .km-import-table-wrap {
    max-height: min(55vh, 620px);
    overflow: auto;
    border: 1px solid rgba(215, 231, 235, .95);
    border-radius: 12px;
}

.app-shell-body .km-import-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    background: rgba(255, 255, 255, .92);
}

.app-shell-body .km-import-table th,
.app-shell-body .km-import-table td {
    padding: 9px 11px;
    border-bottom: 1px solid #e5edf0;
    text-align: left;
    vertical-align: top;
}

.app-shell-body .km-import-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eff8f5;
    color: #244a43;
    white-space: nowrap;
}

.app-shell-body .km-import-table td:last-child { min-width: 300px; }
.app-shell-body .km-import-table td:last-child span { display: block; color: #526b79; font-size: 12px; }
.app-shell-body .km-import-row.ready { background: rgba(240, 253, 244, .58); }
.app-shell-body .km-import-row.rejected { background: rgba(255, 251, 235, .78); }
.app-shell-body .km-import-row.skipped { color: #64748b; }
.app-shell-body .km-import-row.updated { background: rgba(220, 252, 231, .72); }
.app-shell-body .km-import-row.rejected .km-import-status { color: #a16207; }
.app-shell-body .km-import-row.ready .km-import-status,
.app-shell-body .km-import-row.updated .km-import-status { color: #15803d; }

.app-shell-body .km-import-actions form { margin: 0; }
.app-shell-body .km-import-actions button,
.app-shell-body .km-import-download {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: linear-gradient(135deg, #168c72, #177391);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.app-shell-body .km-import-actions .km-import-cancel {
    border-color: #d7e3e8;
    background: #fff;
    color: #425a66;
}

@media (max-width: 900px) {
    .app-shell-body .km-import-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-shell-body .km-import-review-header,
    .app-shell-body .km-import-actions { align-items: stretch; flex-direction: column; }
    .app-shell-body .km-import-review-header > a,
    .app-shell-body .km-import-actions button { width: 100%; }
}

/* Responsive shell and module layouts. Keep these overrides last so the
   earlier module-specific rules cannot reintroduce viewport overflow. */
html {
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    scroll-padding-top: calc(76px + env(safe-area-inset-top));
}

body.app-shell-body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

.app-shell-body main,
.app-shell-body main > *,
.dashboard-page,
.dashboard-panel,
.dashboard-main-grid > *,
.dashboard-charts > *,
.dashboard-stats > *,
.app-shell-body .notification-center-page,
.app-shell-body .notification-center-content,
.app-shell-body .table-section,
.app-shell-body .form-card,
.app-shell-body .filters-card,
.app-shell-body .analysis-filter-card,
.app-shell-body .section-card {
    min-width: 0;
    max-width: 100%;
}

.sidebar-backdrop {
    display: none;
}

.app-shell-body .notifications-menu {
    position: relative;
    flex: 0 0 44px;
}

.app-shell-body .notifications-panel {
    max-width: calc(100vw - 24px);
}

.app-shell-body .maintenance-notification-copy {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.app-shell-body .maintenance-notification-copy strong,
.app-shell-body .maintenance-notification-copy span {
    overflow-wrap: anywhere;
}

.app-shell-body .notification-center-page {
    width: 100%;
    padding: clamp(10px, 2vw, 24px);
}

.app-shell-body .notification-center-controls,
.app-shell-body .notification-filter-group,
.app-shell-body .notification-category-group {
    min-width: 0;
}

.app-shell-body .notification-center-item {
    min-width: 0;
}

.app-shell-body .notification-center-content p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.app-shell-body .notification-center-item.priority-high,
.app-shell-body .notification-center-item.priority-critical {
    border-left: 4px solid #d97706;
}

.app-shell-body .notification-center-item:not(.unread) {
    opacity: .88;
}

.app-shell-body .notification-center-item.unread {
    border-left: 4px solid #218653;
}

.app-shell-body .km-import-table-wrap,
.app-shell-body .table-scroll,
.app-shell-body .dashboard-table-wrapper,
.app-shell-body .editable-plan-wrapper {
    max-width: 100%;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.app-shell-body .km-import-review,
.app-shell-body .km-import-review * {
    min-width: 0;
}

.app-shell-body .km-import-table-wrap {
    overflow-x: auto;
}

.app-shell-body .km-import-table td:last-child {
    overflow-wrap: anywhere;
}

.app-shell-body :is(input, select, textarea, button, .btn, .primary-button, .secondary-button, .filter-pill, .inline-mark-read) {
    max-width: 100%;
}

.app-shell-body :is(button, .btn, .primary-button, .secondary-button, .inline-mark-read) {
    min-height: 44px;
    touch-action: manipulation;
}

.app-shell-body input,
.app-shell-body select,
.app-shell-body textarea {
    min-width: 0;
    font-size: max(16px, 1em);
}

.app-shell-body .modal:not(#completeModal) {
    height: 100vh !important;
    min-height: 100vh !important;
    padding-top: max(14px, env(safe-area-inset-top)) !important;
    padding-bottom: max(14px, env(safe-area-inset-bottom)) !important;
}

.app-shell-body .modal:not(#completeModal) .modal-content {
    max-height: calc(100vh - 28px);
    overscroll-behavior: contain;
}

@supports (height: 100dvh) {
    .app-shell-body .modal:not(#completeModal) {
        height: 100dvh !important;
        min-height: 100dvh !important;
    }

    .app-shell-body .modal:not(#completeModal) .modal-content {
        max-height: calc(100dvh - 28px);
    }

    .app-shell-body .notifications-panel {
        max-height: calc(100dvh - 84px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    }

    .app-shell-body .notifications-list {
        max-height: calc(100dvh - 142px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    }
}

@media (max-width: 1100px) {
    .app-shell-body .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-shell-body .dashboard-main-grid,
    .app-shell-body .dashboard-charts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-shell-body .dashboard-stats .stat-card,
    .app-shell-body .dashboard-panel {
        min-width: 0;
    }
}

@media (max-width: 900px) {
    .app-shell-body header.app-topbar {
        top: 0;
        left: 0;
        right: 0;
        height: calc(64px + env(safe-area-inset-top));
        padding: env(safe-area-inset-top) 12px 0 !important;
        gap: 10px;
        z-index: 1300;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .app-shell-body main,
    .app-shell-body.sidebar-collapsed main {
        padding: calc(78px + env(safe-area-inset-top)) 14px 24px !important;
    }

    .app-shell-body footer,
    .app-shell-body.sidebar-collapsed footer {
        margin-left: 0 !important;
        padding-left: 14px;
        padding-right: 14px;
    }

    .app-shell-body .app-sidebar {
        top: env(safe-area-inset-top);
        bottom: env(safe-area-inset-bottom);
        width: min(320px, calc(100vw - 52px));
        max-width: 88vw;
        border-radius: 0 20px 20px 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        z-index: 1501;
    }

    .app-shell-body .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1500;
        display: block;
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: rgba(14, 38, 31, .34) !important;
        opacity: 1;
        visibility: visible;
        box-shadow: none !important;
    }

    .app-shell-body.sidebar-collapsed .sidebar-backdrop {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .app-shell-body .notifications-panel {
        position: fixed;
        top: calc(68px + env(safe-area-inset-top));
        right: 12px;
        left: auto;
        width: min(420px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 84px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow: hidden;
        z-index: 1400;
        border-radius: 18px;
        background: rgba(249, 254, 250, .98) !important;
        border-color: rgba(184, 215, 194, .95) !important;
        box-shadow: 0 18px 50px rgba(19, 62, 42, .22) !important;
    }

    .app-shell-body .notifications-list {
        max-height: calc(100vh - 142px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .app-shell-body .notifications-footer {
        position: sticky;
        bottom: 0;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
        background: rgba(249, 254, 250, .98);
    }

    .app-shell-body .notification-center-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-shell-body .notification-center-actions,
    .app-shell-body .notification-center-actions > * {
        width: 100%;
    }

    .app-shell-body .notification-center-controls {
        display: grid;
        gap: 12px;
    }

    .app-shell-body .notification-center-item {
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        padding: 14px;
    }

    .app-shell-body .notification-center-icon {
        width: 40px;
        height: 40px;
    }

    .app-shell-body .notification-center-topline {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .app-shell-body .notification-center-topline strong {
        font-size: 16px;
        overflow-wrap: anywhere;
    }

    .app-shell-body .inline-mark-read {
        grid-column: 2;
        justify-self: stretch;
        width: 100%;
    }

    .app-shell-body .dashboard-heading {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .app-shell-body .dashboard-heading > *,
    .app-shell-body .dashboard-date {
        min-width: 0;
        max-width: 100%;
    }

    .app-shell-body .dashboard-main-grid,
    .app-shell-body .dashboard-charts {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-shell-body .km-import-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .app-shell-body header.app-topbar {
        height: calc(58px + env(safe-area-inset-top));
        gap: 8px;
        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    .app-shell-body .menu-button {
        width: 44px !important;
        min-width: 44px;
        height: 44px;
        min-height: 44px !important;
        flex-basis: 44px;
    }

    .app-shell-body .topbar-search {
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
        height: 42px;
        margin: 0 !important;
        padding: 0 10px;
    }

    .app-shell-body .topbar-search input {
        min-width: 0;
        font-size: 16px;
    }

    .app-shell-body .topbar-search input::placeholder {
        font-size: 12px;
    }

    .app-shell-body .topbar-actions {
        flex: 0 0 auto;
        gap: 6px;
    }

    .app-shell-body .notification-button {
        width: 44px;
        height: 44px;
    }

    .app-shell-body .topbar-user {
        width: 44px;
        min-width: 44px;
        height: 44px;
        justify-content: center;
        padding: 2px;
    }

    .app-shell-body .topbar-user-copy {
        display: none;
    }

    .app-shell-body .topbar-user span {
        width: 34px;
        height: 34px;
    }

    .app-shell-body main,
    .app-shell-body.sidebar-collapsed main {
        padding: calc(70px + env(safe-area-inset-top)) 10px 18px !important;
    }

    .app-shell-body main > h1 {
        margin-bottom: 14px;
        font-size: clamp(1.45rem, 6vw, 1.9rem);
        overflow-wrap: anywhere;
    }

    .app-shell-body .notification-center-page {
        gap: 12px;
        padding: 0;
    }

    .app-shell-body .notification-center-header,
    .app-shell-body .notification-center-controls,
    .app-shell-body .notification-center-item,
    .app-shell-body .notification-center-empty {
        border-radius: 14px;
    }

    .app-shell-body .notification-center-header {
        padding: 16px;
    }

    .app-shell-body .notification-center-header h1 {
        font-size: 24px;
    }

    .app-shell-body .notification-center-controls {
        padding: 12px;
    }

    .app-shell-body .notification-filter-group,
    .app-shell-body .notification-category-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .app-shell-body .notification-category-group .filter-pill:first-child {
        grid-column: span 2;
    }

    .app-shell-body .filter-pill {
        min-width: 0;
        min-height: 44px;
        padding: 7px 8px;
        text-align: center;
        white-space: normal;
        font-size: 13px;
    }

    .app-shell-body .notification-center-item {
        gap: 9px;
        padding: 12px;
    }

    .app-shell-body .notification-center-topline strong {
        font-size: 15px;
        line-height: 1.35;
    }

    .app-shell-body .notification-center-content p {
        font-size: 14px;
    }

    .app-shell-body .notification-action-link {
        display: inline-flex;
        min-height: 44px;
        align-items: center;
    }

    .app-shell-body .notifications-panel {
        top: calc(64px + env(safe-area-inset-top));
        right: 8px;
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        padding: 7px;
        border-radius: 16px;
    }

    .app-shell-body .notifications-list {
        max-height: calc(100vh - 126px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    }

    .app-shell-body .maintenance-notification {
        gap: 8px;
        padding: 11px;
    }

    .app-shell-body .notification-dismiss,
    .app-shell-body .notification-hide {
        flex: 0 0 40px;
        width: 40px;
        min-width: 40px;
        height: 40px;
    }

    .app-shell-body .notification-toasts {
        top: calc(66px + env(safe-area-inset-top));
        right: 8px;
        width: calc(100vw - 16px);
        max-height: calc(34dvh);
    }

    .app-shell-body .dashboard-stats {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .app-shell-body .dashboard-heading h1 {
        font-size: clamp(1.55rem, 7vw, 2rem);
    }

    .app-shell-body .dashboard-heading p {
        font-size: 14px;
    }

    .app-shell-body .dashboard-date {
        min-height: 42px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .app-shell-body .dashboard-filter-actions,
    .app-shell-body .vehicle-actions-bar,
    .app-shell-body .daily-news-header-actions,
    .app-shell-body .daily-news-actions,
    .app-shell-body .km-import-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .app-shell-body .vehicle-actions-bar > *,
    .app-shell-body .daily-news-header-actions > *,
    .app-shell-body .daily-news-actions > *,
    .app-shell-body .km-import-actions > *,
    .app-shell-body .km-import-actions form,
    .app-shell-body .km-import-actions button {
        width: 100%;
        min-width: 0;
    }

    .app-shell-body .km-import-review {
        gap: 12px;
        padding: 13px;
        margin-bottom: 16px;
    }

    .app-shell-body .km-import-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .app-shell-body .km-import-summary > div {
        padding: 10px;
        overflow-wrap: anywhere;
    }

    .app-shell-body .km-import-summary strong {
        font-size: 20px;
    }

    .app-shell-body .km-import-table-wrap {
        max-height: min(52dvh, 440px);
    }

    .app-shell-body .table-section,
    .app-shell-body .form-card,
    .app-shell-body .analysis-filter-card {
        padding: 14px 12px;
    }

    .app-shell-body .modal:not(#completeModal) {
        padding-right: max(10px, env(safe-area-inset-right)) !important;
        padding-left: max(10px, env(safe-area-inset-left)) !important;
    }

    .app-shell-body .modal:not(#completeModal) .modal-content {
        width: 100% !important;
        max-height: calc(100vh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        padding: 18px 14px !important;
        border-radius: 16px !important;
    }

    .app-shell-body .table-section {
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .app-shell-body .table-section > table,
    .app-shell-body .form-card > table {
        max-width: 100%;
    }

    .app-shell-body .modal:not(#completeModal) .modal-content :is(.form-grid, .daily-news-entry-form) {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .app-shell-body .modal:not(#completeModal) .modal-content :is(.daily-news-field-wide, .daily-news-actions) {
        grid-column: auto !important;
    }
}

@media (max-width: 360px) {
    .app-shell-body header.app-topbar {
        gap: 6px;
        padding-right: 7px !important;
        padding-left: 7px !important;
    }

    .app-shell-body .topbar-search {
        padding-right: 7px;
        padding-left: 7px;
    }

    .app-shell-body .topbar-search input::placeholder {
        font-size: 11px;
    }

    .app-shell-body .notification-center-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-shell-body .notification-center-icon {
        display: none;
    }

    .app-shell-body .inline-mark-read {
        grid-column: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-shell-body .app-sidebar,
    .app-shell-body .sidebar-backdrop {
        transition: none !important;
    }
}

@supports (height: 100dvh) {
    @media (max-width: 900px) {
        .app-shell-body .notifications-panel {
            max-height: calc(100dvh - 84px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        }

        .app-shell-body .notifications-list {
            max-height: calc(100dvh - 142px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        }
    }

    @media (max-width: 620px) {
        .app-shell-body .notification-toasts {
            max-height: 34dvh;
        }
    }
}
.maintenance-planning-page { max-width: 1500px; margin: 0 auto; padding: 1rem 0 2rem; }
.planning-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:1rem; margin-bottom:1.25rem; }
.planning-heading h1 { margin:.2rem 0; }
.planning-heading p { margin:.35rem 0 0; color:var(--text-muted); }
.planning-eyebrow,.planning-vehicle-number { color:var(--text-muted); font-size:.82rem; }
.planning-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.85rem; margin-bottom:1rem; }
.planning-summary-card { display:flex; justify-content:space-between; align-items:center; gap:.75rem; padding:1rem 1.1rem; border:1px solid var(--glass-border); border-radius:var(--radius-md); background:var(--bg-panel); color:var(--text-primary); text-decoration:none; transition:border-color var(--transition-fast),transform var(--transition-fast); }
.planning-summary-card:hover,.planning-summary-card.selected { border-color:var(--accent); transform:translateY(-1px); }
.planning-summary-card strong { font-size:1.45rem; }
.summary-upcoming strong { color:var(--warning); }.summary-due strong { color:var(--danger); }.summary-unestimated strong { color:var(--text-muted); }
.planning-filters { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)) auto; align-items:end; gap:.8rem; padding:1rem; margin-bottom:1rem; border:1px solid var(--glass-border); border-radius:var(--radius-md); background:var(--bg-panel); }
.planning-filters label { display:grid; gap:.35rem; color:var(--text-secondary); font-size:.88rem; }
.planning-filters input,.planning-filters select { width:100%; min-width:0; }
.planning-filter-actions { display:flex; gap:.5rem; }
.planning-card-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.planning-vehicle-card { min-width:0; padding:1.1rem; border:1px solid var(--glass-border); border-left:4px solid var(--text-muted); border-radius:var(--radius-md); background:var(--bg-panel); }
.planning-vehicle-card.state-due { border-left-color:var(--danger); }.planning-vehicle-card.state-upcoming { border-left-color:var(--warning); }.planning-vehicle-card.state-unestimated { border-left-color:var(--text-muted); }
.planning-card-header { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; }
.planning-card-header h2 { margin:.15rem 0; font-size:1.12rem; }.planning-card-header p { margin:0; color:var(--text-muted); }
.planning-status { flex:0 0 auto; padding:.3rem .6rem; border-radius:999px; font-size:.78rem; background:var(--bg-field); }
.status-due { color:var(--danger); }.status-upcoming { color:var(--warning); }.status-unestimated { color:var(--text-muted); }
.planning-km-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.6rem; margin:1rem 0 .6rem; }
.planning-km-grid div { padding:.65rem; border-radius:var(--radius-sm); background:var(--bg-field); }
.planning-km-grid span,.planning-estimate span { display:block; color:var(--text-muted); font-size:.78rem; }.planning-km-grid strong { display:block; margin-top:.2rem; font-size:.95rem; }.planning-danger-text,.due-date { color:var(--danger)!important; }
.planning-progress { height:6px; overflow:hidden; border-radius:99px; background:var(--bg-field-strong); }.planning-progress span { display:block; height:100%; border-radius:inherit; background:var(--warning); }
.planning-estimate { display:grid; gap:.15rem; margin:.8rem 0; }.planning-date { color:var(--success); }.neutral-date { color:var(--text-muted); }
.confidence-baja { color:var(--warning); font-weight:600; }.confidence-media { color:var(--text-secondary); }.confidence-alta { color:var(--success); }
.planning-card-actions { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.9rem; }.planning-table-view { margin-top:1rem; }.planning-table-view[hidden],.planning-card-list[hidden] { display:none!important; }.planning-table { min-width:1000px; }
@media (max-width:1100px) { .planning-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }.planning-filter-actions { grid-column:1/-1; } }
@media (max-width:760px) { .planning-heading { align-items:flex-start; flex-direction:column; }.planning-summary { grid-template-columns:1fr; gap:.55rem; }.planning-card-list { grid-template-columns:1fr; }.planning-km-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.planning-card-header { flex-direction:column; }.planning-filters { grid-template-columns:1fr; }.planning-filter-actions { grid-column:auto; }.planning-table-view { overflow-x:auto; } }

/* Planning screen palette: local overrides keep the rest of the application intact. */
.maintenance-planning-page {
    --planning-ink: #263832;
    --planning-muted: #687a73;
    --planning-border: #dfe8e3;
    --planning-surface: rgba(255, 255, 255, .88);
    --planning-soft: #f4f7f5;
    --planning-green: #286548;
    --planning-green-soft: #edf5f0;
    --planning-amber: #946814;
    --planning-amber-soft: #fbf5e9;
    --planning-red: #ad4e4e;
    --planning-red-soft: #fbefef;
    --planning-neutral: #647581;
    color: var(--planning-ink);
    padding: 1rem 1.1rem 1.2rem;
    border: 1px solid rgba(218, 228, 222, .78);
    border-radius: 16px;
    background: rgba(248, 250, 249, .82);
}
.maintenance-planning-page .planning-heading { align-items:center; margin-bottom:1rem; gap:1.25rem; }
.maintenance-planning-page .planning-heading h1 { display:flex; align-items:center; gap:.6rem; color:var(--planning-ink); font-size:clamp(1.45rem,2.2vw,1.9rem); letter-spacing:-.025em; }
.maintenance-planning-page .planning-heading p { color:var(--planning-muted); font-size:.96rem; }
.planning-title-icon { display:inline-grid; width:34px; height:34px; place-items:center; border:1px solid var(--planning-border); border-radius:10px; background:var(--planning-surface); color:var(--planning-green); font-size:1.1rem; }
.maintenance-planning-page .planning-eyebrow { color:var(--planning-muted); font-size:.72rem; font-weight:700; letter-spacing:.1em; }
.maintenance-planning-page .planning-summary { gap:.8rem; }
.maintenance-planning-page .planning-summary-card { position:relative; display:grid; grid-template-columns:36px minmax(0,1fr) auto; grid-template-rows:auto auto; min-height:82px; padding:.85rem 1rem; border:1px solid var(--planning-border); border-radius:13px; background:var(--planning-surface); color:var(--planning-ink); box-shadow:0 4px 14px rgba(34,61,48,.045); }
.maintenance-planning-page .planning-summary-card:hover,.maintenance-planning-page .planning-summary-card.selected { border-color:#bdcec4; background:#fff; transform:translateY(-1px); box-shadow:0 7px 18px rgba(34,61,48,.08); }
.planning-summary-icon { grid-column:1; grid-row:1/3; align-self:center; display:grid; width:30px; height:30px; place-items:center; border-radius:9px; background:var(--planning-soft); color:var(--planning-neutral); font-weight:700; }
.planning-summary-label { grid-column:2; align-self:end; color:var(--planning-muted); font-size:.82rem; font-weight:600; }
.maintenance-planning-page .planning-summary-card strong { grid-column:3; grid-row:1/3; align-self:center; color:var(--planning-neutral); font-size:1.55rem; font-variant-numeric:tabular-nums; }
.maintenance-planning-page .summary-upcoming .planning-summary-icon { color:var(--planning-green); background:var(--planning-green-soft); }
.maintenance-planning-page .summary-upcoming strong { color:var(--planning-green); }
.maintenance-planning-page .summary-due .planning-summary-icon { color:var(--planning-red); background:var(--planning-red-soft); }
.maintenance-planning-page .summary-due strong { color:var(--planning-red); }
.maintenance-planning-page .summary-unestimated .planning-summary-icon { color:var(--planning-neutral); }
.maintenance-planning-page .planning-filters { grid-template-columns:repeat(4,minmax(135px,1fr)) auto; gap:.7rem; padding:.85rem; border:1px solid var(--planning-border); border-radius:13px; background:var(--planning-surface); box-shadow:0 4px 14px rgba(34,61,48,.04); }
.maintenance-planning-page .planning-filters label { gap:.3rem; color:var(--planning-muted); font-size:.77rem; font-weight:650; }
.maintenance-planning-page .planning-filters input,.maintenance-planning-page .planning-filters select { min-height:40px; padding:.5rem .65rem; border:1px solid #d7e1dc; border-radius:9px; background:#fbfcfb; color:var(--planning-ink); box-shadow:none; font-size:max(16px,.88rem); }
.maintenance-planning-page .planning-filters input::placeholder { color:#82918b; }
.maintenance-planning-page .planning-filters input:focus,.maintenance-planning-page .planning-filters select:focus { border-color:#739783; background:#fff; box-shadow:0 0 0 3px rgba(40,101,72,.1); }
.maintenance-planning-page .planning-filter-actions { gap:.45rem; }
.maintenance-planning-page .planning-heading .btn,.maintenance-planning-page .planning-filter-actions .btn,.maintenance-planning-page .planning-card-actions .btn { min-height:36px; padding:0 .8rem; border-radius:9px; font-size:.82rem; font-weight:650; box-shadow:none; }
.maintenance-planning-page .planning-filter-actions .btn:not(.secondary),.maintenance-planning-page .planning-card-actions .btn:not(.secondary) { border-color:var(--planning-green); background:var(--planning-green); color:#fff; }
.maintenance-planning-page .planning-heading .btn.secondary,.maintenance-planning-page .planning-filter-actions .btn.secondary,.maintenance-planning-page .planning-card-actions .btn.secondary { border:1px solid var(--planning-border); background:#fff; color:var(--planning-ink); }
.maintenance-planning-page .planning-card-list { gap:.85rem; }
.maintenance-planning-page .planning-vehicle-card { padding:.95rem 1rem; border:1px solid var(--planning-border); border-left:3px solid #aebdb5; border-radius:13px; background:var(--planning-surface); box-shadow:0 5px 16px rgba(34,61,48,.05); }
.maintenance-planning-page .planning-vehicle-card.state-due { border-left-color:#c66b6b; }
.maintenance-planning-page .planning-vehicle-card.state-upcoming { border-left-color:#b99a57; }
.maintenance-planning-page .planning-vehicle-card.state-unestimated { border-left-color:#91a0a8; }
.maintenance-planning-page .planning-card-header { align-items:flex-start; gap:.7rem; }
.planning-card-identity { min-width:0; }
.maintenance-planning-page .planning-vehicle-number { color:var(--planning-muted); font-size:.78rem; font-weight:650; }
.maintenance-planning-page .planning-card-header h2 { margin:.18rem 0; color:var(--planning-ink); font-size:1rem; line-height:1.3; }
.maintenance-planning-page .planning-card-header p { color:var(--planning-muted); font-size:.8rem; }
.maintenance-planning-page .planning-status { padding:.27rem .55rem; border:1px solid transparent; border-radius:999px; background:#f0f3f2; font-size:.72rem; font-weight:650; }
.maintenance-planning-page .status-due { border-color:#f0dada; background:var(--planning-red-soft); color:var(--planning-red); }
.maintenance-planning-page .status-upcoming { border-color:#eee2c4; background:var(--planning-amber-soft); color:var(--planning-amber); }
.maintenance-planning-page .status-unestimated { border-color:#e0e6e8; background:#f1f4f5; color:var(--planning-neutral); }
.maintenance-planning-page .planning-km-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem; margin:.75rem 0 .55rem; }
.maintenance-planning-page .planning-km-grid div { padding:.25rem 0; border-radius:0; background:transparent; }
.maintenance-planning-page .planning-km-grid span,.maintenance-planning-page .planning-estimate-grid span { color:var(--planning-muted); font-size:.73rem; }
.maintenance-planning-page .planning-km-grid strong { margin-top:.1rem; color:var(--planning-ink); font-size:1rem; font-variant-numeric:tabular-nums; }
.maintenance-planning-page .planning-progress { height:5px; margin:.45rem 0 .7rem; background:#e8eeea; }
.maintenance-planning-page .planning-progress span { background:#57846a; }
.maintenance-planning-page .planning-estimate { margin:.6rem 0 0; padding:.7rem .75rem; border:1px solid #e7ece9; border-radius:10px; background:var(--planning-soft); }
.planning-estimate-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.6rem .85rem; }
.planning-estimate-grid > div { min-width:0; }
.planning-estimate-grid strong { display:block; margin-top:.12rem; color:var(--planning-ink); font-size:.87rem; font-weight:650; line-height:1.35; }
.maintenance-planning-page .planning-estimate-grid .planning-date { color:var(--planning-green); font-size:.95rem; }
.maintenance-planning-page .planning-estimate-grid .due-date,.maintenance-planning-page .planning-danger-text { color:var(--planning-red)!important; }
.maintenance-planning-page .planning-estimate-grid .neutral-date { color:var(--planning-neutral); font-size:.85rem; }
.maintenance-planning-page .confidence-alta { color:var(--planning-green); }.maintenance-planning-page .confidence-media { color:#526b60; }.maintenance-planning-page .confidence-baja { color:var(--planning-amber); }
.maintenance-planning-page .planning-card-actions { gap:.45rem; margin-top:.7rem; }
.maintenance-planning-page .planning-card-actions .btn:hover,.maintenance-planning-page .planning-filter-actions .btn:hover,.maintenance-planning-page .planning-heading .btn:hover { transform:translateY(-1px); box-shadow:0 4px 10px rgba(31,62,45,.1); }
.maintenance-planning-page .planning-table-view { border:1px solid var(--planning-border); border-radius:12px; background:#fff; }
@media (max-width:1100px) { .maintenance-planning-page .planning-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:760px) {
    .maintenance-planning-page .planning-heading { align-items:flex-start; flex-direction:row; }
    .maintenance-planning-page .planning-heading h1 { font-size:1.35rem; }
    .maintenance-planning-page .planning-heading > .btn { flex:0 0 auto; }
    .maintenance-planning-page .planning-summary { grid-template-columns:1fr; gap:.55rem; }
    .maintenance-planning-page .planning-card-list { grid-template-columns:1fr; }
    .maintenance-planning-page .planning-card-header { flex-direction:row; }
    .maintenance-planning-page .planning-filters { grid-template-columns:1fr 1fr; }
    .maintenance-planning-page .planning-filter-actions { grid-column:1/-1; }
}
@media (max-width:520px) {
    .maintenance-planning-page { padding:.8rem; }
    .maintenance-planning-page .planning-heading { flex-direction:column; align-items:stretch; }
    .maintenance-planning-page .planning-heading > .btn { align-self:flex-start; }
    .maintenance-planning-page .planning-filters { grid-template-columns:1fr; }
    .maintenance-planning-page .planning-filter-actions { grid-column:auto; }
    .maintenance-planning-page .planning-card-header { flex-direction:column; }
    .maintenance-planning-page .planning-status { align-self:flex-start; }
}

/* Compact weekly maintenance schedule */
.maintenance-planning-page .schedule-navigation {
    display:grid;
    grid-template-columns:auto auto minmax(160px,1fr) auto auto;
    align-items:center;
    gap:.55rem;
    margin:0 0 .75rem;
    padding:.65rem;
    border:1px solid var(--planning-border);
    border-radius:12px;
    background:#fff;
}
.maintenance-planning-page .schedule-navigation .btn { min-height:36px; padding:0 .7rem; border:1px solid var(--planning-border); border-radius:8px; background:#fff; color:var(--planning-ink); font-size:.8rem; box-shadow:none; }
.maintenance-planning-page .schedule-week-label { display:grid; justify-items:center; color:var(--planning-ink); font-size:.9rem; }
.maintenance-planning-page .schedule-week-label span { color:var(--planning-muted); font-size:.72rem; }
.maintenance-planning-page .schedule-period { display:flex; align-items:center; gap:.4rem; color:var(--planning-muted); font-size:.76rem; white-space:nowrap; }
.maintenance-planning-page .schedule-period select { min-height:36px; padding:.35rem .5rem; border:1px solid var(--planning-border); border-radius:8px; background:#fff; color:var(--planning-ink); font-size:16px; }
.maintenance-planning-page .planning-timeline[hidden] { display:none!important; }
.maintenance-planning-page .planning-calendar-scroll { max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; border-radius:11px; scrollbar-color:#aab8c2 #edf1f4; }
.maintenance-planning-page .planning-week-grid { display:grid; grid-template-columns:repeat(7,minmax(132px,1fr)); gap:.55rem; min-width:980px; }
.maintenance-planning-page .planning-day { min-width:0; min-height:190px; border:1px solid var(--planning-border); border-radius:10px; background:#fff; }
.maintenance-planning-page .planning-day.is-today { border-color:#9cabb7; box-shadow:inset 0 2px 0 #24465c; }
.maintenance-planning-page .planning-day-header { display:flex; justify-content:space-between; align-items:center; gap:.3rem; padding:.55rem .6rem; border-bottom:1px solid var(--planning-border); background:#f6f8fa; color:var(--planning-ink); }
.maintenance-planning-page .planning-day-header div { display:flex; flex-direction:column; line-height:1.25; }
.maintenance-planning-page .planning-day-header strong { font-size:.78rem; }
.maintenance-planning-page .planning-day-header time { color:var(--planning-muted); font-size:.7rem; }
.maintenance-planning-page .planning-day-header > span { display:grid; min-width:20px; height:20px; place-items:center; border-radius:50%; background:#e9eef2; color:var(--planning-muted); font-size:.68rem; }
.maintenance-planning-page .planning-day.is-today .planning-day-header { background:#eef2f5; }
.maintenance-planning-page .planning-day-items { display:grid; align-content:start; gap:.4rem; min-height:140px; padding:.4rem; }
.maintenance-planning-page .planning-day-empty { margin:.4rem .1rem; color:#82909c; font-size:.7rem; text-align:center; }
.maintenance-planning-page .schedule-item { min-width:0; border:1px solid #e1e7ec; border-left:3px solid #bd9a4c; border-radius:7px; background:#fff; }
.maintenance-planning-page .schedule-item.state-due { border-left-color:#bd6868; }
.maintenance-planning-page .schedule-item.state-unestimated { border-left-color:#8796a3; }
.maintenance-planning-page .schedule-item-details > summary { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:.15rem .35rem; padding:.45rem; cursor:pointer; list-style:none; }
.maintenance-planning-page .schedule-item-details > summary::-webkit-details-marker { display:none; }
.maintenance-planning-page .schedule-item-vehicle { min-width:0; overflow-wrap:anywhere; color:var(--planning-ink); font-size:.75rem; font-weight:700; }
.maintenance-planning-page .schedule-item-type { grid-column:1/-1; overflow:hidden; color:#52677a; font-size:.7rem; text-overflow:ellipsis; white-space:nowrap; }
.maintenance-planning-page .schedule-item-meta { display:flex; grid-column:1/-1; flex-wrap:wrap; align-items:center; gap:.25rem; color:var(--planning-muted); font-size:.66rem; }
.maintenance-planning-page .schedule-status { display:inline-flex; padding:.12rem .34rem; border-radius:999px; background:#f6f0e2; color:#805d18; font-size:.63rem; font-weight:700; }
.maintenance-planning-page .schedule-status.status-due { background:#f8eeee; color:#a14343; }
.maintenance-planning-page .schedule-status.status-unestimated { background:#eef1f4; color:#596b7a; }
.maintenance-planning-page .schedule-item-expanded { padding:.5rem; border-top:1px solid var(--planning-border); background:#f7f9fb; }
.maintenance-planning-page .schedule-progress { height:4px; margin-bottom:.45rem; overflow:hidden; border-radius:9px; background:#e4eaf0; }
.maintenance-planning-page .schedule-progress span { display:block; height:100%; border-radius:inherit; background:#287653; }
.maintenance-planning-page .schedule-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.45rem .6rem; }
.maintenance-planning-page .schedule-detail-grid > div { min-width:0; }
.maintenance-planning-page .schedule-detail-grid span { display:block; color:var(--planning-muted); font-size:.66rem; }
.maintenance-planning-page .schedule-detail-grid strong { display:block; overflow-wrap:anywhere; color:var(--planning-ink); font-size:.72rem; font-weight:650; }
.maintenance-planning-page .schedule-item-actions { display:flex; flex-wrap:wrap; gap:.35rem; margin-top:.55rem; }
.maintenance-planning-page .schedule-item-actions .btn { min-height:32px; padding:0 .5rem; border:1px solid var(--planning-action); border-radius:7px; background:var(--planning-action); color:#fff; font-size:.7rem; }
.maintenance-planning-page .schedule-item-actions .btn.secondary { border-color:var(--planning-border); background:#fff; color:var(--planning-ink); }
.maintenance-planning-page .planning-attention-section { margin-top:.8rem; padding:.6rem; border:1px solid var(--planning-border); border-radius:11px; background:#fff; }
.maintenance-planning-page .planning-attention-section > header { display:flex; align-items:center; gap:.45rem; margin-bottom:.45rem; }
.maintenance-planning-page .planning-attention-section h2 { margin:0; color:var(--planning-ink); font-size:.9rem; }
.maintenance-planning-page .planning-attention-section > header > span { display:grid; min-width:21px; height:21px; place-items:center; border-radius:50%; background:#eef1f4; color:var(--planning-muted); font-size:.68rem; }
.maintenance-planning-page .planning-overdue-section > header > span { background:#f8eeee; color:#a14343; }
.maintenance-planning-page .planning-unestimated-section > header > span { background:#eef1f4; color:#596b7a; }
.maintenance-planning-page .planning-attention-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; gap:.4rem; }
.maintenance-planning-page .planning-attention-list > .planning-day-empty { grid-column:1/-1; text-align:left; }
.maintenance-planning-page .planning-table-view[hidden] { display:none!important; }
.maintenance-planning-page .schedule-navigation + .planning-timeline { margin-top:.1rem; }
@media (max-width:1100px) {
    .maintenance-planning-page .schedule-navigation { grid-template-columns:1fr auto 1fr; }
    .maintenance-planning-page .schedule-week-label { grid-column:1/-1; grid-row:1; }
    .maintenance-planning-page .schedule-navigation > a:first-child { grid-column:1; grid-row:2; }
    .maintenance-planning-page .schedule-today { grid-column:2; grid-row:2; }
    .maintenance-planning-page .schedule-navigation > a:nth-of-type(3) { grid-column:3; grid-row:2; }
    .maintenance-planning-page .schedule-period { grid-column:1/-1; grid-row:3; justify-content:flex-end; }
    .maintenance-planning-page .schedule-navigation .btn { justify-self:stretch; }
}
@media (max-width:760px) {
    .maintenance-planning-page .planning-week-grid { grid-template-columns:minmax(0,1fr); min-width:0; }
    .maintenance-planning-page .planning-day { min-height:0; }
    .maintenance-planning-page .planning-day-header { position:sticky; top:0; z-index:1; }
    .maintenance-planning-page .planning-day-items { min-height:0; }
    .maintenance-planning-page .schedule-item-details > summary { grid-template-columns:minmax(0,1fr) auto; padding:.55rem; }
    .maintenance-planning-page .schedule-item-meta { grid-column:2; grid-row:1/3; justify-content:flex-end; }
    .maintenance-planning-page .schedule-item-type { grid-column:1; }
    .maintenance-planning-page .planning-attention-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:520px) {
    .maintenance-planning-page .schedule-navigation { grid-template-columns:1fr 1fr; }
    .maintenance-planning-page .schedule-week-label { grid-column:1/-1; }
    .maintenance-planning-page .schedule-navigation > a:first-child { grid-column:1; grid-row:2; }
    .maintenance-planning-page .schedule-today { grid-column:2; grid-row:2; }
    .maintenance-planning-page .schedule-navigation > a:nth-of-type(3) { grid-column:1/-1; grid-row:3; }
    .maintenance-planning-page .schedule-period { grid-column:1/-1; grid-row:4; justify-content:space-between; }
    .maintenance-planning-page .planning-attention-list { grid-template-columns:1fr; }
}

/* Clean Minimal treatment for the maintenance planning module only. */
.maintenance-planning-page {
    --planning-ink: #1f2937;
    --planning-title: #166534;
    --planning-muted: #475569;
    --planning-border: #e5e7eb;
    --planning-surface: #fff;
    --planning-soft: #f0fdf4;
    --planning-green: #166534;
    --planning-green-hover: #14532d;
    --planning-green-soft: #f0fdf4;
    --planning-amber: #a16207;
    --planning-amber-soft: #fef3c7;
    --planning-red: #b91c1c;
    --planning-red-soft: #fef2f2;
    --planning-neutral: #64748b;
    max-width: 1540px;
    padding: 1rem 1.1rem 1.2rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f5f7f6;
    color: var(--planning-ink);
}
.maintenance-planning-page .planning-heading { margin-bottom: .85rem; }
.maintenance-planning-page .planning-heading h1 { gap: .55rem; font-size: clamp(1.35rem, 2vw, 1.75rem); color: var(--planning-title); }
.maintenance-planning-page .planning-heading p { margin-top: .2rem; color: var(--planning-muted); font-size: .88rem; }
.maintenance-planning-page .planning-eyebrow { color: var(--planning-muted); font-size: .68rem; }
.maintenance-planning-page .planning-title-icon { width: 30px; height: 30px; border-radius: 8px; background: #fff; color: var(--planning-title); }
.maintenance-planning-page .planning-view-toggle { min-height: 36px; padding: 0 .75rem; border: 1px solid var(--planning-border); border-radius: 8px; background: #fff; color: var(--planning-ink); box-shadow: none; font-size: .8rem; }
.app-shell-body .maintenance-planning-page .planning-view-toggle { border-color: #bbf7d0; background: #fff; color: var(--planning-title); }
.maintenance-planning-page .planning-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-bottom: .75rem; }
.maintenance-planning-page .planning-summary-card { min-height: 70px; grid-template-columns: 30px minmax(0, 1fr) auto; padding: .65rem .8rem; border-radius: 10px; background: #fff; box-shadow: 0 1px 3px rgba(36, 55, 70, .035); }
.maintenance-planning-page .planning-summary-card:hover,.maintenance-planning-page .planning-summary-card.selected { border-color: #cbd7df; background: #fff; box-shadow: 0 2px 7px rgba(36, 55, 70, .06); }
.maintenance-planning-page .planning-summary-icon { width: 26px; height: 26px; border-radius: 7px; background: var(--planning-soft); }
.maintenance-planning-page .planning-summary-copy { grid-column: 2; display: grid; gap: .05rem; }
.maintenance-planning-page .planning-summary-label { color: var(--planning-ink); font-size: .78rem; }
.maintenance-planning-page .planning-summary-copy small { color: var(--planning-muted); font-size: .68rem; }
.maintenance-planning-page .planning-summary-card strong { font-size: 1.35rem; }
.maintenance-planning-page .planning-filters { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: .6rem; margin-bottom: .75rem; padding: .7rem; border-radius: 10px; background: #fff; box-shadow: none; }
.maintenance-planning-page .planning-filters label { color: var(--planning-muted); font-size: .73rem; }
.maintenance-planning-page .planning-filters input,.maintenance-planning-page .planning-filters select { min-height: 36px; padding: .4rem .55rem; border-color: var(--planning-border); border-radius: 7px; background: #fff; color: var(--planning-ink); font-size: 16px; }
.maintenance-planning-page .planning-filters input:focus,.maintenance-planning-page .planning-filters select:focus { border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .14); }
.maintenance-planning-page .planning-filter-actions { align-items: end; }
.maintenance-planning-page .planning-filter-actions .btn { min-height: 36px; padding: 0 .7rem; border: 1px solid var(--planning-green); border-radius: 7px; background: var(--planning-green); color: #fff; font-size: .77rem; box-shadow: none; }
.maintenance-planning-page .planning-filter-actions .btn:hover,.maintenance-planning-page .schedule-item-actions .btn:hover { background: var(--planning-green-hover); border-color: var(--planning-green-hover); }
.maintenance-planning-page .planning-filter-actions .btn.secondary { border-color: var(--planning-border); background: #fff; color: var(--planning-ink); }
.maintenance-planning-page .schedule-navigation { gap: .45rem; margin-bottom: .65rem; padding: .5rem; border-radius: 9px; }
.maintenance-planning-page .schedule-navigation .btn { min-height: 33px; border-radius: 7px; }
.maintenance-planning-page .schedule-week-label strong { font-size: .84rem; color: var(--planning-ink); }
.maintenance-planning-page .planning-calendar-scroll { overflow: visible; }
.maintenance-planning-page .planning-week-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 900px; gap: .4rem; }
.maintenance-planning-page .planning-day { min-height: 115px; border-radius: 8px; }
.maintenance-planning-page .planning-day-header { padding: .42rem .5rem; border-radius: 7px 7px 0 0; background: #f0fdf4; color: var(--planning-title); }
.maintenance-planning-page .planning-day.is-today { border-color: #9aabb8; box-shadow: inset 0 2px 0 #29465b; }
.maintenance-planning-page .planning-day-items { min-height: 48px; max-height: 340px; gap: .32rem; overflow-y: auto; padding: .32rem; scrollbar-width: thin; }
.maintenance-planning-page .planning-day-empty { margin: .35rem .1rem; color: var(--planning-muted); font-size: .68rem; }
.maintenance-planning-page .schedule-item { border-color: var(--planning-border); border-left: 2px solid #c28a32; border-radius: 6px; }
.app-shell-body .maintenance-planning-page article.schedule-item { margin: 0; padding: 0; box-shadow: none; }
.app-shell-body .maintenance-planning-page article.schedule-item:hover { transform: none; box-shadow: none; }
.maintenance-planning-page .schedule-item.state-due { border-left-color: #c45b5b; }
.maintenance-planning-page .schedule-item.state-unestimated { border-left-color: #8493a1; }
.maintenance-planning-page .schedule-item-details > summary { gap: .12rem .3rem; padding: .38rem; }
.maintenance-planning-page .schedule-item-vehicle { font-size: .72rem; }
.maintenance-planning-page .schedule-item-type { color: #52697a; font-size: .67rem; }
.maintenance-planning-page .schedule-item-meta { gap: .2rem .35rem; font-size: .64rem; }
.maintenance-planning-page .schedule-status { padding: .1rem .3rem; background: var(--planning-amber-soft); color: var(--planning-amber); font-size: .6rem; }
.maintenance-planning-page .schedule-status.status-due { background: var(--planning-red-soft); color: var(--planning-red); }
.maintenance-planning-page .schedule-status.status-unestimated { background: #f1f5f9; color: var(--planning-neutral); }
.maintenance-planning-page .schedule-item-expanded { background: #f8fafb; }
.maintenance-planning-page .schedule-progress span { background: var(--planning-green); }
.maintenance-planning-page .schedule-item-actions .btn { border-color: var(--planning-green); background: var(--planning-green); }
.maintenance-planning-page .planning-attention-section { padding: .55rem; border-radius: 9px; }
.maintenance-planning-page .planning-attention-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
.maintenance-planning-page .planning-table-view { overflow: hidden; border-radius: 9px; background: #fff; }
.maintenance-planning-page .planning-table-view .table-responsive { max-width: 100%; overflow-x: auto; }
.maintenance-planning-page .planning-table { min-width: 1000px; }
.maintenance-planning-page .planning-table .km-remaining-negative { color: var(--planning-red) !important; font-weight: 750; white-space: nowrap; }
.maintenance-planning-page .planning-attention-section > header h2 { color: var(--planning-title); }
.maintenance-planning-page .planning-overdue-section > header > span { background: var(--planning-red-soft); color: var(--planning-red); }
.maintenance-planning-page .planning-unestimated-section > header > span { background: #f1f5f9; color: var(--planning-neutral); }
.maintenance-planning-page .planning-day-header > div > strong { color: var(--planning-title); }
.maintenance-planning-page header {
    position: static;
    top: auto;
    width: auto;
    z-index: auto;
    padding: 0;
    box-shadow: none;
    background: transparent;
    transition: none;
}
.maintenance-planning-page header:hover {
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}
.maintenance-planning-page .planning-heading { background: transparent; }
.maintenance-planning-page .planning-day-header { background: #f0fdf4; }
.maintenance-planning-page .planning-attention-section > header { background: #fff; }
@media (max-width: 1100px) {
    .maintenance-planning-page .planning-week-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); min-width: 0; }
    .maintenance-planning-page .planning-day-items { max-height: 300px; }
}
@media (max-width: 760px) {
    .maintenance-planning-page { padding: .8rem; }
    .maintenance-planning-page .planning-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .maintenance-planning-page .planning-summary-card:last-child { grid-column: 1 / -1; }
    .maintenance-planning-page .planning-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .maintenance-planning-page .planning-week-grid { grid-template-columns: minmax(0, 1fr); }
    .maintenance-planning-page .planning-day { min-height: 0; }
    .maintenance-planning-page .planning-day-items { max-height: none; min-height: 0; overflow: visible; }
    .maintenance-planning-page .planning-day-header { position: static; }
    .maintenance-planning-page .planning-attention-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .maintenance-planning-page .planning-heading { gap: .65rem; }
    .maintenance-planning-page .planning-heading h1 { font-size: 1.25rem; }
    .maintenance-planning-page .planning-summary { gap: .45rem; }
    .maintenance-planning-page .planning-summary-card { grid-template-columns: 25px minmax(0, 1fr) auto; padding: .55rem; }
    .maintenance-planning-page .planning-summary-copy small { font-size: .64rem; }
    .maintenance-planning-page .planning-filters { grid-template-columns: minmax(0, 1fr); }
    .maintenance-planning-page .planning-filter-actions { grid-column: auto; }
    .maintenance-planning-page .planning-filter-actions .btn { flex: 1; justify-content: center; }
    .maintenance-planning-page .planning-attention-list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .maintenance-planning-page *, .maintenance-planning-page *::before, .maintenance-planning-page *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
