﻿/* css/custom.css - Enterprise Design System with Inter Typography & Flaticon UI Icons */
:root {
    /* Primary Typography: Inter by Rasmus Andersson (Enterprise Gold Standard) */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;

    /* Soothing Brand & Status Colors */
    --gov-primary: #1d4ed8;
    --gov-primary-hover: #1e40af;
    --gov-primary-light: #eff6ff;
    --gov-primary-border: #bfdbfe;
    
    /* Verified Soft Status Colors */
    --gov-success: #047857;
    --gov-success-bg: #ecfdf5;
    --gov-success-border: #a7f3d0;
    
    --gov-warning: #b45309;
    --gov-warning-bg: #fffbeb;
    --gov-warning-border: #fde68a;
    
    --gov-danger: #b91c1c;
    --gov-danger-bg: #fef2f2;
    --gov-danger-border: #fecaca;

    --gov-info: #0284c7;
    --gov-info-bg: #f0f9ff;
    --gov-info-border: #bae6fd;

    --gov-purple: #6d28d9;
    --gov-purple-bg: #f5f3ff;
    --gov-purple-border: #ddd6fe;
    
    /* Eye-Friendly Harmonious Canvas & Surfaces */
    --gov-bg: #f8fafc;
    --gov-surface: #ffffff;
    --gov-border: #e2e8f0;
    --gov-border-light: #f1f5f9;
    
    /* Neutral High-Legibility Typography */
    --gov-text-dark: #0f172a;
    --gov-text-body: #334155;
    --gov-text-muted: #64748b;
    --gov-text-subtle: #94a3b8;
    
    /* Layout */
    --sidebar-width: 280px;
    --topbar-height: 56px;
    --header-inset: 8px;
    --header-radius: 9999px;
    --header-offset: calc(var(--header-inset) + var(--topbar-height));
    --sb-card-bg: #ffffff;
    --sb-card-shadow: 0 4px 14px rgba(37, 99, 235, 0.16);
    --sb-pill-text: #374151;
    --sb-fill: #2563eb;
    
    /* Standard Radii (shadcn rounded-xl) */
    --radius-gov: 0.75rem;
    --radius-sm: 0.5rem;
    --radius-pill: 9999px;
    --card: #ffffff;
    --card-foreground: #0f172a;
    --muted-foreground: #64748b;
    --border: #e2e8f0;
    --primary: #1d4ed8;
}

/* =======================================================
   1. GLOBAL RESET & DM SANS TYPOGRAPHY
   ======================================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-family: var(--font-main) !important;
    background-color: var(--gov-bg);
    color: var(--gov-text-body);
    font-size: var(--ui-font-size, 13.5px);
    line-height: 1.5;
    letter-spacing: -0.015em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

/* Prevent layout jump when Bootstrap hides the scrollbar (modals / dropdowns) */
html:has(body.modal-open) {
    overflow: hidden;
    scrollbar-gutter: stable;
}

body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
}

body.modal-open .sb-topnav,
body.modal-open .fixed-top,
body.modal-open .sticky-top,
body.modal-open .is-fixed {
    padding-right: 0 !important;
    margin-right: 0 !important;
}

body.modal-open #layoutSidenav_nav {
    margin-right: 0 !important;
}

.modal-backdrop {
    z-index: 2000 !important;
}

.modal {
    z-index: 2010 !important;
}

/* Nested modals: extra backdrop must sit under the top dialog, not on top of it */
.modal-backdrop.show ~ .modal-backdrop.show {
    z-index: 2040 !important;
}

.modal.show ~ .modal.show {
    z-index: 2050 !important;
}

body, button, input, optgroup, select, textarea, .btn, .form-control, .form-select, .table, .modal, .card, .dropdown-menu, .nav, .badge, h1, h2, h3, h4, h5, h6, p, span, a, label, div {
    font-family: var(--font-main) !important;
    letter-spacing: -0.012em;
}

body {
    background-color: var(--gov-bg);
    color: var(--gov-text-body);
    margin: 0;
    padding: 0 !important;
    min-height: 100vh;
}

.font-monospace {
    font-family: var(--font-mono) !important;
    font-feature-settings: 'tnum' 1;
}

.unit-km {
    font-weight: 400 !important;
    font-style: normal;
}

/* =======================================================
   2. UNIFIED HEADER (matches sidebar card)
   ======================================================= */
.sb-topnav {
    position: fixed !important;
    top: var(--header-inset) !important;
    left: var(--header-inset) !important;
    right: var(--header-inset) !important;
    height: var(--topbar-height) !important;
    background-color: var(--sb-card-bg) !important;
    border-bottom: none !important;
    border-radius: var(--header-radius);
    box-shadow: var(--sb-card-shadow);
    z-index: 1080 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    padding: 0 0.85rem 0 0.7rem;
    width: auto;
    max-width: none;
}

body.sb-nav-fixed::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-offset);
    background: var(--gov-bg);
    z-index: 1070;
    pointer-events: none;
}

.header-left {
    display: flex;
    align-items: center;
    justify-self: start;
    min-width: 0;
    height: 100%;
    gap: 0.35rem;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    justify-self: end;
    justify-content: flex-end;
    min-width: 0;
    height: 100%;
    gap: 0.65rem;
    flex-shrink: 0;
    max-width: none;
}

.header-search {
    display: flex !important;
    align-items: center;
    margin: 0 !important;
    min-width: 0;
    flex: 1 1 auto;
    max-width: 280px;
}

.header-search-group {
    flex-wrap: nowrap !important;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.header-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0.55rem;
    flex-shrink: 0;
}

.header-actions .nav-item.dropdown {
    display: flex;
    align-items: center;
}

.navbar-nav .header-user-btn.nav-link {
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.15 !important;
    flex: 0 0 auto;
    white-space: normal !important;
    height: auto !important;
    overflow: visible !important;
}

.header-user-btn {
    gap: 0.65rem;
    max-width: none;
    width: auto !important;
    height: auto !important;
    min-height: 38px;
    padding: 0 !important;
    color: var(--sb-pill-text) !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    position: relative;
    overflow: visible !important;
    isolation: isolate;
    font-weight: 700;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-end;
    box-shadow: none !important;
    transition: opacity 0.2s ease;
}
.header-user-btn.dropdown-toggle::after {
    display: none !important;
}
.header-user-btn > * {
    position: relative;
    z-index: 2;
}
.header-user-btn::before {
    display: none !important;
}
.header-user-btn:hover,
.header-user-btn:focus,
.header-user-btn.show,
.header-user-btn[aria-expanded="true"] {
    color: var(--sb-pill-text) !important;
    background: transparent !important;
    box-shadow: none !important;
}
.header-user-btn:hover .header-avatar,
.header-user-btn:focus .header-avatar,
.header-user-btn.show .header-avatar,
.header-user-btn[aria-expanded="true"] .header-avatar {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.header-user-meta {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center;
    min-width: 0;
    gap: 2px;
    text-align: right;
    line-height: 1.2;
}
.header-user-name {
    display: block !important;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--sb-pill-text);
    line-height: 1.2;
}
.header-user-role {
    display: block !important;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.2;
}
.header-avatar {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8dcc8;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
    user-select: none;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #dbeafe;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.header-avatar-img,
.header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}
.header-avatar svg,
.header-avatar i {
    width: 16px;
    height: 16px;
    font-size: 15px;
    color: #ffffff;
}
.header-user-icon {
    margin-right: 0;
    flex-shrink: 0;
}

.dropdown-menu.header-user-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 280px;
    min-width: 280px;
    max-width: min(320px, calc(100vw - 1rem));
    background-color: var(--sb-card-bg) !important;
    justify-content: flex-start;
    border-radius: 10px !important;
    border: 1px solid #e8eef6 !important;
    padding: 10px !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08), 0 1px 4px rgba(37, 99, 235, 0.05) !important;
}
.dropdown-menu.header-user-menu.show {
    display: flex !important;
}
.header-user-menu > li {
    display: block;
    margin: 0;
    padding: 0;
}
.header-user-menu .dropdown-item,
.header-user-menu .header-user-menu-item {
    background-color: transparent !important;
    border: none;
    padding: 12px 14px !important;
    color: var(--sb-pill-text) !important;
    display: flex;
    align-items: center;
    position: relative;
    gap: 12px;
    cursor: pointer;
    border-radius: 8px !important;
    font-size: 0.82rem;
    font-weight: 600;
    width: 100%;
    text-align: left;
    line-height: 1.4;
    white-space: normal !important;
    overflow: hidden;
    isolation: isolate;
    z-index: 0;
}
.header-user-menu-label {
    position: relative;
    z-index: 2;
    min-width: 0;
    flex: 1 1 auto;
    white-space: normal;
}
.header-user-menu .dropdown-item > *,
.header-user-menu .header-user-menu-item > * {
    position: relative;
    z-index: 2;
}
.header-user-menu .dropdown-item::before,
.header-user-menu .header-user-menu-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--sb-fill);
    border-radius: 0;
    opacity: 1;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
    pointer-events: none;
}
.header-user-menu .dropdown-item:hover::before,
.header-user-menu .dropdown-item:focus::before,
.header-user-menu .dropdown-item:active::before,
.header-user-menu .header-user-menu-item:hover::before,
.header-user-menu .header-user-menu-item:focus::before,
.header-user-menu .header-user-menu-item:active::before {
    transform: scaleX(1);
    opacity: 1;
}
.header-user-menu .dropdown-item:not(:active):hover,
.header-user-menu .dropdown-item:focus,
.header-user-menu .dropdown-item:active,
.header-user-menu .header-user-menu-item:hover,
.header-user-menu .header-user-menu-item:focus,
.header-user-menu .header-user-menu-item:active {
    background-color: transparent !important;
    color: #ffffff !important;
    outline: none;
    box-shadow: none !important;
}
.header-user-menu .dropdown-item i,
.header-user-menu .dropdown-item svg,
.header-user-menu .header-user-menu-item i {
    width: 15px;
    min-width: 15px;
    font-size: 15px;
    color: #111827 !important;
    text-align: center;
    flex-shrink: 0;
    transition: color 0.28s ease;
}
.header-user-menu .dropdown-item:hover i,
.header-user-menu .dropdown-item:focus i,
.header-user-menu .dropdown-item:active i,
.header-user-menu .header-user-menu-item:hover i,
.header-user-menu .header-user-menu-item:focus i {
    color: #ffffff !important;
}
.header-user-menu .header-user-menu-logout,
.header-user-menu .header-user-menu-logout:hover,
.header-user-menu .header-user-menu-logout:focus {
    color: var(--sb-pill-text) !important;
}
.header-user-menu .header-user-menu-logout:hover,
.header-user-menu .header-user-menu-logout:focus {
    color: #ffffff !important;
}
.header-user-menu .header-user-menu-logout i {
    color: #111827 !important;
}
.header-user-menu .header-user-menu-logout:hover i {
    color: #ffffff !important;
}
.header-user-menu .dropdown-divider {
    border-top-color: #dbeafe !important;
    margin: 6px 4px !important;
    opacity: 1;
}

.header-settings-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #334155;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.header-settings-btn svg {
    width: 18px;
    height: 18px;
}
.header-settings-btn:hover,
.header-settings-btn[aria-expanded="true"] {
    background: var(--sb-fill);
    color: #ffffff;
}
.header-settings-btn[aria-expanded="true"] svg {
    animation: theme-cog-spin 1.1s linear infinite;
}
@keyframes theme-cog-spin {
    to { transform: rotate(360deg); }
}

.theme-settings-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(4px);
    z-index: 1190;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}
.theme-settings-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}
.theme-settings-panel {
    --ts-bg: #ffffff;
    --ts-elev: #f8fafc;
    --ts-line: #e2e8f0;
    --ts-text: #0f172a;
    --ts-muted: #64748b;
    --ts-soft: #94a3b8;
    --ts-face: #ffffff;
    --ts-face-hover: #f1f5f9;
    --ts-accent: var(--sb-fill, #2563eb);
    position: fixed;
    top: 0;
    right: 0;
    width: min(380px, 96vw);
    height: 100vh;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    background: var(--ts-bg);
    color: var(--ts-text);
    box-shadow: -16px 0 48px rgba(15, 23, 42, 0.16);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    pointer-events: none;
    font-family: var(--font-main);
}
html.dark .theme-settings-panel,
html[data-bs-theme="dark"] .theme-settings-panel {
    --ts-bg: #151c26;
    --ts-elev: #1a222d;
    --ts-line: #2a3544;
    --ts-text: #f1f5f9;
    --ts-muted: #94a3b8;
    --ts-soft: #64748b;
    --ts-face: #1e293b;
    --ts-face-hover: #243040;
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.4);
}
.theme-settings-panel.is-open {
    transform: translateX(0);
    pointer-events: auto;
}
.theme-settings-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--ts-line);
    flex-shrink: 0;
    background: var(--ts-bg);
}
.theme-settings-head-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.theme-settings-kicker {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ts-accent);
}
.theme-settings-head strong {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ts-text);
    line-height: 1.3;
}
.theme-settings-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: var(--ts-elev);
    color: var(--ts-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}
.theme-settings-close svg {
    width: 14px;
    height: 14px;
}
.theme-settings-close:hover {
    background: var(--ts-face-hover);
    color: var(--ts-text);
}
.theme-settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 20px 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--ts-line) transparent;
}
.theme-settings-body::-webkit-scrollbar {
    width: 8px;
}
.theme-settings-body::-webkit-scrollbar-thumb {
    background: var(--ts-line);
    border-radius: 99px;
}
.theme-set-section {
    margin: 0;
    padding: 18px 0;
    border-bottom: 1px solid var(--ts-line);
}
.theme-set-section:last-of-type {
    border-bottom: 0;
}
.theme-set-section h4 {
    margin: 0 0 14px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ts-soft);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.theme-set-label {
    margin: 12px 0 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ts-muted);
}
.theme-set-section > .theme-set-label:first-of-type {
    margin-top: 0;
}
.theme-seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.theme-seg-3 {
    grid-template-columns: 1fr 1fr 1fr;
}
.theme-seg-2 {
    grid-template-columns: 1fr 1fr;
}
.theme-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.theme-opt {
    display: block;
    margin: 0;
    cursor: pointer;
}
.theme-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.theme-opt-face {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--ts-line);
    border-radius: 10px;
    background: var(--ts-face);
    color: var(--ts-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.theme-opt--chip .theme-opt-face {
    min-height: 34px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 0.76rem;
}
.theme-opt:hover .theme-opt-face {
    background: var(--ts-face-hover);
    color: var(--ts-text);
}
.theme-opt input:focus-visible ~ .theme-opt-face {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}
.theme-opt input:checked ~ .theme-opt-face {
    border-color: var(--ts-accent);
    background: var(--ts-elev);
    color: var(--ts-text);
    box-shadow: inset 0 0 0 1px var(--ts-accent);
}
.theme-opt-preview {
    display: none;
    flex-shrink: 0;
}
.theme-seg-radius .theme-opt-preview {
    display: block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
}
.theme-seg-radius .theme-opt[data-opt="sharp"] .theme-opt-preview { border-radius: 2px; }
.theme-seg-radius .theme-opt[data-opt="rounded"] .theme-opt-preview { border-radius: 5px; }
.theme-seg-radius .theme-opt[data-opt="pill"] .theme-opt-preview { border-radius: 99px; }
.theme-seg-fonts .theme-opt-face {
    min-height: 44px;
    font-size: 0.92rem;
    font-weight: 600;
}
.theme-seg-fonts .theme-opt[data-opt="inter"] .theme-opt-label {
    font-family: 'Inter', sans-serif !important;
}
.theme-seg-fonts .theme-opt[data-opt="system"] .theme-opt-label {
    font-family: system-ui, -apple-system, sans-serif !important;
}
.theme-seg-fonts .theme-opt[data-opt="serif"] .theme-opt-label {
    font-family: 'Source Serif 4', Georgia, serif !important;
}
.theme-seg-fonts .theme-opt[data-opt="mono"] .theme-opt-label {
    font-family: 'JetBrains Mono', Consolas, monospace !important;
}
.theme-seg-scheme .theme-opt-preview {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    position: relative;
}
.theme-seg-scheme .theme-opt[data-opt="light"] .theme-opt-preview {
    background: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.25);
}
.theme-seg-scheme .theme-opt[data-opt="dark"] .theme-opt-preview {
    background: #1e293b;
    box-shadow: inset -3px -2px 0 1px #93c5fd;
}
.theme-accent-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.theme-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.theme-swatch:hover {
    transform: scale(1.08);
}
.theme-swatch.is-active {
    box-shadow: 0 0 0 2px var(--ts-bg), 0 0 0 4px var(--ts-accent);
}
.theme-swatch-custom {
    position: relative;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px dashed var(--ts-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ts-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
}
.theme-swatch-custom input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.theme-settings-panel input[type="color"] {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.theme-set-slider {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px 10px;
    color: var(--ts-soft);
    font-size: 0.72rem;
    font-weight: 600;
}
.theme-set-slider em {
    grid-column: 1 / -1;
    justify-self: center;
    font-style: normal;
    color: var(--ts-text);
    font-size: 0.82rem;
    font-weight: 700;
    margin: 0;
}
.theme-set-slider input[type="range"] {
    width: 100%;
    height: 4px;
    accent-color: var(--ts-accent);
}
.theme-settings-foot {
    flex-shrink: 0;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--ts-line);
    background: var(--ts-bg);
}
.theme-reset-btn {
    width: 100%;
    margin: 0;
    border: 1px solid var(--ts-line);
    background: var(--ts-elev);
    color: var(--ts-text);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.theme-reset-btn:hover {
    background: var(--ts-face-hover);
    border-color: var(--ts-accent);
}
.theme-set-note {
    margin: 8px 0 0;
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--ts-soft);
    text-align: center;
}

html[data-density="compact"] {
    --topbar-height: 50px;
}
html[data-nav-layout="header"][data-density="compact"] {
    --topbar-height: 56px;
}
html[data-density="spacious"] {
    --topbar-height: 64px;
}
html[data-nav-layout="header"][data-density="spacious"] {
    --topbar-height: 76px;
}
html[data-density="compact"] .gov-main,
html[data-density="compact"] main.gov-main,
html[data-density="compact"] #layoutSidenav_content > main {
    padding: 1rem 1.1rem 1.6rem !important;
}
html[data-density="spacious"] .gov-main,
html[data-density="spacious"] main.gov-main,
html[data-density="spacious"] #layoutSidenav_content > main {
    padding: 2rem 2.4rem 3rem !important;
}
html[data-density="compact"] .sb-sidenav-card .nav-link,
html[data-density="compact"] .sb-sidenav .nav-link {
    min-height: 36px;
    padding: 0.55rem 0.75rem !important;
}
html[data-density="spacious"] .sb-sidenav-card .nav-link,
html[data-density="spacious"] .sb-sidenav .nav-link {
    min-height: 50px;
    padding: 1rem 1.1rem !important;
}
html[data-radius="sharp"] .header-submenu,
html[data-radius="sharp"] .dropdown-menu.header-user-menu {
    border-radius: 6px !important;
}
html[data-radius="rounded"] .header-submenu,
html[data-radius="rounded"] .dropdown-menu.header-user-menu {
    border-radius: 12px !important;
}

html.dark .header-settings-btn {
    background: #243040;
    color: #e2e8f0;
}

html.dark .header-user-menu .dropdown-item,
html.dark .header-user-menu .header-user-menu-item,
html[data-bs-theme="dark"] .header-user-menu .dropdown-item,
html[data-bs-theme="dark"] .header-user-menu .header-user-menu-item {
    color: var(--sb-pill-text) !important;
}
html.dark .header-user-menu .dropdown-item:hover,
html.dark .header-user-menu .dropdown-item:focus,
html.dark .header-user-menu .header-user-menu-item:hover,
html.dark .header-user-menu .header-user-menu-item:focus,
html[data-bs-theme="dark"] .header-user-menu .dropdown-item:hover,
html[data-bs-theme="dark"] .header-user-menu .header-user-menu-item:hover {
    background-color: transparent !important;
    color: #ffffff !important;
}
html.dark .header-user-menu .dropdown-item i,
html.dark .header-user-menu .header-user-menu-item i,
html[data-bs-theme="dark"] .header-user-menu .dropdown-item i {
    color: #e2e8f0 !important;
}
html.dark .header-user-menu .dropdown-item:hover i,
html.dark .header-user-menu .dropdown-item:focus i,
html.dark .header-user-menu .header-user-menu-item:hover i,
html.dark .header-user-menu .header-user-menu-item:focus i,
html[data-bs-theme="dark"] .header-user-menu .dropdown-item:hover i {
    color: #ffffff !important;
}

