.vehicle-profile-photo { display: block; width: 100%; height: clamp(240px, 35vw, 480px); object-fit: contain; background: color-mix(in srgb, var(--ink) 5%, var(--surface)); border-radius: 12px; }
.vehicle-profile-thumbnails { display: flex; gap: 10px; overflow-x: auto; margin-top: 14px; padding-bottom: 6px; }
.vehicle-profile-thumbnails button { flex: 0 0 80px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.vehicle-profile-thumbnails button:hover, .vehicle-profile-thumbnails button:focus-visible { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 2px; }
.vehicle-profile-thumbnails img { width: 72px; height: 54px; object-fit: cover; border-radius: 5px; }
.vehicle-profile .carousel-control-prev, .vehicle-profile .carousel-control-next { width: 48px; height: 48px; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.65); border-radius: 50%; margin: 0 12px; }
.vehicle-profile-photo-count { margin: 10px 0 0; color: var(--muted); font-size: .8rem; }
.vehicle-profile-no-photo { display: grid; place-content: center; text-align: center; min-height: 240px; color: var(--muted); }
.vehicle-profile-no-photo > i { font-size: 3rem; }
.vehicle-profile-text { white-space: pre-wrap; line-height: 1.6; }
.vehicle-profile-price { display: grid; gap: 8px; margin-bottom: 18px; }
.vehicle-profile-price span { color: var(--muted); font-size: .8rem; }
.vehicle-profile-price strong { color: var(--ink); font-size: clamp(1.2rem, 2vw, 1.6rem); overflow-wrap: anywhere; }
.vehicle-profile-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.vehicle-profile-documents { padding: 0; margin: 0; list-style: none; }
.vehicle-profile-documents li { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.vehicle-profile-documents li:first-child { padding-top: 0; }
.vehicle-profile-documents li:last-child { border-bottom: 0; padding-bottom: 0; }
.vehicle-profile-documents li > i { color: var(--blue); font-size: 1.3rem; }
.vehicle-profile-documents li > div { min-width: 0; display: grid; gap: 6px; }
.vehicle-profile-documents strong { font-size: .85rem; overflow-wrap: anywhere; }
.vehicle-profile-documents span { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.vehicle-profile-documents a { color: var(--blue); font-size: .8rem; }
.customer-profile { color: var(--ink); }
.customer-profile-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; color: var(--muted); font-size: .875rem; }
.customer-profile-nav a { color: var(--muted); text-decoration: none; }
.customer-profile-nav a:hover { color: var(--blue); }
.customer-profile .customer-profile-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding: 28px; border-top: 3px solid var(--blue); }
.customer-profile-identity { display: flex; align-items: center; gap: 20px; min-width: 0; flex: 1 1 300px; }
.customer-profile-avatar { display: grid; place-items: center; flex: 0 0 72px; height: 72px; border-radius: 20px; background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); font-size: 1.5rem; font-weight: 700; }
.customer-profile-heading { min-width: 0; }
.customer-profile-eyebrow { color: var(--muted); font-size: .7rem; font-weight: 600; letter-spacing: .1em; }
.customer-profile .customer-profile-heading h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; margin: 5px 0 7px; overflow-wrap: anywhere; }
.customer-profile-heading p { margin: 0; color: var(--muted); font-size: .875rem; }
.customer-profile-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.customer-profile-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 24px; }
.customer-profile-main, .customer-profile-side { min-width: 0; }
.customer-profile .customer-profile-card { padding: 24px; }
.customer-profile-section-heading { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.customer-profile-section-icon { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 10px; background: color-mix(in srgb, var(--blue) 9%, transparent); color: var(--blue); font-size: 1.1rem; }
.customer-profile .customer-profile-section-heading h2 { font-size: 1rem; font-weight: 650; }
.customer-profile-section-heading p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.customer-profile-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 28px; margin: 0; }
.customer-profile-details dt { margin-bottom: 7px; color: var(--muted); font-size: .8rem; font-weight: 500; }
.customer-profile-details dd { margin: 0; color: var(--ink); font-weight: 550; overflow-wrap: anywhere; }
.customer-profile-full { grid-column: 1 / -1; }
.customer-profile-address { white-space: pre-wrap; line-height: 1.7; }
.customer-profile-tin { font-variant-numeric: tabular-nums; }
.customer-profile-status { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--blue) 9%, transparent); color: var(--blue); font-size: .75rem; font-weight: 600; }
.customer-profile-document { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; margin-top: 20px; padding: 24px 18px; border: 1px dashed var(--line); border-radius: 12px; }
.customer-profile-document-icon { color: var(--blue); font-size: 2.4rem; }
.customer-profile-document strong { max-width: 100%; overflow-wrap: anywhere; font-size: .9rem; }
.customer-profile-document p { color: var(--muted); font-size: .8rem; line-height: 1.6; margin: 0 0 6px; }
.customer-profile-record { grid-template-columns: 1fr; gap: 18px; }
@media (max-width: 1100px) { .customer-profile-grid { grid-template-columns: 1fr; } .customer-profile-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; } }
@media (max-width: 600px) { .customer-profile-side { display: block; } .customer-profile .customer-profile-header, .customer-profile .customer-profile-card { padding: 20px; } .customer-profile-identity { gap: 14px; flex-basis: 100%; } .customer-profile-avatar { flex-basis: 56px; height: 56px; border-radius: 16px; font-size: 1.2rem; } .customer-profile-actions { width: 100%; } .customer-profile-actions .btn { flex: 1 1 150px; } .customer-profile-details { grid-template-columns: 1fr; gap: 20px; } .customer-profile-nav > span { display: none; } }

:root {
    --sidebar: #111827;
    --sidebar-muted: #9ca3af;
    --surface: #ffffff;
    --page: #f3f6fb;
    --line: #dfe5ee;
    --ink: #1f2937;
    --muted: #6b7280;
    --blue: #2563eb;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-size: 15px;
}