.sb-topnav .navbar-brand,
.sb-topnav .header-brand {
    width: auto !important;
    max-width: none;
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--sb-pill-text) !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    order: 0;
}

.sb-topnav .navbar-brand img,
.header-logo-img {
    height: 36px;
    max-height: 38px;
    width: auto;
    max-width: 168px;
    object-fit: contain;
    display: block;
}

/* Search Box in Header */
.gov-search-input {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
    border: 1px solid #dbeafe !important;
    background: #ffffff !important;
    color: var(--sb-pill-text) !important;
    font-size: 0.82rem !important;
    height: 32px;
    min-width: 0;
    width: 100%;
}

.gov-search-input::placeholder {
    color: #94a3b8;
}

.gov-search-input:focus {
    background: #ffffff !important;
    border-color: var(--sb-fill) !important;
    box-shadow: none !important;
    color: var(--sb-pill-text) !important;
}

.gov-search-btn {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
    background-color: var(--sb-fill) !important;
    border: 1px solid var(--sb-fill) !important;
    color: #ffffff !important;
    height: 32px;
    width: 40px;
    min-width: 40px;
    padding: 0;
    flex-shrink: 0;
}

.gov-search-btn:hover {
    background-color: var(--gov-primary-hover, #1d4ed8) !important;
}

/* Minimal Header Live Clock */
#liveClock {
    font-feature-settings: 'tnum' 1;
    font-variant-numeric: tabular-nums;
}

/* =======================================================
   2b. FOUR-GROUP TOP HEADER MENU (connected hover dropdown)
   ======================================================= */
.header-nav-groups {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.header-menu {
    font-size: 0.8125rem;
    line-height: 1;
    color: var(--sb-pill-text);
    width: fit-content;
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2px;
    height: 100%;
}

.header-menu a {
    text-decoration: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.header-item {
    position: relative;
    display: flex;
    align-items: center;
    align-self: center;
    height: auto;
    z-index: 1;
}

.header-item:hover,
.header-item.is-open {
    z-index: 5;
}

.header-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border: 0;
    margin: 0;
    border-radius: 9999px;
    overflow: hidden;
    isolation: isolate;
    background: transparent;
    color: var(--sb-pill-text);
    font-weight: 600;
    font-size: 0.8125rem;
    font-family: inherit;
    line-height: 1;
    letter-spacing: 0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.28s ease;
}

.header-link > * {
    position: relative;
    z-index: 2;
}

.header-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--sb-fill);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
    pointer-events: none;
}

.header-link::after {
    display: none !important;
    content: none !important;
}

.header-link svg {
    width: 9px;
    height: 9px;
    fill: currentColor;
    flex-shrink: 0;
    transition: transform 0.18s ease, fill 0.16s ease;
    z-index: 2;
}

.header-submenu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 248px;
    width: max-content;
    padding: 8px;
    gap: 4px;
    border-radius: 10px;
    border: 1px solid #dbeafe;
    background: var(--sb-card-bg);
    color: var(--sb-pill-text);
    box-shadow: var(--sb-card-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
    z-index: 1055;
    pointer-events: none;
    list-style: none;
}

.header-item:last-child .header-submenu {
    left: auto;
    right: 0;
}

.header-submenu::before {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    top: -10px;
    height: 10px;
}

.header-item:hover .header-submenu,
.header-item.is-open .header-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.header-submenu-item {
    width: 100%;
}

.header-submenu-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 12px;
    width: 100%;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--sb-pill-text) !important;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0;
    text-align: left;
    line-height: 1.3;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: color 0.28s ease;
}

.header-submenu-link > * {
    position: relative;
    z-index: 2;
}

.header-submenu-link i {
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: transparent;
    font-size: 15px;
    color: #111827;
    text-align: center;
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.28s ease;
}

.header-submenu-link::before {
    content: "" !important;
    display: block !important;
    position: absolute;
    inset: 0;
    background: var(--sb-fill);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
    pointer-events: none;
}

.header-submenu-link:hover::before,
.header-submenu-link:focus::before,
.header-submenu-link.is-active::before {
    transform: scaleX(1);
}

.header-submenu-link:hover,
.header-submenu-link:focus,
.header-submenu-link.is-active {
    background: transparent;
    color: #ffffff !important;
    font-weight: 600;
}

.header-submenu-link:hover i,
.header-submenu-link:focus i,
.header-submenu-link.is-active i {
    background: transparent;
    color: #ffffff;
}

.header-item:hover .header-link,
.header-item.is-open .header-link,
.header-item.is-current .header-link {
    color: #ffffff;
    background: transparent;
}

.header-item:hover .header-link::before,
.header-item.is-open .header-link::before,
.header-item.is-current .header-link::before {
    transform: scaleX(1);
}

.header-item.is-current .header-link::after {
    display: none !important;
}

.header-item:hover .header-link svg,
.header-item.is-open .header-link svg,
.header-item.is-current .header-link svg {
    fill: #ffffff;
}

.header-item:hover .header-link svg,
.header-item.is-open .header-link svg {
    transform: rotate(-180deg);
}

.header-support-badge {
    font-size: 0.62rem !important;
    margin-left: auto;
}

/* Header layout: scale UI to fill the extra space without the sidebar */
html[data-nav-layout="header"] {
    font-size: var(--ui-font-size, 15.5px);
    --topbar-height: 68px;
}

html[data-nav-layout="header"] .sb-topnav {
    padding: 0 0.95rem 0 0.8rem;
    column-gap: 16px;
}

html[data-nav-layout="header"] .toggle-switch,
html[data-nav-layout="header"] .toggle-switch .toggleSwitch {
    width: 44px;
    height: 44px;
}

html[data-nav-layout="header"] .toggle-switch .icon svg {
    width: 24px;
    height: 24px;
}

html[data-nav-layout="header"] .header-logo-img,
html[data-nav-layout="header"] .sb-topnav .navbar-brand img {
    height: 44px;
    max-height: 46px;
    max-width: 200px;
}

html[data-nav-layout="header"] .header-avatar {
    width: 40px;
    height: 40px;
}

html[data-nav-layout="header"] .header-menu {
    font-size: 0.875rem;
    gap: 4px;
}

html[data-nav-layout="header"] .header-link {
    height: 38px;
    padding: 0 16px;
    font-size: 0.875rem;
    gap: 7px;
    border-radius: 9999px;
}

html[data-nav-layout="header"] .header-link svg {
    width: 10px;
    height: 10px;
}

html[data-nav-layout="header"] .header-submenu {
    min-width: 248px;
    padding: 8px;
    border-radius: 10px;
    top: calc(100% + 8px);
}

html[data-nav-layout="header"] .header-submenu-link {
    padding: 9px 11px;
    font-size: 0.86rem;
    gap: 10px;
    border-radius: 4px;
}

html[data-nav-layout="header"] .header-submenu-link i {
    width: 30px;
    height: 30px;
    min-width: 30px;
    font-size: 14px;
}

html[data-nav-layout="header"] .gov-search-input {
    height: 40px;
    min-width: 0;
    font-size: 0.92rem !important;
}

html[data-nav-layout="header"] .gov-search-btn {
    height: 40px;
    width: 44px;
    min-width: 44px;
    padding: 0;
}

html[data-nav-layout="header"] .header-right {
    gap: 0.75rem;
}

html[data-nav-layout="header"] #navbarDropdown {
    font-size: 0.92rem;
    padding: 0.4rem 0.95rem !important;
    max-width: 100%;
}

html[data-nav-layout="header"] #navbarDropdown span,
#navbarDropdown span {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

html[data-nav-layout="header"] .gov-main,
html[data-nav-layout="header"] main.gov-main,
html[data-nav-layout="header"] main.container-fluid,
html[data-nav-layout="header"] #layoutSidenav_content > main {
    padding: 1.75rem 2.25rem 2.75rem 2.25rem !important;
}

html[data-nav-layout="header"] #insuranceTabs .nav-link,
html[data-nav-layout="header"] #waDispatchTabs .nav-link {
    padding: 0.85rem 1.7rem;
    font-size: 1.08rem;
}

@media (max-width: 1199.98px) {
    html[data-nav-layout="header"] .gov-search-input {
        min-width: 0;
    }
    html[data-nav-layout="header"] .header-link {
        padding: 0 14px;
        font-size: 0.9rem;
    }
}

@media (max-width: 991.98px) {
    html[data-nav-layout="header"] {
        font-size: 14.5px;
        --topbar-height: 60px;
    }
}

body.layout-topnav #layoutSidenav_nav,
html[data-nav-layout="header"] #layoutSidenav_nav,
html:not([data-nav-layout]) #layoutSidenav_nav {
    display: none !important;
}

body.layout-topnav.sb-nav-fixed #layoutSidenav #layoutSidenav_content,
body.layout-topnav #layoutSidenav_content,
html[data-nav-layout="header"] #layoutSidenav_content,
html:not([data-nav-layout]) #layoutSidenav_content {
    margin-left: 0 !important;
    width: 100% !important;
}

@media (min-width: 992px) {
    html[data-nav-layout="sidebar"] .header-nav-groups {
        display: none !important;
    }
}

html[data-nav-layout="sidebar"] .sb-topnav {
    display: flex !important;
    grid-template-columns: none;
}

html[data-nav-layout="sidebar"] .header-left {
    margin-right: auto;
}

html[data-nav-layout="sidebar"] .sb-nav-fixed #layoutSidenav #layoutSidenav_nav {
    top: var(--header-offset) !important;
    height: calc(100vh - var(--header-offset)) !important;
}

.sb-sidenav-menu-heading,
.sb-sidenav .sb-sidenav-menu .nav .sb-sidenav-menu-heading {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
    padding: 0.7rem 1rem 0.2rem !important;
}

/* Layout template picker */
.layout-template-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.layout-template-card {
    border: 2px solid #e2e8f0;
    background: #ffffff;
    border-radius: 14px;
    padding: 0.85rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.layout-template-card:hover {
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.layout-template-card.is-selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.layout-template-card:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    transform: none;
    box-shadow: none;
}

.layout-preview {
    height: 86px;
    border-radius: 8px;
    background: #e2e8f0;
    display: grid;
    overflow: hidden;
    margin-bottom: 0.7rem;
}

.layout-preview-header {
    grid-template-rows: 14px 1fr;
}

.layout-preview-header .lp-bar {
    background: #171d26;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.layout-preview-header .lp-bar i {
    width: 18px;
    height: 4px;
    border-radius: 2px;
    background: #93c5fd;
    display: block;
}

.layout-preview-sidebar {
    grid-template-columns: 28px 1fr;
    grid-template-rows: 14px 1fr;
}

.layout-preview-sidebar .lp-bar {
    grid-column: 1 / -1;
    background: #171d26;
}

.layout-preview-sidebar .lp-side {
    background: #1e293b;
}

.layout-preview .lp-body {
    background: #f1f5f9;
}

.layout-template-card .lp-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #0f172a;
}

.layout-template-card .lp-sub {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 2px;
}

@media (max-width: 575.98px) {
    .layout-template-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1199.98px) {
    .header-link {
        padding: 0 12px;
        gap: 6px;
        font-size: 0.8rem;
    }
    .gov-search-input {
        min-width: 0;
    }
}

@media (max-width: 991.98px) {
    .sb-topnav {
        display: flex !important;
        grid-template-columns: none;
        gap: 8px;
    }

    .header-left {
        margin-right: 0;
        flex-shrink: 0;
    }

    .header-nav-groups {
        display: flex;
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        flex: 1 1 auto;
        min-width: 0;
        height: 100%;
        max-height: none;
        overflow-x: auto;
        overflow-y: visible;
        background: none;
        border: none;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        justify-content: flex-start;
        scrollbar-width: none;
    }

    .header-nav-groups::-webkit-scrollbar {
        display: none;
    }

    html[data-nav-layout="sidebar"] .header-nav-groups {
        display: flex !important;
    }

    .header-menu {
        flex-direction: row;
        align-items: center;
        width: max-content;
        gap: 4px;
        height: 100%;
    }

    .header-item {
        min-width: 0;
        width: auto;
        height: auto;
    }

    .header-link {
        width: auto;
        height: 32px;
        padding: 0 10px;
        font-size: 0.78rem;
    }
}

/* =======================================================
   3. SIDEBAR CARD NAVIGATION (blue rectangular fill)
   ======================================================= */
#layoutSidenav {
    display: flex;
}

.sb-nav-fixed #layoutSidenav #layoutSidenav_nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: var(--sidebar-width) !important;
    height: 100vh !important;
    z-index: 1040 !important;
    background-color: #f8fafc !important;
    border-right: none;
    padding: 10px 10px 12px !important;
    transform: translateX(0);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: visible !important;
}

.sb-nav-fixed #layoutSidenav #layoutSidenav_nav .sb-sidenav,
.sb-sidenav-card {
    padding-top: 0 !important;
    background-color: transparent !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.sidebar-card {
    background: var(--sb-card-bg);
    box-shadow: var(--sb-card-shadow);
    border-radius: var(--ui-card-radius, 10px);
    padding: 0.7rem 0.65rem 0.75rem;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.sidebar-brand-wrapper {
    padding: 0.35rem 0.35rem 0.65rem !important;
    background: transparent;
    border-bottom: 1px solid #dbeafe;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.sidebar-brand-wrapper a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.sidebar-logo-img {
    width: auto;
    max-width: 180px;
    height: auto;
    max-height: 64px;
    object-fit: contain;
    filter: none;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
    margin: 0 auto;
}

.sidebar-brand-wrapper a:hover .sidebar-logo-img {
    transform: scale(1.03);
}

.sb-sidenav-menu {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.15rem 0 0.35rem !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sb-sidenav-menu::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.sb-sidenav-menu .nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    position: relative;
    border-left: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    width: 100%;
}

.sb-sidenav-card .nav-link,
.sb-sidenav .nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem !important;
    min-height: 44px;
    color: var(--sb-pill-text) !important;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 4px !important;
    border: 0;
    width: 100%;
    transition: color 0.28s ease;
    background: transparent !important;
    overflow: hidden;
    box-shadow: none !important;
    isolation: isolate;
}

.sb-sidenav-card .nav-link::before,
.sb-sidenav .nav-link::before {
    content: "" !important;
    display: block !important;
    position: absolute;
    inset: 0;
    background: var(--sb-fill);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
    pointer-events: none;
}

.sb-sidenav-card .nav-link::after,
.sb-sidenav .nav-link::after {
    content: none !important;
    display: none !important;
}

.sb-sidenav-card .nav-link:hover::before,
.sb-sidenav-card .nav-link.active::before,
.sb-sidenav-card .nav-link:focus-visible::before,
.sb-sidenav .nav-link:hover::before,
.sb-sidenav .nav-link.active::before,
.sb-sidenav .nav-link:focus-visible::before {
    transform: scaleX(1);
}

.sb-sidenav-card .nav-link:hover,
.sb-sidenav-card .nav-link.active,
.sb-sidenav-card .nav-link:focus-visible,
.sb-sidenav .nav-link:hover,
.sb-sidenav .nav-link.active,
.sb-sidenav .nav-link:focus-visible {
    color: #ffffff !important;
    font-weight: 600;
    background: transparent !important;
    box-shadow: none !important;
    outline: none;
    transform: none;
}

.sb-sidenav-card .nav-link .sb-nav-link-icon,
.sb-sidenav .nav-link .sb-nav-link-icon {
    font-size: 1.15rem;
    width: 24px;
    height: 24px;
    min-width: 24px;
    margin-right: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    transition: color 0.28s ease;
    flex-shrink: 0;
    z-index: 3;
    overflow: visible !important;
    line-height: 1 !important;
}

.sb-sidenav .nav-link .sb-nav-link-icon i,
.sb-sidenav .nav-link .sb-nav-link-icon i[class^="fi-"],
.sb-sidenav .nav-link .sb-nav-link-icon i[class*=" fi-"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    overflow: visible !important;
    vertical-align: middle !important;
    width: 100%;
    height: 100%;
}

.sb-sidenav .nav-link .sb-nav-link-icon i::before,
.sb-sidenav .nav-link .sb-nav-link-icon i[class^="fi-"]::before,
.sb-sidenav .nav-link .sb-nav-link-icon i[class*=" fi-"]::before {
    display: inline-block !important;
    line-height: 1 !important;
    overflow: visible !important;
    vertical-align: middle !important;
}

.sb-sidenav-card .nav-link:hover .sb-nav-link-icon,
.sb-sidenav-card .nav-link.active .sb-nav-link-icon,
.sb-sidenav-card .nav-link:focus-visible .sb-nav-link-icon,
.sb-sidenav .nav-link:hover .sb-nav-link-icon,
.sb-sidenav .nav-link.active .sb-nav-link-icon,
.sb-sidenav .nav-link:focus-visible .sb-nav-link-icon {
    color: #ffffff !important;
    transform: none;
}

.sb-sidenav .nav-link span {
    z-index: 3;
    position: relative;
}

.sidebar-card-footer {
    flex-shrink: 0;
    padding-top: 0.45rem;
    margin-top: auto;
    border-top: 1px solid #dbeafe;
}

.sb-sidenav-card .nav-link.nav-link-logout,
.sb-sidenav .nav-link.nav-link-logout {
    border-top: 0;
    margin-top: 0;
    padding-top: 0.85rem;
    color: var(--sb-pill-text) !important;
    border-radius: 4px !important;
}

.sb-sidenav-card .nav-link.nav-link-logout .sb-nav-link-icon,
.sb-sidenav .nav-link.nav-link-logout .sb-nav-link-icon {
    color: #111827 !important;
}

.sb-sidenav-card .nav-link.nav-link-logout:hover,
.sb-sidenav .nav-link.nav-link-logout:hover {
    background: transparent !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.sb-sidenav-card .nav-link.nav-link-logout:hover .sb-nav-link-icon,
.sb-sidenav .nav-link.nav-link-logout:hover .sb-nav-link-icon {
    color: #ffffff !important;
}

.sb-sidenav-card .nav-link .badge {
    margin-left: auto;
    font-size: 0.65rem;
    min-width: 1.2rem;
    position: relative;
    z-index: 3;
}

.sb-sidenav-card .nav-link.active .badge,
.sb-sidenav-card .nav-link:hover .badge {
    background: #ffffff !important;
    color: #1d4ed8 !important;
}

/* =======================================================
   4. ROOT-LEVEL GAP & COLLAPSIBLE SIDEBAR LAYOUT
   ======================================================= */
.sb-nav-fixed #layoutSidenav #layoutSidenav_content,
#layoutSidenav_content {
    top: 0 !important;
    padding-top: var(--header-offset) !important;
    padding-left: 0 !important;
    margin-left: var(--sidebar-width) !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--gov-bg);
    position: relative;
    width: auto !important;
    flex-grow: 1 !important;
    transition: margin-left 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* WHEN SIDEBAR IS COLLAPSED -> EXPAND CONTENT TO 100% */
body.sb-sidenav-toggled #layoutSidenav #layoutSidenav_nav {
    transform: translateX(calc(-1 * var(--sidebar-width))) !important;
}

body.sb-sidenav-toggled #layoutSidenav #layoutSidenav_content,
body.sb-sidenav-toggled.sb-nav-fixed #layoutSidenav #layoutSidenav_content,
body.layout-topnav.sb-nav-fixed #layoutSidenav #layoutSidenav_content,
body.layout-topnav #layoutSidenav_content {
    margin-left: 0 !important;
    padding-left: 0 !important;
    width: 100% !important;
}

@media (max-width: 991.98px) {
    .sb-nav-fixed #layoutSidenav #layoutSidenav_nav {
        transform: translateX(calc(-1 * var(--sidebar-width))) !important;
        z-index: 1045 !important;
    }
    body.sb-sidenav-toggled #layoutSidenav #layoutSidenav_nav {
        transform: translateX(0) !important;
        box-shadow: 8px 0 24px rgba(37, 99, 235, 0.18);
    }
    .sb-nav-fixed #layoutSidenav #layoutSidenav_content,
    #layoutSidenav_content {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
}

html:not(.dark)[data-topbar="light"] .sb-topnav {
    background-color: #ffffff !important;
}
html:not(.dark)[data-topbar="light"] .header-user-name {
    color: #111827 !important;
}
html:not(.dark)[data-topbar="light"] .header-user-role {
    color: #64748b !important;
}
html:not(.dark)[data-topbar="light"] .header-link,
html:not(.dark)[data-topbar="light"] .header-menu {
    color: #374151 !important;
}
html:not(.dark)[data-topbar="light"] .header-settings-btn {
    background: #f1f5f9;
    color: #334155;
}

html[data-topbar="dark"] .sb-topnav,
html.dark[data-topbar="dark"] .sb-topnav {
    background-color: #1a222d !important;
}
html[data-topbar="dark"] .header-user-name,
html.dark[data-topbar="dark"] .header-user-name {
    color: #f8fafc !important;
}
html[data-topbar="dark"] .header-user-role {
    color: #94a3b8 !important;
}
html[data-topbar="dark"] .header-link,
html[data-topbar="dark"] .header-menu {
    color: #cbd5e1 !important;
}
html[data-topbar="dark"] .header-settings-btn,
html.dark[data-topbar="dark"] .header-settings-btn {
    background: #243040;
    color: #e2e8f0;
}
html[data-topbar="dark"] .gov-search-input,
html.dark[data-topbar="dark"] .gov-search-input {
    background: #243040 !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
html[data-topbar="dark"] .gov-search-input::placeholder {
    color: #94a3b8;
}
html[data-topbar="dark"] #liveClock,
html[data-topbar="dark"] .header-user-meta {
    color: #e2e8f0;
}
html[data-menu="dark"] .sb-sidenav-card .nav-link,
html:not(.dark)[data-menu="dark"] .sb-sidenav-card .nav-link {
    color: #cbd5e1 !important;
}
html[data-menu="dark"] .sb-sidenav-card .nav-link .sb-nav-link-icon,
html:not(.dark)[data-menu="dark"] .sb-sidenav-card .nav-link .sb-nav-link-icon {
    color: #e2e8f0 !important;
}

html:not(.dark)[data-menu="light"] .sidebar-card {
    background: #ffffff;
    --sb-pill-text: #374151;
    --sb-card-bg: #ffffff;
}
html[data-menu="dark"] .sidebar-card,
html:not(.dark)[data-menu="dark"] .sidebar-card {
    background: #1a222d;
    --sb-pill-text: #cbd5e1;
    --sb-card-bg: #1a222d;
}
html[data-menu="dark"] .sb-sidenav-menu-heading,
html:not(.dark)[data-menu="dark"] .sb-sidenav-menu-heading {
    color: #94a3b8;
}
html[data-menu="dark"] .sidebar-brand-wrapper,
html:not(.dark)[data-menu="dark"] .sidebar-brand-wrapper {
    border-bottom-color: rgba(148, 163, 184, 0.18);
}

html[data-sidebar-size="condensed"][data-nav-layout="sidebar"],
html[data-sidebar-size="sm-hover"][data-nav-layout="sidebar"],
html[data-sidebar-size="sm-hover-active"][data-nav-layout="sidebar"] {
    --sidebar-width: 88px;
}

html[data-sidebar-size="condensed"][data-nav-layout="sidebar"] .sb-sidenav-menu-heading,
html[data-sidebar-size="condensed"][data-nav-layout="sidebar"] .sidebar-pill > span:not(.sb-nav-link-icon),
html[data-sidebar-size="sm-hover"][data-nav-layout="sidebar"] .sb-sidenav-menu-heading,
html[data-sidebar-size="sm-hover"][data-nav-layout="sidebar"] .sidebar-pill > span:not(.sb-nav-link-icon),
html[data-sidebar-size="sm-hover-active"][data-nav-layout="sidebar"] .sb-sidenav-menu-heading,
html[data-sidebar-size="sm-hover-active"][data-nav-layout="sidebar"] .sidebar-pill > span:not(.sb-nav-link-icon) {
    display: none !important;
}

html[data-sidebar-size="condensed"][data-nav-layout="sidebar"] .sb-sidenav-card .nav-link,
html[data-sidebar-size="sm-hover"][data-nav-layout="sidebar"] .sb-sidenav-card .nav-link,
html[data-sidebar-size="sm-hover-active"][data-nav-layout="sidebar"] .sb-sidenav-card .nav-link {
    justify-content: center;
    padding: 0.75rem 0.4rem !important;
    gap: 0;
}

html[data-sidebar-size="sm-hover"][data-nav-layout="sidebar"] #layoutSidenav_nav,
html[data-sidebar-size="sm-hover-active"][data-nav-layout="sidebar"] #layoutSidenav_nav {
    width: 88px !important;
}
html[data-sidebar-size="sm-hover"][data-nav-layout="sidebar"] #layoutSidenav_content,
html[data-sidebar-size="sm-hover-active"][data-nav-layout="sidebar"] #layoutSidenav_content,
html[data-sidebar-size="sm-hover"][data-nav-layout="sidebar"] .sb-nav-fixed #layoutSidenav #layoutSidenav_content,
html[data-sidebar-size="sm-hover-active"][data-nav-layout="sidebar"] .sb-nav-fixed #layoutSidenav #layoutSidenav_content {
    margin-left: 88px !important;
}
html[data-sidebar-size="sm-hover"][data-nav-layout="sidebar"] #layoutSidenav_nav:hover,
html[data-sidebar-size="sm-hover-active"][data-nav-layout="sidebar"] #layoutSidenav_nav:hover {
    width: 280px !important;
    z-index: 1090 !important;
}
html[data-sidebar-size="sm-hover"][data-nav-layout="sidebar"] #layoutSidenav_nav:hover .sb-sidenav-menu-heading,
html[data-sidebar-size="sm-hover-active"][data-nav-layout="sidebar"] #layoutSidenav_nav:hover .sb-sidenav-menu-heading {
    display: block !important;
}
html[data-sidebar-size="sm-hover"][data-nav-layout="sidebar"] #layoutSidenav_nav:hover .sidebar-pill > span:not(.sb-nav-link-icon),
html[data-sidebar-size="sm-hover-active"][data-nav-layout="sidebar"] #layoutSidenav_nav:hover .sidebar-pill > span:not(.sb-nav-link-icon) {
    display: inline !important;
}
html[data-sidebar-size="sm-hover"][data-nav-layout="sidebar"] #layoutSidenav_nav:hover .sb-sidenav-card .nav-link,
html[data-sidebar-size="sm-hover-active"][data-nav-layout="sidebar"] #layoutSidenav_nav:hover .sb-sidenav-card .nav-link {
    justify-content: flex-start;
    padding: 0.85rem 1rem !important;
    gap: 1rem;
}

html[data-nav-layout="header"][data-sidebar-size="hidden"] {
    --sidebar-width: 0px;
}

.gov-main,
main.gov-main,
main.container-fluid,
#layoutSidenav_content > main {
    padding: 1.5rem 1.75rem 2.5rem 1.75rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    flex-grow: 1;
}

@media (max-width: 768px) {
    .gov-main,
    main.gov-main,
    main.container-fluid,
    #layoutSidenav_content > main {
        padding: 1rem 1rem 2rem 1rem !important;
    }
}

/* =======================================================
   5. SHADCN-STYLE CARDS
   ======================================================= */
.card,
.gov-card,
.card-stat {
    background: var(--card);
    color: var(--card-foreground);
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-gov) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: visible;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card.p-3,
.card.p-4,
.gov-card.p-3,
.gov-card.p-4,
.card-stat.p-3 {
    padding: 1.15rem 1.25rem !important;
}

.card:not(:has(.card-header, .card-body, .ui-card-header, .ui-card-content, .ui-card-footer)):not([class*="p-"]),
.gov-card:not(:has(.card-header, .card-body, .ui-card-header, .ui-card-content)):not([class*="p-"]),
.card-stat:not([class*="p-"]) {
    padding: 1.25rem 1.5rem;
}

.card:hover,
.gov-card:hover,
.card-stat:hover {
    transform: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    border-color: var(--border) !important;
}

.card > .card-header,
.gov-card > .card-header {
    background: transparent !important;
    background-color: transparent !important;
    color: var(--card-foreground) !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 1.15rem 1.5rem 0.85rem !important;
    border-radius: 0 !important;
}

.card > .card-header .card-title,
.card > .card-header h5,
.card > .card-header h6,
.card > .card-header.text-white,
.card > .card-header .text-white {
    color: var(--card-foreground) !important;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card > .card-header .text-info {
    color: var(--primary) !important;
}

.card > .card-body {
    padding: 1rem 1.5rem 1.5rem;
}

.ui-stat-card {
    background-image: linear-gradient(to top, color-mix(in srgb, var(--primary) 6%, transparent), var(--card));
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
    gap: 0;
}

.card.h-100.p-3 {
    background-image: linear-gradient(to top, color-mix(in srgb, var(--primary) 6%, transparent), var(--card));
}

a:hover .ui-stat-card {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border)) !important;
}

.ui-card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem 0.75rem;
    padding: 1.2rem 1.35rem 0;
    align-items: start;
}

.ui-card-description {
    grid-column: 1;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
}

.ui-card-title {
    grid-column: 1;
    color: var(--card-foreground);
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    margin: 0;
}

.ui-card-title-sm {
    grid-column: 1;
    color: var(--card-foreground);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
    margin: 0;
}

.ui-card-action {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    justify-self: end;
}

.ui-card-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.85rem 1.35rem 1.2rem;
    font-size: 0.8125rem;
}

.ui-card-footer-lead {
    font-weight: 500;
    color: var(--card-foreground);
    line-height: 1.35;
}

.ui-card-footer-muted {
    color: var(--muted-foreground);
    line-height: 1.35;
}

.ui-card-content {
    padding: 0.85rem 1.35rem 1.25rem;
}

.ui-badge-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 80%, transparent);
    color: var(--card-foreground);
    border-radius: 0.5rem;
    padding: 0.22rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.ui-badge-outline i {
    font-size: 0.72rem;
    color: var(--muted-foreground);
}

/* Eye-Friendly Icon Badges (Soft Tinted Backgrounds) */
.gov-icon-badge,
.icon-box {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.gov-icon-primary,
.bg-primary-subtle { background: #eff6ff !important; color: #2563eb !important; }

.gov-icon-success,
.bg-success-subtle { background: #ecfdf5 !important; color: #059669 !important; }

.gov-icon-warning,
.bg-warning-subtle { background: #fffbeb !important; color: #d97706 !important; }

.gov-icon-danger,
.bg-danger-subtle { background: #fef2f2 !important; color: #dc2626 !important; }

.gov-icon-info,
.bg-info-subtle { background: #f0f9ff !important; color: #0284c7 !important; }

.gov-icon-purple,
.bg-purple-subtle { background: #f5f3ff !important; color: #7c3aed !important; }

/* =======================================================
   6. AUTHENTIC AZERBAIJAN VEHICLE LICENSE PLATE
   ======================================================= */
.car-plate {
    display: inline-flex;
    align-items: center;
    height: 30px;
    background: #ffffff;
    border: 1.8px solid #0f172a;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    font-family: 'JetBrains Mono', 'Plus Jakarta Sans', -apple-system, monospace;
    overflow: hidden;
    user-select: none;
    vertical-align: middle;
    line-height: 1;
    position: relative;
    z-index: 2;
    isolation: isolate;
}

.car-plate .flag-az {
    background: #f8fafc;
    border-right: 1.8px solid #0f172a;
    padding: 2px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-width: 22px;
    box-sizing: border-box;
}

.car-plate .flag-stripes {
    display: flex;
    flex-direction: column;
    width: 14px;
    height: 8px;
    border-radius: 1px;
    overflow: hidden;
    margin-bottom: 2px;
}

.car-plate .stripe-blue { background: #0092bc; height: 2.66px; width: 100%; }
.car-plate .stripe-red { background: #e4002b; height: 2.67px; width: 100%; }
.car-plate .stripe-green { background: #009639; height: 2.66px; width: 100%; }

.car-plate .az-text {
    font-size: 8px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -0.02em;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

.car-plate .vehicle-plate {
    padding: 0 10px;
    font-size: 0.96rem;
    font-weight: 800;
    color: #090d16 !important;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', 'Plus Jakarta Sans', monospace;
    font-feature-settings: 'tnum';
    white-space: nowrap;
}

/* Plate cells: never inherit table hover overlay / gray boxes */
td:has(.car-plate),
th:has(.car-plate) {
    box-shadow: none !important;
    --bs-table-accent-bg: transparent !important;
}

tbody tr:hover > td:has(.car-plate),
.table-hover > tbody > tr:hover > td:has(.car-plate) {
    box-shadow: none !important;
    --bs-table-accent-bg: transparent !important;
}

/* =======================================================
   7. UNIFIED SOOTHING TABLES & CONTAINERS
   ======================================================= */
.gov-table-card,
.table-separate-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-gov);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.gov-table,
.table-separate,
.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
}

.gov-table td.text-wrap,
.gov-table th.text-wrap,
.table-separate td.text-wrap,
.table-separate th.text-wrap,
.table td.text-wrap,
.table th.text-wrap,
.text-wrap {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

.gov-table thead th,
.table-separate thead th,
.table thead th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.8rem 0.95rem;
    border-bottom: 1px solid #e2e8f0;
    border-top: none;
    vertical-align: middle;
}

.gov-table tbody tr,
.table-separate tbody tr,
.table tbody tr {
    transition: background-color 0.12s ease;
    border-bottom: 1px solid #f1f5f9;
}

.gov-table tbody tr:last-child,
.table-separate tbody tr:last-child,
.table tbody tr:last-child {
    border-bottom: none;
}

.gov-table tbody tr:hover,
.table-separate tbody tr:hover,
.table tbody tr:hover {
    background-color: #f8fafc;
}

.gov-table tbody tr.cursor-pointer,
.table tbody tr.cursor-pointer {
    cursor: pointer;
}

.gov-table tbody td,
.table-separate tbody td,
.table tbody td {
    padding: 0.75rem 0.95rem;
    vertical-align: middle;
    font-size: 0.86rem;
    color: #1e293b;
    border-top: none;
}

/* Minimalist Transparent Action Buttons & Animated Edit Button */
.editBtn,
.table .btn-outline-secondary,
.table .btn-outline-primary,
.table .btn-edit,
.table .btn-edit-fine {
    background-color: transparent !important;
    border: none !important;
    color: #0f172a !important;
    box-shadow: none !important;
    transition: all 0.25s ease;
}

.editBtn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background-color: transparent !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: all 0.25s ease;
    padding: 0;
    vertical-align: middle;
    outline: none;
}

.editBtn:hover {
    background-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: none !important;
}

.editBtn svg {
    height: 16px;
    width: 16px;
    fill: #0f172a !important;
    z-index: 3;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom right;
    pointer-events: none;
}

.editBtn:hover svg {
    fill: #000000 !important;
    transform: rotate(-15deg) translateY(-2px);
}

.editBtn::after {
    content: "";
    width: 15px;
    height: 2px;
    position: absolute;
    bottom: 5px;
    left: 9px;
    background-color: #0f172a;
    border-radius: 2px;
    z-index: 2;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-out;
    pointer-events: none;
}

.editBtn:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* =======================================================
   CUSTOM ANIMATED SVG CHECKBOX (React Checkbox Style)
   ======================================================= */
.checkbox {
    --checkbox-color: #334155;
    --checkbox-checked-color: #2563eb;
    --checkbox-size: 1.35rem;
    display: inline-flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    user-select: none;
    font-size: var(--checkbox-size);
    font-weight: 600;
    color: var(--checkbox-color);
    margin-bottom: 0;
    vertical-align: middle;
    line-height: 1;
}

.checkbox input {
    position: absolute;
    pointer-events: none;
    inset: 0;
    opacity: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.checkbox .checkmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--checkbox-size) / 2.5);
    opacity: 0.7;
    transition: opacity 150ms ease, color 150ms ease;
    color: var(--checkbox-color);
}

.checkbox:hover .checkmark,
.checkbox .checkmark:hover {
    opacity: 0.9;
}

.checkbox input:checked ~ .checkmark {
    opacity: 1;
    color: var(--checkbox-checked-color);
}

.checkbox .checkmark svg {
    width: var(--checkbox-size);
    height: var(--checkbox-size);
    display: block;
    flex-shrink: 0;
}

.checkbox .checkmark svg rect {
    stroke-dasharray: 88 0;
    stroke-dashoffset: 73;
    transition: stroke-dasharray 150ms ease, stroke 150ms ease;
}

.checkbox input:checked ~ .checkmark svg rect {
    stroke-dasharray: 80 18;
}

.checkbox .checkmark svg polyline {
    stroke-dasharray: 0 30;
    stroke-dashoffset: 1;
    transition: stroke-dasharray 200ms ease, stroke 200ms ease;
}

.checkbox input:checked ~ .checkmark svg polyline {
    stroke-dasharray: 30 30;
}

/* Modifiers */
.checkbox.checkbox-sm {
    --checkbox-size: 1.15rem;
}

.checkbox.checkbox-lg {
    --checkbox-size: 1.55rem;
}

.checkbox.checkbox-primary {
    --checkbox-checked-color: #2563eb;
}
.checkbox.checkbox-success {
    --checkbox-checked-color: #16a34a;
}
.checkbox.checkbox-danger {
    --checkbox-checked-color: #dc2626;
}
.checkbox.checkbox-warning {
    --checkbox-checked-color: #d97706;
}
.checkbox.checkbox-purple {
    --checkbox-checked-color: #9333ea;
}


/* =======================================================
   8. SOFT PASTEL STATUS BADGES & TABS
   ======================================================= */
.gov-badge,
.badge-saas {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.gov-badge-success {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.gov-badge-warning {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.gov-badge-danger {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.gov-badge-info {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.gov-badge-purple {
    background-color: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}

.gov-badge-neutral {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* Nav Pills (myGov Tabs) */
.nav-pills .nav-link {
    color: var(--gov-text-body);
    border-radius: var(--radius-pill);
    padding: 0.45rem 1.1rem;
    font-size: 0.84rem;
    font-weight: 600;
    transition: all 0.15s ease;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
}

.nav-pills .nav-link:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.nav-pills .nav-link.active {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

#insuranceTabs.nav-pills {
    gap: 0.65rem !important;
}

#insuranceTabs .nav-link {
    padding: 0.7rem 1.45rem;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

#insuranceTabs .nav-link i {
    font-size: 1.05rem;
}

#insuranceTabs .nav-link .badge {
    font-size: 0.85rem;
    min-width: 1.7rem;
    padding: 0.28em 0.55em;
    vertical-align: middle;
}

#waDispatchTabs.nav-pills {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 0.65rem !important;
}

#waDispatchTabs .nav-item {
    flex: 1 1 0;
    min-width: 0;
}

#waDispatchTabs .nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.15rem;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

#waDispatchTabs .nav-link i {
    font-size: 1.05rem;
}

@media (max-width: 1199.98px) {
    #waDispatchTabs .nav-item {
        flex: 1 1 calc(50% - 0.65rem);
    }
}

@media (max-width: 767.98px) {
    #waDispatchTabs .nav-item {
        flex: 1 1 100%;
    }
    #waDispatchTabs .nav-link {
        white-space: normal;
        font-size: 0.95rem;
    }
}

/* Alert Banner */
.alert-gov-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626 !important;
    border-radius: var(--radius-gov);
    color: #991b1b;
}

.alert-gov-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background-color: #dc2626;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* =======================================================
   9. BUTTONS & ACTIONS
   ======================================================= */
.btn {
    font-weight: 600;
    font-size: 0.84rem;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.btn-action-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: var(--gov-text-muted);
    transition: all 0.15s ease;
}

.btn-action-icon:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

.btn-action-danger:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
}

/* =======================================================
   10. MODALS & FORMS
   ======================================================= */
.modal-content {
    border: 1px solid var(--gov-border);
    border-radius: var(--radius-gov);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.modal-content > * {
    min-width: 0;
    max-width: 100%;
}

.modal-header {
    background-color: #171d26;
    color: #ffffff;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #283242;
}

.modal-title {
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.modal-body {
    padding: 1.25rem;
    background-color: #ffffff;
}

.modal-footer {
    padding: 0.85rem 1.25rem;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.form-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--gov-text-dark);
    margin-bottom: 0.3rem;
}

.form-control, .form-select {
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    padding: 0.48rem 0.75rem;
    font-size: 0.86rem;
    color: var(--gov-text-body);
    background-color: #ffffff;
}

.form-control:focus, .form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}

/* =======================================================
   11. MASTER REPORT & MODULE TOGGLE CARDS
   ======================================================= */
.report-table-wrapper {
    overflow-x: auto !important;
    overflow-y: auto !important;
    max-height: 680px;
    border-radius: 0 0 10px 10px;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #f1f5f9;
}
.report-table-wrapper::-webkit-scrollbar {
    height: 9px;
    width: 8px;
}
.report-table-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.report-table-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.report-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

#reportMasterTable th {
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    user-select: none;
}
#reportMasterTable td {
    padding: 8px 12px;
    font-size: 0.84rem;
    white-space: nowrap;
    vertical-align: middle;
}