.auth-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 48%, #ecfeff 100%);
}

.auth-shell {
    width: min(440px, calc(100vw - 32px));
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 22px 70px rgba(31, 41, 55, 0.14);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.login-brand span,
.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
}

.login-brand h1,
.topbar h1,
.panel h2 {
    margin: 0;
    letter-spacing: 0;
}

.login-brand h1 {
    font-size: 1.35rem;
}

.login-brand p,
.topbar p,
.panel-header p {
    margin: 0;
    color: var(--muted);
}

.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--sidebar);
    color: #fff;
    padding: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 22px;
}

.admin-menu {
    display: grid;
    gap: 6px;
}

.menu-group {
    display: grid;
    gap: 4px;
}

.menu-toggle,
.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    width: 100%;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--sidebar-muted);
    padding: 10px 12px;
    text-align: left;
    text-decoration: none;
}

.menu-toggle {
    justify-content: space-between;
    color: #d1d5db;
    font-weight: 700;
}

.menu-toggle span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-toggle:hover,
.menu-toggle:not(.collapsed) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.menu-chevron {
    font-size: 0.8rem;
    transition: transform 0.18s ease;
}

.menu-toggle:not(.collapsed) .menu-chevron {
    transform: rotate(180deg);
}

.submenu {
    display: grid;
    gap: 2px;
    margin: 2px 0 6px 18px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.submenu .nav-link {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 0.92rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.main-panel {
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 78px;
    padding: 18px 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.notification-bell { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #e2e8f0; border-radius: 10px; color: #334155; background: #fff; text-decoration: none; }
.notification-bell:hover { color: #2563eb; border-color: #bfdbfe; }
.notification-bell span { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; color: #fff; background: #dc2626; font-size: .68rem; font-weight: 700; }
.notification-icon { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; color: #2563eb; background: #eff6ff; }
.notification-unread { border-left: 3px solid #2563eb !important; background: #f8fbff; padding-left: 12px !important; }

.topbar h1 {
    font-size: 1.45rem;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #075985;
    font-weight: 700;
}

.user-chip strong,
.user-chip span {
    display: block;
    line-height: 1.2;
}

.user-chip span {
    color: var(--muted);
    font-size: 0.83rem;
}

.content {
    padding: 28px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat-card,
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 42px rgba(31, 41, 55, 0.06);
}

.stat-card {
    position: relative;
    min-height: 126px;
    padding: 18px;
    overflow: hidden;
}

.stat-card i {
    font-size: 1.6rem;
}

.stat-card span {
    display: block;
    margin-top: 12px;
    color: var(--muted);
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.accent-blue i { color: #2563eb; }
.accent-green i { color: #059669; }
.accent-yellow i { color: #ca8a04; }
.accent-red i { color: #dc2626; }

.panel {
    padding: 18px;
}

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

.panel h2 {
    font-size: 1.05rem;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    color: #4b5563;
    font-size: 0.78rem;
    text-transform: uppercase;
    border-bottom-color: var(--line);
}

.table-subtext {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
}

.maintenance-total {
    min-height: 31px;
    display: inline-flex;
    align-items: center;
    font-size: 0.86rem;
}

.icon-btn {
    width: 34px;
    height: 34px;
    padding: 0;
}

.vehicle-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
}

.vehicle-cell span {
    display: block;
    color: var(--muted);
    font-size: 0.86rem;
}

.vehicle-thumb {
    display: grid;
    place-items: center;
    width: 58px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8fafc;
    color: #64748b;
    overflow: hidden;
}

.vehicle-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.vehicle-image-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.vehicle-image-card::before {
    content: "Main image";
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    padding: 4px 8px;
    border-radius: 7px;
    background: #2563eb;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

.vehicle-image-card.is-primary-image {
    border-color: #93c5fd;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.14);
}

.vehicle-image-card.is-primary-image::before {
    display: block;
}

.vehicle-image-card.is-dragging {
    opacity: 0.55;
    border-style: dashed;
}

.vehicle-image-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.vehicle-image-card form,
.vehicle-image-card > .btn {
    padding: 10px;
}

.image-order-tools {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 8px;
    padding: 10px 10px 0;
}

.image-drag-handle {
    cursor: grab;
    min-height: 42px;
}

.image-drag-handle:active {
    cursor: grabbing;
}

.image-order-field {
    display: grid;
    gap: 4px;
}

.image-order-field span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.report-link {
    display: grid;
    gap: 8px;
    min-height: 140px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--ink);
    text-decoration: none;
}

.report-link:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.report-link i {
    color: var(--blue);
    font-size: 1.6rem;
}

.report-link span {
    color: var(--muted);
}

.report-filter {
    display: grid;
    grid-template-columns: minmax(260px, 420px) auto;
    gap: 12px;
    align-items: end;
}

.report-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.report-summary-grid .stat-card strong {
    font-size: 1.2rem;
    line-height: 1.25;
}

.report-print-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
    padding-bottom: 18px;
}

.report-print-header h2 {
    margin: 0;
    font-size: 1.35rem;
}

.report-table tfoot th {
    border-top: 2px solid var(--ink);
    font-size: 1rem;
}

.form-panel {
    max-width: 980px;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 10px;
    margin-bottom: 18px;
}

.empty-state {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 360px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 32px;
}

.empty-state i {
    font-size: 3rem;
    color: #dc2626;
}

@media (max-width: 980px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .admin-menu {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .menu-group {
        min-width: 220px;
    }

    .sidebar .nav {
        flex-direction: row !important;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .sidebar .nav-link {
        white-space: nowrap;
    }

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

.dashboard-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 18px;
}

.chart-panel {
    min-width: 0;
}

.chart-container {
    position: relative;
    height: 330px;
}

.profit-stats-grid .stat-card strong {
    font-size: clamp(1.05rem, 1.6vw, 1.45rem);
}

@media (max-width: 900px) {
    .dashboard-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .topbar,
    .content {
        padding: 18px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-grid,
    .search-row {
        grid-template-columns: 1fr;
    }

    .report-filter,
    .report-summary-grid {
        grid-template-columns: 1fr;
    }

    .panel-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Modern mobile-first admin shell */
:root {
    --sidebar: #0b1220;
    --sidebar-muted: #94a3b8;
    --surface: #ffffff;
    --page: #f4f7fb;
    --line: #e5eaf1;
    --ink: #172033;
    --muted: #718096;
    --blue: #c80000;
    --blue-dark: #9f0000;
    --blue-soft: #fff1f1;
    --radius: 16px;
    --shadow: 0 8px 30px rgba(15, 23, 42, .06);
}

.admin-layout { grid-template-columns: 270px minmax(0, 1fr); }

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.sidebar {
    width: 270px;
    padding: 20px 14px;
    overflow-y: auto;
    scrollbar-width: thin;
    z-index: 1040;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.brand { margin: 0; min-width: 0; }
.brand > span:last-child { display: grid; line-height: 1.1; }
.brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand small { margin-top: 5px; color: #64748b; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { flex: 0 0 42px; border-radius: 13px; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); box-shadow: 0 8px 24px rgba(200, 0, 0, .3); }
.sidebar-close { display: none; border: 0; background: rgba(255,255,255,.08); color: #fff; width: 40px; height: 40px; border-radius: 12px; }

.menu-toggle, .sidebar .nav-link { min-height: 46px; border-radius: 12px; padding: 11px 12px; }
.menu-toggle { font-size: .9rem; }
.menu-toggle:hover, .menu-toggle:not(.collapsed), .sidebar .nav-link:hover { background: rgba(255,255,255,.07); }
.sidebar .nav-link.active { color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); box-shadow: 0 6px 18px rgba(200, 0, 0, .22); }
.submenu { margin-left: 19px; border-color: rgba(148,163,184,.18); }

.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: 76px;
    padding: 14px 28px;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.topbar h1 { font-size: 1.35rem; font-weight: 750; }
.topbar p { font-size: .82rem; }
.mobile-menu-button { display: none; width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--ink); font-size: 1.4rem; }
.avatar { width: 42px; height: 42px; background: var(--blue-soft); color: var(--blue); }
.user-chip .btn { width: 40px; height: 40px; border-radius: 12px; }

.content { width: 100%; max-width: 1680px; margin: 0 auto; padding: 26px; }
.stat-card, .panel { border-color: rgba(226,232,240,.9); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card { min-height: 138px; padding: 20px; transition: transform .2s ease, box-shadow .2s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 14px 35px rgba(15,23,42,.09); }
.stat-card i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #f8fafc; font-size: 1.35rem; }
.stat-card span { margin: 14px 0 5px; font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.stat-card strong { font-size: clamp(1.35rem, 2vw, 1.85rem); }
.panel { padding: 20px; }
.panel h2 { font-size: 1.08rem; font-weight: 750; }
.panel-header p { margin-top: 3px; font-size: .86rem; }
.form-control, .form-select { min-height: 44px; border-color: #dce3ec; border-radius: 11px; }
.form-control:focus, .form-select:focus { border-color: #dc5252; box-shadow: 0 0 0 4px rgba(200, 0, 0, .12); }
.btn { min-height: 40px; border-radius: 11px; font-weight: 650; }
.btn-primary { border-color: var(--blue); background: var(--blue); }
.table-responsive { border-radius: 12px; -webkit-overflow-scrolling: touch; }
.table > :not(caption) > * > * { padding: .85rem .75rem; }
.table tbody tr { border-color: #edf1f5; }
.table tbody tr:hover { background: #fafbff; }
.table td:last-child, .table th:last-child { white-space: nowrap; }
.badge { padding: .48em .7em; border-radius: 8px; }
.alert { border: 0; border-radius: 13px; }
.mobile-bottom-nav, .sidebar-backdrop { display: none; }

@media (max-width: 1023.98px) {
    body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
    body.sidebar-open { overflow: hidden; }
    .admin-layout { display: block; min-height: 100vh; }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(88vw, 330px);
        height: 100dvh;
        padding: 18px 14px calc(24px + env(safe-area-inset-bottom));
        transform: translateX(-105%);
        transition: transform .25s cubic-bezier(.22,1,.36,1);
        box-shadow: 24px 0 60px rgba(2,6,23,.28);
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-head { position: sticky; top: -18px; z-index: 2; padding: 18px 0 14px; background: var(--sidebar); }
    .sidebar-close { display: grid; place-items: center; flex: 0 0 40px; }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 1035; background: rgba(15,23,42,.52); opacity: 0; visibility: hidden; display: block; transition: .2s ease; }
    body.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
    .admin-menu { display: grid; overflow: visible; padding: 0; }
    .menu-group { min-width: 0; }
    .sidebar .nav-link { white-space: normal; }
    .mobile-menu-button { display: grid; place-items: center; }
    .topbar { align-items: center; flex-direction: row; justify-content: flex-start; padding: 12px 16px; min-height: 68px; }
    .topbar-title { min-width: 0; flex: 1; }
    .topbar-title h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.08rem; }
    .topbar-title p { display: none; }
    .user-chip { gap: 7px; }
    .avatar { width: 38px; height: 38px; }
    .content { padding: 16px; }
    .mobile-bottom-nav {
        position: fixed; left: 10px; right: 10px; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 1030;
        display: flex; justify-content: space-around; min-height: 62px; padding: 7px 6px;
        border: 1px solid rgba(226,232,240,.9); border-radius: 18px; background: rgba(255,255,255,.96);
        box-shadow: 0 12px 40px rgba(15,23,42,.18); backdrop-filter: blur(16px);
    }
    .mobile-bottom-nav a, .mobile-bottom-nav button { display: grid; place-items: center; gap: 1px; min-width: 54px; border: 0; border-radius: 12px; background: transparent; color: #8490a3; padding: 5px 8px; text-decoration: none; font-size: .68rem; font-weight: 700; }
    .mobile-bottom-nav i { font-size: 1.18rem; }
    .mobile-bottom-nav .active { color: var(--blue); background: var(--blue-soft); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
    .stat-card { min-height: 125px; padding: 15px; }
    .stat-card i { width: 36px; height: 36px; font-size: 1.1rem; }
    .stat-card span { margin-top: 11px; font-size: .68rem; }
    .panel { padding: 16px; }
    .panel-header { align-items: center; flex-direction: row; flex-wrap: wrap; gap: 12px; }
    .panel-header > .btn, .panel-header > a.btn { flex: 0 0 auto; }
    .table { min-width: 680px; }
    .table-responsive::after { content: "Swipe to see more →"; position: sticky; left: 12px; display: inline-block; padding: 6px 0 2px; color: var(--muted); font-size: .72rem; }
    .form-panel { max-width: none; }
    .search-row { grid-template-columns: 1fr auto auto; }
    .chart-container { height: 280px; }
}

@media (max-width: 575.98px) {
    .content { padding: 13px; }
    .topbar { padding-inline: 12px; }
    .user-chip .avatar { display: none; }
    .panel { padding: 14px; }
    .panel-header { align-items: flex-start; }
    .panel-header > div { min-width: 0; flex: 1; }
    .panel-header > .btn, .panel-header > a.btn { width: auto; }
    .search-row, .report-filter { grid-template-columns: 1fr; }
    .search-row .btn, .report-filter .btn { width: 100%; }
    .form-panel .row > [class*="col-"] { width: 100%; }
    .form-panel .d-flex.justify-content-end { flex-direction: column-reverse; }
    .form-panel .d-flex.justify-content-end .btn { width: 100%; }
    .modal-dialog { margin: 10px; }
    .modal-content { border: 0; border-radius: 18px; }
    .dashboard-chart-grid { gap: 13px; }
    .chart-container { height: 250px; }
}

/* Per-user theme customization */
body {
    --blue: var(--user-accent, #4f8cff);
    --blue-dark: color-mix(in srgb, var(--blue) 78%, #000);
    --blue-soft: color-mix(in srgb, var(--blue) 14%, transparent);
}

body[data-theme-sidebar="gradient"] .sidebar {
    background: linear-gradient(165deg, color-mix(in srgb, var(--blue) 24%, #090d14) 0%, #090d14 52%, color-mix(in srgb, var(--blue) 12%, #090d14) 100%);
}

body[data-theme-density="compact"] .content { padding: 18px; }
body[data-theme-density="compact"] .panel { padding: 16px; border-radius: 14px; }
body[data-theme-density="compact"] .topbar { min-height: 68px; }
body[data-theme-density="compact"] .form-control,
body[data-theme-density="compact"] .form-select { min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
body[data-theme-density="compact"] .table > :not(caption) > * > * { padding: .55rem .65rem; }
body[data-theme-density="compact"] .menu-toggle,
body[data-theme-density="compact"] .sidebar .nav-link { min-height: 38px; padding-top: 7px; padding-bottom: 7px; }

body[data-user-theme="light"],
html[data-resolved-theme="light"] body[data-user-theme="system"] {
    --sidebar: #172033;
    --sidebar-muted: #aab5c8;
    --surface: #ffffff;
    --surface-raised: #f5f7fb;
    --page: #eef2f7;
    --line: rgba(15, 23, 42, .12);
    --ink: #172033;
    --muted: #687386;
    --shadow: 0 18px 45px rgba(15, 23, 42, .09);
    background: var(--page);
    color: var(--ink);
}
body[data-user-theme="light"]::before,
html[data-resolved-theme="light"] body[data-user-theme="system"]::before { background: radial-gradient(circle at 85% 5%, color-mix(in srgb, var(--blue) 10%, transparent), transparent 30%); }
body[data-user-theme="light"] .topbar,
html[data-resolved-theme="light"] body[data-user-theme="system"] .topbar { background: rgba(255,255,255,.88); }
body[data-user-theme="light"] .topbar h1,
html[data-resolved-theme="light"] body[data-user-theme="system"] .topbar h1 { color: var(--ink); }
body[data-user-theme="light"] .stat-card,
body[data-user-theme="light"] .panel,
body[data-user-theme="light"] .empty-state,
html[data-resolved-theme="light"] body[data-user-theme="system"] .stat-card,
html[data-resolved-theme="light"] body[data-user-theme="system"] .panel,
html[data-resolved-theme="light"] body[data-user-theme="system"] .empty-state { background: rgba(255,255,255,.96); }
body[data-user-theme="light"] .form-control,
body[data-user-theme="light"] .form-select,
html[data-resolved-theme="light"] body[data-user-theme="system"] .form-control,
html[data-resolved-theme="light"] body[data-user-theme="system"] .form-select { background-color: #fff; border-color: var(--line); color: var(--ink); }
body[data-user-theme="light"] .form-control:focus,
body[data-user-theme="light"] .form-select:focus,
html[data-resolved-theme="light"] body[data-user-theme="system"] .form-control:focus,
html[data-resolved-theme="light"] body[data-user-theme="system"] .form-select:focus { background-color: #fff; color: var(--ink); border-color: var(--blue); }
body[data-user-theme="light"] .table,
html[data-resolved-theme="light"] body[data-user-theme="system"] .table { --bs-table-color: #293548; --bs-table-border-color: var(--line); --bs-table-hover-color: #111827; --bs-table-hover-bg: color-mix(in srgb, var(--blue) 6%, transparent); }

/* Shared application footer */
.main-panel { display: flex; min-height: 100vh; flex-direction: column; }
.main-panel > .content { flex: 1 0 auto; }
.common-footer { color: var(--muted); font-size: .8rem; }
.common-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; }
.common-footer-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.common-footer-brand > div { display: grid; }
.common-footer-brand strong { font-size: .86rem; }
.common-footer-brand small { color: var(--muted); font-size: .68rem; }
.common-footer-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; }
.common-footer-copy { text-align: center; }
.common-footer-links { display: flex; gap: 18px; }
.common-footer-links a { color: var(--muted); text-decoration: none; transition: color .18s ease; }
.common-footer-links a:hover { color: var(--blue); }
.common-footer--admin { flex: 0 0 auto; margin: 0 28px; padding: 20px 0 24px; border-top: 1px solid var(--line); }
.common-footer--auth { position: fixed; right: 28px; bottom: 20px; left: 28px; z-index: 3; }
.common-footer--auth .common-footer-inner { padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 767.98px) {
    .common-footer-inner { align-items: flex-start; flex-direction: column; gap: 10px; }
    .common-footer-copy { text-align: left; }
    .common-footer--admin { margin: 0 18px; padding-bottom: 92px; }
    .common-footer--auth { position: static; padding: 16px 20px 24px; }
    .common-footer--auth .common-footer-brand { display: none; }
}
body[data-user-theme="light"] .notification-bell,
body[data-user-theme="light"] .mobile-menu-button,
html[data-resolved-theme="light"] body[data-user-theme="system"] .notification-bell,
html[data-resolved-theme="light"] body[data-user-theme="system"] .mobile-menu-button { background: #fff; color: #4b5563; }
body[data-user-theme="light"] .btn-outline-secondary,
html[data-resolved-theme="light"] body[data-user-theme="system"] .btn-outline-secondary { color: #4b5563; }

.theme-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.theme-choice { cursor: pointer; }
.theme-choice input { position: absolute; opacity: 0; pointer-events: none; }
.theme-choice span { display: grid; min-height: 132px; place-items: center; align-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-raised); transition: .2s ease; }
.theme-choice i { color: var(--blue); font-size: 1.6rem; }
.theme-choice small { color: var(--muted); }
.theme-choice input:checked + span { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); transform: translateY(-2px); }
.accent-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.accent-picker > label:not(.custom-color) { cursor: pointer; }
.accent-picker > label:not(.custom-color) input { position: absolute; opacity: 0; }
.accent-picker > label:not(.custom-color) span { display: block; width: 38px; height: 38px; border: 4px solid var(--surface); border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1px var(--line); transition: .18s ease; }
.accent-picker > label:not(.custom-color) input:checked + span { box-shadow: 0 0 0 3px var(--swatch); transform: scale(.92); }
.custom-color { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.custom-color input { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.theme-preview { display: grid; grid-template-columns: 150px 1fr; min-height: 220px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--page); }
.theme-preview-sidebar { padding: 28px 20px; background: var(--sidebar); }
.theme-preview-sidebar span { display: block; height: 12px; margin-bottom: 16px; border-radius: 8px; background: rgba(255,255,255,.12); }
.theme-preview-sidebar span:first-child { background: var(--blue); }
.theme-preview-content { padding: 28px; }
.theme-preview-heading { width: 42%; height: 18px; margin-bottom: 28px; border-radius: 8px; background: var(--ink); opacity: .75; }
.theme-preview-card { height: 90px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
@media (max-width: 575.98px) { .theme-choice-grid { grid-template-columns: 1fr; } .theme-preview { grid-template-columns: 80px 1fr; } }

@media (max-width: 359.98px) {
    .stats-grid { grid-template-columns: 1fr; }
}

@media print {
    body {
        background: #fff;
        font-size: 12px;
    }

    .sidebar,
    .topbar,
    .mobile-bottom-nav,
    .no-print,
    .alert {
        display: none !important;
    }

    .admin-layout {
        display: block;
        min-height: 0;
    }

    .content {
        padding: 0;
    }

    .panel {
        border: 0;
        box-shadow: none;
        padding: 0;
    }

    .report-summary-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .stat-card {
        box-shadow: none;
        min-height: auto;
        padding: 10px;
    }

    .stat-card i {
        display: none;
    }

    .stat-card span {
        margin-top: 0;
    }

    .stat-card strong {
        font-size: 0.95rem;
    }

    .table {
        font-size: 11px;
    }
}

/* Final preference overrides (kept after the base dark theme). */
body .brand-mark,
body .sidebar .nav-link.active { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); }
body .brand-mark { box-shadow: 0 10px 28px color-mix(in srgb, var(--blue) 30%, transparent); }
body .sidebar .nav-link.active { box-shadow: 0 12px 30px color-mix(in srgb, var(--blue) 24%, transparent); }
body .btn-primary { border-color: var(--blue); background: var(--blue); }

body[data-user-theme="light"],
html[data-resolved-theme="light"] body[data-user-theme="system"] { background: var(--page); color: var(--ink); }
body[data-user-theme="light"] .topbar,
html[data-resolved-theme="light"] body[data-user-theme="system"] .topbar { background: rgba(255,255,255,.88); }
body[data-user-theme="light"] .topbar h1,
html[data-resolved-theme="light"] body[data-user-theme="system"] .topbar h1 { color: var(--ink); }
body[data-user-theme="light"] .stat-card,
body[data-user-theme="light"] .panel,
body[data-user-theme="light"] .empty-state,
html[data-resolved-theme="light"] body[data-user-theme="system"] .stat-card,
html[data-resolved-theme="light"] body[data-user-theme="system"] .panel,
html[data-resolved-theme="light"] body[data-user-theme="system"] .empty-state { background: rgba(255,255,255,.96); }
body[data-user-theme="light"] .form-control,
body[data-user-theme="light"] .form-select,
html[data-resolved-theme="light"] body[data-user-theme="system"] .form-control,
html[data-resolved-theme="light"] body[data-user-theme="system"] .form-select { background-color: #fff; color: var(--ink); }
body[data-user-theme="light"] .table,
html[data-resolved-theme="light"] body[data-user-theme="system"] .table { --bs-table-color: #293548; --bs-table-border-color: var(--line); --bs-table-hover-color: #111827; --bs-table-hover-bg: color-mix(in srgb, var(--blue) 6%, transparent); }

/* QASWA Ceylon unified animated dark interface */
:root {
    --sidebar: #090d14;
    --sidebar-muted: #8d99aa;
    --surface: #111722;
    --surface-raised: #171e2b;
    --page: #080b10;
    --line: rgba(255, 255, 255, .09);
    --ink: #f2f5fa;
    --muted: #8f9bac;
    --blue: #4f8cff;
    --blue-dark: #326fe1;
    --blue-soft: rgba(79, 140, 255, .12);
    --radius: 18px;
    --shadow: 0 20px 60px rgba(0, 0, 0, .26);
}

body {
    background: var(--page);
    color: var(--ink);
}
body:not(.auth-page)::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at 85% 5%, rgba(79, 140, 255, .09), transparent 28%);
}

/* Login */
.auth-page {
    position: relative;
    display: block;
    overflow: hidden auto;
    background: #080b10;
}
.auth-page::before,
.auth-page::after {
    content: "";
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(100px);
    opacity: .16;
    animation: authGlow 9s ease-in-out infinite alternate;
}
.auth-page::before { top: -180px; right: -100px; background: #4f8cff; }
.auth-page::after { bottom: -220px; left: -150px; background: #7c3aed; animation-delay: -4s; }
.auth-shell { width: 100%; min-height: 100vh; }
.login-experience {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(420px, 1.1fr) minmax(440px, .9fr);
    min-height: 100vh;
}
.login-visual {
    position: relative;
    isolation: isolate;
    display: flex;
    overflow: hidden;
    align-items: flex-end;
    padding: clamp(42px, 7vw, 100px);
    background:
        linear-gradient(135deg, rgba(8, 11, 16, .12), rgba(8, 11, 16, .82)),
        url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?auto=format&fit=crop&w=1600&q=88') center / cover;
}
.login-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(5, 8, 13, .98), transparent 72%);
}
.login-grid-pattern {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .11;
    background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, transparent, #000);
}
.login-orb { position: absolute; border-radius: 50%; filter: blur(6px); opacity: .2; animation: orbFloat 8s ease-in-out infinite alternate; }
.login-orb-one { top: 14%; left: 12%; width: 210px; height: 210px; background: #4f8cff; }
.login-orb-two { right: 8%; bottom: 18%; width: 130px; height: 130px; background: #7dd3fc; animation-delay: -3s; }
.login-visual-content { position: relative; max-width: 680px; animation: loginRise .8s cubic-bezier(.22, 1, .36, 1) both; }
.login-visual-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 26px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 18px;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 1.55rem;
    backdrop-filter: blur(14px);
}
.login-kicker { color: #9cc0ff; font-size: .75rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.login-visual h2 { max-width: 620px; margin: 18px 0; font-size: clamp(2.6rem, 5vw, 5.4rem); font-weight: 790; letter-spacing: -.06em; line-height: .94; }
.login-visual p { max-width: 580px; color: rgba(255,255,255,.67); font-size: 1.02rem; line-height: 1.7; }
.login-features { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 28px; }
.login-features span { color: rgba(255,255,255,.76); font-size: .85rem; }
.login-features i { margin-right: 6px; color: #76a7ff; }
.login-panel {
    position: relative;
    display: grid;
    place-items: center;
    padding: 76px clamp(28px, 6vw, 90px) 42px;
    background: rgba(8, 11, 16, .94);
    border-left: 1px solid var(--line);
}
.login-home-link { position: absolute; top: 28px; right: 34px; color: var(--muted); font-size: .84rem; text-decoration: none; transition: color .2s ease, transform .2s ease; }
.login-home-link:hover { color: #fff; transform: translateX(-3px); }
.login-form-wrap { width: min(100%, 470px); animation: loginRise .7s .12s cubic-bezier(.22, 1, .36, 1) both; }
.login-brand { gap: 12px; margin-bottom: 64px; }
.login-brand > span { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(145deg, #73a7ff, #356fe0); box-shadow: 0 12px 32px rgba(79,140,255,.32); }
.login-brand h1 { color: #fff; font-size: 1.35rem; font-weight: 820; letter-spacing: -.045em; }
.login-brand h1 span { display: inline; width: auto; height: auto; border-radius: 0; background: transparent; color: var(--blue); }
.login-brand p { margin-top: 2px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.login-heading > span { color: #81adff; font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.login-heading h2 { margin: 10px 0 8px; color: #f5f7fb; font-size: clamp(2rem, 3vw, 2.7rem); font-weight: 770; letter-spacing: -.045em; }
.login-heading p { margin: 0; color: var(--muted); }
.login-alert { display: flex; align-items: center; gap: 9px; margin: 26px 0 0; background: rgba(220, 38, 38, .12); color: #fecaca; }
.login-form { display: grid; gap: 20px; margin-top: 32px; }
.login-field .form-label { margin-bottom: 8px; color: #cbd4e0; font-size: .82rem; font-weight: 700; }
.login-field .input-group { padding: 3px; border: 1px solid var(--line); border-radius: 14px; background: #0d121b; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.login-field .input-group:focus-within { border-color: rgba(79,140,255,.72); box-shadow: 0 0 0 4px rgba(79,140,255,.1), 0 14px 34px rgba(0,0,0,.2); transform: translateY(-1px); }
.login-field .input-group-text { width: 48px; justify-content: center; border: 0; background: transparent; color: #718096; }
.login-field .form-control { min-height: 52px; border: 0; background: transparent; color: #fff; box-shadow: none; }
.login-field .form-control::placeholder { color: #566173; }
.login-password-toggle { width: 48px; min-height: 48px; border: 0; background: transparent; color: #718096; }
.login-password-toggle:hover { color: #fff; background: rgba(255,255,255,.05); }
.login-submit { display: flex; align-items: center; justify-content: space-between; min-height: 58px; margin-top: 6px; padding: 0 22px; border-radius: 14px; background: linear-gradient(135deg, #5c95ff, #326fe1); box-shadow: 0 16px 42px rgba(79,140,255,.25); transition: transform .2s ease, box-shadow .2s ease; }
.login-submit:hover { transform: translateY(-2px); box-shadow: 0 20px 50px rgba(79,140,255,.36); }
.login-submit i { transition: transform .2s ease; }
.login-submit:hover i { transform: translateX(4px); }
.login-security { margin: 24px 0 0; color: #667386; font-size: .76rem; text-align: center; }
.login-security i { margin-right: 5px; color: #6f9eff; }

/* Admin shell */
.admin-layout { grid-template-columns: 276px minmax(0, 1fr); }
.sidebar { width: 276px; background: rgba(9, 13, 20, .98); border-right: 1px solid var(--line); }
.brand-mark { background: linear-gradient(145deg, #73a7ff, #356fe0); box-shadow: 0 10px 28px rgba(79,140,255,.3); }
.brand small { color: #657184; }
.menu-toggle, .sidebar .nav-link { color: var(--sidebar-muted); }
.menu-toggle:hover, .menu-toggle:not(.collapsed), .sidebar .nav-link:hover { background: rgba(255,255,255,.055); color: #fff; }
.sidebar .nav-link.active { background: linear-gradient(135deg, rgba(92,149,255,.96), rgba(50,111,225,.96)); box-shadow: 0 12px 30px rgba(50,111,225,.24); }
.submenu { border-color: rgba(255,255,255,.09); }
.topbar { background: rgba(8, 11, 16, .82); border-color: var(--line); backdrop-filter: blur(22px) saturate(140%); }
.topbar h1 { color: #f5f7fb; letter-spacing: -.025em; }
.notification-bell, .mobile-menu-button { border-color: var(--line); background: #111722; color: #a8b3c2; }
.notification-bell:hover { color: #8eb5ff; border-color: rgba(79,140,255,.45); }
.notification-unread { border-left-color: #4f8cff !important; background: rgba(79,140,255,.06); }
.notification-icon { color: #79a8ff; background: rgba(79,140,255,.12); }
.avatar { background: linear-gradient(145deg, rgba(115,167,255,.22), rgba(53,111,224,.14)); color: #9fc1ff; border: 1px solid rgba(79,140,255,.22); }
.content { animation: contentEnter .45s ease both; }
.stat-card, .panel, .empty-state { background: rgba(17, 23, 34, .9); border-color: var(--line); box-shadow: var(--shadow); }
.stat-card { overflow: hidden; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.stat-card::after { content: ""; position: absolute; right: -32px; bottom: -45px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(79,140,255,.12), transparent 70%); }
.stat-card:hover { transform: translateY(-5px); border-color: rgba(79,140,255,.32); box-shadow: 0 28px 60px rgba(0,0,0,.34); }
.stat-card i { background: rgba(255,255,255,.04); }
.panel { transition: border-color .22s ease; }
.panel:hover { border-color: rgba(255,255,255,.14); }
.form-control, .form-select { border-color: var(--line); background-color: #0c1119; color: #e8edf5; }
.form-control:focus, .form-select:focus { border-color: #4f8cff; background-color: #0c1119; color: #fff; box-shadow: 0 0 0 4px rgba(79,140,255,.11); }
.form-control::placeholder { color: #596576; }
.input-group-text { border-color: var(--line); background: #111722; color: #8490a2; }
.btn-primary { border-color: var(--blue); background: var(--blue); box-shadow: 0 8px 22px rgba(79,140,255,.2); }
.btn-primary:hover { border-color: #6da1ff; background: #6da1ff; transform: translateY(-1px); }
.btn-outline-secondary { border-color: var(--line); color: #aeb8c6; }
.btn-outline-secondary:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.07); color: #fff; }
.table { --bs-table-bg: transparent; --bs-table-color: #cdd5e1; --bs-table-border-color: var(--line); --bs-table-hover-bg: rgba(79,140,255,.055); --bs-table-hover-color: #fff; }
.table thead th { color: #8995a6; font-size: .73rem; letter-spacing: .055em; text-transform: uppercase; }
.table tbody tr { border-color: var(--line); }
.table tbody tr:hover { background: rgba(79,140,255,.055); }
.table-light { --bs-table-bg: #151c28; --bs-table-color: #dbe2ec; }
.report-link, .vehicle-image-card, .vehicle-thumb { border-color: var(--line); background: #0c1119; color: var(--ink); }
.report-link:hover { border-color: rgba(79,140,255,.4); background: rgba(79,140,255,.07); transform: translateY(-2px); }
.report-link i { color: #79a8ff; }
.nav-tabs { --bs-nav-tabs-border-color: var(--line); --bs-nav-tabs-link-active-bg: #171e2b; --bs-nav-tabs-link-active-border-color: var(--line); --bs-nav-tabs-link-active-color: #fff; }
.modal-content, .dropdown-menu { border-color: var(--line); background: #111722; color: var(--ink); box-shadow: var(--shadow); }
.alert-success { background: rgba(16,185,129,.12); color: #a7f3d0; }
.alert-danger { background: rgba(239,68,68,.12); color: #fecaca; }
.pagination { --bs-pagination-bg: #111722; --bs-pagination-border-color: var(--line); --bs-pagination-color: #aeb8c6; --bs-pagination-hover-bg: #171e2b; --bs-pagination-hover-color: #fff; --bs-pagination-active-bg: #4f8cff; --bs-pagination-active-border-color: #4f8cff; }
.mobile-bottom-nav { border-color: var(--line); background: rgba(9,13,20,.96); box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.mobile-bottom-nav .active { color: #8eb5ff; background: rgba(79,140,255,.12); }

@keyframes loginRise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes orbFloat { from { transform: translate3d(-12px, -8px, 0) scale(.92); } to { transform: translate3d(20px, 18px, 0) scale(1.08); } }
@keyframes authGlow { from { transform: translate3d(-20px, -12px, 0) scale(.9); } to { transform: translate3d(24px, 20px, 0) scale(1.1); } }
@keyframes contentEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1023.98px) {
    .sidebar { background: #090d14; }
    .sidebar-head { background: #090d14; }
    .sidebar-backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(4px); }
}

@media (max-width: 880px) {
    .login-experience { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-panel { min-height: 100vh; border: 0; }
    .login-brand { margin-bottom: 48px; }
}

@media (max-width: 575.98px) {
    .login-panel { place-items: start stretch; padding: 86px 20px 34px; }
    .login-home-link { top: 24px; right: 20px; }
    .login-heading h2 { font-size: 2.05rem; }
    .login-brand { margin-bottom: 40px; }
}

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

@media print {
    body { background: #fff; color: #111; }
    .panel, .stat-card { background: #fff; color: #111; border-color: #ddd; }
    .table { --bs-table-color: #111; --bs-table-border-color: #ccc; }
}

/* Shared company branding. */
.brand img.company-logo { width: 70px; height: auto; flex-shrink: 0; }
.login-brand img.company-logo { width: 110px; height: auto; flex-shrink: 0; }
.common-footer img.company-logo { width: 86px; height: auto; flex-shrink: 0; }

/* Vehicle entry form */
.vehicle-form-panel { max-width: 1180px; }
.vehicle-form-panel > .panel-header { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.vehicle-form-panel > .panel-header h2 { font-weight: 700; }
.vehicle-form-notice { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 10px; background: color-mix(in srgb, var(--blue) 7%, var(--surface)); color: var(--ink); font-size: .85rem; }
.vehicle-form-notice > i { color: var(--blue); font-size: 1.1rem; }
.vehicle-entry-form .vehicle-form-section { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.vehicle-form-section legend { float: none; display: flex; align-items: center; gap: 12px; width: auto; margin: 0 0 8px; font-size: 1rem; font-weight: 650; color: var(--ink); }
.vehicle-form-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--blue); background: color-mix(in srgb, var(--blue) 9%, var(--surface)); }
.vehicle-form-section-help { margin: 0 0 22px; color: var(--muted); font-size: .83rem; }
.vehicle-form-section .form-label { font-size: .84rem; font-weight: 600; margin-bottom: 8px; }
.vehicle-form-section .form-control, .vehicle-form-section .form-select { min-height: 44px; border-radius: 8px; }
.vehicle-form-section textarea.form-control { min-height: 100px; }
.vehicle-form-section .form-text { font-size: .78rem; color: var(--muted); }
.vehicle-form-section .form-check { padding-top: 8px; padding-bottom: 8px; }
.vehicle-form-upload { padding-top: 18px; padding-bottom: 18px; border-top: 1px dashed var(--line); }
.vehicle-form-actions { padding-top: 20px; border-top: 1px solid var(--line); }
.vehicle-form-actions .btn { min-width: 140px; padding: 11px 20px; }
@media (max-width: 600px) {
    .vehicle-entry-form .vehicle-form-section { padding: 18px 14px; }
    .vehicle-form-section legend { font-size: .95rem; }
    .vehicle-form-notice { align-items: flex-start; padding: 12px 14px; }
}

.vehicle-arrange-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.vehicle-arrange-toolbar p { font-size: .83rem; margin-top: 6px; }
.vehicle-order-message { margin: 18px 0; font-size: .85rem; color: var(--muted); }
.vehicle-arrange-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; }
.vehicle-arrange-card { min-width: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); cursor: grab; }
.vehicle-arrange-card.is-dragging { opacity: .45; }
.vehicle-arrange-card.is-drop-target { outline: 3px solid var(--blue); outline-offset: 2px; }
.vehicle-arrange-photo { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 5%, var(--surface)); }
.vehicle-arrange-photo > img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-arrange-photo > i { font-size: 2.5rem; color: var(--muted); }
.vehicle-arrange-position, .vehicle-arrange-grip { position: absolute; top: 10px; display: grid; place-items: center; height: 30px; min-width: 30px; padding: 0 8px; background: var(--surface); color: var(--ink); border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.vehicle-arrange-position { left: 10px; font-weight: 700; font-size: .8rem; }
.vehicle-arrange-grip { right: 10px; }
.vehicle-arrange-body { padding: 16px; }
.vehicle-arrange-body h3 { font-size: .95rem; font-weight: 650; margin: 0 0 6px; overflow-wrap: anywhere; }
.vehicle-arrange-body p { font-size: .8rem; color: var(--muted); margin: 0 0 12px; }
.vehicle-arrange-controls { display: flex; gap: 6px; margin-top: 16px; }
.vehicle-arrange-controls .btn { flex: 1; padding: 8px 5px; font-size: .75rem; }
@media (max-width: 1250px) { .vehicle-arrange-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .vehicle-arrange-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .vehicle-arrange-grid { grid-template-columns: 1fr; } .vehicle-arrange-toolbar > .d-flex { width: 100%; } .vehicle-arrange-toolbar .btn { flex: 1; } }