/* Sticky Headers & Sticky Left Columns */
#reportMasterTable thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    color: #ffffff !important;
    background-color: var(--rpt-th-bg, #1e293b) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}
#reportMasterTable thead th.sticky-col-1 {
    left: 0;
    z-index: 12 !important;
}
#reportMasterTable thead th.sticky-col-2 {
    left: 50px;
    z-index: 12 !important;
}
#reportMasterTable tbody td.sticky-col-1 {
    position: sticky;
    left: 0;
    z-index: 5;
    background-color: var(--gov-surface, #ffffff);
    border-right: 1px solid var(--gov-border, #e2e8f0);
}
#reportMasterTable tbody td.sticky-col-2 {
    position: sticky;
    left: 50px;
    z-index: 5;
    background-color: var(--gov-surface, #ffffff);
    border-right: 2px solid var(--gov-border, #cbd5e1);
}
#reportMasterTable tbody tr:hover td.sticky-col-1,
#reportMasterTable tbody tr:hover td.sticky-col-2 {
    background-color: #f8fafc;
}

/* Modern Professional Module Toggle Cards */
.module-toggle-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 0.85rem 1rem !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    user-select: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0.2rem !important;
    min-width: 0 !important;
}
.module-toggle-card > .d-flex {
    gap: 0.5rem !important;
    min-width: 0 !important;
}
.module-toggle-card > .d-flex > .fw-bold {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    line-height: 1.3 !important;
}
.module-toggle-card .checkbox {
    flex-shrink: 0 !important;
}
.module-toggle-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-1px) !important;
}
.module-toggle-card.active {
    background: #ffffff !important;
    border-color: #bfdbfe !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.05) !important;
}
.module-toggle-card .toggle-icon-box {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    flex-shrink: 0 !important;
    transition: all 0.15s ease !important;
}
.module-toggle-card .toggle-title {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    color: #1e293b !important;
}
.module-toggle-card .toggle-sub {
    font-size: 0.74rem !important;
    color: #64748b !important;
    margin-top: 2px !important;
}
/* Inactive switch state */
.module-toggle-card:not(.active) {
    opacity: 0.65 !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}
.module-toggle-card:not(.active) .toggle-icon-box {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
}
.module-toggle-card .form-check-input {
    width: 2.2em !important;
    height: 1.2em !important;
    cursor: pointer !important;
    margin: 0 !important;
}
.module-toggle-card .form-check-input:checked {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

/* =======================================================
   12. WINDOWS EXPLORER SPLIT PANE & FILE MANAGER
   ======================================================= */
.explorer-split-wrapper {
    display: flex !important;
    gap: 1rem !important;
    min-height: 680px !important;
    align-items: stretch !important;
}

@media (max-width: 991.98px) {
    .explorer-split-wrapper {
        flex-direction: column !important;
    }
}

.explorer-tree-pane {
    width: 290px !important;
    min-width: 270px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.explorer-tree-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 0.75rem 0.95rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.explorer-tree-body {
    flex-grow: 1 !important;
    overflow-y: auto !important;
    padding: 0.5rem 0.35rem !important;
    max-height: 720px !important;
    font-size: 0.86rem !important;
}

.win-tree-item {
    position: relative !important;
    user-select: none !important;
}

.win-tree-row {
    display: flex !important;
    align-items: center !important;
    padding: 0.35rem 0.5rem !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    color: #1e293b !important;
    font-weight: 500 !important;
    transition: background-color 0.12s ease !important;
    gap: 0.35rem !important;
    line-height: 1.2 !important;
}

.win-tree-row:hover {
    background-color: #f1f5f9 !important;
}

.win-tree-row.active {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    font-weight: 700 !important;
}

.win-tree-arrow {
    width: 16px !important;
    height: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.65rem !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    transition: transform 0.15s ease !important;
}

.win-tree-arrow.expanded {
    transform: rotate(90deg) !important;
}

.win-tree-arrow.empty {
    visibility: hidden !important;
}

.win-tree-icon {
    font-size: 1rem !important;
    color: #f59e0b !important;
    margin-right: 0.25rem !important;
    flex-shrink: 0 !important;
}

.win-tree-row.active .win-tree-icon {
    color: #0284c7 !important;
}

.win-tree-name {
    flex-grow: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.win-tree-badge {
    font-size: 0.7rem !important;
    padding: 0.1rem 0.45rem !important;
    border-radius: 9999px !important;
    background: #f1f5f9 !important;
    color: #64748b !important;
    font-family: 'JetBrains Mono', monospace !important;
}

.win-tree-actions {
    opacity: 0;
    transition: opacity 0.15s ease;
    margin-left: 0.25rem;
}

.win-tree-row:hover .win-tree-actions,
.win-tree-actions.show {
    opacity: 1;
}

.win-tree-actions-btn {
    width: 20px;
    height: 20px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #64748b;
    border: none;
    background: transparent;
    font-size: 0.75rem;
}
.win-tree-actions-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.win-tree-children {
    margin-left: 1.1rem !important;
    padding-left: 0.4rem !important;
    border-left: 1px dashed #cbd5e1 !important;
}

.win-tree-space {
    padding: 0.35rem 0.2rem 0.65rem !important;
    margin-bottom: 0.45rem !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
}
.win-tree-space:last-child {
    margin-bottom: 0 !important;
}
.win-tree-space[data-space="personal"] {
    background: #f8f7ff !important;
    border-color: #e0e7ff !important;
}
.win-tree-space[data-space="shared"] {
    background: #f0f9ff !important;
    border-color: #bae6fd !important;
}
.win-tree-space-head {
    margin-bottom: 0.15rem !important;
}
.win-tree-space-hint {
    font-size: 0.68rem !important;
    color: #64748b !important;
    padding: 0 0.5rem 0.25rem 2.05rem !important;
    line-height: 1.2 !important;
}
.win-tree-space-root {
    font-weight: 700 !important;
}
.win-tree-space .win-tree-children {
    margin-left: 0.55rem !important;
    margin-right: 0.25rem !important;
}

html.dark .win-tree-space {
    background: #151c26 !important;
    border-color: #2a3544 !important;
}
html.dark .win-tree-space[data-space="personal"] {
    background: #171a2b !important;
    border-color: #2e3355 !important;
}
html.dark .win-tree-space[data-space="shared"] {
    background: #13202b !important;
    border-color: #1e3a4c !important;
}
html.dark .win-tree-space-hint { color: #94a3b8 !important; }

.explorer-main-pane {
    flex-grow: 1 !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-width: 0 !important;
}

.explorer-toolbar {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 0.65rem 1rem !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
}

.explorer-address-bar {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 0.35rem 0.65rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    font-size: 0.84rem !important;
    min-height: 34px !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    scrollbar-width: none !important;
}
.explorer-address-bar::-webkit-scrollbar { display: none; }

.explorer-content-area {
    flex-grow: 1 !important;
    padding: 1.25rem !important;
    overflow-y: auto !important;
    max-height: 720px !important;
    background: #ffffff !important;
}

.explorer-folder-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 0.75rem 0.9rem !important;
    transition: all 0.12s ease !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    user-select: none !important;
}
.explorer-folder-card:hover {
    border-color: #93c5fd !important;
    background: #f0f7ff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 6px rgba(0,0,0,0.04) !important;
}

.explorer-file-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 0.85rem !important;
    transition: all 0.12s ease !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
}
.explorer-file-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
    transform: translateY(-2px) !important;
}

.dropzone-box {
    border: 2px dashed #93c5fd !important;
    background: #f8fafc !important;
    border-radius: 8px !important;
    padding: 1.25rem !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    margin-bottom: 1.25rem !important;
}
.dropzone-box.drag-over {
    background: #eff6ff !important;
    border-color: #2563eb !important;
    transform: scale(1.01) !important;
}

html.dark .explorer-tree-pane,
html[data-bs-theme="dark"] .explorer-tree-pane,
html.dark .explorer-main-pane,
html[data-bs-theme="dark"] .explorer-main-pane,
html.dark .explorer-content-area,
html[data-bs-theme="dark"] .explorer-content-area {
    background: var(--card, #1a222d) !important;
    border-color: var(--border, #2a3544) !important;
    box-shadow: none !important;
}

html.dark .explorer-tree-header,
html[data-bs-theme="dark"] .explorer-tree-header,
html.dark .explorer-toolbar,
html[data-bs-theme="dark"] .explorer-toolbar {
    background: #151c26 !important;
    border-color: #2a3544 !important;
}

html.dark .explorer-address-bar,
html[data-bs-theme="dark"] .explorer-address-bar {
    background: #12171f !important;
    border-color: #2a3544 !important;
    color: #e2e8f0 !important;
}

html.dark .win-tree-row,
html[data-bs-theme="dark"] .win-tree-row {
    color: #e2e8f0 !important;
}

html.dark .win-tree-badge,
html[data-bs-theme="dark"] .win-tree-badge {
    background: #243040 !important;
    color: #94a3b8 !important;
}

html.dark .win-tree-children,
html[data-bs-theme="dark"] .win-tree-children {
    border-left-color: #2a3544 !important;
}

html.dark .win-tree-actions-btn:hover,
html[data-bs-theme="dark"] .win-tree-actions-btn:hover {
    background: #243040 !important;
    color: #e2e8f0 !important;
}

html.dark .explorer-folder-card,
html[data-bs-theme="dark"] .explorer-folder-card,
html.dark .explorer-file-card,
html[data-bs-theme="dark"] .explorer-file-card {
    background: #151c26 !important;
    border-color: #2a3544 !important;
    color: #e2e8f0 !important;
}

html.dark .explorer-folder-card .text-slate-800,
html.dark .explorer-file-card .text-slate-900,
html.dark .explorer-file-card .text-slate-800,
html.dark .dropzone-box .text-slate-800 {
    color: #e2e8f0 !important;
}

html.dark .dropzone-box,
html[data-bs-theme="dark"] .dropzone-box {
    background: #151c26 !important;
    border-color: #3d4d63 !important;
}

html.dark .dropzone-box.drag-over,
html[data-bs-theme="dark"] .dropzone-box.drag-over {
    background: #1e3a5f !important;
    border-color: #5b8def !important;
}

html.dark .explorer-toolbar .form-control,
html.dark .explorer-toolbar .input-group-text,
html[data-bs-theme="dark"] .explorer-toolbar .form-control,
html[data-bs-theme="dark"] .explorer-toolbar .input-group-text {
    background: #12171f !important;
    border-color: #2a3544 !important;
    color: #e2e8f0 !important;
}

html.dark .explorer-toolbar .btn-outline-secondary,
html[data-bs-theme="dark"] .explorer-toolbar .btn-outline-secondary {
    background: #151c26 !important;
    border-color: #2a3544 !important;
    color: #cbd5e1 !important;
}

html.dark .explorer-toolbar .btn-outline-secondary.active,
html.dark .explorer-toolbar .btn-outline-secondary:hover,
html[data-bs-theme="dark"] .explorer-toolbar .btn-outline-secondary.active {
    background: #243040 !important;
    border-color: #3d4d63 !important;
    color: #f1f5f9 !important;
}

/* =======================================================
   VEHICLE PROFILE MODAL TABS & SUB-RECORDS
   ======================================================= */
.vehicle-modal-tabs-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.55rem 0.85rem;
}

.vehicle-modal-tabs {
    background: #f1f5f9;
    border-radius: 9px;
    padding: 3px;
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    margin: 0;
    border: 1px solid #e2e8f0;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.vehicle-modal-tabs::-webkit-scrollbar {
    height: 6px;
}

.vehicle-modal-tabs .nav-item {
    flex: 1 0 auto;
    text-align: center;
}

.vehicle-modal-tabs .nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.46rem 0.65rem !important;
    border-radius: 6px !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    white-space: nowrap;
    transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer;
}

.vehicle-modal-tabs .nav-link:hover {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.65) !important;
}

.vehicle-modal-tabs .nav-link.active {
    background: #ffffff !important;
    color: #2563eb !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.06) !important;
}

.vehicle-modal-tabs .nav-link i {
    font-size: 0.82rem;
    color: #94a3b8;
    transition: color 0.15s ease, transform 0.15s ease;
}

.vehicle-modal-tabs .nav-link:hover i,
.vehicle-modal-tabs .nav-link.active i {
    color: #2563eb !important;
    transform: scale(1.06);
}

.sub-record-card {
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px;
    transition: all 0.15s ease-in-out;
}
.sub-record-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Sub-modals stack above the vehicle profile modal and the dimmed backdrop */
#modalInsurance,
#modalInspection,
#modalMaintenance,
#modalFine,
#modalFinePhotos,
#modalEtibarname,
#modalYolVereqesi,
#modalFerqlenme {
    z-index: 2050 !important;
}

/* =======================================================
   IT SUPPORT LIVE CHAT & HELPDESK SYSTEM
   ======================================================= */
#floatingSupportChatContainer {
    position: fixed !important;
    right: 18px;
    bottom: 18px;
    z-index: 1090 !important;
    width: 56px;
    height: 56px;
    margin: 0 !important;
    padding: 0 !important;
}
#floatingSupportChatDrawer {
    position: fixed !important;
    right: 18px;
    bottom: 84px;
    z-index: 1091 !important;
    width: 380px;
    max-width: calc(100vw - 28px);
    height: 420px;
}
.floating-chat-btn {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%) !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45) !important;
    border: 2px solid rgba(255, 255, 255, 0.9) !important;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease !important;
    cursor: pointer;
}

.floating-chat-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.55) !important;
}

.floating-chat-drawer {
    width: 380px;
    max-width: calc(100vw - 28px);
    height: 420px !important;
    max-height: calc(100vh - 90px);
    border-radius: 0.5rem !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    transform: translateY(24px) scale(0.96);
    opacity: 0;
}

.floating-chat-drawer.active {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.badge-pulse-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background-color: #22c55e;
    border-radius: 50%;
    margin-right: 4px;
    box-shadow: 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Ticket List Item */
.ticket-list-item {
    transition: all 0.18s ease;
    border-color: #e2e8f0 !important;
}

.ticket-list-item:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.ticket-list-item.active-ticket-item {
    background-color: #eff6ff !important;
    border-color: #3b82f6 !important;
    border-left: 4px solid #2563eb !important;
}

/* Chat Speech Bubbles in Dedicated Page (destek.php) */
.message-bubble {
    max-width: 78%;
    padding: 0.75rem 1rem;
    position: relative;
    word-wrap: break-word;
}

.bubble-outgoing {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border-radius: 16px 16px 4px 16px !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2) !important;
}

.bubble-incoming {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px 16px 16px 4px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.bubble-outgoing .message-text {
    color: #ffffff !important;
    font-size: 0.88rem;
    line-height: 1.45;
}

.bubble-incoming .message-text {
    color: #1e293b !important;
    font-size: 0.88rem;
    line-height: 1.45;
}

.support-messages-thread {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

.support-messages-thread::-webkit-scrollbar {
    width: 6px;
}

.support-messages-thread::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

/* =======================================================
   EXACT USER REACT CHATBOX CARD STYLING
   ======================================================= */
#floatingSupportChatDrawer {
    background-color: #ffffff !important;
    border: 1px solid #e4e4e7 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    border-radius: 0.5rem !important; /* rounded-lg */
    overflow: hidden;
}

#chatDisplay {
    background-color: #ffffff !important;
}

.chat-message {
    max-width: 20rem; /* max-w-xs */
    padding: 0.375rem 0.75rem; /* px-3 py-1.5 */
    font-size: 0.875rem; /* text-sm */
    line-height: 1.35;
    border-radius: 0.5rem; /* rounded-lg */
    word-break: break-word;
    display: inline-block;
}

.chat-message.self-end {
    align-self: flex-end;
    background-color: #3b82f6 !important; /* bg-blue-500 */
    color: #ffffff !important;
}

.chat-message.self-start {
    align-self: flex-start;
    background-color: #71717a !important; /* bg-zinc-500 */
    color: #ffffff !important;
}

/* =======================================================
   ANIMATED SVG STROKE CHECKBOX (Styled Wrapper)
   ======================================================= */
.checkbox,
.custom-animated-checkbox {
  --checkbox-color: #2563eb;
  --checkbox-size: 1.4rem;
  display: inline-flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0;
  vertical-align: middle;
}

.checkbox input,
.custom-animated-checkbox input {
  position: absolute;
  pointer-events: none;
  inset: 0;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.checkbox .checkmark,
.custom-animated-checkbox .checkmark {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--checkbox-size) / 2.5);
  opacity: 0.85;
  transition: opacity 150ms ease;
  color: var(--checkbox-color);
}

.checkbox .checkmark:hover,
.custom-animated-checkbox .checkmark:hover {
  opacity: 1;
}

.checkbox input:checked ~ .checkmark,
.custom-animated-checkbox input:checked ~ .checkmark {
  opacity: 1;
}

.checkbox .checkmark svg,
.custom-animated-checkbox .checkmark svg {
  width: var(--checkbox-size);
  height: var(--checkbox-size);
  flex-shrink: 0;
  color: var(--checkbox-color);
}

.checkbox .checkmark svg rect,
.custom-animated-checkbox .checkmark svg rect {
  stroke-dasharray: 88 0;
  stroke-dashoffset: 73;
  stroke: #94a3b8;
  transition: stroke-dasharray 120ms ease, stroke 150ms ease;
}

.checkbox input:checked ~ .checkmark svg rect,
.custom-animated-checkbox input:checked ~ .checkmark svg rect {
  stroke-dasharray: 80 18;
  stroke: var(--checkbox-color);
}

.checkbox .checkmark svg polyline,
.custom-animated-checkbox .checkmark svg polyline {
  stroke-dasharray: 0 30;
  stroke-dashoffset: 1;
  stroke: var(--checkbox-color);
  transition: stroke-dasharray 150ms ease;
}

.checkbox input:checked ~ .checkmark svg polyline,
.custom-animated-checkbox input:checked ~ .checkmark svg polyline {
  stroke-dasharray: 30 30;
  stroke: var(--checkbox-color);
}

.checkbox .checkmark span,
.custom-animated-checkbox .checkmark span {
  color: #1e293b;
  font-size: 0.88rem;
  font-weight: 500;
}

/* =======================================================
   ANIMATED EDIT BUTTON (TRANSPARENT BACKGROUND & DARK ICON)
   ======================================================= */
.editBtn,
.btn-action-icon.btn-edit,
.btn-action-icon.btn-edit-vehicle,
.btn-action-icon.btn-edit-ins {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 8px !important;
  border: none !important;
  background-color: transparent !important;
  background: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  cursor: pointer !important;
  position: relative !important;
  overflow: visible !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  padding: 0 !important;
  vertical-align: middle !important;
  text-decoration: none !important;
}

.editBtn::before,
.btn-action-icon.btn-edit::before,
.btn-action-icon.btn-edit-vehicle::before,
.btn-action-icon.btn-edit-ins::before {
  display: none !important;
}

.editBtn:hover,
.btn-action-icon.btn-edit:hover,
.btn-action-icon.btn-edit-vehicle:hover,
.btn-action-icon.btn-edit-ins:hover {
  background-color: rgba(37, 99, 235, 0.08) !important;
  box-shadow: none !important;
  transform: translateY(-1px) scale(1.08) !important;
}

.editBtn svg,
.btn-action-icon.btn-edit svg,
.btn-action-icon.btn-edit-vehicle svg,
.btn-action-icon.btn-edit-ins svg {
  height: 16px !important;
  width: 16px !important;
  fill: #0f172a !important; /* Bold dark charcoal */
  color: #0f172a !important;
  z-index: 3 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transform-origin: bottom !important;
}

.editBtn svg path,
.btn-action-icon.btn-edit svg path,
.btn-action-icon.btn-edit-vehicle svg path,
.btn-action-icon.btn-edit-ins svg path {
  fill: #0f172a !important;
  transition: fill 0.2s ease !important;
}

.editBtn:hover svg,
.btn-action-icon.btn-edit:hover svg,
.btn-action-icon.btn-edit-vehicle:hover svg,
.btn-action-icon.btn-edit-ins:hover svg {
  fill: #2563eb !important;
  color: #2563eb !important;
  transform: rotate(-15deg) translateX(2px) !important;
}

.editBtn:hover svg path,
.btn-action-icon.btn-edit:hover svg path,
.btn-action-icon.btn-edit-vehicle:hover svg path,
.btn-action-icon.btn-edit-ins:hover svg path {
  fill: #2563eb !important;
}

.editBtn::after,
.btn-action-icon.btn-edit::after,
.btn-action-icon.btn-edit-vehicle::after,
.btn-action-icon.btn-edit-ins::after {
  content: "" !important;
  width: 16px !important;
  height: 2px !important;
  position: absolute !important;
  bottom: 4px !important;
  left: 4px !important;
  background-color: #2563eb !important;
  border-radius: 2px !important;
  z-index: 2 !important;
  transform: scaleX(0) !important;
  transform-origin: left !important;
  transition: transform 0.35s ease-out !important;
}

.editBtn:hover::after,
.btn-action-icon.btn-edit:hover::after,
.btn-action-icon.btn-edit-vehicle:hover::after,
.btn-action-icon.btn-edit-ins:hover::after {
  transform: scaleX(1) !important;
  left: 8px !important;
  transform-origin: right !important;
}

/* =======================================================
   ANIMATED TRASH DELETE BUTTON (TRANSPARENT BACKGROUND & DARK ICON)
   ======================================================= */
.deleteBtn,
.btn-action-icon.btn-action-danger,
button.btn-action-danger {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 8px !important;
  border: none !important;
  background-color: transparent !important;
  background: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  cursor: pointer !important;
  position: relative !important;
  overflow: visible !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  padding: 0 !important;
  vertical-align: middle !important;
  text-decoration: none !important;
}

.deleteBtn::before,
.deleteBtn::after,
.btn-action-icon.btn-action-danger::before,
.btn-action-icon.btn-action-danger::after,
button.btn-action-danger::before,
button.btn-action-danger::after {
  display: none !important;
  content: none !important;
}

.deleteBtn:hover,
.btn-action-icon.btn-action-danger:hover,
button.btn-action-danger:hover {
  background-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: translateY(-1px) scale(1.08) !important;
}

.deleteBtn svg,
.btn-action-icon.btn-action-danger svg,
button.btn-action-danger svg {
  height: 16px !important;
  width: 16px !important;
  fill: #0f172a !important;
  color: #0f172a !important;
  z-index: 3 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transform-origin: center !important;
}

.deleteBtn svg path,
.btn-action-icon.btn-action-danger svg path,
button.btn-action-danger svg path {
  fill: #0f172a !important;
  transition: fill 0.2s ease !important;
}

.deleteBtn:hover svg,
.btn-action-icon.btn-action-danger:hover svg,
button.btn-action-danger:hover svg {
  fill: #ef4444 !important;
  color: #ef4444 !important;
  transform: rotate(12deg) !important;
}

.deleteBtn:hover svg path,
.btn-action-icon.btn-action-danger:hover svg path,
button.btn-action-danger:hover svg path {
  fill: #ef4444 !important;
}

/* =======================================================
   ANIMATED PHOTO / GALLERY BUTTON (TRANSPARENT BACKGROUND & DARK ICON)
   ======================================================= */
.photoBtn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 8px !important;
  border: none !important;
  background-color: transparent !important;
  background: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  cursor: pointer !important;
  position: relative !important;
  overflow: visible !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  padding: 0 !important;
  vertical-align: middle !important;
  text-decoration: none !important;
}

.photoBtn::before,
.photoBtn::after {
  display: none !important;
  content: none !important;
}

.photoBtn:hover {
  background-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: translateY(-1px) scale(1.08) !important;
}

.photoBtn svg {
  height: 16px !important;
  width: 16px !important;
  fill: #0f172a !important;
  color: #0f172a !important;
  z-index: 3 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transform-origin: center !important;
}

.photoBtn svg path {
  fill: #0f172a !important;
  transition: fill 0.2s ease !important;
}

.photoBtn:hover svg {
  fill: #0ea5e9 !important;
  color: #0ea5e9 !important;
  transform: rotate(-8deg) scale(1.05) !important;
}

.photoBtn:hover svg path {
  fill: #0ea5e9 !important;
}

td:has(.editBtn),
td:has(.deleteBtn),
td:has(.photoBtn) {
  white-space: nowrap !important;
}




.chat-message .chat-time {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
    display: block;
}

/* Interactive Clickable Cards Styles */
.gov-card.cursor-pointer,
.card-stat.cursor-pointer,
.clickable-card {
    cursor: pointer !important;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
}

.gov-card.cursor-pointer:hover,
.card-stat.cursor-pointer:hover,
.clickable-card:hover {
    transform: none !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border)) !important;
}
}

.card[data-filter-status] {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.15s ease;
}

.card[data-filter-status]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1) !important;
}

.card[data-filter-status].is-filter-active {
    border: 2px solid #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
}

html.dark .card[data-filter-status].is-filter-active {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22) !important;
}

/* Flatpickr — DD/MM/YYYY alt inputs aligned with Bootstrap form controls */
.flatpickr-calendar {
    font-family: var(--font-main);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    border: 1px solid var(--gov-border);
}
input.app-date-alt,
.flatpickr-input.form-control[readonly] {
    background-color: #fff;
    cursor: pointer;
}

html.dark input.app-date-alt,
html[data-bs-theme="dark"] input.app-date-alt {
    background-color: #151c26 !important;
    color: #e2e8f0 !important;
    border-color: var(--gov-border) !important;
}
.demo-mode-banner {
    position: sticky;
    top: 56px;
    z-index: 1020;
    background: #f59e0b;
    color: #1f2937;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    padding: 6px 12px;
}
.perm-matrix-wrap {
    border: 1px solid var(--gov-border, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.perm-matrix-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    background: #f8fafc;
    border-bottom: 1px solid var(--gov-border, #e2e8f0);
    font-size: 0.72rem;
}
.perm-matrix-toolbar .btn-link {
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    color: #475569;
}
.perm-matrix {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 0.75rem;
}
.perm-matrix th,
.perm-matrix td {
    padding: 3px 6px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.perm-matrix thead th {
    background: #f8fafc;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #64748b;
    text-align: center;
    padding: 4px 4px;
    white-space: nowrap;
}
.perm-matrix thead th:first-child,
.perm-matrix td:first-child {
    text-align: left;
    width: 38%;
}
.perm-matrix tbody tr:last-child td {
    border-bottom: 0;
}
.perm-matrix tbody tr:hover td {
    background: #f8fafc;
}
.perm-matrix .perm-group td {
    background: #eef2f7;
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 8px;
}
.perm-mod-toggle {
    border: 0;
    background: none;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    line-height: 1.2;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.perm-mod-toggle:hover {
    color: #2563eb;
}
.perm-check {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
}
.perm-check input {
    appearance: none;
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
    border: 1.5px solid #94a3b8;
    border-radius: 4px;
    background: #fff;
    display: inline-block;
    vertical-align: middle;
    accent-color: #2563eb;
}
.perm-check input:checked {
    background: #2563eb;
    border-color: #2563eb;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E");
    background-size: 11px 11px;
    background-position: center;
    background-repeat: no-repeat;
}
.perm-na {
    text-align: center;
    color: #cbd5e1;
    font-size: 0.7rem;
}
.custom-role-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 3px 8px 3px 4px;
    background: #fff;
}
.custom-role-chip .btn-link {
    font-size: 0.72rem;
    text-decoration: none;
}

/* =======================================================
   THEME TOGGLE SWITCH (moon / sun)
   ======================================================= */
.toggle-switch {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    line-height: 0;
}

.toggle-switch .checkbox {
    display: none;
}

.toggle-switch .toggleSwitch {
    width: 40px;
    height: 40px;
    display: grid;
    border-radius: 50%;
    position: relative;
    place-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    line-height: 1;
    overflow: hidden;
    margin: 0;
}

.toggle-switch .icon {
    grid-column: 1 / 1;
    grid-row: 1 / 1;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    z-index: 2;
    transform-origin: center center;
    transition: transform 500ms ease, opacity 300ms ease;
    opacity: 0;
    pointer-events: none;
}

.toggle-switch .icon--moon {
    color: #212121;
    background-color: #e8e8e8;
    border-radius: 50%;
}

.toggle-switch .icon--sun {
    color: #e8e8e8;
    background-color: #212121;
    border-radius: 50%;
}

.toggle-switch .icon--moon,
.toggle-switch .icon--sun {
    transform: rotate(0deg) scale(0);
    opacity: 0;
}

.toggle-switch .checkbox:not(:checked) + .toggleSwitch .icon--sun {
    transform: rotate(360deg) scale(1);
    opacity: 1;
}

.toggle-switch .checkbox:not(:checked) + .toggleSwitch .icon--moon {
    transform: rotate(0deg) scale(0);
    opacity: 0;
}

.toggle-switch .checkbox:checked + .toggleSwitch .icon--moon {
    transform: rotate(360deg) scale(1);
    opacity: 1;
}

.toggle-switch .checkbox:checked + .toggleSwitch .icon--sun {
    transform: rotate(0deg) scale(0);
    opacity: 0;
}

.toggle-switch .checkbox:active + .toggleSwitch {
    transform: scale(0.94);
}

.toggle-switch .icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor !important;
}

/* =======================================================
   DARK MODE
   ======================================================= */
html.dark,
html[data-bs-theme="dark"] {
    --gov-bg: #12171f;
    --gov-surface: #1a222d;
    --card: #1a222d;
    --card-foreground: #f1f5f9;
    --muted-foreground: #94a3b8;
    --border: #2a3544;
    --gov-border: #2a3544;
    --gov-border-light: #243040;
    --gov-text-dark: #f1f5f9;
    --gov-text-body: #cbd5e1;
    --gov-text-muted: #94a3b8;
    --gov-text-subtle: #64748b;
    --gov-primary-light: #1e3a5f;
    --gov-primary-border: #1e40af;
    --sb-card-bg: #1a222d;
    --sb-card-shadow: 0 4px 18px rgba(37, 99, 235, 0.18);
    --sb-pill-text: #cbd5e1;
    color-scheme: dark;
}

html.dark body,
html[data-bs-theme="dark"] body,
html.dark #layoutSidenav_content,
html[data-bs-theme="dark"] #layoutSidenav_content,
html.dark .gov-main,
html[data-bs-theme="dark"] .gov-main,
html.dark main {
    background-color: var(--gov-bg) !important;
    color: var(--gov-text-body) !important;
}

html.dark .sb-nav-fixed #layoutSidenav #layoutSidenav_nav,
html[data-bs-theme="dark"] .sb-nav-fixed #layoutSidenav #layoutSidenav_nav {
    background-color: #12171f !important;
}

html.dark .sidebar-card,
html[data-bs-theme="dark"] .sidebar-card {
    background: #1a222d;
    --sb-card-bg: #1a222d;
    --sb-pill-text: #cbd5e1;
}

html.dark .sidebar-brand-wrapper,
html[data-bs-theme="dark"] .sidebar-brand-wrapper,
html.dark .sidebar-card-footer,
html[data-bs-theme="dark"] .sidebar-card-footer {
    border-color: rgba(37, 99, 235, 0.22);
}

html.dark .sb-sidenav-menu-heading,
html[data-bs-theme="dark"] .sb-sidenav-menu-heading {
    color: #64748b;
}

html.dark .sb-sidenav-card .nav-link,
html[data-bs-theme="dark"] .sb-sidenav-card .nav-link,
html.dark .sb-sidenav .nav-link,
html[data-bs-theme="dark"] .sb-sidenav .nav-link {
    color: var(--sb-pill-text) !important;
}

html.dark .sb-sidenav-card .nav-link .sb-nav-link-icon,
html.dark .sb-sidenav-card .nav-link.nav-link-logout .sb-nav-link-icon,
html[data-bs-theme="dark"] .sb-sidenav-card .nav-link .sb-nav-link-icon {
    color: #e2e8f0 !important;
}

html.dark .sb-sidenav-card .nav-link:hover,
html.dark .sb-sidenav-card .nav-link.active,
html.dark .sb-sidenav-card .nav-link:focus-visible,
html[data-bs-theme="dark"] .sb-sidenav-card .nav-link:hover,
html[data-bs-theme="dark"] .sb-sidenav-card .nav-link.active {
    color: #ffffff !important;
    background: transparent !important;
}

html.dark .sb-sidenav-card .nav-link:hover .sb-nav-link-icon,
html.dark .sb-sidenav-card .nav-link.active .sb-nav-link-icon,
html.dark .sb-sidenav-card .nav-link.nav-link-logout:hover .sb-nav-link-icon,
html[data-bs-theme="dark"] .sb-sidenav-card .nav-link:hover .sb-nav-link-icon,
html[data-bs-theme="dark"] .sb-sidenav-card .nav-link.active .sb-nav-link-icon {
    color: #ffffff !important;
}

html.dark .card,
html.dark .gov-card,
html.dark .card-stat,
html.dark .gov-table-card,
html.dark .table-separate-container,
html.dark .modal-content,
html.dark .dropdown-menu,
html.dark .offcanvas,
html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .gov-card,
html[data-bs-theme="dark"] .gov-table-card,
html[data-bs-theme="dark"] .table-separate-container,
html[data-bs-theme="dark"] .modal-content,
html[data-bs-theme="dark"] .dropdown-menu {
    background: var(--gov-surface) !important;
    border-color: var(--gov-border) !important;
    color: var(--gov-text-body) !important;
}

html.dark .layout-template-card {
    background: #151c26 !important;
    border-color: #2a3544 !important;
}

html.dark .layout-template-card.is-selected {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

html.dark .layout-template-card .lp-title {
    color: #e2e8f0 !important;
}

html.dark .layout-template-card .lp-sub {
    color: #94a3b8 !important;
}

html.dark .layout-preview .lp-body {
    background: #243040;
}

html.dark .header-submenu,
html[data-bs-theme="dark"] .header-submenu {
    background: var(--sb-card-bg) !important;
    border-color: rgba(37, 99, 235, 0.22) !important;
    box-shadow: var(--sb-card-shadow);
}

html.dark .header-submenu-link,
html[data-bs-theme="dark"] .header-submenu-link {
    color: var(--sb-pill-text) !important;
}

html.dark .header-submenu-link i,
html[data-bs-theme="dark"] .header-submenu-link i {
    color: #e2e8f0;
    background: transparent;
}

html.dark .header-submenu-link:hover,
html.dark .header-submenu-link.is-active,
html[data-bs-theme="dark"] .header-submenu-link:hover,
html[data-bs-theme="dark"] .header-submenu-link.is-active {
    background: transparent;
    color: #ffffff !important;
}

html.dark .header-submenu-link:hover i,
html.dark .header-submenu-link.is-active i {
    color: #ffffff;
    background: transparent;
}

html.dark .sb-topnav,
html[data-bs-theme="dark"] .sb-topnav {
    background-color: var(--sb-card-bg) !important;
    box-shadow: var(--sb-card-shadow);
}

html.dark .header-link,
html.dark .header-menu {
    color: var(--sb-pill-text) !important;
}

html.dark .header-item:hover .header-link,
html.dark .header-item.is-open .header-link,
html.dark .header-item.is-current .header-link {
    color: #ffffff !important;
}

html.dark .header-user-btn {
    border: none !important;
    color: #f8fafc !important;
    box-shadow: none !important;
}

html.dark .header-user-btn:hover,
html.dark .header-user-btn.show,
html.dark .header-user-btn[aria-expanded="true"] {
    color: #f8fafc !important;
    box-shadow: none !important;
}

html.dark .header-user-btn:hover .header-avatar,
html.dark .header-user-btn.show .header-avatar,
html.dark .header-user-btn[aria-expanded="true"] .header-avatar {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28);
}

html.dark .header-user-name {
    color: #f8fafc;
}

html.dark .header-user-role {
    color: #cbd5e1;
}

html.dark .header-avatar {
    border-color: rgba(96, 165, 250, 0.45);
}

html.dark .header-user-menu {
    border-color: rgba(148, 163, 184, 0.14) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32), 0 0 14px rgba(37, 99, 235, 0.07) !important;
}

html.dark .header-user-menu .dropdown-divider {
    border-top-color: rgba(37, 99, 235, 0.22) !important;
}

html.dark .card:hover,
html.dark .gov-card:hover,
html.dark .card-stat:hover {
    border-color: var(--border) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

html.dark .ui-stat-card,
html[data-bs-theme="dark"] .ui-stat-card,
html.dark .card.h-100.p-3,
html[data-bs-theme="dark"] .card.h-100.p-3 {
    background-image: none;
}

html.dark .gov-table thead th,
html.dark .table-separate thead th,
html.dark .table thead th,
html[data-bs-theme="dark"] .gov-table thead th,
html[data-bs-theme="dark"] .table thead th {
    background: #151c26 !important;
    color: #e2e8f0 !important;
    border-color: rgba(148, 163, 184, 0.12) !important;
}

html.dark #reportMasterTable thead th,
html[data-bs-theme="dark"] #reportMasterTable thead th {
    color: #ffffff !important;
    background-color: var(--rpt-th-bg, #1e293b) !important;
    border-color: transparent !important;
}

html.dark .gov-table tbody td,
html.dark .table-separate tbody td,
html.dark .table tbody td,
html.dark .gov-table tbody tr,
html[data-bs-theme="dark"] .table tbody td {
    background: var(--gov-surface) !important;
    color: var(--gov-text-body) !important;
    border-color: rgba(148, 163, 184, 0.12) !important;
}

html.dark .gov-table tbody tr:hover,
html.dark .table-separate tbody tr:hover,
html.dark .table tbody tr:hover {
    background: #222b38 !important;
}

html.dark .gov-table tbody tr:hover td,
html.dark .table-separate tbody tr:hover td,
html.dark .table tbody tr:hover td {
    background: #222b38 !important;
}

html.dark .form-control,
html.dark .form-select,
html.dark .form-control:hover,
html.dark .form-select:hover,
html.dark .form-control:focus,
html.dark .form-select:focus,
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select {
    background-color: #151c26 !important;
    border-color: var(--gov-border) !important;
    color: #e2e8f0 !important;
}

html.dark .form-control:hover,
html.dark .form-select:hover {
    background-color: #1a2430 !important;
    border-color: #3d4d63 !important;
}

html.dark .form-control::placeholder {
    color: #64748b !important;
}

html.dark input[type="date"],
html.dark input[type="datetime-local"],
html.dark input[type="time"] {
    color-scheme: dark;
    color: #e2e8f0 !important;
}

html.dark input[type="date"]::-webkit-datetime-edit,
html.dark input[type="date"]::-webkit-calendar-picker-indicator,
html.dark input[type="datetime-local"]::-webkit-datetime-edit {
    color: #e2e8f0;
    opacity: 1;
}

html.dark .input-group-text,
html[data-bs-theme="dark"] .input-group-text {
    background-color: #151c26 !important;
    border-color: var(--gov-border) !important;
    color: #94a3b8 !important;
}

html.dark .bg-white,
html.dark .bg-light,
html[data-bs-theme="dark"] .bg-white,
html[data-bs-theme="dark"] .bg-light {
    background-color: var(--gov-surface) !important;
}

html.dark .text-slate-800,
html.dark .text-slate-900,
html.dark .text-dark,
html.dark h1, html.dark h2, html.dark h3, html.dark h4, html.dark h5, html.dark h6,
html[data-bs-theme="dark"] .text-slate-800,
html[data-bs-theme="dark"] .text-slate-900 {
    color: #e2e8f0 !important;
}

html.dark .text-muted,
html.dark .text-slate-500,
html.dark .text-slate-600,
html.dark .text-slate-700,
html[data-bs-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

html.dark .border,
html.dark .border-bottom,
html.dark .border-top,
html.dark .border-end,
html[data-bs-theme="dark"] .border {
    border-color: var(--gov-border) !important;
}

html.dark .modal-header,
html[data-bs-theme="dark"] .modal-header {
    background: #171d26 !important;
    color: #f1f5f9 !important;
    border-color: #283242 !important;
}

html.dark .modal-title,
html.dark .modal-title.text-slate-800,
html.dark .modal-header .btn-close {
    color: #f1f5f9 !important;
}

html.dark .modal-body,
html.dark .modal-body.bg-white,
html.dark .modal-body.bg-light,
html[data-bs-theme="dark"] .modal-body {
    background-color: #1a222d !important;
    color: #cbd5e1 !important;
}

html.dark .modal-footer,
html.dark .modal-footer.bg-white,
html[data-bs-theme="dark"] .modal-footer {
    background: #151c26 !important;
    border-color: #283242 !important;
}

html.dark .dropdown-divider,
html[data-bs-theme="dark"] .dropdown-divider {
    border-color: var(--gov-border) !important;
}

html.dark .form-label,
html.dark .col-form-label,
html.dark .modal-body label,
html.dark .modal-body .form-label {
    color: #cbd5e1 !important;
}

html.dark .modal-content .card,
html.dark .modal-content .bg-white,
html.dark .modal-content .bg-light {
    background-color: #151c26 !important;
    border-color: var(--gov-border) !important;
}

html.dark .dropdown-item,
html[data-bs-theme="dark"] .dropdown-item {
    color: #e2e8f0 !important;
}

.dropdown-menu button.dropdown-item {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
}

html.dark .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:hover {
    background: #243040 !important;
    color: #fff !important;
}

html.dark .alert,
html[data-bs-theme="dark"] .alert {
    border-color: var(--gov-border);
}

html.dark .alert-danger,
html[data-bs-theme="dark"] .alert-danger,
html.dark .alert-danger-subtle {
    background: #2a1c1f !important;
    border: 1px solid #5a3030 !important;
    color: #fecaca !important;
}

html.dark .alert-danger .alert-heading,
html.dark .alert-danger h5,
html.dark .alert-danger h6,
html.dark .alert-danger p,
html.dark .alert-danger .small,
html.dark .alert-danger .text-danger {
    color: #fecaca !important;
}

html.dark .alert-warning,
html[data-bs-theme="dark"] .alert-warning,
html.dark .alert-warning-subtle {
    background: #2a2318 !important;
    border: 1px solid #5a4a28 !important;
    color: #fde68a !important;
}

html.dark .alert-warning .alert-heading,
html.dark .alert-warning h5,
html.dark .alert-warning h6,
html.dark .alert-warning p,
html.dark .alert-warning .small,
html.dark .alert-warning .text-warning,
html.dark .alert-warning .text-warning-emphasis {
    color: #fde68a !important;
}

html.dark .alert-info,
html.dark .alert-info-subtle {
    background: #17232e !important;
    border: 1px solid #2c4a5e !important;
    color: #bae6fd !important;
}

html.dark .alert-success,
html.dark .alert-success-subtle {
    background: #172820 !important;
    border: 1px solid #2c5a44 !important;
    color: #a7f3d0 !important;
}

html.dark .empty-state-box,
html[data-bs-theme="dark"] .empty-state-box {
    background: var(--gov-surface) !important;
    border-color: var(--gov-border) !important;
}

html.dark .badge.bg-slate-100,
html.dark .badge.bg-slate-200,
html.dark .bg-slate-50,
html.dark .bg-slate-100,
html.dark .bg-slate-200 {
    background-color: #243040 !important;
    color: #cbd5e1 !important;
}

html.dark .insurance-type-card {
    background: #151c26 !important;
    border-color: #2a3544 !important;
    box-shadow: none !important;
}

html.dark .insurance-type-card:hover {
    border-color: #3d4d63 !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25) !important;
}

html.dark .insurance-type-card.active-icbari {
    background: #1a2740 !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25), 0 4px 16px rgba(37, 99, 235, 0.18) !important;
}

html.dark .insurance-type-card.active-kasko {
    background: #241a33 !important;
    border-color: #9333ea !important;
    box-shadow: 0 0 0 1px rgba(147, 51, 234, 0.25), 0 4px 16px rgba(147, 51, 234, 0.18) !important;
}

html.dark .insurance-type-card .text-slate-800,
html.dark .insurance-type-card .fw-bold {
    color: #e2e8f0 !important;
}

html.dark .insurance-type-card .text-muted {
    color: #94a3b8 !important;
}

html.dark .card-icon-badge-icbari.bg-primary-subtle {
    background: rgba(37, 99, 235, 0.22) !important;
    color: #93c5fd !important;
}

html.dark .card-icon-badge-kasko {
    background: rgba(147, 51, 234, 0.22) !important;
    color: #c4b5fd !important;
}

html.dark .active-icbari .card-icon-badge-icbari {
    background: #2563eb !important;
    color: #ffffff !important;
}

html.dark .active-kasko .card-icon-badge-kasko {
    background: #9333ea !important;
    color: #ffffff !important;
}

html.dark .checkbox,
html.dark .custom-animated-checkbox {
    --checkbox-color: #64748b;
    color: #cbd5e1;
}

html.dark .module-toggle-card,
html.dark .module-toggle-card.active {
    background: #151c26 !important;
    border-color: #2a3544 !important;
    box-shadow: none !important;
}

html.dark .module-toggle-card.active {
    border-color: #3a5a88 !important;
    background: #1a2740 !important;
}

html.dark .module-toggle-card:not(.active) {
    background: #151c26 !important;
    border-color: #243040 !important;
    opacity: 0.85 !important;
}

html.dark .module-toggle-card .toggle-title {
    color: #e2e8f0 !important;
}

html.dark .module-toggle-card .toggle-sub {
    color: #94a3b8 !important;
}

html.dark .module-toggle-card:not(.active) .toggle-icon-box {
    background: #243040 !important;
    color: #94a3b8 !important;
}

html.dark .list-group-item,
html[data-bs-theme="dark"] .list-group-item {
    background: var(--gov-surface) !important;
    border-color: var(--gov-border) !important;
    color: var(--gov-text-body) !important;
}

html.dark .nav-pills .nav-link,
html[data-bs-theme="dark"] .nav-pills .nav-link {
    color: #cbd5e1;
}

html.dark .page-link,
html[data-bs-theme="dark"] .page-link {
    background: var(--gov-surface);
    border-color: var(--gov-border);
    color: #cbd5e1;
}

html.dark .floating-chat-drawer,
html.dark .floating-chat-drawer .bg-white,
html[data-bs-theme="dark"] .floating-chat-drawer {
    background: var(--gov-surface) !important;
    color: var(--gov-text-body) !important;
}

html.dark .custom-role-chip {
    background: var(--gov-surface);
    border-color: var(--gov-border);
}

html.dark .gov-search-input {
    background: #151c26 !important;
    border-color: rgba(37, 99, 235, 0.22) !important;
    color: #f1f5f9 !important;
}

/* Dark mode: mute bright buttons, badges, pills (less eye strain) */
html.dark .btn-primary,
html.dark .btn-primary.shadow-sm,
html.dark .btn-primary.shadow-xs,
html.dark .btn-primary.shadow,
html.dark .btn-primary.shadow-lg,
html[data-bs-theme="dark"] .btn-primary {
    background-color: #2a456e !important;
    border-color: #3a5a88 !important;
    color: #e8eef8 !important;
    box-shadow: none !important;
}

html.dark .btn-primary:hover,
html.dark .btn-primary:focus,
html[data-bs-theme="dark"] .btn-primary:hover {
    background-color: #345480 !important;
    border-color: #4a6c9c !important;
    color: #f8fafc !important;
}

html.dark .btn-success,
html.dark .btn-success.shadow-sm,
html.dark .btn-success.shadow-xs,
html[data-bs-theme="dark"] .btn-success {
    background-color: #1d4536 !important;
    border-color: #2d5f4b !important;
    color: #d1fae5 !important;
    box-shadow: none !important;
}

html.dark .btn-success:hover,
html[data-bs-theme="dark"] .btn-success:hover {
    background-color: #265a46 !important;
    border-color: #38785e !important;
    color: #ecfdf5 !important;
}

html.dark .btn-danger,
html.dark .btn-danger.shadow-sm,
html.dark .btn-danger.shadow-xs,
html[data-bs-theme="dark"] .btn-danger {
    background-color: #5a2c2c !important;
    border-color: #734040 !important;
    color: #fecaca !important;
    box-shadow: none !important;
}

html.dark .btn-danger:hover,
html[data-bs-theme="dark"] .btn-danger:hover {
    background-color: #6d3838 !important;
    color: #fee2e2 !important;
}

html.dark .btn-warning,
html.dark .btn-warning.shadow-sm,
html.dark .btn-warning.text-dark,
html[data-bs-theme="dark"] .btn-warning {
    background-color: #5a4920 !important;
    border-color: #74602c !important;
    color: #fde68a !important;
    box-shadow: none !important;
}

html.dark .btn-warning:hover,
html[data-bs-theme="dark"] .btn-warning:hover {
    background-color: #6c5828 !important;
    color: #fef3c7 !important;
}

html.dark .btn-info,
html.dark .btn-info.shadow-sm,
html.dark .btn-info.text-white,
html[data-bs-theme="dark"] .btn-info {
    background-color: #1d4558 !important;
    border-color: #2d5f74 !important;
    color: #bae6fd !important;
    box-shadow: none !important;
}

html.dark .btn-info:hover,
html[data-bs-theme="dark"] .btn-info:hover {
    background-color: #26586e !important;
    color: #e0f2fe !important;
}

html.dark .btn-secondary,
html.dark .btn-light,
html.dark .btn-outline-secondary,
html.dark .btn-outline-primary,
html.dark .btn-outline-light,
html[data-bs-theme="dark"] .btn-secondary,
html[data-bs-theme="dark"] .btn-light,
html[data-bs-theme="dark"] .btn-outline-secondary {
    background-color: #243040 !important;
    border-color: #3d4d63 !important;
    color: #cbd5e1 !important;
    box-shadow: none !important;
}

html.dark .btn-secondary:hover,
html.dark .btn-light:hover,
html.dark .btn-outline-secondary:hover,
html.dark .btn-outline-primary:hover {
    background-color: #2c3a4c !important;
    color: #f1f5f9 !important;
}

html.dark .btn-close {
    filter: invert(1) grayscale(100%) brightness(1.4);
    opacity: 0.65;
}

html.dark .nav-pills .nav-link {
    background: transparent;
    color: #94a3b8 !important;
}

html.dark .nav-pills .nav-link:hover {
    background: #243040 !important;
    color: #e2e8f0 !important;
}

html.dark .nav-pills .nav-link.active,
html[data-bs-theme="dark"] .nav-pills .nav-link.active {
    background-color: #2a456e !important;
    border-color: #3a5a88 !important;
    color: #e8eef8 !important;
    box-shadow: none !important;
}

html.dark .gov-search-btn {
    background-color: #2a456e !important;
    border-color: #3a5a88 !important;
}

html.dark .gov-search-btn:hover {
    background-color: #345480 !important;
}

html.dark .header-link::after {
    display: none !important;
}

html.dark .header-submenu-link:hover i,
html.dark .header-submenu-link.is-active i {
    color: #ffffff;
}

html.dark .header-submenu-link.is-active {
    background: transparent !important;
    color: #ffffff !important;
}

html.dark .floating-chat-btn,
html[data-bs-theme="dark"] .floating-chat-btn {
    background: #2a456e !important;
    background-image: none !important;
    border-color: #3a5a88 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) !important;
}

html.dark .floating-chat-btn:hover {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4) !important;
}

html.dark #sendButton,
html.dark .bg-blue-500,
html.dark .bg-blue-600 {
    background-color: #2a456e !important;
    background: #2a456e !important;
}

html.dark .badge.bg-primary,
html.dark .bg-primary {
    background-color: #2a456e !important;
    color: #dbeafe !important;
}

html.dark .badge.bg-success,
html.dark .bg-success {
    background-color: #1d4536 !important;
    color: #bbf7d0 !important;
}

html.dark .badge.bg-danger,
html.dark .bg-danger {
    background-color: #5a2c2c !important;
    color: #fecaca !important;
}

html.dark .badge.bg-warning,
html.dark .bg-warning,
html.dark .badge.bg-warning.text-dark {
    background-color: #5a4920 !important;
    color: #fde68a !important;
}

html.dark .badge.bg-info,
html.dark .bg-info {
    background-color: #1d4558 !important;
    color: #bae6fd !important;
}

html.dark .gov-icon-primary,
html.dark .bg-primary-subtle {
    background: rgba(42, 69, 110, 0.35) !important;
    color: #93c5fd !important;
}

html.dark .gov-icon-success,
html.dark .bg-success-subtle {
    background: rgba(29, 69, 54, 0.45) !important;
    color: #6ee7b7 !important;
}

html.dark .gov-icon-warning,
html.dark .bg-warning-subtle {
    background: rgba(90, 73, 32, 0.45) !important;
    color: #fcd34d !important;
}

html.dark .gov-icon-danger,
html.dark .bg-danger-subtle {
    background: rgba(90, 44, 44, 0.45) !important;
    color: #fca5a5 !important;
}

html.dark .gov-icon-info,
html.dark .bg-info-subtle {
    background: rgba(29, 69, 88, 0.45) !important;
    color: #7dd3fc !important;
}

html.dark .gov-icon-purple,
html.dark .bg-purple-subtle {
    background: rgba(55, 40, 85, 0.45) !important;
    color: #c4b5fd !important;
}

html.dark .page-item.active .page-link,
html[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: #2a456e !important;
    border-color: #3a5a88 !important;
    color: #e8eef8 !important;
}

html.dark .page-link:hover {
    background: #243040 !important;
    color: #e2e8f0 !important;
}

html.dark .btn-action-icon {
    background: transparent !important;
    border-color: transparent !important;
    color: #cbd5e1 !important;
}

html.dark .editBtn,
html.dark .deleteBtn,
html.dark .photoBtn,
html.dark .table .btn-outline-secondary,
html.dark .table .btn-outline-primary,
html.dark .table .btn-edit,
html.dark .table .btn-edit-fine,
html.dark .table .btn-edit-vehicle {
    color: #cbd5e1 !important;
}

html.dark .editBtn svg,
html.dark .editBtn svg path,
html.dark .deleteBtn svg,
html.dark .deleteBtn svg path,
html.dark .photoBtn svg,
html.dark .photoBtn svg path,
html.dark .btn-action-icon svg,
html.dark .btn-action-icon svg path,
html.dark .btn-action-icon.btn-edit svg,
html.dark .btn-action-icon.btn-edit svg path,
html.dark .btn-action-icon.btn-edit-vehicle svg,
html.dark .btn-action-icon.btn-edit-vehicle svg path,
html.dark .btn-action-icon.btn-edit-ins svg,
html.dark .btn-action-icon.btn-edit-ins svg path,
html.dark .btn-action-icon.btn-action-danger svg,
html.dark .btn-action-icon.btn-action-danger svg path,
html.dark button.btn-action-danger svg,
html.dark button.btn-action-danger svg path {
    fill: #cbd5e1 !important;
    color: #cbd5e1 !important;
}

html.dark .btn-action-icon:hover {
    background: rgba(37, 99, 235, 0.14) !important;
    border-color: transparent !important;
    color: #93c5fd !important;
}

html.dark .editBtn:hover,
html.dark .btn-action-icon.btn-edit:hover,
html.dark .btn-action-icon.btn-edit-vehicle:hover,
html.dark .btn-action-icon.btn-edit-ins:hover {
    background-color: rgba(37, 99, 235, 0.16) !important;
}

html.dark .editBtn:hover svg,
html.dark .editBtn:hover svg path,
html.dark .btn-action-icon.btn-edit:hover svg,
html.dark .btn-action-icon.btn-edit:hover svg path,
html.dark .btn-action-icon.btn-edit-vehicle:hover svg,
html.dark .btn-action-icon.btn-edit-vehicle:hover svg path,
html.dark .btn-action-icon.btn-edit-ins:hover svg,
html.dark .btn-action-icon.btn-edit-ins:hover svg path {
    fill: #93c5fd !important;
    color: #93c5fd !important;
}

html.dark .deleteBtn:hover,
html.dark .btn-action-danger:hover,
html.dark button.btn-action-danger:hover {
    background: rgba(239, 68, 68, 0.14) !important;
    border-color: transparent !important;
    color: #fca5a5 !important;
}

html.dark .deleteBtn:hover svg,
html.dark .deleteBtn:hover svg path,
html.dark .btn-action-icon.btn-action-danger:hover svg,
html.dark .btn-action-icon.btn-action-danger:hover svg path,
html.dark button.btn-action-danger:hover svg,
html.dark button.btn-action-danger:hover svg path {
    fill: #fca5a5 !important;
    color: #fca5a5 !important;
}

html.dark .photoBtn:hover svg,
html.dark .photoBtn:hover svg path {
    fill: #7dd3fc !important;
    color: #7dd3fc !important;
}

html.dark .alert-gov-danger {
    background: #3a2428 !important;
    border-color: #5a2c2c !important;
    color: #fecaca !important;
}

html.dark .alert-gov-icon {
    background-color: #5a2c2c !important;
}

html.dark .text-primary {
    color: #7aa2d4 !important;
}

html.dark .text-success {
    color: #6ee7b7 !important;
}

html.dark .text-danger {
    color: #fca5a5 !important;
}

html.dark .text-warning {
    color: #fcd34d !important;
}

html.dark .text-info {
    color: #7dd3fc !important;
}

html.dark .progress-bar {
    background-color: #2a456e !important;
}

html.dark .form-check-input:checked {
    background-color: #2a456e !important;
    border-color: #3a5a88 !important;
}

html.dark .perm-matrix-wrap,
html[data-bs-theme="dark"] .perm-matrix-wrap {
    background: #151c26 !important;
    border-color: #283242 !important;
}
html.dark .perm-matrix-toolbar,
html[data-bs-theme="dark"] .perm-matrix-toolbar {
    background: #121820 !important;
    border-color: #283242 !important;
}
html.dark .perm-matrix-toolbar .btn-link,
html[data-bs-theme="dark"] .perm-matrix-toolbar .btn-link {
    color: #93c5fd !important;
}
html.dark .perm-matrix th,
html.dark .perm-matrix td,
html[data-bs-theme="dark"] .perm-matrix th,
html[data-bs-theme="dark"] .perm-matrix td {
    border-bottom-color: rgba(148, 163, 184, 0.12) !important;
    color: #cbd5e1;
}
html.dark .perm-matrix thead th,
html[data-bs-theme="dark"] .perm-matrix thead th {
    background: #121820 !important;
    color: #94a3b8 !important;
}
html.dark .perm-matrix .perm-group td,
html[data-bs-theme="dark"] .perm-matrix .perm-group td {
    background: #1c2430 !important;
    color: #94a3b8 !important;
}
html.dark .perm-mod-toggle,
html[data-bs-theme="dark"] .perm-mod-toggle {
    color: #e2e8f0 !important;
}
html.dark .perm-mod-toggle:hover,
html[data-bs-theme="dark"] .perm-mod-toggle:hover {
    color: #93c5fd !important;
}
html.dark .perm-na,
html[data-bs-theme="dark"] .perm-na {
    color: #475569 !important;
}
html.dark .perm-check input,
html[data-bs-theme="dark"] .perm-check input {
    background: #1a222d;
    border-color: #64748b;
    accent-color: #3b82f6;
}
html.dark .perm-check input:checked,
html[data-bs-theme="dark"] .perm-check input:checked {
    background: #2563eb;
    border-color: #3b82f6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E");
    background-size: 11px 11px;
    background-position: center;
    background-repeat: no-repeat;
}

html.dark footer.bg-white {
    background: var(--gov-surface) !important;
    border-color: var(--gov-border) !important;
}

/* Dark mode: kill Bootstrap inset hover (white/gray cell boxes) */
html.dark .table,
html.dark .gov-table,
html.dark .table-separate,
html[data-bs-theme="dark"] .table {
    --bs-table-bg: #1a222d;
    --bs-table-color: #cbd5e1;
    --bs-table-border-color: rgba(148, 163, 184, 0.12);
    --bs-table-accent-bg: transparent;
    --bs-table-hover-bg: #222b38;
    --bs-table-hover-color: #e2e8f0;
    --bs-table-striped-bg: #1c2430;
    --bs-table-active-bg: #222b38;
}

html.dark .table > :not(caption) > * > *,
html.dark .gov-table > :not(caption) > * > *,
html.dark .table-separate > :not(caption) > * > *,
html[data-bs-theme="dark"] .table > :not(caption) > * > * {
    box-shadow: none !important;
    --bs-table-accent-bg: transparent;
}

html.dark .table tbody tr:hover > *,
html.dark .gov-table tbody tr:hover > td,
html.dark .gov-table tbody tr:hover > th,
html.dark .table-separate tbody tr:hover > td,
html.dark .table-hover tbody tr:hover > *,
html[data-bs-theme="dark"] .table tbody tr:hover > * {
    background-color: #222b38 !important;
    box-shadow: none !important;
    --bs-table-accent-bg: transparent;
    color: #e2e8f0 !important;
}

html.dark .win-tree-row:hover {
    background-color: #222b38 !important;
}

html.dark .win-tree-row.active {
    background-color: #1e3a5f !important;
    color: #93c5fd !important;
}

html.dark .explorer-folder-card:hover,
html.dark .explorer-file-card:hover {
    background: #222b38 !important;
    border-color: #3d4d63 !important;
    box-shadow: none !important;
}

html.dark .vehicle-modal-tabs .nav-link:hover {
    background: #243040 !important;
    color: #e2e8f0 !important;
}

html.dark .vehicle-modal-tabs .nav-link.active {
    background: #2a456e !important;
    color: #e8eef8 !important;
}

html.dark .editBtn:hover {
    background-color: rgba(255, 255, 255, 0.06) !important;
}

html.dark .perm-matrix tbody tr:hover td {
    background: #222b38 !important;
}

html.dark .dropzone-box {
    background: #151c26 !important;
    border-color: #3a5a88 !important;
}

html.dark .ticket-list-item:hover {
    border-color: #3d4d63 !important;
    box-shadow: none;
    background: #222b38;
}

html.dark #reportMasterTable tbody td.sticky-col-1,
html.dark #reportMasterTable tbody td.sticky-col-2,
html[data-bs-theme="dark"] #reportMasterTable tbody td.sticky-col-1,
html[data-bs-theme="dark"] #reportMasterTable tbody td.sticky-col-2 {
    background-color: #1a222d !important;
    border-color: #2a3544 !important;
}

html.dark #reportMasterTable tbody tr:hover td.sticky-col-1,
html.dark #reportMasterTable tbody tr:hover td.sticky-col-2,
html[data-bs-theme="dark"] #reportMasterTable tbody tr:hover td.sticky-col-1,
html[data-bs-theme="dark"] #reportMasterTable tbody tr:hover td.sticky-col-2 {
    background-color: #222b38 !important;
}

html.dark td:has(.car-plate),
html.dark th:has(.car-plate),
html[data-bs-theme="dark"] td:has(.car-plate) {
    background-color: #1a222d !important;
    box-shadow: none !important;
}

html.dark tbody tr:hover > td:has(.car-plate),
html.dark .table-hover tbody tr:hover > td:has(.car-plate),
html[data-bs-theme="dark"] tbody tr:hover > td:has(.car-plate) {
    background-color: #222b38 !important;
    box-shadow: none !important;
}

html.dark .car-plate,
html[data-bs-theme="dark"] .car-plate {
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* =======================================================
   FLUID LAYOUT — any viewport without overflow or overlap
   ======================================================= */
html, body {
    max-width: 100%;
}

img, svg, video, canvas, iframe {
    max-width: 100%;
    height: auto;
}

#layoutSidenav,
#layoutSidenav_content,
.gov-main,
main.gov-main,
main.container-fluid {
    min-width: 0;
    max-width: 100%;
}

.row > [class*="col-"] {
    min-width: 0;
}

.card,
.gov-card,
.card-stat {
    min-width: 0;
    max-width: 100%;
}

.table-responsive,
.gov-table-card,
.table-separate-container,
.report-table-wrapper {
    max-width: 100%;
}

.dropdown-menu {
    max-width: min(320px, calc(100vw - 1rem));
}

.header-submenu {
    max-width: min(280px, calc(100vw - 1.5rem));
}

.modal-dialog {
    width: calc(100% - 1rem);
    max-width: min(var(--bs-modal-width, 800px), calc(100vw - 1rem)) !important;
    margin-left: auto;
    margin-right: auto;
    min-width: 0;
}

.modal-xl {
    --bs-modal-width: 1140px;
}

.modal-lg {
    --bs-modal-width: 800px;
}

.flatpickr-calendar {
    max-width: calc(100vw - 16px);
}

.modal-header {
    min-width: 0;
    gap: 0.75rem;
}

.modal-header > *:not(.btn-close) {
    min-width: 0;
    flex: 1 1 auto;
}

.modal-header .btn-close {
    flex-shrink: 0;
}

.modal-header .rounded-circle,
.modal-header .d-flex.rounded-circle {
    flex: 0 0 auto !important;
    aspect-ratio: 1;
}

.modal-body {
    min-width: 0;
}

.vehicle-tabs-scroll {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.nav-tabs.flex-nowrap,
#vehicleDetailTabs,
.vehicle-modal-tabs {
    display: flex;
    flex-wrap: nowrap !important;
    gap: 4px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 8px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.nav-tabs.flex-nowrap .nav-item,
#vehicleDetailTabs .nav-item,
.vehicle-modal-tabs .nav-item {
    flex: 0 0 auto;
}

.nav-tabs.flex-nowrap .nav-link,
#vehicleDetailTabs .nav-link,
.vehicle-modal-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

#photoTab {
    flex-wrap: wrap;
    max-width: 100%;
    gap: 4px;
}

.nav-link .badge,
#vehicleDetailTabs .badge {
    flex-shrink: 0;
}

#insuranceTabs,
#waDispatchTabs,
#finesTabs,
#templateEditorTabs {
    flex-wrap: wrap;
    max-width: 100%;
}

.modal-body .d-flex.justify-content-between,
.tab-pane > .d-flex.justify-content-between,
.card-header.d-flex {
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    min-width: 0;
}

.input-group {
    min-width: 0;
    max-width: 100%;
}

.form-control:not([type="date"]):not([type="datetime-local"]):not([type="time"]),
.form-select,
.input-group > .form-control:not([type="date"]):not([type="datetime-local"]):not([type="time"]),
.input-group > .form-select {
    min-width: 0;
}

input[type="date"],
input[type="datetime-local"],
input[type="time"],
input.app-date-alt {
    display: block;
    width: 100%;
    min-width: 10.5rem;
    max-width: 100%;
    letter-spacing: 0 !important;
}

input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
    min-width: 7.5rem;
    color: inherit;
}

input.flatpickr-input:not(.app-date-alt) {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

input.app-date-alt {
    position: relative !important;
    z-index: 2;
    display: block !important;
    width: 100% !important;
    min-width: 10.5rem !important;
    max-width: 100% !important;
    min-height: 38px !important;
    height: calc(1.5em + 0.75rem + 2px) !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: inherit !important;
    letter-spacing: 0 !important;
    pointer-events: auto !important;
}

.row > [class*="col-"]:has(input[type="date"]),
.row > [class*="col-"]:has(input[type="datetime-local"]),
.row > [class*="col-"]:has(.app-date-alt) {
    min-width: min(100%, 10.5rem);
    flex: 1 1 10.5rem;
}

input[type="file"] {
    max-width: 100%;
}

.btn {
    max-width: 100%;
}

main .d-flex.gap-2:has(.btn),
main .d-flex.gap-3:has(.btn) {
    flex-wrap: wrap;
}

.dataTables_wrapper {
    max-width: 100%;
    overflow-x: auto;
}

@media (max-width: 1399.98px) {
    .header-search {
        max-width: 200px;
    }
    html[data-nav-layout="header"] .header-link {
        padding: 0 14px;
    }
    html[data-nav-layout="header"] .gov-main,
    html[data-nav-layout="header"] main.gov-main,
    html[data-nav-layout="header"] main.container-fluid,
    html[data-nav-layout="header"] #layoutSidenav_content > main {
        padding: 1.35rem 1.5rem 2.25rem 1.5rem !important;
    }
}

@media (max-width: 1199.98px) {
    .header-search {
        flex: 0 0 auto;
        max-width: none;
        position: relative;
        z-index: 6;
    }
    .header-search-group {
        overflow: visible;
        width: auto;
    }
    .header-search .gov-search-input {
        position: absolute;
        right: 100%;
        top: 0;
        width: 0;
        min-width: 0 !important;
        max-width: none;
        height: 100%;
        opacity: 0;
        padding-left: 0 !important;
        padding-right: 0 !important;
        border-width: 0 !important;
        pointer-events: none;
        background: #171d26 !important;
    }
    .header-search:focus-within .gov-search-input,
    .header-search.is-open .gov-search-input {
        width: min(240px, calc(100vw - 210px));
        opacity: 1;
        pointer-events: auto;
        padding-left: 0.75rem !important;
        padding-right: 0.6rem !important;
        border-width: 1px !important;
        border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
    }
    .header-user-name,
    .header-user-role {
        max-width: 7.5rem;
    }
    .header-user-btn.dropdown-toggle::after {
        display: none !important;
    }
    html[data-nav-layout="header"] .header-menu {
        gap: 4px;
    }
}

@media (max-width: 991.98px) {
    .sb-topnav {
        padding: 0 0.75rem;
        column-gap: 8px;
    }
    .header-right {
        gap: 0.4rem;
    }
    .header-actions {
        gap: 0.4rem;
    }
    .header-search .gov-search-btn,
    html[data-nav-layout="header"] .header-search .gov-search-btn {
        height: 34px;
        width: 36px;
        min-width: 36px;
    }
    .toggle-switch,
    .toggle-switch .toggleSwitch {
        width: 34px;
        height: 34px;
        transform: none;
    }
    .toggle-switch .icon svg {
        width: 18px;
        height: 18px;
    }
    .header-user-btn {
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
    }
    .header-avatar {
        width: 36px;
        height: 36px;
    }
    .gov-main,
    main.gov-main,
    main.container-fluid,
    #layoutSidenav_content > main,
    html[data-nav-layout="header"] .gov-main,
    html[data-nav-layout="header"] main.gov-main,
    html[data-nav-layout="header"] main.container-fluid,
    html[data-nav-layout="header"] #layoutSidenav_content > main {
        padding: 1rem 0.9rem 1.75rem 0.9rem !important;
    }
    .explorer-split-wrapper {
        min-height: 0 !important;
    }
    .explorer-tree-pane {
        width: 100% !important;
        min-width: 0 !important;
        max-height: 240px;
    }
    .modal-body {
        padding: 1rem !important;
    }
    .modal-header,
    .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 767.98px) {
    .header-logo-img,
    .sb-topnav .navbar-brand img,
    html[data-nav-layout="header"] .header-logo-img,
    html[data-nav-layout="header"] .sb-topnav .navbar-brand img {
        height: 30px;
        max-height: 32px;
        max-width: 132px;
    }
    .header-search:focus-within .gov-search-input,
    .header-search.is-open .gov-search-input {
        width: min(200px, calc(100vw - 170px));
    }
    .btn {
        white-space: nowrap;
    }
    .gov-main .d-flex.justify-content-between,
    .gov-main .d-flex.justify-content-md-between {
        align-items: stretch;
    }
    .gov-main .d-flex.justify-content-between .btn,
    .gov-main .d-flex.justify-content-between .d-flex {
        flex-wrap: wrap;
    }
    #vehicleDetailTabs .nav-link {
        font-size: 0.78rem;
        padding: 0.45rem 0.65rem !important;
    }
    .floating-chat-drawer {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        height: min(70vh, 480px) !important;
        margin: 8px !important;
    }
}

@media (max-width: 575.98px) {
    html {
        font-size: 13px;
    }
    html[data-nav-layout="header"] {
        font-size: 13.5px;
        --topbar-height: 56px;
    }
    .sb-topnav {
        padding: 0 0.55rem;
        height: var(--topbar-height) !important;
    }
    .toggle-switch,
    .toggle-switch .toggleSwitch {
        width: 32px;
        height: 32px;
        transform: none;
    }
    .toggle-switch .icon svg {
        width: 17px;
        height: 17px;
    }
    .header-user-btn.dropdown-toggle::after {
        display: none;
    }
    .modal-dialog {
        margin: 0.4rem;
        max-width: calc(100vw - 0.8rem) !important;
        width: calc(100vw - 0.8rem);
    }
    .login-card-blue {
        padding: 28px 18px 22px !important;
        border-radius: 16px !important;
    }
}

@media (max-width: 400px) {
    .g-recaptcha {
        transform: scale(0.82);
        transform-origin: center top;
    }
}

/* Super Admin settings console */
.settings-console-tabs.nav-pills .nav-link {
    padding: 0.55rem 1.15rem;
}
.nav-module-group-head {
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #e2e8f0;
}
.nav-module-group-head .letter-spacing {
    letter-spacing: 0.06em;
}
.module-toggle-card.is-locked {
    cursor: default !important;
    opacity: 1 !important;
}
.module-toggle-card.is-locked:hover {
    transform: none !important;
}
.users-console-embedded {
    padding-top: 0.25rem;
}
html.dark .nav-module-group-head {
    border-bottom-color: #2a3344;
}

/* =======================================================
   Helpdesk dual role: agent console vs user portal
   ======================================================= */
.hd-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.35rem;
}
.hd-kicker-light { color: rgba(255,255,255,0.72); }

.hd-agent-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.1rem;
}
.hd-agent-title {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
    margin: 0;
}
.hd-agent-sub { color: #64748b; font-size: 0.9rem; }
.hd-agent-hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f766e;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
}
.hd-live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16,185,129,0.2);
    animation: hdPulse 1.6s ease-out infinite;
}
@keyframes hdPulse {
    0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.45); }
    100% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}

.hd-agent-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.hd-kpi {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 16px;
    padding: 0.95rem 1.05rem;
    position: relative;
    overflow: hidden;
}
.hd-kpi::after {
    content: "";
    position: absolute;
    right: -12px; top: -18px;
    width: 72px; height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
.hd-kpi-label {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
}
.hd-kpi strong {
    display: block;
    font-size: 1.7rem;
    line-height: 1.15;
    letter-spacing: -0.04em;
    margin: 0.15rem 0 0.15rem;
}
.hd-kpi-hint { font-size: 0.75rem; color: #94a3b8; }
.hd-kpi-warn { background: linear-gradient(160deg, #78350f, #1e293b); }
.hd-kpi-info { background: linear-gradient(160deg, #0e7490, #1e293b); }
.hd-kpi-ok { background: linear-gradient(160deg, #065f46, #1e293b); }

#supportApp {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
body:has(#supportApp) #layoutSidenav_content {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}
#supportApp > .hd-agent,
#supportApp > .hd-user {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
.hd-agent-hero,
.hd-agent-kpis,
.hd-user-hero {
    flex-shrink: 0;
}

.hd-agent-workspace {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 0.9rem;
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
}
.hd-queue, .hd-thread, .hd-mycards, .hd-user-thread {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    max-height: 100%;
}
.hd-queue { background: #f8fafc; }
.hd-queue-head, .hd-mycards-head { padding: 0.9rem; border-bottom: 1px solid #e2e8f0; }
.hd-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0 0.75rem;
    margin-bottom: 0.65rem;
}
.hd-search i { color: #94a3b8; }
.hd-search input {
    border: 0; outline: 0; background: transparent;
    height: 38px; width: 100%; font-size: 0.85rem;
}
.hd-pills { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.hd-pill {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 650;
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
}
.hd-pill.is-on { background: #0f172a; color: #fff; border-color: #0f172a; }
.hd-queue-list, .hd-mycards-list {
    overflow: auto;
    padding: 0.55rem;
    flex: 1;
}
.hd-q-item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 0.65rem;
    padding: 0.7rem 0.75rem;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    margin-bottom: 0.4rem;
    background: #fff;
}
.hd-q-item:hover { border-color: #cbd5e1; }
.hd-q-item.is-active {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15,118,110,0.12);
    background: #f0fdfa;
}
.hd-q-item.is-prio-high { border-left: 3px solid #f59e0b; }
.hd-q-item.is-prio-urgent { border-left: 3px solid #ef4444; }
.hd-avatar {
    width: 36px; height: 36px; border-radius: 10px;
    background: #0f172a; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem; font-weight: 800;
    flex-shrink: 0;
}
.hd-q-title { font-weight: 700; font-size: 0.84rem; color: #0f172a; margin: 0 0 0.1rem; }
.hd-q-meta { font-size: 0.72rem; color: #64748b; }
.hd-q-time { font-size: 0.68rem; color: #94a3b8; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hd-unread {
    display: inline-flex; min-width: 18px; height: 18px;
    align-items: center; justify-content: center;
    background: #ef4444; color: #fff; border-radius: 999px;
    font-size: 0.65rem; font-weight: 800; padding: 0 5px;
}

.hd-thread-head, .hd-user-thread-head {
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.hd-requester { display: flex; gap: 0.7rem; min-width: 0; }
.hd-thread-head h2, .hd-user-thread-head h2 {
    font-size: 1.05rem; font-weight: 800; margin: 0.2rem 0 0.15rem; color: #0f172a;
}
.hd-thread-badges { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; }
.hd-chip {
    font-size: 0.68rem; font-weight: 700; color: #475569;
    background: #f1f5f9; border-radius: 999px; padding: 0.15rem 0.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.hd-status {
    font-size: 0.68rem; font-weight: 800; border-radius: 999px;
    padding: 0.18rem 0.55rem;
}
.hd-prio {
    font-size: 0.68rem; font-weight: 800; border-radius: 6px;
    padding: 0.15rem 0.45rem; background: #e2e8f0; color: #334155;
}
.hd-prio.is-high { background: #fef3c7; color: #92400e; }
.hd-prio.is-urgent { background: #fee2e2; color: #991b1b; }
.hd-requester-meta { font-size: 0.78rem; color: #64748b; }
.hd-status-seg {
    display: inline-flex; background: #f1f5f9; border-radius: 10px; padding: 3px;
}
.hd-status-seg button {
    border: 0; background: transparent; font-size: 0.72rem; font-weight: 700;
    color: #64748b; border-radius: 8px; padding: 0.35rem 0.6rem;
}
.hd-status-seg button.is-on { background: #fff; color: #0f172a; box-shadow: 0 1px 4px rgba(15,23,42,0.08); }
.hd-del-ticket {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 0.4rem 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.hd-q-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-top: 4px;
    border: 0;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.75rem;
}
.hd-wait-banner, .hd-closed-note {
    margin: 0.65rem 1.1rem 0;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}
.hd-wait-banner { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.hd-closed-note { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }
.hd-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1.15rem;
    background:
        radial-gradient(circle at 1px 1px, #e2e8f0 1px, transparent 0) 0 0 / 18px 18px,
        #f8fafc;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 transparent;
}
.hd-messages::-webkit-scrollbar { width: 8px; }
.hd-messages::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 8px;
}
.hd-messages::-webkit-scrollbar-track { background: transparent; }
.hd-thread-head, .hd-user-thread-head, .hd-composer { flex-shrink: 0; }
.hd-thread-active {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow: hidden;
}
.hd-composer { padding: 0.75rem 1rem 0.9rem; border-top: 1px solid #e2e8f0; background: #fff; }
.hd-composer-row { display: flex; gap: 0.5rem; align-items: center; }
.hd-composer-row input[type="text"] {
    flex: 1; height: 44px; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 0 0.9rem; font-size: 0.9rem; outline: none;
}
.hd-composer-row input[type="text"]:focus { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15,118,110,0.12); }
.hd-icon-btn {
    width: 44px; height: 44px; border-radius: 12px; border: 1px solid #e2e8f0;
    background: #f8fafc; color: #475569;
}
.hd-send {
    height: 44px; border: 0; border-radius: 12px; padding: 0 1.1rem;
    background: #0f172a; color: #fff; font-weight: 700; font-size: 0.88rem;
}
.hd-send-user { background: #0f766e; }
.hd-attach-pill {
    display: flex; align-items: center; gap: 0.5rem;
    background: #ecfeff; border: 1px solid #a5f3fc; border-radius: 10px;
    padding: 0.35rem 0.55rem; margin-bottom: 0.5rem; font-size: 0.8rem;
}
.hd-attach-pill button { border: 0; background: transparent; font-size: 1.1rem; line-height: 1; color: #0e7490; }
.hd-empty {
    margin: auto; text-align: center; padding: 2.5rem 1.5rem; max-width: 380px;
}
.hd-empty h2 { font-size: 1.15rem; font-weight: 800; color: #0f172a; }
.hd-empty p { color: #64748b; font-size: 0.88rem; }
.hd-empty-icon {
    width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 0.8rem;
    display: flex; align-items: center; justify-content: center;
    background: #0f172a; color: #fff; font-size: 1.5rem;
}
.hd-loading { text-align: center; color: #64748b; padding: 2.5rem 1rem; font-size: 0.88rem; }

.hd-user-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
    gap: 1rem;
    background: linear-gradient(135deg, #0f766e 0%, #115e59 42%, #0f172a 100%);
    color: #fff;
    border-radius: 22px;
    padding: 1.5rem 1.6rem;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}
.hd-user-hero::before {
    content: "";
    position: absolute; right: -40px; top: -50px;
    width: 220px; height: 220px; border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.hd-user-hero-copy { position: relative; z-index: 1; }
.hd-user-hero h1 {
    font-size: 1.7rem; font-weight: 800; letter-spacing: -0.04em; margin: 0 0 0.4rem;
}
.hd-user-hero p { color: rgba(255,255,255,0.78); margin-bottom: 1rem; max-width: 36rem; }
.hd-user-cta {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: #fff; color: #0f766e; border: 0; border-radius: 999px;
    font-weight: 800; padding: 0.65rem 1.15rem;
}
.hd-user-cta-sm { padding: 0.5rem 0.95rem; font-size: 0.85rem; }
.hd-user-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem;
    position: relative; z-index: 1; align-content: center;
}
.hd-ustat {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px; padding: 0.7rem 0.75rem; text-align: center;
    backdrop-filter: blur(8px);
}
.hd-ustat strong { display: block; font-size: 1.45rem; letter-spacing: -0.04em; }
.hd-ustat span { font-size: 0.72rem; color: rgba(255,255,255,0.72); font-weight: 600; }

.hd-user-workspace {
    display: grid;
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    gap: 0.9rem;
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
}
.hd-mycards-head h2 { font-size: 0.95rem; font-weight: 800; margin: 0 0 0.6rem; color: #0f172a; }
.hd-search-light { background: #f8fafc; margin: 0.65rem 0 0; }
.hd-ucard {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
    padding: 0.9rem; margin-bottom: 0.55rem; cursor: pointer;
}
.hd-ucard:hover { border-color: #99f6e4; }
.hd-ucard.is-active { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15,118,110,0.12); }
.hd-ucard h3 { font-size: 0.95rem; font-weight: 800; margin: 0.2rem 0 0.35rem; color: #0f172a; }
.hd-ucard p { font-size: 0.8rem; color: #64748b; margin: 0; }
.hd-progress {
    display: flex; gap: 0.35rem; margin-top: 0.55rem; flex-wrap: wrap;
}
.hd-progress span {
    font-size: 0.68rem; font-weight: 700; color: #94a3b8;
    background: #f1f5f9; border-radius: 999px; padding: 0.18rem 0.55rem;
}
.hd-progress span.is-done { background: #ccfbf1; color: #0f766e; }
.hd-progress span.is-now { background: #0f766e; color: #fff; }
.hd-composer-hint { font-size: 0.72rem; color: #94a3b8; margin-top: 0.4rem; }

.hd-modal { border-radius: 18px; }
.hd-modal-head {
    background: linear-gradient(135deg, #0f766e, #0f172a);
    color: #fff; padding: 1rem 1.2rem;
    display: flex; justify-content: space-between; align-items: flex-start;
}
.hd-modal-foot { background: #f8fafc; }

.ticket-send-btn {
    --primary: #ff5569;
    --neutral-1: #f7f8f7;
    --neutral-2: #e7e7e7;
    --radius: 999px;
    cursor: pointer;
    border-radius: var(--radius);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    border: none;
    box-shadow: 0 0.5px 0.5px 1px rgba(255, 255, 255, 0.2),
      0 6px 12px rgba(0, 0, 0, 0.14), 0 2px 3px 0px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    min-width: 0;
    padding: 0.375rem 0.95rem;
    height: 38px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    background: transparent;
    overflow: visible;
}
.ticket-send-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 1px 2px rgba(255, 255, 255, 0.3),
      0 8px 16px rgba(0, 0, 0, 0.18), 0 4px 3px -3px rgba(0, 0, 0, 0.04);
}
.ticket-send-btn:active {
    transform: scale(1);
    box-shadow: 0 0 1px 2px rgba(255, 255, 255, 0.3),
      0 10px 3px -3px rgba(0, 0, 0, 0.2);
}
.ticket-send-btn:after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    border: 2.5px solid transparent;
    background: linear-gradient(var(--neutral-1), var(--neutral-2)) padding-box,
      linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.45)) border-box;
    z-index: 0;
    transition: all 0.4s ease;
}
.ticket-send-btn:hover::after {
    transform: scale(1.05, 1.1);
    box-shadow: inset 0 -1px 3px 0 rgba(255, 255, 255, 1);
}
.ticket-send-btn::before {
    content: "";
    inset: 4px 5px 3px 5px;
    position: absolute;
    background: linear-gradient(to top, var(--neutral-1), var(--neutral-2));
    border-radius: 999px;
    filter: blur(0.5px);
    z-index: 2;
}
.ticket-send-btn .state p {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}
.ticket-send-btn .state .icon {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    transform: scale(1.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ticket-send-btn .state .icon svg { overflow: visible; }
.ticket-send-btn .outline {
    position: absolute;
    border-radius: inherit;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
    inset: -2px -3.5px;
}
.ticket-send-btn .outline::before {
    content: "";
    position: absolute;
    inset: -100%;
    background: conic-gradient(from 180deg, transparent 60%, white 80%, transparent 100%);
    animation: ticketSendSpin 2s linear infinite;
    animation-play-state: paused;
}
@keyframes ticketSendSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.ticket-send-btn:hover .outline { opacity: 1; }
.ticket-send-btn:hover .outline::before { animation-play-state: running; }
.ticket-send-btn .state p span {
    display: block;
    opacity: 0;
    animation: ticketSendSlideDown 0.8s ease forwards calc(var(--i) * 0.03s);
}
.ticket-send-btn:hover p span {
    opacity: 1;
    animation: ticketSendWave 0.5s ease forwards calc(var(--i) * 0.02s);
}
@keyframes ticketSendWave {
    30% { opacity: 1; transform: translateY(4px) translateX(0) rotate(0); }
    50% { opacity: 1; transform: translateY(-3px) translateX(0) rotate(0); color: var(--primary); }
    100% { opacity: 1; transform: translateY(0) translateX(0) rotate(0); }
}
@keyframes ticketSendSlideDown {
    0% { opacity: 0; transform: translateY(-20px) translateX(5px) rotate(-90deg); color: var(--primary); filter: blur(5px); }
    30% { opacity: 1; transform: translateY(4px) translateX(0) rotate(0); filter: blur(0); }
    50% { opacity: 1; transform: translateY(-3px) translateX(0) rotate(0); }
    100% { opacity: 1; transform: translateY(0) translateX(0) rotate(0); }
}
@keyframes ticketSendDisappear {
    from { opacity: 1; }
    to { opacity: 0; transform: translateX(5px) translateY(20px); color: var(--primary); filter: blur(5px); }
}
.ticket-send-btn .state--default .icon svg {
    animation: ticketSendLand 0.6s ease forwards;
}
.ticket-send-btn:hover .state--default .icon {
    transform: rotate(45deg) scale(1.05);
}
.ticket-send-btn.is-sending .state--default svg,
.ticket-send-btn.is-sent .state--default svg {
    animation: ticketSendTakeOff 0.8s linear forwards;
}
.ticket-send-btn.is-sending .state--default .icon,
.ticket-send-btn.is-sent .state--default .icon {
    transform: rotate(0) scale(1.05);
}
.ticket-send-btn.is-sending p span,
.ticket-send-btn.is-sent .state--default p span {
    opacity: 1;
    animation: ticketSendDisappear 0.6s ease forwards calc(var(--i) * 0.03s);
}
@keyframes ticketSendTakeOff {
    0% { opacity: 1; }
    60% { opacity: 1; transform: translateX(36px) rotate(45deg) scale(1.4); }
    100% { opacity: 0; transform: translateX(72px) rotate(45deg) scale(0); }
}
@keyframes ticketSendLand {
    0% { transform: translateX(-60px) translateY(30px) rotate(-50deg) scale(2); opacity: 0; filter: blur(3px); }
    100% { transform: translateX(0) translateY(0) rotate(0); opacity: 1; filter: blur(0); }
}
.ticket-send-btn .state--default .icon:before {
    content: "";
    position: absolute;
    top: 50%;
    height: 2px;
    width: 0;
    left: -5px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.5));
}
.ticket-send-btn.is-sending .state--default .icon:before,
.ticket-send-btn.is-sent .state--default .icon:before {
    animation: ticketSendContrail 0.8s linear forwards;
}
@keyframes ticketSendContrail {
    0% { width: 0; opacity: 1; }
    8% { width: 15px; }
    60% { opacity: 0.7; width: 80px; }
    100% { opacity: 0; width: 160px; }
}
.ticket-send-btn .state {
    padding-left: 20px;
    z-index: 3;
    display: flex;
    position: relative;
}
.ticket-send-btn .state--default span:nth-child(7) { margin-right: 5px; }
.ticket-send-btn .state--sent { display: none; }
.ticket-send-btn .state--sent svg {
    transform: scale(1.05);
    margin-right: 6px;
}
.ticket-send-btn.is-sending .state--default,
.ticket-send-btn.is-sent .state--default {
    position: absolute;
}
.ticket-send-btn.is-sent .state--sent { display: flex; }
.ticket-send-btn.is-sent .state--sent span {
    opacity: 0;
    animation: ticketSendSlideDown 0.8s ease forwards calc(var(--i) * 0.12s);
}
.ticket-send-btn.is-sent .state--sent .icon svg {
    opacity: 0;
    animation: ticketSendAppear 1.2s ease forwards 0.8s;
}
@keyframes ticketSendAppear {
    0% { opacity: 0; transform: scale(4) rotate(-40deg); color: var(--primary); filter: blur(4px); }
    30% { opacity: 1; transform: scale(0.6); filter: blur(1px); }
    50% { opacity: 1; transform: scale(1.2); filter: blur(0); }
    100% { opacity: 1; transform: scale(1); }
}
.ticket-send-btn.is-sending,
.ticket-send-btn.is-sent {
    pointer-events: none;
}
.ticket-send-btn:disabled { cursor: wait; }

html.dark .ticket-send-btn {
    color: #0f172a;
}

@media (max-width: 991.98px) {
    .hd-agent-kpis, .hd-user-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hd-agent-workspace, .hd-user-workspace, .hd-user-hero { grid-template-columns: 1fr; }
    .hd-agent-workspace, .hd-user-workspace { flex: 0 0 auto; height: auto; min-height: 0; }
    .hd-queue, .hd-mycards {
        min-height: 220px;
        max-height: 38vh;
        height: auto;
    }
    .hd-thread, .hd-user-thread {
        height: min(70vh, 680px);
        max-height: 70vh;
        min-height: 420px;
    }
}

html.dark .hd-agent-title,
html.dark .hd-thread-head h2,
html.dark .hd-user-thread-head h2,
html.dark .hd-q-title,
html.dark .hd-ucard h3,
html.dark .hd-mycards-head h2,
html.dark .hd-empty h2 { color: #e2e8f0; }
html.dark .hd-queue,
html.dark .hd-thread,
html.dark .hd-mycards,
html.dark .hd-user-thread { background: #151c26; border-color: #2a3544; }
html.dark .hd-queue { background: #12171f; }
html.dark .hd-q-item,
html.dark .hd-ucard { background: #1b2430; border-color: #2a3544; }
html.dark .hd-q-item.is-active,
html.dark .hd-ucard.is-active { background: #16302c; border-color: #14b8a6; }
html.dark .hd-search { background: #1b2430; border-color: #2a3544; }
html.dark .hd-search input, html.dark .hd-composer-row input[type="text"] { color: #e2e8f0; }
html.dark .hd-composer, html.dark .hd-thread-head, html.dark .hd-user-thread-head,
html.dark .hd-queue-head, html.dark .hd-mycards-head { background: #151c26; border-color: #2a3544; }
html.dark .hd-messages { background: #12171f; }
html.dark .hd-pill { background: #1b2430; color: #cbd5e1; border-color: #2a3544; }
html.dark .hd-pill.is-on { background: #14b8a6; color: #042f2e; border-color: #14b8a6; }
html.dark .hd-chip { background: #243040; color: #cbd5e1; }
html.dark .hd-status-seg { background: #1b2430; }
html.dark .hd-status-seg button.is-on { background: #0f172a; color: #e2e8f0; }
html.dark .hd-icon-btn { background: #1b2430; border-color: #2a3544; color: #cbd5e1; }
.explorer-space-card {
    border: 1px solid #dbeafe !important;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%) !important;
}
.explorer-space-card i.fa-users { color: #0ea5e9 !important; }
.explorer-space-card i.fa-user { color: #4f46e5 !important; }
.explorer-space-card i.fa-user-lock { color: #64748b !important; }

html.dark .explorer-space-card {
    background: linear-gradient(180deg, #152033 0%, #1b2430 100%) !important;
    border-color: #2a3544 !important;
}

/* =======================================================
   GPS WORKSPACE (embedded tracking site)
   ======================================================= */
body.gps-page #layoutSidenav,
body.gps-page #layoutSidenav_content {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

body.gps-page #layoutSidenav_content {
    display: flex;
    flex-direction: column;
    background: #12171f !important;
}

body.gps-page #layoutSidenav_content > main.gov-main,
body.gps-page main.gps-workspace,
html[data-nav-layout="header"] body.gps-page #layoutSidenav_content > main.gov-main,
html[data-nav-layout="header"] body.gps-page main.gps-workspace {
    padding: 0 !important;
    margin: 0 !important;
    flex: 1 1 auto;
    width: 100% !important;
    min-height: 0 !important;
    height: calc(100vh - var(--header-offset)) !important;
    max-height: calc(100vh - var(--header-offset)) !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #12171f !important;
}

body.gps-page footer {
    display: none !important;
}

body.gps-page .floating-chat-btn {
    display: none !important;
}

.gps-workspace {
    width: 100%;
    min-width: 0;
}

.gps-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
    background: #171d26;
    border-bottom: 1px solid #2a3544;
    color: #cbd5e1;
}

.gps-toolbar-meta {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 600;
}

.gps-toolbar-host {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e2e8f0;
}

.gps-open-btn {
    flex-shrink: 0;
}

body.gps-page iframe.gps-embed-frame,
.gps-embed-frame {
    display: block !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    border: 0;
    background: #0f172a;
}

.gps-empty-state {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background: #12171f;
    min-height: 0;
}

.gps-fallback-card {
    max-width: 520px;
    width: 100%;
    background: #1a222d;
    border: 1px solid #2a3544;
    border-radius: 1rem;
    padding: 1.75rem 1.5rem;
    text-align: center;
    color: #cbd5e1;
}

.gps-fallback-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    font-size: 1.25rem;
}

.gps-fallback-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 0.65rem;
}

.gps-fallback-card p {
    margin: 0 0 1.15rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #94a3b8;
}

.gps-fallback-muted {
    margin: 0 !important;
    color: #64748b !important;
}

/* Yol vərəqələri — per-vehicle history menu */
#yolVereqeleriTable .car-plate {
    z-index: 0;
    isolation: auto;
}

#yolVereqeleriTable tbody tr.yol-menu-open {
    position: relative;
    z-index: 40;
}

.table-separate-container:has(.yol-vehicle-menu.show) {
    overflow: visible !important;
}

.yol-vehicle-dropdown {
    position: relative;
    z-index: 2;
}

.yol-vehicle-menu-btn {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    padding: 0.28rem 0.62rem;
    line-height: 1.2;
    border-radius: 999px !important;
}

.yol-manager-list {
    max-height: min(420px, 58vh);
    overflow-y: auto;
    padding: 0.7rem 0.85rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #f8fafc;
}

.yol-manager-dialog {
    max-width: 520px;
}

.yol-manager-sheet {
    border: 1px solid #e2e8f0 !important;
    border-radius: 1rem !important;
    overflow: hidden;
    background: #fff !important;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16) !important;
}

.yol-manager-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.05rem 1.15rem 0.7rem;
    background: #fff;
    border-bottom: 1px solid #eef2f7;
}

.yol-manager-kicker {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.2rem;
}

.yol-manager-title {
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin: 0;
}

.yol-manager-sub {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: #64748b;
}

.yol-manager-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.yol-manager-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.yol-manager-hint {
    padding: 0.55rem 1.15rem;
    font-size: 0.78rem;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
}

.yol-manager-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 1.75rem 1rem;
}

.yol-manager-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    border-left-width: 3px;
    border-left-color: #22c55e;
}

.yol-manager-item.is-expiring { border-left-color: #f59e0b; }
.yol-manager-item.is-expired { border-left-color: #ef4444; }

.yol-manager-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.yol-mgr-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.yol-mgr-num {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.yol-mgr-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 650;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.yol-manager-item.is-expiring .yol-mgr-chip {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.yol-manager-item.is-expired .yol-mgr-chip {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.yol-mgr-dates {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.28rem;
    font-size: 0.75rem;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.yol-mgr-dates i {
    font-size: 0.7rem;
    opacity: 0.75;
}

.yol-mgr-arrow {
    color: #94a3b8;
    padding: 0 0.1rem;
}

.yol-mgr-notes {
    margin-top: 0.22rem;
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yol-mgr-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    background: #f8fafc;
    flex-shrink: 0;
}

.yol-mgr-btn {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 0.45rem;
    background: transparent;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
}

.yol-mgr-btn:hover {
    background: #fff;
    color: #0f172a;
}

.yol-mgr-btn.is-danger:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.yol-manager-foot {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 1.05rem;
    background: #fff;
    border-top: 1px solid #eef2f7;
}

html.dark .yol-manager-list,
html[data-bs-theme="dark"] .yol-manager-list {
    background: #151c26;
}

html.dark .yol-manager-sheet,
html[data-bs-theme="dark"] .yol-manager-sheet {
    background: #1a222d !important;
    border-color: #2a3544 !important;
}

html.dark .yol-manager-head,
html.dark .yol-manager-foot,
html[data-bs-theme="dark"] .yol-manager-head,
html[data-bs-theme="dark"] .yol-manager-foot {
    background: #1a222d;
    border-color: #2a3544;
}

html.dark .yol-manager-title,
html[data-bs-theme="dark"] .yol-manager-title {
    color: #f1f5f9;
}

html.dark .yol-manager-hint,
html[data-bs-theme="dark"] .yol-manager-hint {
    background: #151c26;
    border-color: #2a3544;
    color: #94a3b8;
}

html.dark .yol-manager-item,
html[data-bs-theme="dark"] .yol-manager-item {
    background: #1e2734;
    border-color: #2a3544;
}

html.dark .yol-mgr-num,
html[data-bs-theme="dark"] .yol-mgr-num {
    color: #e2e8f0;
}

html.dark .yol-mgr-actions,
html[data-bs-theme="dark"] .yol-mgr-actions {
    background: #151c26;
    border-color: #2a3544;
}

html.dark .yol-mgr-btn,
html[data-bs-theme="dark"] .yol-mgr-btn {
    color: #cbd5e1;
}

html.dark .yol-manager-close,
html[data-bs-theme="dark"] .yol-manager-close {
    color: #94a3b8;
}

html.dark .yol-manager-close:hover,
html[data-bs-theme="dark"] .yol-manager-close:hover {
    background: #243040;
    color: #fff;
}

.yol-vehicle-menu-btn::after {
    margin-left: 0.35rem;
    vertical-align: middle;
}

.dropdown-menu.yol-vehicle-menu {
    min-width: 320px;
    max-width: min(420px, calc(100vw - 1.25rem));
    padding: 0.2rem 0 0.35rem;
    z-index: 2050 !important;
}

.yol-vehicle-menu-head {
    line-height: 1.25;
}

.yol-vehicle-menu-list {
    max-height: min(360px, 58vh);
    overflow-y: auto;
}

.yol-pass-menu-item {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.yol-pass-menu-item:last-child {
    border-bottom: 0;
}

.yol-pass-menu-item.is-current {
    background: rgba(13, 202, 240, 0.08);
}

.yol-vehicle-menu-add {
    color: #0aa2c0 !important;
}

.yol-vehicle-menu-add:hover,
.yol-vehicle-menu-add:focus {
    color: #0891b2 !important;
    background: rgba(13, 202, 240, 0.1) !important;
}

html.dark .yol-pass-menu-item,
html[data-bs-theme="dark"] .yol-pass-menu-item {
    border-bottom-color: var(--gov-border, #2a3544);
}

html.dark .yol-pass-menu-item.is-current,
html[data-bs-theme="dark"] .yol-pass-menu-item.is-current {
    background: rgba(13, 202, 240, 0.12);
}

html.dark .yol-vehicle-menu-add,
html[data-bs-theme="dark"] .yol-vehicle-menu-add {
    color: #67e8f9 !important;
}

