:root {
    --font-base: 'Manrope', 'Segoe UI', sans-serif;
    --font-display: 'Sora', 'Trebuchet MS', sans-serif;
    --primary-color: #1d4f91; /* Deep Blue */
    --primary-light: #2f6ab6;
    --secondary-color: #f5b921; /* Gold */
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --bg-color: #0b1220;
    --text-primary: #f3f4f6;
    --text-secondary: #cbd5e1;
    --card-bg: rgba(17, 24, 39, 0.82);
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    background: radial-gradient(circle at top right, #16243d 0%, #0b1220 45%, #060b14 100%);
    font-family: var(--font-base);
    color: var(--text-primary);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    min-height: 100dvh;
}

#app {
    min-height: 100dvh;
}

body.theme-light {
    --primary-color: #0d2b56;
    --primary-light: #2a4d82;
    --bg-color: #f3f4f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --card-bg: rgba(255, 255, 255, 0.9);
    background: radial-gradient(circle at top right, #e8eef7 0%, #f4f6fb 45%, #eef2f9 100%);
    color: var(--text-primary);
}

body.theme-light .card {
    border: 1px solid rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

body.theme-light .card-header {
    color: #0f172a;
    background-color: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

body.theme-light .form-control,
body.theme-light .form-select {
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    border: 1px solid rgba(15, 23, 42, 0.16);
}

body.theme-light .form-control::placeholder {
    color: #6b7280;
}

body.theme-light .table thead th {
    background-color: #f1f5f9;
    color: #334155;
    border-bottom: 1px solid #dbe3ef;
}

body.theme-light .table td {
    color: #1f2937;
    border-bottom: 1px solid #e2e8f0;
}

body.theme-light .table-hover tbody tr:hover {
    background-color: rgba(13, 43, 86, 0.06);
}

body.theme-light .text-muted {
    color: #64748b !important;
}

body.theme-light .text-secondary {
    color: #475569 !important;
}

body.theme-light .small {
    color: #475569 !important;
}

body.theme-dark .form-text,
body:not(.theme-light) .form-text {
    color: #94a3b8 !important;
}

body.theme-light .form-text {
    color: #64748b !important;
}

body.theme-light .bg-light {
    background-color: #f8fafc !important;
    color: #1f2937 !important;
}

body.theme-light .alert-light {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #334155;
}

body.theme-light .card-header .text-muted,
body.theme-light .card-body .text-muted,
body.theme-light .table .text-muted {
    color: #64748b !important;
}

body.theme-light .btn-outline-info {
    border: 1px solid #0ea5e9;
    color: #0369a1;
    background: rgba(14, 165, 233, 0.08);
}

body.theme-light .btn-outline-info:hover {
    background: rgba(14, 165, 233, 0.18);
    color: #075985;
    border-color: #0284c7;
}

.profile-field-missing {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.2) !important;
    animation: profileFieldPulse 0.7s ease-in-out 2;
}

@keyframes profileFieldPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.35);
    }
    100% {
        box-shadow: 0 0 0 0.45rem rgba(220, 53, 69, 0);
    }
}

/* Theme-aware dropdown menus */
body.theme-dark .dropdown-menu,
body:not(.theme-light) .dropdown-menu {
    background-color: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 12px 26px rgba(2, 6, 23, 0.45);
}

body.theme-dark .dropdown-item,
body:not(.theme-light) .dropdown-item {
    color: #e2e8f0;
}

body.theme-dark .dropdown-item:hover,
body:not(.theme-light) .dropdown-item:hover {
    background-color: rgba(59, 130, 246, 0.2);
    color: #ffffff;
}

body.theme-dark .dropdown-divider,
body:not(.theme-light) .dropdown-divider {
    border-top-color: rgba(148, 163, 184, 0.25);
}

body.theme-light .dropdown-menu {
    background-color: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

body.theme-light .dropdown-item {
    color: #1f2937 !important;
}

body.theme-light .dropdown-item:hover,
body.theme-light .dropdown-item:focus {
    background-color: rgba(13, 43, 86, 0.08) !important;
    color: #0f172a !important;
}

body.theme-light .dropdown-item.active {
    background-color: #0d2b56 !important;
    color: #ffffff !important;
}

body.theme-light .dropdown-divider {
    border-top-color: rgba(15, 23, 42, 0.12);
}

/* Theme-aware native select option lists */
body.theme-dark .form-select option,
body:not(.theme-light) .form-select option {
    background-color: #0f172a;
    color: #e5e7eb;
}

body.theme-light .form-select option {
    background-color: #ffffff;
    color: #1f2937;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18) !important;
    padding: 0.8rem 1rem;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
    font-size: 1.5rem;
}

.app-navbar-brand {
    transition: var(--transition);
}

.app-navbar-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background-color: transparent !important;
    transition: var(--transition);
}

.app-navbar-title {
    display: inline-block;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-navbar-username {
    color: rgba(255, 255, 255, 0.92) !important;
}

body.theme-light .app-navbar-username {
    color: #f8fafc !important;
}

.app-navbar-brand:hover {
    transform: translateY(-1px);
}

.app-navbar-brand:hover .app-navbar-logo {
    transform: scale(1.06);
}

@media (max-width: 576px) {
    .app-navbar-title {
        max-width: 170px;
    }
}

.navbar .nav-link {
    font-weight: 500;
    opacity: 0.9;
    transition: var(--transition);
}

.navbar .nav-link:hover, .navbar .nav-link.active {
    opacity: 1;
    color: var(--secondary-color) !important;
    transform: translateY(-1px);
}

body.theme-dark .navbar .nav-link.active,
body:not(.theme-light) .navbar .nav-link.active {
    color: #f5b921 !important;
}

.navbar .btn {
    border-width: 1px;
    font-weight: 600;
    min-height: 34px;
    box-shadow: none;
}

.navbar .btn.btn-sm {
    padding: 0.35rem 0.8rem;
}

.navbar .btn-outline-info,
.navbar .btn-outline-warning,
.navbar .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc !important;
}

.navbar .btn-outline-info:hover,
.navbar .btn-outline-warning:hover,
.navbar .btn-outline-light:hover {
    border-color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.navbar .btn-outline-info:focus,
.navbar .btn-outline-warning:focus,
.navbar .btn-outline-light:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.22);
}

.navbar .bi {
    color: #e2e8f0;
    transition: var(--transition);
}

.navbar .bi-moon-stars,
.navbar .bi-sun {
    color: #fbbf24;
}

.navbar .bi-key {
    color: #a78bfa;
}

.navbar .bi-box-arrow-right {
    color: #f87171;
}

.navbar .bi-person-circle,
.navbar .bi-chevron-down,
.navbar .bi-list {
    color: #7dd3fc;
}

.navbar .btn:hover .bi,
.navbar .btn:focus .bi,
.navbar .dropdown-item:hover .bi {
    filter: brightness(1.15);
}

/* Auth Glass View */
.auth-glass-bg {
    width: 100%;
    min-height: 100dvh;
    background-image:
        linear-gradient(rgba(8, 24, 48, 0.46), rgba(8, 24, 48, 0.46)),
        url('../img/colombo-port.jpg');
    background-color: #0b1220;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

body.theme-dark .auth-glass-bg,
body:not(.theme-light) .auth-glass-bg {
    background-image:
    linear-gradient(rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.52)),
        url('../img/colombo-port.jpg');
}

.welcome-glow-bg {
    position: relative;
    overflow: visible;
    isolation: auto;
}

@media (prefers-reduced-motion: reduce) {
    .welcome-glow-bg::before {
        animation: none;
    }
}

.auth-theme-toggle {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: 14px;
    z-index: 1200;
    border-width: 1px;
    font-weight: 600;
    min-height: 34px;
    padding: 0.35rem 0.8rem;
    box-shadow: 0 8px 22px rgba(2, 6, 23, 0.35);
    border-color: rgba(255, 255, 255, 0.75) !important;
    background: rgba(15, 23, 42, 0.72) !important;
    color: #f8fafc !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.auth-theme-toggle:hover {
    border-color: rgba(255, 255, 255, 0.92) !important;
    background: rgba(15, 23, 42, 0.86) !important;
    color: #ffffff !important;
}

.auth-theme-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.22) !important;
}

body.theme-light .auth-theme-toggle {
    border-color: #0369a1 !important;
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
}

body.theme-light .auth-theme-toggle:hover {
    border-color: #075985 !important;
    color: #0b3b61 !important;
    background: rgba(240, 249, 255, 0.96) !important;
}

@media (max-width: 575px) {
    .auth-theme-toggle {
        top: max(10px, env(safe-area-inset-top));
        right: 10px;
        min-height: 32px;
        padding: 0.3rem 0.7rem;
    }
}

body.theme-light .auth-theme-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.22) !important;
}

.auth-glass-card {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.38);
    background: rgba(15, 23, 42, 0.84);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.55);
}

.card.auth-glass-card {
    background: rgba(15, 23, 42, 0.92) !important;
    border: 1px solid rgba(148, 163, 184, 0.4) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.56) !important;
}

.auth-glass-card .card-header,
.auth-glass-card .card-footer {
    background: transparent;
}

.auth-glass-card .card-title,
.auth-glass-card h1,
.auth-glass-card h2,
.auth-glass-card h3,
.auth-glass-card h4,
.auth-glass-card h5,
.auth-glass-card h6 {
    color: #f1f5f9 !important;
}

.auth-glass-card .text-muted,
.auth-glass-card .text-secondary,
.auth-glass-card .small {
    color: #cbd5e1 !important;
}

.auth-glass-card .form-label {
    color: #e2e8f0;
}

.auth-glass-card .form-control,
.auth-glass-card .form-select {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.34);
    color: #f8fafc;
}

.auth-form-card .form-control,
.auth-form-card .form-select {
    background: rgba(15, 23, 42, 0.36);
    border: 1px solid rgba(148, 163, 184, 0.5);
    color: #f8fafc;
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-form-card .form-control::placeholder {
    color: rgba(203, 213, 225, 0.88);
}

.auth-form-card .form-control:focus,
.auth-form-card .form-select:focus {
    border-color: rgba(125, 211, 252, 0.95);
    background: rgba(15, 23, 42, 0.5);
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.auth-glass-card .card-body,
.auth-glass-card .card-header,
.auth-glass-card .card-footer,
.auth-glass-card p,
.auth-glass-card span,
.auth-glass-card label {
    color: #e2e8f0;
}

.auth-glass-card .form-control::placeholder {
    color: #94a3b8;
}

.auth-glass-card a {
    color: #93c5fd !important;
}

.auth-glass-card a:hover {
    color: #bfdbfe !important;
}

body.theme-light .auth-glass-card {
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.30);
}

body.theme-light .card.auth-glass-card {
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.78) !important;
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.35) !important;
}

body.theme-light .auth-glass-card .card-title,
body.theme-light .auth-glass-card h1,
body.theme-light .auth-glass-card h2,
body.theme-light .auth-glass-card h3,
body.theme-light .auth-glass-card h4,
body.theme-light .auth-glass-card h5,
body.theme-light .auth-glass-card h6 {
    color: #0d2b56 !important;
}

body.theme-light .auth-glass-card .text-muted,
body.theme-light .auth-glass-card .text-secondary,
body.theme-light .auth-glass-card .small {
    color: #4b5563 !important;
}

body.theme-light .auth-glass-card .form-label {
    color: #1f2937;
}

body.theme-light .auth-glass-card .form-control,
body.theme-light .auth-glass-card .form-select {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(13, 43, 86, 0.18);
    color: #0f172a;
}

body.theme-light .auth-form-card .form-control,
body.theme-light .auth-form-card .form-select {
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(15, 23, 42, 0.24);
    color: #0f172a;
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

body.theme-light .auth-form-card .form-control::placeholder {
    color: rgba(71, 85, 105, 0.92);
}

body.theme-light .auth-form-card .form-control:focus,
body.theme-light .auth-form-card .form-select:focus {
    border-color: rgba(14, 116, 144, 0.72);
    background: rgba(255, 255, 255, 0.56);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body.theme-light .auth-glass-card .card-body,
body.theme-light .auth-glass-card .card-header,
body.theme-light .auth-glass-card .card-footer,
body.theme-light .auth-glass-card p,
body.theme-light .auth-glass-card span,
body.theme-light .auth-glass-card label {
    color: #1f2937;
}

body.theme-light .auth-glass-card .form-control::placeholder {
    color: #6b7280;
}

body.theme-light .auth-glass-card a {
    color: #1d4ed8 !important;
}

body.theme-light .auth-glass-card a:hover {
    color: #1e40af !important;
}

.auth-glass-card .btn-outline-primary {
    border: 1px solid #1d4ed8;
    color: #1e3a8a;
    background: rgba(29, 78, 216, 0.08);
}

.auth-glass-card .btn-outline-primary:hover {
    border-color: #1e40af;
    background: rgba(29, 78, 216, 0.18);
    color: #1e3a8a;
}

.auth-glass-card .btn-outline-secondary {
    border: 1px solid rgba(148, 163, 184, 0.78);
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.14);
}

.auth-glass-card .btn-outline-secondary:hover {
    border-color: rgba(226, 232, 240, 0.92);
    background: rgba(148, 163, 184, 0.28);
    color: #ffffff;
}

body.theme-light .auth-glass-card .btn-outline-secondary {
    border: 1px solid #64748b;
    color: #334155;
    background: rgba(100, 116, 139, 0.1);
}

body.theme-light .auth-glass-card .btn-outline-secondary:hover {
    border-color: #475569;
    background: rgba(100, 116, 139, 0.2);
    color: #1f2937;
}

.auth-glass-logo {
    width: 90px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.28));
}

.welcome-info-panel {
    background: rgba(15, 23, 42, 0.42);
    border-color: rgba(148, 163, 184, 0.35) !important;
}

.welcome-info-panel ul li {
    margin-bottom: 0.2rem;
}

/* Home page enhancements */
.home-shell {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Ant Design Animated BorderBeam Motion for Home Card */
.home-card {
    position: relative;
    width: min(1120px, 96vw);
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.32) !important;
    background: linear-gradient(155deg, rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.42)) !important;
    backdrop-filter: blur(24px) saturate(145%);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
    box-shadow: 0 24px 64px rgba(2, 6, 23, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    overflow: visible;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-card:hover {
    box-shadow: 0 28px 72px rgba(2, 6, 23, 0.68), 0 0 45px rgba(22, 119, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.card.auth-glass-card.home-card {
    border: 1px solid rgba(148, 163, 184, 0.32) !important;
    background: linear-gradient(155deg, rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.42)) !important;
}

/* Ant Design Laser Beam SVG Border (Fail-safe, Ultra-Bright) */
.ant-laser-beam-svg {
    position: absolute;
    top: -1px;
    left: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    pointer-events: none;
    z-index: 10;
    overflow: visible;
    border-radius: 26px;
}

.ant-laser-beam-svg rect {
    x: 1px;
    y: 1px;
    width: calc(100% - 2px);
    height: calc(100% - 2px);
    rx: 26px;
    ry: 26px;
}

.ant-laser-track {
    fill: none;
    stroke: transparent;
    stroke-width: 1px;
}

.ant-laser-glow-beam {
    fill: none;
    stroke: #38bdf8;
    stroke-width: 2.4px;
    stroke-linecap: round;
    stroke-dasharray: 9 91;
    stroke-dashoffset: 0;
    filter: url(#laserGlowWelcome) drop-shadow(0 0 8px rgba(56, 189, 248, 0.95)) drop-shadow(0 0 16px rgba(22, 119, 255, 0.8));
    animation: antLaserRun 4.5s linear infinite;
}

.ant-laser-core-beam {
    fill: none;
    stroke: url(#laserGradWelcome);
    stroke-width: 1.6px;
    stroke-linecap: round;
    stroke-dasharray: 7 93;
    stroke-dashoffset: 0;
    animation: antLaserRun 4.5s linear infinite;
}

@keyframes antLaserRun {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* Light Mode Laser adjustments */
body.theme-light .ant-laser-track {
    stroke: rgba(22, 119, 255, 0.22);
}

body.theme-light .ant-laser-glow-beam {
    stroke: #1677ff;
    filter: url(#laserGlowWelcome) drop-shadow(0 0 10px rgba(22, 119, 255, 0.9)) drop-shadow(0 0 18px rgba(19, 194, 194, 0.7));
}

@media (max-width: 767px) {
    .ant-laser-beam-svg {
        border-radius: 18px;
    }
    .ant-laser-beam-svg rect {
        rx: 18px;
        ry: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ant-laser-glow-beam,
    .ant-laser-core-beam {
        animation: none;
    }
}

.ant-border-beam-card {
    position: relative !important;
    overflow: hidden !important;
}

.card.auth-glass-card.auth-form-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.42) !important;
    background: linear-gradient(155deg, rgba(15, 23, 42, 0.34), rgba(15, 23, 42, 0.2)) !important;
    backdrop-filter: blur(24px) saturate(145%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(145%) !important;
    box-shadow: 0 20px 48px rgba(2, 6, 23, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

.home-grid {
    position: relative;
}

.home-chip {
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(14, 116, 144, 0.16);
    color: #dbeafe;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.home-main-logo {
    width: 82px;
}

.home-title {
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 1.2rem + 1.4vw, 2.25rem);
    letter-spacing: 0.02em;
    line-height: 1.1;
    color: #f8fafc;
}

.home-subtitle {
    color: #bfdbfe;
    font-size: 0.96rem;
    font-weight: 600;
}

.home-lead {
    font-size: 1.02rem;
    max-width: 52ch;
}

.home-cta-wrap .home-cta {
    min-width: 190px;
}

.home-kpi-row {
    animation: fadeRiseIn 0.7s ease both;
}

.home-kpi-box {
    height: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    padding: 0.75rem 0.85rem;
    background: rgba(2, 6, 23, 0.28);
}

.home-kpi-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: #facc15;
}

.home-kpi-label {
    font-size: 0.78rem;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.home-info-panel {
    border-radius: 16px;
    background:
        linear-gradient(170deg, rgba(15, 23, 42, 0.36), rgba(15, 23, 42, 0.22)),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.16) 0%, transparent 44%);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    border: 1px solid rgba(148, 163, 184, 0.34) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.home-panel-title {
    letter-spacing: 0.08em;
    font-size: 0.75rem;
}

.home-download-btn {
    justify-content: flex-start;
}

.home-support-line {
    border-top: 1px dashed rgba(148, 163, 184, 0.45);
    border-bottom: 1px dashed rgba(148, 163, 184, 0.45);
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.home-rule-list li {
    margin-bottom: 0.32rem;
    line-height: 1.4;
}

.home-card-theme-toggle {
    border: 1px solid rgba(148, 163, 184, 0.58);
    background: rgba(15, 23, 42, 0.62);
    color: #e2e8f0;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.28);
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.home-card-theme-toggle:hover {
    border-color: rgba(255, 255, 255, 0.82);
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
}

body.theme-light .home-card-theme-toggle {
    border-color: rgba(15, 23, 42, 0.28);
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
}

body.theme-light .home-card-theme-toggle:hover {
    border-color: rgba(15, 23, 42, 0.46);
    background: rgba(248, 250, 252, 0.96);
    color: #020617;
}

.home-card-theme-toggle i {
    font-size: 1.05rem;
    line-height: 1;
}

@keyframes fadeRiseIn {
    from {
        opacity: 0;
        transform: translateY(9px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.theme-light .welcome-info-panel {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.16) !important;
}

body.theme-light .home-chip {
    border-color: rgba(2, 132, 199, 0.4);
    background: rgba(14, 165, 233, 0.12);
    color: #0c4a6e;
}

body.theme-light .home-title {
    color: #0f172a;
}

body.theme-light .home-subtitle {
    color: #1d4ed8;
}

body.theme-light .home-kpi-box {
    border-color: rgba(15, 23, 42, 0.14);
    background: rgba(255, 255, 255, 0.88);
}

body.theme-light .home-kpi-value {
    color: #b45309;
}

body.theme-light .home-kpi-label {
    color: #475569;
}

body.theme-light .home-info-panel {
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.45), rgba(241, 245, 249, 0.38)),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.16) 0%, transparent 44%);
    border: 1px solid rgba(15, 23, 42, 0.14) !important;
}

body.theme-light .home-card {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.72)) !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

body.theme-light .home-card:hover {
    box-shadow: 0 26px 56px rgba(15, 23, 42, 0.18), 0 0 35px rgba(22, 119, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 1);
}

body.theme-light .card.auth-glass-card.home-card {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.72)) !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
}

body.theme-light .ant-border-beam::after {
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 110deg,
        rgba(22, 119, 255, 0.15) 140deg,
        rgba(22, 119, 255, 0.6) 175deg,
        rgba(19, 194, 194, 0.9) 205deg,
        rgba(14, 165, 233, 1) 228deg,
        #ffffff 238deg,
        rgba(14, 165, 233, 1) 246deg,
        rgba(37, 99, 235, 0.95) 260deg,
        rgba(22, 119, 255, 0.4) 280deg,
        transparent 305deg,
        transparent 360deg
    );
    filter: drop-shadow(0 0 14px rgba(14, 165, 233, 0.9)) drop-shadow(0 0 5px rgba(22, 119, 255, 0.9));
}

body.theme-light .card.auth-glass-card.auth-form-card {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.4), rgba(248, 250, 252, 0.34)) !important;
    border: 1px solid rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(24px) saturate(145%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(145%) !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

body.theme-light .home-panel-title {
    color: #0f172a;
}

body.theme-light .home-support-line {
    border-top-color: rgba(15, 23, 42, 0.24);
    border-bottom-color: rgba(15, 23, 42, 0.24);
}

@media (min-width: 992px) {
    .home-card {
        width: min(1160px, 95vw);
    }

    .home-card .card-body {
        padding: 2rem 2.2rem !important;
    }

    .home-grid {
        --bs-gutter-x: 2rem;
    }

    .home-left-col {
        padding-right: 0.65rem;
        padding-top: 0.4rem;
    }

    .home-right-col {
        padding-left: 0.65rem;
    }

    .home-lead {
        max-width: 46ch;
    }

    .home-chip {
        margin-bottom: 0.85rem !important;
    }

    .home-info-panel {
        min-height: 100%;
        justify-content: space-between !important;
    }

    .home-rule-list li {
        margin-bottom: 0.44rem;
    }
}

@media (max-width: 991px) {
    .home-card {
        width: min(920px, 97vw);
    }

    .home-main-logo {
        width: 74px;
    }
}

@media (max-width: 767px) {
    .home-shell {
        min-height: 100dvh;
        align-items: flex-start !important;
        padding-top: 1.1rem !important;
        padding-bottom: 1.1rem !important;
    }

    .home-card {
        border-radius: 18px;
    }

    .home-card .card-body {
        padding: 1.05rem !important;
    }

    .home-main-logo {
        width: 64px;
    }

    .home-title {
        font-size: clamp(1.35rem, 1.05rem + 1.2vw, 1.75rem);
    }

    .home-subtitle {
        font-size: 0.9rem;
    }

    .home-lead {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 0.9rem !important;
    }

    .home-cta-wrap .home-cta {
        min-width: 100%;
        min-height: 44px;
    }

    .home-kpi-row {
        margin-top: 0.65rem !important;
    }

    .home-kpi-box {
        padding: 0.62rem 0.68rem;
    }

    .home-info-panel {
        padding: 0.9rem !important;
    }

    .home-rule-list li {
        margin-bottom: 0.26rem;
        line-height: 1.34;
    }

    .home-card-theme-toggle {
        width: 42px;
        min-height: 40px;
    }
}

@media (max-width: 575px) {
    .home-title {
        font-size: 1.32rem;
        line-height: 1.15;
    }

    .home-subtitle {
        font-size: 0.85rem;
    }

    .home-main-logo {
        width: 56px;
    }

    .home-chip {
        font-size: 0.7rem;
        padding: 0.3rem 0.62rem;
    }

    .home-panel-title {
        font-size: 0.7rem;
    }

    .home-download-btn {
        min-height: 38px;
        font-size: 0.82rem;
    }

    .home-support-line {
        font-size: 0.8rem;
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
    }

    .home-kpi-value {
        font-size: 0.96rem;
    }

    .home-kpi-label {
        font-size: 0.71rem;
        letter-spacing: 0.04em;
    }
}

@media (max-width: 400px) {
    .home-shell {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .home-card {
        border-radius: 14px;
    }

    .home-title {
        font-size: 1.22rem;
    }

    .home-main-logo {
        width: 50px;
    }
}

.rules-preview-panel {
    background: rgba(15, 23, 42, 0.46);
    border-color: rgba(148, 163, 184, 0.35) !important;
}

.rules-preview-panel h6,
.rules-preview-panel li {
    color: #e2e8f0;
}

.rules-preview-panel ul {
    padding-left: 1.1rem;
}

.rules-preview-panel li {
    line-height: 1.45;
}

body.theme-light .rules-preview-panel {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.14) !important;
}

body.theme-light .rules-preview-panel h6,
body.theme-light .rules-preview-panel li {
    color: #0f172a;
}

.guideline-file-input {
    min-width: 220px;
}

body.theme-dark .guideline-file-input,
body:not(.theme-light) .guideline-file-input {
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.78);
}

body.theme-dark .guideline-file-input::file-selector-button,
body:not(.theme-light) .guideline-file-input::file-selector-button {
    margin-right: 0.7rem;
    border: 1px solid rgba(96, 165, 250, 0.6);
    border-radius: 8px;
    padding: 0.32rem 0.72rem;
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.18);
    cursor: pointer;
}

body.theme-light .guideline-file-input {
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.2);
    background: #ffffff;
}

body.theme-light .guideline-file-input::file-selector-button {
    margin-right: 0.7rem;
    border: 1px solid rgba(37, 99, 235, 0.45);
    border-radius: 8px;
    padding: 0.32rem 0.72rem;
    color: #1e3a8a;
    background: rgba(59, 130, 246, 0.12);
    cursor: pointer;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    will-change: transform, box-shadow;
    animation: card-enter 0.45s ease-out both;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px) scale(1.01);
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.12) 40%, transparent 80%);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    background-color: rgba(255, 255, 255, 0.09);
    border-bottom: 1px solid rgba(255,255,255,0.18);
    padding: 1rem 1.25rem;
    font-weight: 700;
    color: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 1.25rem;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
    border-bottom: none;
}
.card-header.bg-info {
    background: linear-gradient(135deg, var(--info-color), #60a5fa) !important;
    border-bottom: none;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.4rem 1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
    color: #f8fafc;
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
}

.btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: var(--shadow-sm);
}

.btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.26), transparent);
    transition: left 0.45s ease;
}

.btn:hover::after {
    left: 140%;
}

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .card,
    .btn {
        animation: none !important;
        transition: none !important;
    }

    .card:hover,
    .btn:hover,
    .btn:active {
        transform: none !important;
    }

    .btn::after,
    .card::before {
        display: none;
    }
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #ffffff;
}

.btn-success {
    background: linear-gradient(135deg, #22a06b, #6ee7b7);
    color: #ffffff;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #f87171);
    color: #ffffff;
}

.btn-secondary {
    background: linear-gradient(135deg, #64748b, #94a3b8);
    color: #ffffff;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #fbbf24);
    color: #111827;
}
.btn-warning:hover {
    color: #111827;
}

.btn-outline-primary {
    border: 1px solid #60a5fa;
    color: #bfdbfe;
    background: rgba(96, 165, 250, 0.08);
}
.btn-outline-primary:hover {
    background: rgba(96, 165, 250, 0.25);
    color: #ffffff;
}

.btn-outline-warning {
    border: 1px solid #fbbf24;
    color: #fde68a;
    background: rgba(251, 191, 36, 0.08);
}
.btn-outline-warning:hover {
    background: rgba(251, 191, 36, 0.24);
    color: #fff8e1;
}

.btn-outline-danger {
    border: 1px solid #f87171;
    color: #fecaca;
    background: rgba(248, 113, 113, 0.08);
}
.btn-outline-danger:hover {
    background: rgba(248, 113, 113, 0.24);
    color: #fff;
}

.btn-outline-success {
    border: 1px solid #6ee7b7;
    color: #d1fae5;
    background: rgba(110, 231, 183, 0.12);
}

.btn-outline-success:hover {
    background: rgba(110, 231, 183, 0.28);
    color: #f0fdf4;
}

.btn-outline-secondary {
    border: 1px solid #94a3b8;
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.12);
}

.btn-outline-secondary:hover {
    background: rgba(148, 163, 184, 0.26);
    color: #ffffff;
}

.btn-outline-info {
    border: 1px solid #60a5fa;
    color: #bae6fd;
    background: rgba(59, 130, 246, 0.08);
}
.btn-outline-info:hover {
    background: rgba(59, 130, 246, 0.24);
    color: #fff;
}

.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.06);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

body.theme-dark .btn:disabled,
body:not(.theme-light) .btn:disabled {
    opacity: 0.55;
    filter: saturate(0.75);
}

body.theme-light .btn-outline-primary {
    border-color: #2563eb;
    color: #1d4ed8 !important;
    background: rgba(37, 99, 235, 0.08);
}

body.theme-light .btn-outline-primary:hover {
    border-color: #1d4ed8;
    color: #ffffff !important;
    background: #2563eb;
}

body.theme-light .btn-outline-secondary {
    border-color: #64748b;
    color: #334155 !important;
    background: rgba(100, 116, 139, 0.08);
}

body.theme-light .btn-outline-secondary:hover {
    border-color: #334155;
    color: #ffffff !important;
    background: #475569;
}

body.theme-light .btn-outline-warning {
    border-color: #d97706;
    color: #b45309 !important;
    background: rgba(217, 119, 6, 0.08);
}

body.theme-light .btn-outline-warning:hover {
    border-color: #b45309;
    color: #ffffff !important;
    background: #d97706;
}

body.theme-light .btn-outline-info {
    border-color: #0284c7;
    color: #0369a1 !important;
    background: rgba(2, 132, 199, 0.08);
}

body.theme-light .btn-outline-info:hover {
    border-color: #0369a1;
    color: #ffffff !important;
    background: #0284c7;
}

body.theme-light .btn-outline-success {
    border-color: #059669;
    color: #047857 !important;
    background: rgba(5, 150, 105, 0.08);
}

body.theme-light .btn-outline-success:hover {
    border-color: #047857;
    color: #ffffff !important;
    background: #059669;
}

body.theme-light .btn-outline-danger {
    border-color: #dc2626;
    color: #b91c1c !important;
    background: rgba(220, 38, 38, 0.08);
}

body.theme-light .btn-outline-danger:hover {
    border-color: #b91c1c;
    color: #ffffff !important;
    background: #dc2626;
}

body.theme-light .btn-dark {
    background: #1e293b;
    color: #ffffff !important;
    border-color: #0f172a;
}

body.theme-light .btn-dark:hover {
    background: #0f172a;
    color: #ffffff !important;
}

body.theme-light .btn-outline-dark {
    border-color: #334155;
    color: #1e293b !important;
    background: rgba(30, 41, 59, 0.06);
}

body.theme-light .btn-outline-dark:hover {
    background: #1e293b;
    color: #ffffff !important;
    border-color: #0f172a;
}

body.theme-light .btn-light {
    background: #ffffff;
    color: #1e293b !important;
    border: 1px solid #cbd5e1;
}

body.theme-light .btn-light:hover {
    background: #f1f5f9;
    color: #0f172a !important;
    border-color: #94a3b8;
}

body.theme-light .btn-secondary {
    background: linear-gradient(135deg, #475569, #64748b);
    color: #ffffff !important;
}

body.theme-light .btn-secondary:hover {
    background: linear-gradient(135deg, #334155, #475569);
    color: #ffffff !important;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #f9fafb;
    padding: 0.625rem 0.875rem;
    transition: var(--transition);
}

.form-select {
    padding-right: 2.25rem !important;
    background-repeat: no-repeat !important;
    background-position: right 0.85rem center !important;
    background-size: 16px 12px !important;
    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='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 6l5 5 5-5'/%3E%3C/svg%3E") !important;
}

.form-control::placeholder {
    color: #cbd5e1;
}

/* Browser autofill theme compatibility */
body.theme-dark .form-control:-webkit-autofill,
body.theme-dark .form-control:-webkit-autofill:hover,
body.theme-dark .form-control:-webkit-autofill:focus,
body.theme-dark .form-control:-webkit-autofill:active,
body.theme-dark .form-select:-webkit-autofill,
body.theme-dark .form-select:-webkit-autofill:hover,
body.theme-dark .form-select:-webkit-autofill:focus,
body.theme-dark .form-select:-webkit-autofill:active,
body:not(.theme-light) .form-control:-webkit-autofill,
body:not(.theme-light) .form-control:-webkit-autofill:hover,
body:not(.theme-light) .form-control:-webkit-autofill:focus,
body:not(.theme-light) .form-control:-webkit-autofill:active,
body:not(.theme-light) .form-select:-webkit-autofill,
body:not(.theme-light) .form-select:-webkit-autofill:hover,
body:not(.theme-light) .form-select:-webkit-autofill:focus,
body:not(.theme-light) .form-select:-webkit-autofill:active,
body.theme-dark .form-control:autofill,
body.theme-dark .form-select:autofill,
body:not(.theme-light) .form-control:autofill,
body:not(.theme-light) .form-select:autofill {
    -webkit-text-fill-color: #f8fafc !important;
    caret-color: #f8fafc;
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.08) inset;
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.08) inset;
    transition: background-color 5000s ease-in-out 0s;
}

body.theme-light .form-control:-webkit-autofill,
body.theme-light .form-control:-webkit-autofill:hover,
body.theme-light .form-control:-webkit-autofill:focus,
body.theme-light .form-control:-webkit-autofill:active,
body.theme-light .form-select:-webkit-autofill,
body.theme-light .form-select:-webkit-autofill:hover,
body.theme-light .form-select:-webkit-autofill:focus,
body.theme-light .form-select:-webkit-autofill:active,
body.theme-light .form-control:autofill,
body.theme-light .form-select:autofill {
    -webkit-text-fill-color: #1f2937 !important;
    caret-color: #1f2937;
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.95) inset;
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.95) inset;
}

body.theme-dark .auth-glass-card .form-control:-webkit-autofill,
body.theme-dark .auth-glass-card .form-control:-webkit-autofill:hover,
body.theme-dark .auth-glass-card .form-control:-webkit-autofill:focus,
body.theme-dark .auth-glass-card .form-control:-webkit-autofill:active,
body:not(.theme-light) .auth-glass-card .form-control:-webkit-autofill,
body:not(.theme-light) .auth-glass-card .form-control:-webkit-autofill:hover,
body:not(.theme-light) .auth-glass-card .form-control:-webkit-autofill:focus,
body:not(.theme-light) .auth-glass-card .form-control:-webkit-autofill:active,
body.theme-dark .auth-glass-card .form-control:autofill,
body:not(.theme-light) .auth-glass-card .form-control:autofill {
    -webkit-text-fill-color: #f8fafc !important;
    caret-color: #f8fafc;
    -webkit-box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.72) inset;
    box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.72) inset;
    border: 1px solid rgba(148, 163, 184, 0.34);
}

body.theme-light .auth-glass-card .form-control:-webkit-autofill,
body.theme-light .auth-glass-card .form-control:-webkit-autofill:hover,
body.theme-light .auth-glass-card .form-control:-webkit-autofill:focus,
body.theme-light .auth-glass-card .form-control:-webkit-autofill:active,
body.theme-light .auth-glass-card .form-control:autofill {
    -webkit-text-fill-color: #0f172a !important;
    caret-color: #0f172a;
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.98) inset;
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.98) inset;
}

body.theme-dark input.form-control,
body.theme-dark textarea.form-control,
body.theme-dark select.form-select,
body:not(.theme-light) input.form-control,
body:not(.theme-light) textarea.form-control,
body:not(.theme-light) select.form-select {
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc;
}

body.theme-dark input.form-control:focus,
body.theme-dark textarea.form-control:focus,
body.theme-dark select.form-select:focus,
body:not(.theme-light) input.form-control:focus,
body:not(.theme-light) textarea.form-control:focus,
body:not(.theme-light) select.form-select:focus {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
}

.form-control:focus, .form-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
    background: rgba(255, 255, 255, 0.14);
}

/* Flatpickr readability in dark mode */
body.theme-dark .form-control.bg-white,
body.theme-dark .form-select.bg-white,
body:not(.theme-light) .form-control.bg-white,
body:not(.theme-light) .form-select.bg-white {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
}

body.theme-dark .flatpickr-calendar,
body:not(.theme-light) .flatpickr-calendar {
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.55);
}

body.theme-dark .flatpickr-months .flatpickr-month,
body:not(.theme-light) .flatpickr-months .flatpickr-month,
body.theme-dark .flatpickr-current-month .flatpickr-monthDropdown-months,
body:not(.theme-light) .flatpickr-current-month .flatpickr-monthDropdown-months,
body.theme-dark .flatpickr-current-month input.cur-year,
body:not(.theme-light) .flatpickr-current-month input.cur-year,
body.theme-dark span.flatpickr-weekday,
body:not(.theme-light) span.flatpickr-weekday,
body.theme-dark .flatpickr-weekdays,
body:not(.theme-light) .flatpickr-weekdays {
    background: #0f172a;
    color: #e2e8f0;
    fill: #e2e8f0;
}

body.theme-dark .flatpickr-day,
body:not(.theme-light) .flatpickr-day {
    color: #e5e7eb;
}

body.theme-dark .flatpickr-day.prevMonthDay,
body.theme-dark .flatpickr-day.nextMonthDay,
body:not(.theme-light) .flatpickr-day.prevMonthDay,
body:not(.theme-light) .flatpickr-day.nextMonthDay {
    color: #94a3b8;
}

body.theme-dark .flatpickr-day:hover,
body:not(.theme-light) .flatpickr-day:hover {
    background: rgba(59, 130, 246, 0.28);
    border-color: rgba(59, 130, 246, 0.5);
}

body.theme-dark .flatpickr-day.selected,
body.theme-dark .flatpickr-day.startRange,
body.theme-dark .flatpickr-day.endRange,
body:not(.theme-light) .flatpickr-day.selected,
body:not(.theme-light) .flatpickr-day.startRange,
body:not(.theme-light) .flatpickr-day.endRange {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

body.theme-dark .flatpickr-day.today,
body:not(.theme-light) .flatpickr-day.today {
    border-color: #93c5fd;
}

body.theme-dark .flatpickr-prev-month,
body.theme-dark .flatpickr-next-month,
body:not(.theme-light) .flatpickr-prev-month,
body:not(.theme-light) .flatpickr-next-month {
    color: #e2e8f0;
    fill: #e2e8f0;
    border-radius: 8px;
}

body.theme-dark .flatpickr-prev-month:hover,
body.theme-dark .flatpickr-next-month:hover,
body:not(.theme-light) .flatpickr-prev-month:hover,
body:not(.theme-light) .flatpickr-next-month:hover {
    background: rgba(59, 130, 246, 0.2);
}

body.theme-dark .flatpickr-prev-month svg,
body.theme-dark .flatpickr-next-month svg,
body:not(.theme-light) .flatpickr-prev-month svg,
body:not(.theme-light) .flatpickr-next-month svg {
    fill: #e2e8f0;
}

body.theme-dark .flatpickr-prev-month:hover svg,
body.theme-dark .flatpickr-next-month:hover svg,
body:not(.theme-light) .flatpickr-prev-month:hover svg,
body:not(.theme-light) .flatpickr-next-month:hover svg {
    fill: #ffffff;
}

body.theme-dark .reports-view .border.rounded.p-2,
body:not(.theme-light) .reports-view .border.rounded.p-2 {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.35) !important;
    color: #f8fafc;
}

body.theme-dark .reports-view .border.rounded.p-2 .text-muted,
body:not(.theme-light) .reports-view .border.rounded.p-2 .text-muted {
    color: #cbd5e1 !important;
}

body.theme-dark .reports-view .border.rounded.p-2 strong,
body:not(.theme-light) .reports-view .border.rounded.p-2 strong {
    color: #ffffff;
}

body.theme-dark .reports-view .card-header.bg-light,
body:not(.theme-light) .reports-view .card-header.bg-light {
    background-color: rgba(15, 23, 42, 0.78) !important;
    color: #e2e8f0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28) !important;
}

body.theme-dark .reports-view h6,
body.theme-dark .reports-view .form-label,
body:not(.theme-light) .reports-view h6,
body:not(.theme-light) .reports-view .form-label {
    color: #e2e8f0 !important;
}

body.theme-dark .reports-view .badge.bg-info.text-dark,
body:not(.theme-light) .reports-view .badge.bg-info.text-dark {
    color: #e6f6ff !important;
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.badge.bg-secondary {
    background-color: rgba(71, 85, 105, 0.8) !important;
    color: #f8fafc !important;
}

.badge.bg-success {
    background-color: rgba(16, 185, 129, 0.82) !important;
    color: #ecfeff !important;
}

.badge.bg-danger {
    background-color: rgba(239, 68, 68, 0.82) !important;
    color: #fff1f2 !important;
}

.badge.bg-info {
    background-color: rgba(59, 130, 246, 0.82) !important;
    color: #eff6ff !important;
}

/* Tables */
.table {
    margin-bottom: 0;
    color: #f8fafc;
}
.table thead th {
    background-color: rgba(2, 6, 23, 0.85);
    color: #f8fafc;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.28);
    padding: 0.6rem 0.75rem;
}
.table td {
    padding: 0.6rem 0.75rem;
    vertical-align: middle;
    color: #f8fafc;
    background-color: rgba(15, 23, 42, 0.55);
    border-bottom: 1px solid rgba(255,255,255,0.16);
    font-size: 0.9rem;
}
.table-hover tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.24);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(30, 41, 59, 0.66);
}

.table-responsive {
    background: rgba(15, 23, 42, 0.72);
}

.table-contrast thead th {
    background-color: rgba(2, 6, 23, 0.85) !important;
    color: #f8fafc !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.28) !important;
    font-weight: 700;
}

.table-contrast td {
    color: #f8fafc !important;
    background-color: rgba(15, 23, 42, 0.55);
}

.table-contrast.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(30, 41, 59, 0.66);
}

.table-contrast.table-hover tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.24) !important;
}

body.theme-light .table-contrast thead th {
    background-color: #dbeafe !important;
    color: #0f172a !important;
    border-bottom: 1px solid #bfdbfe !important;
}

/* Light mode: all tables use audit-log equivalent light style */
body.theme-light .table thead th {
    background-color: #dbeafe;
    color: #0f172a;
    border-bottom: 1px solid #bfdbfe;
}

body.theme-light .table td {
    color: #0f172a;
    background-color: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #dbe3ef;
}

body.theme-light .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #f8fafc;
}

body.theme-light .table-hover tbody tr:hover {
    background-color: rgba(13, 43, 86, 0.08);
}

body.theme-light .table-contrast td {
    color: #0f172a !important;
    background-color: rgba(255, 255, 255, 0.92);
}

body.theme-light .table-contrast.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #f8fafc;
}

/* Sidebar (Super Admin) */
.superadmin-sidebar {
    background-color: rgba(2, 6, 23, 0.92);
    border-right: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sidebar-header {
    color: #e2e8f0;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.4px;
    padding: 0.9rem 1rem 0.6rem;
    margin: 0 0.8rem 0.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    align-items: center;
}

.sidebar {
    background-color: rgba(2, 6, 23, 0.92);
    border-right: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 100; 
}

.sidebar .nav-link {
    color: #e2e8f0;
    padding: 0.6rem 1rem;
    font-weight: 500;
    border-radius: 0 24px 24px 0;
    margin-right: 1rem;
    margin-bottom: 0.15rem;
    transition: var(--transition);
    font-size: 0.95rem;
}

.superadmin-sidebar .nav-link {
    color: #e2e8f0;
    padding: 0.6rem 1rem;
    font-weight: 500;
    border-radius: 0 24px 24px 0;
    margin-right: 1rem;
    margin-bottom: 0.15rem;
    transition: transform 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.superadmin-sidebar .nav-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #38bdf8, #818cf8);
    opacity: 0;
    transform: scaleY(0.35);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.sidebar .nav-link:hover {
    color: #ffffff;
    background-color: rgba(59, 130, 246, 0.22);
}

.superadmin-sidebar .nav-link:hover {
    color: #ffffff;
    background-color: rgba(59, 130, 246, 0.22);
    transform: translateX(4px);
    box-shadow: 0 6px 14px rgba(30, 64, 175, 0.22);
}

.superadmin-sidebar .nav-link:hover::before {
    opacity: 0.9;
    transform: scaleY(1);
}

.sidebar .nav-link.active {
    color: #f5b921;
    background-color: rgba(245, 185, 33, 0.18);
    box-shadow: inset 0 0 0 1px rgba(245, 185, 33, 0.45);
    font-weight: 600;
}

.superadmin-sidebar .nav-link.active {
    color: #f5b921;
    background-color: rgba(245, 185, 33, 0.18);
    box-shadow: inset 0 0 0 1px rgba(245, 185, 33, 0.45);
    font-weight: 600;
    transform: translateX(4px);
}

.superadmin-sidebar .nav-link.active::before {
    opacity: 1;
    transform: scaleY(1);
    background: linear-gradient(180deg, #f5b921, #f59e0b);
}

body.theme-dark .sidebar .nav-link.active,
body:not(.theme-light) .sidebar .nav-link.active {
    color: #f5b921;
    background-color: rgba(245, 185, 33, 0.18);
    box-shadow: inset 0 0 0 1px rgba(245, 185, 33, 0.45);
}

body.theme-dark .superadmin-sidebar .nav-link.active,
body:not(.theme-light) .superadmin-sidebar .nav-link.active {
    color: #f5b921;
    background-color: rgba(245, 185, 33, 0.18);
    box-shadow: inset 0 0 0 1px rgba(245, 185, 33, 0.45);
}

/* Light Theme Sidebar and Submenu Styling */
body.theme-light .superadmin-sidebar,
body.theme-light .sidebar {
    background-color: rgba(255, 255, 255, 0.96) !important;
    border-right: 1px solid rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.theme-light .superadmin-sidebar .sidebar-header,
body.theme-light .sidebar .sidebar-header {
    color: #0f172a !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12) !important;
}

body.theme-light .superadmin-sidebar .nav-link,
body.theme-light .sidebar .nav-link {
    color: #334155 !important;
}

body.theme-light .superadmin-sidebar .nav-link:hover,
body.theme-light .sidebar .nav-link:hover {
    color: #0f172a !important;
    background-color: rgba(13, 43, 86, 0.08) !important;
}

body.theme-light .superadmin-sidebar .nav-link.active,
body.theme-light .sidebar .nav-link.active {
    color: #0d2b56 !important;
    background-color: rgba(13, 43, 86, 0.12) !important;
    box-shadow: inset 0 0 0 1px rgba(13, 43, 86, 0.25) !important;
    font-weight: 600;
}

/* Submenu links inside sidebar (Statuses, Reports, etc.) */
body.theme-light .superadmin-sidebar .nav.flex-column .nav-link,
body.theme-light .sidebar .nav.flex-column .nav-link,
body.theme-light .sidebar-has-submenu .nav-link.small {
    color: #475569 !important;
}

body.theme-light .superadmin-sidebar .nav.flex-column .nav-link:hover,
body.theme-light .sidebar .nav.flex-column .nav-link:hover,
body.theme-light .sidebar-has-submenu .nav-link.small:hover {
    color: #0f172a !important;
    background-color: rgba(13, 43, 86, 0.08) !important;
}

body.theme-light .superadmin-sidebar .nav.flex-column .nav-link.active,
body.theme-light .sidebar .nav.flex-column .nav-link.active,
body.theme-light .sidebar-has-submenu .nav-link.small.active {
    color: #0d2b56 !important;
    background-color: rgba(13, 43, 86, 0.15) !important;
    font-weight: 600;
}

.sidebar .nav-link i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.superadmin-sidebar .nav-link i {
    margin-right: 10px;
    font-size: 1.1rem;
    color: #93c5fd;
}

.superadmin-sidebar .sidebar-header .bi-grid-1x2-fill {
    color: #38bdf8;
}

.superadmin-sidebar .btn .bi-list {
    color: #e2e8f0;
}

.superadmin-sidebar .nav-link .bi-speedometer2 {
    color: #38bdf8;
}

.superadmin-sidebar .nav-link .bi-people {
    color: #a78bfa;
}

.superadmin-sidebar .nav-link .bi-hourglass-split {
    color: #fbbf24;
}

.superadmin-sidebar .nav-link .bi-check-circle {
    color: #34d399;
}

.superadmin-sidebar .nav-link .bi-x-circle {
    color: #f87171;
}

.superadmin-sidebar .nav-link .bi-flag {
    color: #60a5fa;
}

.superadmin-sidebar .nav-link .bi-file-earmark-bar-graph,
.superadmin-sidebar .nav-link .bi-calendar-week {
    color: #34d399;
}

.superadmin-sidebar .nav-link .bi-calendar3 {
    color: #a78bfa;
}

.superadmin-sidebar .nav-link .bi-journal-text {
    color: #f59e0b;
}

.superadmin-sidebar .nav-link:hover i,
.superadmin-sidebar .nav-link.active i {
    filter: brightness(1.15);
}

.superadmin-sidebar #sidebarMenu .nav-item {
    opacity: 0;
    transform: translateX(-8px);
    animation: sa-menu-in 0.35s ease forwards;
}

.superadmin-sidebar #sidebarMenu .nav-item:nth-child(1) { animation-delay: 0.02s; }
.superadmin-sidebar #sidebarMenu .nav-item:nth-child(2) { animation-delay: 0.05s; }
.superadmin-sidebar #sidebarMenu .nav-item:nth-child(3) { animation-delay: 0.08s; }
.superadmin-sidebar #sidebarMenu .nav-item:nth-child(4) { animation-delay: 0.11s; }
.superadmin-sidebar #sidebarMenu .nav-item:nth-child(5) { animation-delay: 0.14s; }
.superadmin-sidebar #sidebarMenu .nav-item:nth-child(6) { animation-delay: 0.17s; }
.superadmin-sidebar #sidebarMenu .nav-item:nth-child(7) { animation-delay: 0.2s; }
.superadmin-sidebar #sidebarMenu .nav-item:nth-child(8) { animation-delay: 0.23s; }

@keyframes sa-menu-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .superadmin-sidebar .nav-link,
    .superadmin-sidebar .nav-link::before,
    .superadmin-sidebar #sidebarMenu .nav-item {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

@media (max-width: 767.98px) {
    .superadmin-sidebar {
        min-height: auto !important;
    }
    #sidebarMenu {
        margin-bottom: 0.75rem;
    }
}

/* Super Admin dashboard KPI cards */
.sa-kpi-card {
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.sa-kpi-card .h3.mb-0,
.sa-kpi-card .h4.mb-0 {
    color: #f8fafc;
    font-weight: 700;
}

body.theme-light .sa-kpi-card .h3.mb-0,
body.theme-light .sa-kpi-card .h4.mb-0 {
    color: #0f172a;
}

.sa-kpi-icon {
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 1.05rem;
}

.sa-kpi-users .sa-kpi-icon {
    background: rgba(59, 130, 246, 0.2);
    color: #bfdbfe;
}

.sa-kpi-institutes .sa-kpi-icon {
    background: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}

.sa-kpi-bookings .sa-kpi-icon {
    background: rgba(245, 158, 11, 0.22);
    color: #fde68a;
}

.sa-kpi-logs .sa-kpi-icon {
    background: rgba(168, 85, 247, 0.2);
    color: #e9d5ff;
}

.sa-kpi-students .sa-kpi-icon {
    background: rgba(99, 102, 241, 0.2);
    color: #c7d2fe;
}

.sa-kpi-teachers .sa-kpi-icon {
    background: rgba(6, 182, 212, 0.2);
    color: #a5f3fc;
}

.sa-kpi-parents .sa-kpi-icon {
    background: rgba(236, 72, 153, 0.2);
    color: #fbcfe8;
}

.sa-kpi-buses .sa-kpi-icon {
    background: rgba(249, 115, 22, 0.2);
    color: #fed7aa;
}

body.theme-light .sa-kpi-users .sa-kpi-icon {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

body.theme-light .sa-kpi-institutes .sa-kpi-icon {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

body.theme-light .sa-kpi-bookings .sa-kpi-icon {
    background: rgba(245, 158, 11, 0.16);
    color: #b45309;
}

body.theme-light .sa-kpi-logs .sa-kpi-icon {
    background: rgba(168, 85, 247, 0.14);
    color: #7e22ce;
}

body.theme-light .sa-kpi-students .sa-kpi-icon {
    background: rgba(99, 102, 241, 0.14);
    color: #4338ca;
}

body.theme-light .sa-kpi-teachers .sa-kpi-icon {
    background: rgba(6, 182, 212, 0.14);
    color: #0e7490;
}

body.theme-light .sa-kpi-parents .sa-kpi-icon {
    background: rgba(236, 72, 153, 0.14);
    color: #be185d;
}

body.theme-light .sa-kpi-buses .sa-kpi-icon {
    background: rgba(249, 115, 22, 0.14);
    color: #c2410c;
}

/* Login Page Styling */
.login-card {
    max-width: 420px;
    margin: 80px auto;
    border: none;
    box-shadow: var(--shadow-lg);
}

.login-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    text-align: center;
    font-size: 1.4rem;
    padding: 2rem 1rem;
    display: block;
}

/* Nav Tabs in Dashboard */
.nav-tabs {
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    background-color: transparent;
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    background-color: transparent;
}

body.theme-dark .nav-tabs .nav-link.active,
body:not(.theme-light) .nav-tabs .nav-link.active {
    color: #f5b921 !important;
    border-bottom-color: #f5b921 !important;
}

body.theme-dark .nav-tabs .nav-link:hover,
body:not(.theme-light) .nav-tabs .nav-link:hover {
    color: #f5b921;
}

.bg-light {
    background-color: rgba(255, 255, 255, 0.07) !important;
    color: #e5e7eb !important;
}

.text-muted {
    color: #cbd5e1 !important;
}

.text-secondary {
    color: #d1d5db !important;
}

.small {
    color: #e2e8f0;
}

.alert-light {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e5e7eb;
}

/* Theme-aware Alert Styles - Dark Theme */
body.theme-dark .alert-danger,
body:not(.theme-light) .alert-danger {
    background-color: rgba(239, 68, 68, 0.18) !important;
    border: 1px solid rgba(248, 113, 113, 0.55) !important;
    color: #fecaca !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.15);
    font-weight: 500;
}

body.theme-dark .alert-danger *,
body:not(.theme-light) .alert-danger * {
    color: #fee2e2 !important;
}

body.theme-dark .alert-danger i,
body:not(.theme-light) .alert-danger i {
    color: #f87171 !important;
}

body.theme-dark .alert-warning,
body:not(.theme-light) .alert-warning {
    background-color: rgba(245, 158, 11, 0.18) !important;
    border: 1px solid rgba(251, 191, 36, 0.55) !important;
    color: #fef08a !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
    font-weight: 500;
}

body.theme-dark .alert-warning *,
body:not(.theme-light) .alert-warning * {
    color: #fef9c3 !important;
}

body.theme-dark .alert-success,
body:not(.theme-light) .alert-success {
    background-color: rgba(16, 185, 129, 0.18) !important;
    border: 1px solid rgba(52, 211, 153, 0.55) !important;
    color: #a7f3d0 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
    font-weight: 500;
}

body.theme-dark .alert-success *,
body:not(.theme-light) .alert-success * {
    color: #d1fae5 !important;
}

body.theme-dark .alert-info,
body:not(.theme-light) .alert-info {
    background-color: rgba(59, 130, 246, 0.18) !important;
    border: 1px solid rgba(96, 165, 250, 0.55) !important;
    color: #bfdbfe !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.15);
    font-weight: 500;
}

body.theme-dark .alert-info *,
body:not(.theme-light) .alert-info * {
    color: #dbeafe !important;
}

body.theme-dark .text-danger,
body:not(.theme-light) .text-danger {
    color: #f87171 !important;
}

body.theme-dark .invalid-feedback,
body:not(.theme-light) .invalid-feedback {
    color: #fca5a5 !important;
}

body.theme-dark .form-control.is-invalid,
body:not(.theme-light) .form-control.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.25) !important;
}

body.theme-dark .form-control.is-valid,
body:not(.theme-light) .form-control.is-valid {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.2) !important;
}

/* Theme-aware Alert Styles - Light Theme */
body.theme-light .alert-danger {
    background-color: #fef2f2 !important;
    border: 1px solid #f87171 !important;
    color: #991b1b !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
    font-weight: 600;
}

body.theme-light .alert-danger *,
body.theme-light .alert-danger span,
body.theme-light .alert-danger p,
body.theme-light .alert-danger div {
    color: #991b1b !important;
}

body.theme-light .alert-danger i {
    color: #dc2626 !important;
}

body.theme-light .alert-warning {
    background-color: #fffbeb !important;
    border: 1px solid #f59e0b !important;
    color: #92400e !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
    font-weight: 600;
}

body.theme-light .alert-warning *,
body.theme-light .alert-warning span {
    color: #92400e !important;
}

body.theme-light .alert-success {
    background-color: #ecfdf5 !important;
    border: 1px solid #10b981 !important;
    color: #065f46 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
    font-weight: 600;
}

body.theme-light .alert-success *,
body.theme-light .alert-success span {
    color: #065f46 !important;
}

body.theme-light .alert-info {
    background-color: #eff6ff !important;
    border: 1px solid #3b82f6 !important;
    color: #1e40af !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
    font-weight: 600;
}

body.theme-light .alert-info *,
body.theme-light .alert-info span {
    color: #1e40af !important;
}

body.theme-light .text-danger {
    color: #dc2626 !important;
    font-weight: 600;
}

body.theme-light .invalid-feedback {
    color: #b91c1c !important;
    font-weight: 600;
}

body.theme-light .form-control.is-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.15) !important;
}

body.theme-light .form-control.is-valid {
    border-color: #059669 !important;
    box-shadow: 0 0 0 0.2rem rgba(5, 150, 105, 0.15) !important;
}

/* Password Requirement Box */
.password-requirements-box {
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
}

body.theme-dark .password-requirements-box .fw-bold,
body:not(.theme-light) .password-requirements-box .fw-bold {
    color: #cbd5e1 !important;
}

body.theme-light .password-requirements-box {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
}

body.theme-light .password-requirements-box .fw-bold {
    color: #334155 !important;
}

body.theme-light .password-requirements-box .badge.bg-secondary {
    background-color: #64748b !important;
    color: #ffffff !important;
}

body.theme-light .password-requirements-box .badge.bg-success {
    background-color: #059669 !important;
    color: #ffffff !important;
}

body.theme-light .password-requirements-box .badge.bg-danger {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

/* Theme-aware modals with Bright Thin Outline */
body.theme-dark .modal-content,
body:not(.theme-light) .modal-content,
body.theme-dark .swal2-popup,
body:not(.theme-light) .swal2-popup {
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(56, 189, 248, 0.55) !important;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25), 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 24px rgba(56, 189, 248, 0.18) !important;
    color: #f1f5f9;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.theme-dark .modal-header,
body.theme-dark .modal-footer,
body:not(.theme-light) .modal-header,
body:not(.theme-light) .modal-footer {
    border-color: rgba(148, 163, 184, 0.22);
}

body.theme-dark .modal-title,
body.theme-dark .modal-body,
body.theme-dark .modal-body p,
body.theme-dark .modal-body span,
body.theme-dark .modal-body label,
body:not(.theme-light) .modal-title,
body:not(.theme-light) .modal-body,
body:not(.theme-light) .modal-body p,
body:not(.theme-light) .modal-body span,
body:not(.theme-light) .modal-body label {
    color: #f1f5f9;
}

body.theme-dark .btn-close,
body:not(.theme-light) .btn-close {
    filter: invert(1) grayscale(100%) brightness(180%);
}

body.theme-light .modal-content,
body.theme-light .swal2-popup {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(37, 99, 235, 0.45) !important;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2), 0 20px 45px rgba(15, 23, 42, 0.16), 0 0 18px rgba(37, 99, 235, 0.12) !important;
    color: #1f2937;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.theme-light .modal-header,
body.theme-light .modal-footer {
    border-color: rgba(15, 23, 42, 0.12);
}

body.theme-light .modal-title,
body.theme-light .modal-body,
body.theme-light .modal-body p,
body.theme-light .modal-body span,
body.theme-light .modal-body label {
    color: #1f2937;
}

body.theme-light .modal-content .nav-tabs .nav-link,
body.theme-light .modal-content .nav-pills .nav-link {
    color: #475569 !important;
}

body.theme-light .modal-content .nav-tabs .nav-link:hover,
body.theme-light .modal-content .nav-pills .nav-link:hover {
    color: #0f172a !important;
}

body.theme-light .modal-content .nav-tabs .nav-link.active,
body.theme-light .modal-content .nav-pills .nav-link.active {
    color: #0d2b56 !important;
    background-color: rgba(13, 43, 86, 0.1) !important;
    border-color: #0d2b56 !important;
    font-weight: 600;
}

body.theme-light .badge.bg-secondary {
    background-color: #64748b !important;
    color: #ffffff !important;
}

body.theme-light code,
body.theme-light .username-code {
    background-color: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

body.theme-light .btn-close {
    filter: none;
}

/* SweetAlert - Edit Bus modal theme compatibility */
body.theme-dark .swal2-popup.bus-edit-swal-popup,
body:not(.theme-light) .swal2-popup.bus-edit-swal-popup {
    background: rgba(15, 23, 42, 0.96) !important;
    border: 1px solid rgba(56, 189, 248, 0.55) !important;
    color: var(--text-primary) !important;
}

body.theme-dark .swal2-popup.bus-edit-swal-popup .swal2-title,
body.theme-dark .swal2-popup.bus-edit-swal-popup .form-label,
body:not(.theme-light) .swal2-popup.bus-edit-swal-popup .swal2-title,
body:not(.theme-light) .swal2-popup.bus-edit-swal-popup .form-label {
    color: var(--text-primary) !important;
}

body.theme-dark .swal2-popup.bus-edit-swal-popup .form-control,
body:not(.theme-light) .swal2-popup.bus-edit-swal-popup .form-control {
    background: rgba(30, 41, 59, 0.85) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
}

body.theme-dark .swal2-popup.bus-edit-swal-popup .form-control::placeholder,
body:not(.theme-light) .swal2-popup.bus-edit-swal-popup .form-control::placeholder {
    color: var(--text-secondary) !important;
}

body.theme-light .swal2-popup.bus-edit-swal-popup {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(37, 99, 235, 0.45) !important;
    color: #1f2937 !important;
}

body.theme-dark .swal2-popup.participant-edit-swal-popup,
body:not(.theme-light) .swal2-popup.participant-edit-swal-popup {
    background: rgba(15, 23, 42, 0.96) !important;
    border: 1px solid rgba(56, 189, 248, 0.55) !important;
    color: var(--text-primary) !important;
}

body.theme-dark .swal2-popup.participant-edit-swal-popup .swal2-title,
body.theme-dark .swal2-popup.participant-edit-swal-popup .form-label,
body:not(.theme-light) .swal2-popup.participant-edit-swal-popup .swal2-title,
body:not(.theme-light) .swal2-popup.participant-edit-swal-popup .form-label {
    color: var(--text-primary) !important;
}

body.theme-dark .swal2-popup.participant-edit-swal-popup .form-control,
body:not(.theme-light) .swal2-popup.participant-edit-swal-popup .form-control {
    background: rgba(30, 41, 59, 0.85) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
}

body.theme-dark .swal2-popup.participant-edit-swal-popup .form-control::placeholder,
body:not(.theme-light) .swal2-popup.participant-edit-swal-popup .form-control::placeholder {
    color: var(--text-secondary) !important;
}

body.theme-light .swal2-popup.participant-edit-swal-popup {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    color: #1f2937 !important;
}

body.theme-dark .swal2-popup.booking-edit-swal-popup,
body:not(.theme-light) .swal2-popup.booking-edit-swal-popup {
    background: rgba(15, 23, 42, 0.96) !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
    color: var(--text-primary) !important;
}

body.theme-dark .swal2-popup.booking-edit-swal-popup .swal2-title,
body.theme-dark .swal2-popup.booking-edit-swal-popup .form-label,
body:not(.theme-light) .swal2-popup.booking-edit-swal-popup .swal2-title,
body:not(.theme-light) .swal2-popup.booking-edit-swal-popup .form-label {
    color: var(--text-primary) !important;
}

body.theme-dark .swal2-popup.booking-edit-swal-popup .form-control,
body.theme-dark .swal2-popup.booking-edit-swal-popup .form-select,
body:not(.theme-light) .swal2-popup.booking-edit-swal-popup .form-control,
body:not(.theme-light) .swal2-popup.booking-edit-swal-popup .form-select {
    background: rgba(30, 41, 59, 0.85) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
}

body.theme-dark .swal2-popup.booking-edit-swal-popup .form-control::placeholder,
body:not(.theme-light) .swal2-popup.booking-edit-swal-popup .form-control::placeholder {
    color: var(--text-secondary) !important;
}

body.theme-light .swal2-popup.booking-edit-swal-popup {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    color: #1f2937 !important;
}

/* Client/Admin table wrappers that use Bootstrap utility classes */
body.theme-dark .table-responsive.bg-white,
body:not(.theme-light) .table-responsive.bg-white {
    background: rgba(15, 23, 42, 0.78) !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
}

body.theme-dark .table-responsive.bg-white .table,
body:not(.theme-light) .table-responsive.bg-white .table {
    color: #f8fafc !important;
}

body.theme-dark .table-light,
body:not(.theme-light) .table-light {
    background-color: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
}

body.theme-dark .table-light th,
body.theme-dark .table-light td,
body:not(.theme-light) .table-light th,
body:not(.theme-light) .table-light td {
    background-color: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}

body.theme-dark .table-responsive.bg-white .table td,
body.theme-dark .table-responsive.bg-white .table th,
body:not(.theme-light) .table-responsive.bg-white .table td,
body:not(.theme-light) .table-responsive.bg-white .table th {
    color: #f8fafc !important;
}

body.theme-light .table-responsive.bg-white {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
}

body.theme-light .table-responsive.bg-white .table {
    color: #1f2937 !important;
}

body.theme-light .table-light,
body.theme-light .table-light th,
body.theme-light .table-light td {
    background-color: #f8fafc !important;
    color: #334155 !important;
    border-color: #e2e8f0 !important;
}

body.theme-dark .active-visits-section .card-body,
body:not(.theme-light) .active-visits-section .card-body {
    color: #f8fafc;
}

body.theme-dark .active-visits-section .card-body p,
body.theme-dark .active-visits-section .card-body strong,
body.theme-dark .active-visits-section .card-body .small,
body:not(.theme-light) .active-visits-section .card-body p,
body:not(.theme-light) .active-visits-section .card-body strong,
body:not(.theme-light) .active-visits-section .card-body .small {
    color: #f8fafc !important;
}

body.theme-dark .active-visits-section .alert-light,
body:not(.theme-light) .active-visits-section .alert-light {
    background-color: rgba(51, 65, 85, 0.36);
    border-color: rgba(148, 163, 184, 0.34);
    color: #e5e7eb;
}

body.theme-dark .active-visits-section .alert-success,
body:not(.theme-light) .active-visits-section .alert-success {
    background-color: rgba(16, 185, 129, 0.22);
    border-color: rgba(16, 185, 129, 0.38);
    color: #ecfdf5;
}

.participant-modal .modal-dialog {
    max-width: 860px;
}

.participant-modal .modal-header {
    border-bottom-width: 1px;
}

.participant-modal-body {
    max-height: min(68vh, 720px);
    overflow-y: auto;
}

.participant-modal-footer {
    border-top-width: 1px;
}

.participant-modal-tabs .nav-link {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.55rem 0.75rem;
}

.participant-modal-tabs .nav-link .badge {
    font-size: 0.72rem;
    padding: 0.35em 0.5em;
    transition: var(--transition);
}

.participant-list .participant-item {
    border-radius: 10px;
    margin-bottom: 0.45rem;
    transition: var(--transition);
}

.participant-list .participant-item:hover {
    transform: translateY(-1px);
}

.participant-selected {
    border-width: 1px;
}

.participant-check {
    width: 1.08rem;
    height: 1.08rem;
    cursor: pointer;
}

body.theme-dark .participant-modal-content,
body:not(.theme-light) .participant-modal-content {
    background: rgba(15, 23, 42, 0.97);
}

body.theme-dark .participant-modal-tabs .nav-link,
body:not(.theme-light) .participant-modal-tabs .nav-link {
    background: rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
}

body.theme-dark .participant-modal-tabs .nav-link.active,
body:not(.theme-light) .participant-modal-tabs .nav-link.active {
    background: rgba(59, 130, 246, 0.3);
    color: #ffffff;
}

body.theme-dark .participant-modal-tabs .nav-link.active .badge,
body:not(.theme-light) .participant-modal-tabs .nav-link.active .badge {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff;
}

body.theme-dark .participant-list .participant-item,
body:not(.theme-light) .participant-list .participant-item {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(148, 163, 184, 0.28);
    color: #f8fafc;
}

body.theme-dark .participant-list .participant-item .text-muted,
body:not(.theme-light) .participant-list .participant-item .text-muted {
    color: #cbd5e1 !important;
}

body.theme-dark .participant-list .participant-item.participant-selected,
body:not(.theme-light) .participant-list .participant-item.participant-selected {
    background: rgba(30, 64, 175, 0.28);
    border-color: rgba(96, 165, 250, 0.65);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.35);
}

body.theme-dark .participant-modal .alert-info,
body:not(.theme-light) .participant-modal .alert-info {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(96, 165, 250, 0.35);
    color: #dbeafe;
}

body.theme-light .participant-modal-tabs .nav-link {
    background: #f1f5f9;
    color: #334155;
}

body.theme-light .participant-modal-tabs .nav-link.active {
    background: rgba(37, 99, 235, 0.15);
    color: #0f172a;
}

body.theme-light .participant-modal-tabs .nav-link.active .badge {
    background: rgba(37, 99, 235, 0.2) !important;
    color: #0f172a;
}

body.theme-light .participant-list .participant-item {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1f2937;
}

body.theme-light .participant-list .participant-item.participant-selected {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
}

.client-institute-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.14);
}

.client-institute-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: #cbd5e1;
}

.client-institute-name {
    font-weight: 700;
    color: #f8fafc;
    text-transform: uppercase;
}

.institute-name-uppercase {
    text-transform: uppercase;
}

body.theme-light .client-institute-banner {
    border-color: rgba(15, 23, 42, 0.15);
    background: rgba(255, 255, 255, 0.86);
}

body.theme-light .client-institute-label {
    color: #475569;
}

body.theme-light .client-institute-name {
    color: #0f172a;
    text-transform: uppercase;
}

.client-tabs {
    gap: 0.6rem;
    border-bottom: none;
}

.client-tabs-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.client-tabs-wrap .client-tabs {
    width: max-content;
    min-width: 100%;
    flex-wrap: nowrap;
}

.client-tabs-wrap .nav-item {
    flex: 0 0 auto;
}

.client-tabs .nav-item {
    margin-bottom: 0.35rem;
}

.client-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.45);
    padding: 0.58rem 0.9rem;
}

.client-tabs .nav-link:hover {
    border-color: rgba(96, 165, 250, 0.65);
    background: rgba(30, 41, 59, 0.72);
}

.client-tabs .nav-link.active {
    border-color: rgba(59, 130, 246, 0.95);
    background: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.client-tabs .tab-step-badge {
    min-width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(148, 163, 184, 0.24);
    color: #e2e8f0;
}

.client-tabs .tab-icon {
    font-size: 1rem;
}

.client-tabs .tab-icon-profile {
    color: #60a5fa;
}

.client-tabs .tab-icon-lists {
    color: #f59e0b;
}

.client-tabs .tab-icon-visit {
    color: #34d399;
}

.client-tabs .tab-label {
    color: #e2e8f0;
    font-weight: 600;
}

.client-tabs .tab-count-badge {
    margin-left: 0.2rem;
    background: rgba(148, 163, 184, 0.24);
    color: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.3);
    font-size: 0.72rem;
    font-weight: 700;
}

.client-tabs .nav-link.active .tab-step-badge,
.client-tabs .nav-link.active .tab-count-badge {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(96, 165, 250, 0.5);
    color: #dbeafe;
}

body.theme-light .client-tabs .nav-link {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.45);
}

body.theme-light .client-tabs .nav-link:hover {
    background: rgba(239, 246, 255, 0.9);
    border-color: rgba(59, 130, 246, 0.6);
}

body.theme-light .client-tabs .nav-link.active {
    background: rgba(219, 234, 254, 0.85);
    border-color: rgba(37, 99, 235, 0.9);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

body.theme-light .client-tabs .tab-step-badge,
body.theme-light .client-tabs .tab-count-badge {
    background: rgba(15, 23, 42, 0.08);
    color: #1e293b;
    border-color: rgba(15, 23, 42, 0.12);
}

body.theme-light .client-tabs .tab-label {
    color: #0f172a;
}

@media (max-width: 767.98px) {
    .client-tabs-wrap {
        padding-bottom: 0.25rem;
    }

    .client-tabs-wrap .client-tabs {
        margin-bottom: 1rem !important;
    }

    .client-tabs .nav-link {
        padding: 0.54rem 0.78rem;
    }

    .client-tabs .tab-label {
        white-space: nowrap;
        font-size: 0.88rem;
    }
}

/* Add Bus panel theme compatibility */
body.theme-dark .bus-form-panel,
body:not(.theme-light) .bus-form-panel {
    background: rgba(15, 23, 42, 0.78) !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
}

body.theme-dark .bus-form-panel .bus-form-card,
body:not(.theme-light) .bus-form-panel .bus-form-card {
    background: rgba(30, 41, 59, 0.72) !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
}

body.theme-dark .bus-form-panel h5,
body.theme-dark .bus-form-panel h6,
body.theme-dark .bus-form-panel .form-label,
body:not(.theme-light) .bus-form-panel h5,
body:not(.theme-light) .bus-form-panel h6,
body:not(.theme-light) .bus-form-panel .form-label {
    color: #e2e8f0 !important;
}

body.theme-dark .bus-form-panel .input-group-text,
body:not(.theme-light) .bus-form-panel .input-group-text {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.34);
    color: #cbd5e1;
}

body.theme-dark .bus-form-panel .form-control.bg-white,
body:not(.theme-light) .bus-form-panel .form-control.bg-white {
    background: rgba(15, 23, 42, 0.62) !important;
    color: #f8fafc !important;
    border-color: rgba(148, 163, 184, 0.34) !important;
}

body.theme-dark .bus-form-cancel,
body:not(.theme-light) .bus-form-cancel {
    background: rgba(71, 85, 105, 0.36) !important;
    border: 1px solid rgba(148, 163, 184, 0.4) !important;
    color: #e2e8f0 !important;
}

body.theme-dark .bus-form-cancel:hover,
body:not(.theme-light) .bus-form-cancel:hover {
    background: rgba(100, 116, 139, 0.5) !important;
    color: #ffffff !important;
}

body.theme-light .bus-form-panel {
    background: #ffffff !important;
}

body.theme-light .bus-form-panel .bus-form-card {
    background: #f8fafc !important;
}

body.theme-dark .booking-auto-note,
body:not(.theme-light) .booking-auto-note {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(96, 165, 250, 0.4);
    color: #dbeafe;
}

body.theme-dark .booking-auto-note strong,
body:not(.theme-light) .booking-auto-note strong {
    color: #ffffff;
}

body.theme-light .booking-auto-note {
    background: rgba(219, 234, 254, 0.9);
    border-color: rgba(147, 197, 253, 0.7);
    color: #1e3a8a;
}

body.theme-dark .booking-disabled-note,
body:not(.theme-light) .booking-disabled-note {
    background: rgba(217, 119, 6, 0.2);
    border-color: rgba(251, 191, 36, 0.45);
    color: #fef3c7;
}

body.theme-dark .booking-disabled-note strong,
body:not(.theme-light) .booking-disabled-note strong {
    color: #ffffff;
}

body.theme-light .booking-disabled-note {
    background: rgba(254, 243, 199, 0.9);
    border-color: rgba(251, 191, 36, 0.6);
    color: #92400e;
}

/* Keep gate pass strictly light-themed regardless of current app theme */
body.theme-dark #print-area,
body.theme-dark #print-area *,
body:not(.theme-light) #print-area,
body:not(.theme-light) #print-area * {
    background-color: #ffffff !important;
    color: #111827 !important;
    border-color: #d1d5db !important;
}

body.theme-dark #print-area .table,
body.theme-dark #print-area .table th,
body.theme-dark #print-area .table td,
body:not(.theme-light) #print-area .table,
body:not(.theme-light) #print-area .table th,
body:not(.theme-light) #print-area .table td {
    background-color: #ffffff !important;
    color: #111827 !important;
    border-color: #d1d5db !important;
}

body.theme-dark #print-area .badge,
body:not(.theme-light) #print-area .badge {
    color: #111827 !important;
    background-color: #e5e7eb !important;
}

#print-area .print-approval-block {
    margin-top: 1.25rem;
}

#print-area h2 {
    color: #0f172a !important;
    letter-spacing: 0.02em;
    font-size: 1.55rem;
    margin-bottom: 0.2rem;
}

#print-area h4 {
    color: #334155 !important;
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

#print-area hr {
    border-top: 2px solid #cbd5e1;
    margin-top: 0.5rem;
    margin-bottom: 0.85rem;
}

#print-area .print-gp-info-table thead th {
    background-color: #0d6efd !important;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.82rem;
}

#print-area .print-gp-info-table th,
#print-area .print-gp-info-table td {
    padding: 0.24rem 0.42rem !important;
    font-size: 0.86rem;
    line-height: 1.2;
    vertical-align: middle;
}

#print-area .print-gp-info-table tbody tr:nth-child(even) td,
#print-area .print-gp-info-table tbody tr:nth-child(even) th {
    background-color: #f8fafc !important;
}

#print-area .print-gp-info-table tbody th {
    width: 30%;
    font-weight: 700;
}

#print-area .print-gp-vehicle-table thead th {
    background-color: #198754 !important;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.8rem;
}

#print-area .print-gp-summary-table thead th {
    background-color: #6c757d !important;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.8rem;
}

#print-area .print-gp-summary-table tbody td {
    font-size: 1rem;
    font-weight: 500;
}

#print-area .print-gp-summary-table tbody td:last-child {
    background-color: #f3f4f6 !important;
    font-weight: 700;
}

#print-area .signature-line {
    width: 88%;
    height: 2.5rem;
    margin: 0 auto 0.5rem;
    border-bottom: 1.5px solid #111827;
}

/* Animations */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

body.theme-dark .username-code {
    color: #38bdf8 !important;
}
body.theme-light .username-code {
    color: #0369a1 !important;
}

body.theme-dark .selected-row-highlight td {
    background-color: rgba(13, 110, 253, 0.3) !important;
}
body.theme-light .selected-row-highlight td {
    background-color: rgba(13, 110, 253, 0.15) !important;
}

@page {
    size: A4 portrait;
    margin: 10mm;
}

/* Print Styles */
@media print {

    html,
    body {
        width: 210mm;
        min-height: 297mm;
        background: #ffffff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    #app > *:not(#print-area) {
        display: none !important;
    }

    #print-area {
        display: block !important;
        position: static !important;
        width: 190mm !important;
        max-width: 190mm !important;
        min-height: 277mm;
        max-width: none !important;
        background-color: white !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 auto !important;
        box-sizing: border-box;
    }

    #print-area .table {
        width: 100% !important;
        table-layout: fixed;
    }

    #print-area .table th,
    #print-area .table td {
        padding: 0.42rem 0.55rem !important;
        word-break: break-word;
        white-space: normal !important;
    }

    #print-area .print-gp-info-table th,
    #print-area .print-gp-info-table td {
        padding: 0.2rem 0.35rem !important;
        font-size: 0.8rem !important;
        line-height: 1.15 !important;
    }

    #print-area .print-gp-info-table,
    #print-area .print-gp-vehicle-table,
    #print-area .print-gp-summary-table {
        page-break-inside: avoid;
    }

    #print-area .print-logo {
        max-height: 55px !important;
        width: auto !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 !important;
    }

    #print-area .signature-line {
        height: 2.2rem;
        border-bottom: 1.5px solid #111827;
    }

    #print-area .print-timing-notice {
        page-break-inside: avoid;
        margin: 6px 0 !important;
        padding: 6px 10px !important;
        border: 1.5px solid #d97706 !important;
        background-color: #fff9e6 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .d-print-none {
        display: none !important;
    }
}

/* AntV Dashboard Custom Styling */
.sa-kpi-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border-radius: 12px;
}
.sa-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08) !important;
}
.sa-kpi-icon {
    font-size: 1.75rem;
    opacity: 0.85;
}
.sa-kpi-users .sa-kpi-icon { color: #2563eb; }
.sa-kpi-institutes .sa-kpi-icon { color: #00a896; }
.sa-kpi-bookings .sa-kpi-icon { color: #7c3aed; }
.sa-kpi-completed-rate .sa-kpi-icon { color: #10b981; }
.sa-kpi-logs .sa-kpi-icon { color: #f59e0b; }
.sa-kpi-students .sa-kpi-icon { color: #6366f1; }
.sa-kpi-teachers .sa-kpi-icon { color: #06b6d4; }
.sa-kpi-parents .sa-kpi-icon { color: #ec4899; }
.sa-kpi-buses .sa-kpi-icon { color: #f97316; }

.tracking-wider {
    letter-spacing: 0.05em;
}

div[id^="antv"] {
    position: relative;
    width: 100%;
}

/* Theme-aware Dashboard Cards & Components */
body:not(.theme-light) .superadmin-sidebar + .col-md-10 .card,
body:not(.theme-light) .superadmin-sidebar + .col-md-11 .card {
    background-color: var(--card-bg, rgba(15, 23, 42, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f3f4f6;
}

body:not(.theme-light) .superadmin-sidebar + .col-md-10 .card-header,
body:not(.theme-light) .superadmin-sidebar + .col-md-11 .card-header {
    background-color: rgba(255, 255, 255, 0.04);
    color: #f8fafc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.theme-light .superadmin-sidebar + .col-md-10 .card,
body.theme-light .superadmin-sidebar + .col-md-11 .card {
    background-color: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    color: #1f2937;
}

body.theme-light .superadmin-sidebar + .col-md-10 .card-header,
body.theme-light .superadmin-sidebar + .col-md-11 .card-header {
    background-color: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1) !important;
}

body:not(.theme-light) .sa-kpi-card {
    background-color: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.theme-light .sa-kpi-card {
    background-color: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

/* Theme-aware Input Groups & Tables in Dark Mode */
body:not(.theme-light) .input-group-text {
    background-color: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}

body:not(.theme-light) .form-control {
    background-color: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
    color: #f8fafc;
}

body:not(.theme-light) .form-control::placeholder {
    color: #94a3b8;
}

body:not(.theme-light) .table {
    color: #f8fafc;
}

body:not(.theme-light) .table thead th {
    background-color: rgba(30, 41, 59, 0.9);
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

body:not(.theme-light) .table-hover tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.15);
    color: #ffffff;
}

/* AntV Tooltip Dark Mode Styling */
body:not(.theme-light) .g2-tooltip {
    background-color: rgba(15, 23, 42, 0.95) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

body:not(.theme-light) .g2-tooltip-title,
body:not(.theme-light) .g2-tooltip-list-item {
    color: #f8fafc !important;
}

/* Fixed / Sticky Left Sidebar for Admin Menu (Flush Left & Slim Width) */
@media (min-width: 768px) {
    .superadmin-sidebar {
        position: sticky;
        top: 4.5rem;
        height: calc(100vh - 5.5rem);
        overflow-y: auto;
        z-index: 100;
        padding-bottom: 2rem;
        flex: 0 0 195px !important;
        width: 195px !important;
        max-width: 195px !important;
        margin-left: -0.75rem !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        transition: all 0.2s ease-in-out;
    }

    .superadmin-sidebar .nav-link {
        padding: 0.5rem 0.65rem !important;
        margin-right: 0.3rem !important;
        font-size: 0.88rem !important;
    }

    .superadmin-sidebar .sidebar-header {
        margin: 0 0.2rem 0.5rem !important;
        padding: 0.75rem 0.5rem 0.5rem !important;
    }

    .superadmin-sidebar-mini {
        flex: 0 0 68px !important;
        width: 68px !important;
        max-width: 68px !important;
        margin-left: -0.75rem !important;
        padding-left: 0.2rem !important;
        padding-right: 0.2rem !important;
    }

    .superadmin-sidebar-mini .nav-link {
        justify-content: center !important;
        padding: 0.65rem 0.25rem !important;
        margin-right: 0 !important;
        border-radius: 12px !important;
    }

    .superadmin-sidebar-mini .nav-link i {
        font-size: 1.3rem !important;
        margin-right: 0 !important;
    }

    .superadmin-sidebar-mini .sidebar-header {
        justify-content: center !important;
        padding: 0.65rem 0.2rem !important;
        margin: 0 0 0.5rem !important;
    }
}

.superadmin-sidebar::-webkit-scrollbar {
    width: 4px;
}

.superadmin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 4px;
}

/* Special Announcement Banners (Home & Portal) */
.announcement-banner {
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
    border-left: 5px solid;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transition: all 0.25s ease-in-out;
}

/* Light Theme Styling */
body.theme-light .announcement-banner-info,
.announcement-banner-info {
    background: #f0f9ff;
    border-left-color: #0284c7;
    color: #0369a1;
}

body.theme-light .announcement-banner-warning,
.announcement-banner-warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

body.theme-light .announcement-banner-danger,
.announcement-banner-danger {
    background: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

body.theme-light .announcement-banner-success,
.announcement-banner-success {
    background: #f0fdf4;
    border-left-color: #10b981;
    color: #065f46;
}

body.theme-light .announcement-banner-purple,
.announcement-banner-purple {
    background: #faf5ff;
    border-left-color: #8b5cf6;
    color: #5b21b6;
}

body.theme-light .announcement-banner-primary,
.announcement-banner-primary {
    background: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e40af;
}

/* Dark Theme Overrides for Announcement Banners */
body:not(.theme-light) .announcement-banner-info {
    background: rgba(2, 132, 199, 0.18);
    border-left-color: #38bdf8;
    color: #e0f2fe;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

body:not(.theme-light) .announcement-banner-warning {
    background: rgba(245, 158, 11, 0.18);
    border-left-color: #fbbf24;
    color: #fef3c7;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

body:not(.theme-light) .announcement-banner-danger {
    background: rgba(239, 68, 68, 0.18);
    border-left-color: #f87171;
    color: #fee2e2;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

body:not(.theme-light) .announcement-banner-success {
    background: rgba(16, 185, 129, 0.18);
    border-left-color: #34d399;
    color: #dcfce7;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

body:not(.theme-light) .announcement-banner-purple {
    background: rgba(139, 92, 246, 0.18);
    border-left-color: #a78bfa;
    color: #f3e8ff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

body:not(.theme-light) .announcement-banner-primary {
    background: rgba(59, 130, 246, 0.18);
    border-left-color: #60a5fa;
    color: #e0e7ff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Dark Theme Overrides for Admin Forms & Badges */
body:not(.theme-light) .bg-body-tertiary {
    background-color: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
    color: #f8fafc !important;
}

body:not(.theme-light) .bg-purple {
    background-color: #7c3aed !important;
    color: #ffffff !important;
}

/* Mini / Compact Left Menu Sidebar Styles */
.sidebar-mini-toggle-btn {
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}

.sidebar-mini-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

body.theme-light .sidebar-mini-toggle-btn {
    color: #0d2b56 !important;
    background: rgba(13, 43, 86, 0.08) !important;
    border: 1px solid rgba(13, 43, 86, 0.22) !important;
}

body.theme-light .sidebar-mini-toggle-btn:hover,
body.theme-light .sidebar-mini-toggle-btn:focus {
    background: rgba(13, 43, 86, 0.18) !important;
    color: #081d3c !important;
    border-color: rgba(13, 43, 86, 0.38) !important;
}

body.theme-light button[data-bs-target="#sidebarMenu"] {
    background-color: #0d2b56 !important;
    border-color: #0d2b56 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(13, 43, 86, 0.2) !important;
}

body.theme-light .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.45) !important;
}

@media (min-width: 768px) {
    .superadmin-sidebar-mini {
        width: 80px !important;
        max-width: 80px !important;
        padding-left: 0.4rem !important;
        padding-right: 0.4rem !important;
    }

    .superadmin-sidebar-mini .nav-link {
        justify-content: center !important;
        padding: 0.65rem 0.25rem !important;
        font-size: 0.95rem;
    }

    .superadmin-sidebar-mini .nav-link i {
        font-size: 1.35rem !important;
        margin-right: 0 !important;
    }

    .superadmin-sidebar-mini .sidebar-header {
        justify-content: center !important;
        padding: 0.65rem 0.2rem !important;
    }
}

/* Sidebar Flyout Submenu in Mini Mode */
.superadmin-sidebar-mini .sidebar-has-submenu {
    position: relative;
}

.superadmin-sidebar-mini .sidebar-flyout-menu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 0.35rem;
    min-width: 195px;
    z-index: 1060;
    background: rgba(15, 23, 42, 0.96) !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
    border-radius: 10px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

body.theme-light .sidebar-flyout-menu {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(203, 213, 225, 0.8) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.superadmin-sidebar-mini .sidebar-has-submenu:hover .sidebar-flyout-menu,
.superadmin-sidebar-mini .sidebar-has-submenu:focus-within .sidebar-flyout-menu {
    display: block !important;
    animation: flyoutFadeIn 0.18s ease-in-out forwards;
}

body.theme-light .sidebar-flyout-menu .fw-bold {
    color: #0d2b56 !important;
    border-bottom-color: rgba(15, 23, 42, 0.12) !important;
}

.sidebar-flyout-menu .dropdown-item {
    color: #e2e8f0;
    transition: all 0.15s ease-in-out;
}

body.theme-light .sidebar-flyout-menu .dropdown-item {
    color: #1e293b !important;
}

.sidebar-flyout-menu .dropdown-item:hover,
.sidebar-flyout-menu .dropdown-item.active {
    background: rgba(59, 130, 246, 0.22) !important;
    color: #3b82f6 !important;
}

body.theme-light .sidebar-flyout-menu .dropdown-item:hover,
body.theme-light .sidebar-flyout-menu .dropdown-item.active {
    background: rgba(13, 43, 86, 0.1) !important;
    color: #0d2b56 !important;
    font-weight: 600;
}

@keyframes flyoutFadeIn {
    from {
        opacity: 0;
        transform: translateX(-6px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Light Pink Button (Change Status) */
.btn-light-pink {
    background-color: #fce7f3;
    color: #9d174d;
    border: 1px solid #fbcfe8;
    font-weight: 600;
    transition: var(--transition);
}

.btn-light-pink:hover,
.btn-light-pink:focus {
    background-color: #fbcfe8;
    color: #831843;
    border-color: #f472b6;
    box-shadow: 0 4px 12px rgba(244, 114, 182, 0.25);
}

.btn-light-pink:active,
.btn-light-pink.show,
.btn-light-pink.dropdown-toggle.show {
    background-color: #f472b6;
    color: #ffffff;
    border-color: #ec4899;
    box-shadow: 0 0 0 0.2rem rgba(244, 114, 182, 0.4);
}

/* Theme dark variant for btn-light-pink */
body.theme-dark .btn-light-pink,
body:not(.theme-light) .btn-light-pink {
    background-color: rgba(244, 114, 182, 0.22);
    color: #fbcfe8;
    border: 1px solid rgba(244, 114, 182, 0.45);
}

body.theme-dark .btn-light-pink:hover,
body.theme-dark .btn-light-pink:focus,
body:not(.theme-light) .btn-light-pink:hover,
body:not(.theme-light) .btn-light-pink:focus {
    background-color: rgba(244, 114, 182, 0.38);
    color: #ffffff;
    border-color: rgba(244, 114, 182, 0.7);
    box-shadow: 0 4px 14px rgba(244, 114, 182, 0.35);
}

body.theme-dark .btn-light-pink:active,
body.theme-dark .btn-light-pink.show,
body.theme-dark .btn-light-pink.dropdown-toggle.show,
body:not(.theme-light) .btn-light-pink:active,
body:not(.theme-light) .btn-light-pink.show,
body:not(.theme-light) .btn-light-pink.dropdown-toggle.show {
    background-color: rgba(236, 72, 153, 0.65);
    color: #ffffff;
    border-color: #ec4899;
    box-shadow: 0 0 0 0.2rem rgba(244, 114, 182, 0.45);
}

/* Incomplete Profiles Trigger Button */
.btn-incomplete-profiles {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.45);
    transition: var(--transition);
}

.btn-incomplete-profiles:hover,
.btn-incomplete-profiles:focus {
    background: rgba(245, 158, 11, 0.32);
    color: #ffffff;
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

body.theme-light .btn-incomplete-profiles {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fcd34d;
}

body.theme-light .btn-incomplete-profiles:hover,
body.theme-light .btn-incomplete-profiles:focus {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.18);
}

/* Incomplete Client Profiles Modal Header */
body.theme-dark .incomplete-profiles-modal-header,
body:not(.theme-light) .incomplete-profiles-modal-header {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(180, 83, 9, 0.12) 100%) !important;
    border-bottom: 1px solid rgba(245, 158, 11, 0.3) !important;
    color: #fef3c7 !important;
}

body.theme-dark .incomplete-profiles-modal-header .modal-title,
body:not(.theme-light) .incomplete-profiles-modal-header .modal-title {
    color: #fef3c7 !important;
}

body.theme-light .incomplete-profiles-modal-header {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
    border-bottom: 1px solid #fde68a !important;
    color: #78350f !important;
}

body.theme-light .incomplete-profiles-modal-header .modal-title {
    color: #78350f !important;
}

/* Incomplete Summary Stats Bar */
body.theme-dark .incomplete-summary-bar,
body:not(.theme-light) .incomplete-summary-bar {
    background: rgba(15, 23, 42, 0.45);
}

body.theme-light .incomplete-summary-bar {
    background: #f8fafc;
}

body.theme-dark .incomplete-stat-card,
body:not(.theme-light) .incomplete-stat-card {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(148, 163, 184, 0.22) !important;
}

body.theme-light .incomplete-stat-card {
    background: #ffffff;
    border-color: #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.theme-dark .incomplete-stat-card:hover,
body:not(.theme-light) .incomplete-stat-card:hover {
    border-color: rgba(245, 158, 11, 0.45) !important;
    background: rgba(30, 41, 59, 0.75);
}

body.theme-light .incomplete-stat-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Pagination Component Styling (Light & Dark Theme)
   ========================================================================== */
.pagination {
    margin-bottom: 0;
    gap: 3px;
    flex-wrap: wrap;
}

.pagination .page-item .page-link {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary, #e2e8f0);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.28rem 0.6rem;
    font-size: 0.8125rem;
    font-weight: 500;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    cursor: pointer;
    user-select: none;
}

.pagination .page-item .page-link:hover:not(:disabled) {
    background-color: rgba(59, 130, 246, 0.22);
    border-color: rgba(59, 130, 246, 0.45);
    color: #93c5fd;
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #1d4f91 0%, #2563eb 100%);
    border-color: #3b82f6;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
    cursor: default;
}

.pagination .page-item.disabled .page-link {
    background-color: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.06);
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

/* Light Theme Pagination */
body.theme-light .pagination .page-item .page-link {
    background-color: #ffffff;
    color: #334155;
    border-color: #cbd5e1;
}

body.theme-light .pagination .page-item .page-link:hover:not(:disabled) {
    background-color: #eff6ff;
    border-color: #93c5fd;
    color: #1d4f91;
}

body.theme-light .pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #1d4f91 0%, #2563eb 100%);
    border-color: #1d4f91;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(29, 79, 145, 0.25);
}

body.theme-light .pagination .page-item.disabled .page-link {
    background-color: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
}

/* ==========================================================================
   Modern Change Password Modal UI - Theme Matched
   ========================================================================== */
.change-password-modal-backdrop {
    background: rgba(6, 11, 20, 0.76) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    z-index: 1060;
    transition: all 0.3s ease;
}

.change-password-dialog {
    max-width: 480px;
    margin: 1.75rem auto;
    animation: modalPopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPopIn {
    0% {
        opacity: 0;
        transform: scale(0.94) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.change-password-modal-card {
    border-radius: 16px !important;
    overflow: hidden;
    transition: all 0.25s ease;
}

/* --------------------------------------------------------------------------
   Dark Theme (Default)
   -------------------------------------------------------------------------- */
body.theme-dark .change-password-modal-card,
body:not(.theme-light) .change-password-modal-card {
    background: linear-gradient(180deg, #131d31 0%, #0d1527 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.55) !important;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25), 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 24px rgba(56, 189, 248, 0.18) !important;
    color: #f1f5f9;
}

body.theme-dark .change-password-header,
body:not(.theme-light) .change-password-header {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(30, 41, 59, 0.2) 100%);
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

body.theme-dark .change-password-modal-card .modal-title,
body:not(.theme-light) .change-password-modal-card .modal-title {
    color: #f8fafc !important;
}

body.theme-dark .change-password-icon-wrapper,
body:not(.theme-light) .change-password-icon-wrapper {
    background: linear-gradient(135deg, #1d4f91 0%, #3b82f6 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38) !important;
}

body.theme-dark .change-password-user-badge,
body:not(.theme-light) .change-password-user-badge {
    background: rgba(59, 130, 246, 0.16) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(59, 130, 246, 0.35) !important;
}

/* Dark Theme Labels & Icons */
body.theme-dark .change-pass-form-label,
body:not(.theme-light) .change-pass-form-label {
    color: #f1f5f9 !important;
}

body.theme-dark .change-pass-field-icon,
body:not(.theme-light) .change-pass-field-icon {
    color: #60a5fa !important;
}

body.theme-dark .change-pass-input-group .input-group-text,
body:not(.theme-light) .change-pass-input-group .input-group-text {
    background: rgba(15, 23, 42, 0.72) !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #94a3b8 !important;
}

body.theme-dark .change-pass-input-group .form-control,
body:not(.theme-light) .change-pass-input-group .form-control {
    background: rgba(15, 23, 42, 0.88) !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #f8fafc !important;
}

body.theme-dark .change-pass-input-group .form-control::placeholder,
body:not(.theme-light) .change-pass-input-group .form-control::placeholder {
    color: #64748b !important;
}

body.theme-dark .change-pass-input-group .change-pass-toggle-btn,
body:not(.theme-light) .change-pass-input-group .change-pass-toggle-btn {
    background: rgba(15, 23, 42, 0.72) !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #94a3b8 !important;
}

body.theme-dark .change-pass-input-group .change-pass-toggle-btn:hover,
body:not(.theme-light) .change-pass-input-group .change-pass-toggle-btn:hover {
    background: rgba(30, 41, 59, 0.95) !important;
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
}

body.theme-dark .change-pass-input-group:focus-within .input-group-text,
body:not(.theme-light) .change-pass-input-group:focus-within .input-group-text {
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
}

body.theme-dark .change-pass-input-group:focus-within .form-control,
body:not(.theme-light) .change-pass-input-group:focus-within .form-control {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.2) !important;
}

body.theme-dark .change-pass-input-group:focus-within .change-pass-toggle-btn,
body:not(.theme-light) .change-pass-input-group:focus-within .change-pass-toggle-btn {
    border-color: #3b82f6 !important;
}

/* Dark Theme Buttons */
body.theme-dark .change-pass-submit-btn,
body:not(.theme-light) .change-pass-submit-btn {
    background: linear-gradient(135deg, #1d4f91 0%, #2563eb 100%) !important;
    border: 1px solid #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
    transition: var(--transition);
}

body.theme-dark .change-pass-submit-btn:hover:not(:disabled),
body:not(.theme-light) .change-pass-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
    border-color: #60a5fa !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.48) !important;
    transform: translateY(-1px);
}

body.theme-dark .change-pass-submit-btn:disabled,
body:not(.theme-light) .change-pass-submit-btn:disabled {
    background: rgba(148, 163, 184, 0.16) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    color: rgba(255, 255, 255, 0.35) !important;
    box-shadow: none !important;
    cursor: not-allowed;
    transform: none;
}

body.theme-dark .change-pass-cancel-btn,
body:not(.theme-light) .change-pass-cancel-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
    color: #cbd5e1 !important;
    transition: var(--transition);
}

body.theme-dark .change-pass-cancel-btn:hover:not(:disabled),
body:not(.theme-light) .change-pass-cancel-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(226, 232, 240, 0.6) !important;
    color: #ffffff !important;
}

/* Dark Theme Requirements & Badges */
body.theme-dark .change-password-reqs-card,
body:not(.theme-light) .change-password-reqs-card {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
}

body.theme-dark .change-pass-reqs-title,
body:not(.theme-light) .change-pass-reqs-title {
    color: #cbd5e1 !important;
}

body.theme-dark .change-pass-req-pill,
body:not(.theme-light) .change-pass-req-pill {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

body.theme-dark .change-pass-req-pill i,
body:not(.theme-light) .change-pass-req-pill i {
    color: #64748b;
}

body.theme-dark .change-pass-req-pill.is-met,
body:not(.theme-light) .change-pass-req-pill.is-met {
    color: #f1f5f9;
    background: rgba(16, 185, 129, 0.14) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    font-weight: 600;
}

body.theme-dark .change-pass-req-pill.is-met i,
body:not(.theme-light) .change-pass-req-pill.is-met i {
    color: #34d399 !important;
}

body.theme-dark .change-password-security-tip,
body:not(.theme-light) .change-password-security-tip {
    background: rgba(30, 41, 59, 0.45) !important;
    border: 1px solid rgba(148, 163, 184, 0.14) !important;
}

body.theme-dark .change-pass-tip-icon,
body:not(.theme-light) .change-pass-tip-icon {
    color: #60a5fa !important;
}

body.theme-dark .change-pass-tip-text,
body:not(.theme-light) .change-pass-tip-text {
    color: #cbd5e1 !important;
}

/* Dark Theme Strength & Match Badges */
body.theme-dark .strength-danger,
body:not(.theme-light) .strength-danger {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

body.theme-dark .strength-warning,
body:not(.theme-light) .strength-warning {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

body.theme-dark .strength-info,
body:not(.theme-light) .strength-info {
    background: rgba(59, 130, 246, 0.18) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

body.theme-dark .strength-primary,
body:not(.theme-light) .strength-primary {
    background: rgba(99, 102, 241, 0.18) !important;
    color: #818cf8 !important;
    border: 1px solid rgba(99, 102, 241, 0.35);
}

body.theme-dark .strength-success,
body:not(.theme-light) .strength-success {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

body.theme-dark .match-success,
body:not(.theme-light) .match-success {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

body.theme-dark .match-error,
body:not(.theme-light) .match-error {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.35);
}


/* --------------------------------------------------------------------------
   Light Theme (SLPA Deep Navy / Crisp Slate Theme)
   -------------------------------------------------------------------------- */
body.theme-light .change-password-modal-card {
    background: #ffffff !important;
    border: 1px solid rgba(37, 99, 235, 0.45) !important;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2), 0 20px 40px -15px rgba(15, 23, 42, 0.15), 0 0 18px rgba(37, 99, 235, 0.12) !important;
    color: #1e293b;
}

body.theme-light .change-password-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

body.theme-light .change-password-modal-card .modal-title {
    color: #0d2b56 !important;
}

body.theme-light .change-password-icon-wrapper {
    background: linear-gradient(135deg, #0d2b56 0%, #1d4f91 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(13, 43, 86, 0.25) !important;
}

body.theme-light .change-password-user-badge {
    background: rgba(13, 43, 86, 0.08) !important;
    color: #0d2b56 !important;
    border: 1px solid rgba(13, 43, 86, 0.22) !important;
}

/* Light Theme Labels & Icons */
body.theme-light .change-pass-form-label {
    color: #0f172a !important;
}

body.theme-light .change-pass-field-icon {
    color: #1d4f91 !important;
}

body.theme-light .change-pass-input-group .input-group-text {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
}

body.theme-light .change-pass-input-group .form-control {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.theme-light .change-pass-input-group .form-control::placeholder {
    color: #94a3b8 !important;
}

body.theme-light .change-pass-input-group .change-pass-toggle-btn {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
}

body.theme-light .change-pass-input-group .change-pass-toggle-btn:hover {
    background: #eef2f6 !important;
    border-color: #1d4f91 !important;
    color: #1d4f91 !important;
}

body.theme-light .change-pass-input-group:focus-within .input-group-text {
    border-color: #1d4f91 !important;
    color: #1d4f91 !important;
}

body.theme-light .change-pass-input-group:focus-within .form-control {
    border-color: #1d4f91 !important;
    box-shadow: 0 0 0 0.2rem rgba(29, 79, 145, 0.15) !important;
}

body.theme-light .change-pass-input-group:focus-within .change-pass-toggle-btn {
    border-color: #1d4f91 !important;
}

/* Light Theme Buttons */
body.theme-light .change-pass-submit-btn {
    background: linear-gradient(135deg, #0d2b56 0%, #1d4f91 100%) !important;
    border: 1px solid #0d2b56 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(13, 43, 86, 0.25) !important;
    transition: var(--transition);
}

body.theme-light .change-pass-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4f91 0%, #2a4d82 100%) !important;
    border-color: #1d4f91 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(13, 43, 86, 0.35) !important;
    transform: translateY(-1px);
}

body.theme-light .change-pass-submit-btn:disabled {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    cursor: not-allowed;
    transform: none;
}

body.theme-light .change-pass-cancel-btn {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    transition: var(--transition);
}

body.theme-light .change-pass-cancel-btn:hover:not(:disabled) {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* Light Theme Requirements & Badges */
body.theme-light .change-password-reqs-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

body.theme-light .change-pass-reqs-title {
    color: #334155 !important;
}

body.theme-light .change-pass-req-pill {
    color: #64748b;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

body.theme-light .change-pass-req-pill i {
    color: #94a3b8;
}

body.theme-light .change-pass-req-pill.is-met {
    color: #065f46 !important;
    background: rgba(5, 150, 105, 0.1) !important;
    border: 1px solid rgba(5, 150, 105, 0.25) !important;
    font-weight: 600;
}

body.theme-light .change-pass-req-pill.is-met i {
    color: #059669 !important;
}

body.theme-light .change-password-security-tip {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
}

body.theme-light .change-pass-tip-icon {
    color: #1d4f91 !important;
}

body.theme-light .change-pass-tip-text {
    color: #475569 !important;
}

/* Light Theme Strength & Match Badges */
body.theme-light .strength-danger {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fca5a5;
}

body.theme-light .strength-warning {
    background: #fef3c7 !important;
    color: #d97706 !important;
    border: 1px solid #fcd34d;
}

body.theme-light .strength-info {
    background: #e0f2fe !important;
    color: #0284c7 !important;
    border: 1px solid #7dd3fc;
}

body.theme-light .strength-primary {
    background: #ede9fe !important;
    color: #4f46e5 !important;
    border: 1px solid #c4b5fd;
}

body.theme-light .strength-success {
    background: #d1fae5 !important;
    color: #059669 !important;
    border: 1px solid #6ee7b7;
}

body.theme-light .match-success {
    background: #d1fae5 !important;
    color: #059669 !important;
    border: 1px solid #6ee7b7;
}

body.theme-light .match-error {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fca5a5;
}


/* --------------------------------------------------------------------------
   Shared Structural Layout & Animations
   -------------------------------------------------------------------------- */
.change-password-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.change-password-close-btn {
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.75;
}

.change-password-close-btn:hover {
    transform: rotate(90deg);
    opacity: 1;
}

.change-pass-input-group {
    border-radius: 10px;
    transition: all 0.2s ease;
}

.change-pass-input-group .input-group-text {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    font-size: 1rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    transition: all 0.2s ease;
}

.change-pass-input-group .form-control {
    border-radius: 0;
    font-size: 0.925rem;
    padding: 0.6rem 0.75rem;
}

.change-pass-input-group .change-pass-toggle-btn {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 0;
    transition: all 0.2s ease;
}

.change-password-reqs-card {
    border-radius: 12px;
    transition: all 0.2s ease;
}

.change-pass-reqs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 6px 10px;
}

.change-pass-req-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.775rem;
    padding: 4px 8px;
    border-radius: 7px;
    transition: all 0.2s ease;
}

.change-pass-strength-progress {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    overflow: hidden;
}

.change-pass-strength-progress .progress-bar {
    border-radius: 999px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

/* ==========================================================================
   Improved Login Form Styling - Theme-Aware
   ========================================================================== */
.login-card-container {
    border-radius: 20px !important;
    position: relative;
    overflow: visible;
}

.login-card-container .card-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
}

.login-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: transform 0.25s ease;
}

.login-logo-wrapper:hover {
    transform: scale(1.05);
}

.login-portal-badge {
    font-size: 0.775rem;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.theme-dark .login-portal-badge,
body:not(.theme-light) .login-portal-badge {
    background: rgba(56, 189, 248, 0.15) !important;
    color: #7dd3fc !important;
    border: 1px solid rgba(56, 189, 248, 0.32) !important;
}

body.theme-light .login-portal-badge {
    background: rgba(13, 43, 86, 0.08) !important;
    color: #0d2b56 !important;
    border: 1px solid rgba(13, 43, 86, 0.22) !important;
}

body.theme-dark .login-title,
body:not(.theme-light) .login-title {
    color: #ffffff !important;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

body.theme-light .login-title {
    color: #0d2b56 !important;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

body.theme-dark .login-header-caption,
body:not(.theme-light) .login-header-caption {
    color: #cbd5e1 !important;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    opacity: 0.95;
}

body.theme-light .login-header-caption {
    color: #475569 !important;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

body.theme-dark .login-field-icon,
body:not(.theme-light) .login-field-icon {
    color: #60a5fa !important;
}

body.theme-light .login-field-icon {
    color: #1d4f91 !important;
}

body.theme-dark .login-forgot-link,
body:not(.theme-light) .login-forgot-link {
    color: #60a5fa !important;
}

body.theme-dark .login-forgot-link:hover,
body:not(.theme-light) .login-forgot-link:hover {
    color: #93c5fd !important;
    text-decoration: underline !important;
}

body.theme-light .login-forgot-link {
    color: #1d4f91 !important;
}

body.theme-light .login-forgot-link:hover {
    color: #0d2b56 !important;
    text-decoration: underline !important;
}

/* Input Groups for Login */
.login-input-group {
    border-radius: 12px;
}

.login-input-group .input-group-text {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    padding-left: 1rem;
    padding-right: 1rem;
    font-size: 1.05rem;
    transition: all 0.2s ease;
}

.login-input-group .form-control {
    border-radius: 0;
    padding: 0.7rem 0.85rem;
    font-size: 0.95rem;
}

.login-input-group .login-toggle-pw-btn {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    padding-left: 0.95rem;
    padding-right: 0.95rem;
    border-left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* Dark Theme Inputs */
body.theme-dark .login-input-group .input-group-text,
body:not(.theme-light) .login-input-group .input-group-text {
    background: rgba(15, 23, 42, 0.72) !important;
    border-color: rgba(148, 163, 184, 0.32) !important;
    color: #94a3b8 !important;
}

body.theme-dark .login-input-group .form-control,
body:not(.theme-light) .login-input-group .form-control {
    background: rgba(15, 23, 42, 0.88) !important;
    border-color: rgba(148, 163, 184, 0.32) !important;
    color: #f8fafc !important;
}

body.theme-dark .login-input-group .login-toggle-pw-btn,
body:not(.theme-light) .login-input-group .login-toggle-pw-btn {
    background: rgba(15, 23, 42, 0.72) !important;
    border-color: rgba(148, 163, 184, 0.32) !important;
    color: #94a3b8 !important;
}

body.theme-dark .login-input-group .login-toggle-pw-btn:hover,
body:not(.theme-light) .login-input-group .login-toggle-pw-btn:hover {
    background: rgba(30, 41, 59, 0.95) !important;
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
}

body.theme-dark .login-input-group:focus-within .input-group-text,
body:not(.theme-light) .login-input-group:focus-within .input-group-text {
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
}

body.theme-dark .login-input-group:focus-within .form-control,
body:not(.theme-light) .login-input-group:focus-within .form-control {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.22) !important;
}

body.theme-dark .login-input-group:focus-within .login-toggle-pw-btn,
body:not(.theme-light) .login-input-group:focus-within .login-toggle-pw-btn {
    border-color: #3b82f6 !important;
}

/* Light Theme Inputs */
body.theme-light .login-input-group .input-group-text {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
}

body.theme-light .login-input-group .form-control {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.theme-light .login-input-group .login-toggle-pw-btn {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
}

body.theme-light .login-input-group .login-toggle-pw-btn:hover {
    background: #eef2f6 !important;
    border-color: #1d4f91 !important;
    color: #1d4f91 !important;
}

body.theme-light .login-input-group:focus-within .input-group-text {
    border-color: #1d4f91 !important;
    color: #1d4f91 !important;
}

body.theme-light .login-input-group:focus-within .form-control {
    border-color: #1d4f91 !important;
    box-shadow: 0 0 0 0.2rem rgba(29, 79, 145, 0.16) !important;
}

body.theme-light .login-input-group:focus-within .login-toggle-pw-btn {
    border-color: #1d4f91 !important;
}

/* Login Submit Button */
.login-submit-btn {
    min-height: 48px;
    border-radius: 12px;
    transition: var(--transition);
}

body.theme-dark .login-submit-btn,
body:not(.theme-light) .login-submit-btn {
    background: linear-gradient(135deg, #1d4f91 0%, #2563eb 100%) !important;
    border: 1px solid #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4) !important;
}

body.theme-dark .login-submit-btn:hover:not(:disabled),
body:not(.theme-light) .login-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
    border-color: #60a5fa !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.52) !important;
    transform: translateY(-1px);
}

body.theme-light .login-submit-btn {
    background: linear-gradient(135deg, #0d2b56 0%, #1d4f91 100%) !important;
    border: 1px solid #0d2b56 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(13, 43, 86, 0.28) !important;
}

body.theme-light .login-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4f91 0%, #2a4d82 100%) !important;
    border-color: #1d4f91 !important;
    box-shadow: 0 6px 18px rgba(13, 43, 86, 0.38) !important;
    transform: translateY(-1px);
}

/* Back to Home Button */
.login-home-btn {
    min-height: 42px;
    border-radius: 12px;
    transition: var(--transition);
}

body.theme-dark .login-home-btn,
body:not(.theme-light) .login-home-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    color: #cbd5e1 !important;
}

body.theme-dark .login-home-btn:hover:not(:disabled),
body:not(.theme-light) .login-home-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(226, 232, 240, 0.55) !important;
    color: #ffffff !important;
}

body.theme-light .login-home-btn {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
}

body.theme-light .login-home-btn:hover:not(:disabled) {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* Callout Box */
.login-register-callout {
    border-radius: 14px;
    transition: all 0.2s ease;
}

body.theme-dark .login-register-callout,
body:not(.theme-light) .login-register-callout {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
}

body.theme-light .login-register-callout {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.login-error-alert {
    animation: alertSlideIn 0.2s ease-out;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Improved Register Form Styling - Theme-Aware
   ========================================================================== */
.register-card-container {
    border-radius: 20px !important;
    position: relative;
    overflow: visible;
}

.register-card-container .card-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
}

.register-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: transform 0.25s ease;
}

.register-logo-wrapper:hover {
    transform: scale(1.05);
}

.register-portal-badge {
    font-size: 0.775rem;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.theme-dark .register-portal-badge,
body:not(.theme-light) .register-portal-badge {
    background: rgba(52, 211, 153, 0.15) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(52, 211, 153, 0.32) !important;
}

body.theme-light .register-portal-badge {
    background: rgba(13, 43, 86, 0.08) !important;
    color: #0d2b56 !important;
    border: 1px solid rgba(13, 43, 86, 0.22) !important;
}

body.theme-dark .register-title,
body:not(.theme-light) .register-title {
    color: #ffffff !important;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

body.theme-light .register-title {
    color: #0d2b56 !important;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

body.theme-dark .register-header-caption,
body:not(.theme-light) .register-header-caption {
    color: #cbd5e1 !important;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    opacity: 0.95;
}

body.theme-light .register-header-caption {
    color: #475569 !important;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

body.theme-dark .register-field-icon,
body:not(.theme-light) .register-field-icon {
    color: #34d399 !important;
}

body.theme-light .register-field-icon {
    color: #059669 !important;
}

.register-field-hint {
    font-size: 0.775rem;
    color: #94a3b8;
}

body.theme-light .register-field-hint {
    color: #64748b;
}

/* Input Groups for Register */
.register-input-group {
    border-radius: 12px;
}

.register-input-group .input-group-text {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    padding-left: 1rem;
    padding-right: 1rem;
    font-size: 1.05rem;
    transition: all 0.2s ease;
}

.register-input-group .form-control {
    border-radius: 0;
    padding: 0.7rem 0.85rem;
    font-size: 0.95rem;
}

.register-input-group .register-toggle-pw-btn {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    padding-left: 0.95rem;
    padding-right: 0.95rem;
    border-left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* Dark Theme Register Inputs */
body.theme-dark .register-input-group .input-group-text,
body:not(.theme-light) .register-input-group .input-group-text {
    background: rgba(15, 23, 42, 0.72) !important;
    border-color: rgba(148, 163, 184, 0.32) !important;
    color: #94a3b8 !important;
}

body.theme-dark .register-input-group .form-control,
body:not(.theme-light) .register-input-group .form-control {
    background: rgba(15, 23, 42, 0.88) !important;
    border-color: rgba(148, 163, 184, 0.32) !important;
    color: #f8fafc !important;
}

body.theme-dark .register-input-group .register-toggle-pw-btn,
body:not(.theme-light) .register-input-group .register-toggle-pw-btn {
    background: rgba(15, 23, 42, 0.72) !important;
    border-color: rgba(148, 163, 184, 0.32) !important;
    color: #94a3b8 !important;
}

body.theme-dark .register-input-group .register-toggle-pw-btn:hover,
body:not(.theme-light) .register-input-group .register-toggle-pw-btn:hover {
    background: rgba(30, 41, 59, 0.95) !important;
    border-color: #34d399 !important;
    color: #34d399 !important;
}

body.theme-dark .register-input-group:focus-within .input-group-text,
body:not(.theme-light) .register-input-group:focus-within .input-group-text {
    border-color: #34d399 !important;
    color: #34d399 !important;
}

body.theme-dark .register-input-group:focus-within .form-control,
body:not(.theme-light) .register-input-group:focus-within .form-control {
    border-color: #34d399 !important;
    box-shadow: 0 0 0 0.2rem rgba(52, 211, 153, 0.22) !important;
}

body.theme-dark .register-input-group:focus-within .register-toggle-pw-btn,
body:not(.theme-light) .register-input-group:focus-within .register-toggle-pw-btn {
    border-color: #34d399 !important;
}

/* Light Theme Register Inputs */
body.theme-light .register-input-group .input-group-text {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
}

body.theme-light .register-input-group .form-control {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.theme-light .register-input-group .register-toggle-pw-btn {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
}

body.theme-light .register-input-group .register-toggle-pw-btn:hover {
    background: #eef2f6 !important;
    border-color: #059669 !important;
    color: #059669 !important;
}

body.theme-light .register-input-group:focus-within .input-group-text {
    border-color: #059669 !important;
    color: #059669 !important;
}

body.theme-light .register-input-group:focus-within .form-control {
    border-color: #059669 !important;
    box-shadow: 0 0 0 0.2rem rgba(5, 150, 105, 0.16) !important;
}

body.theme-light .register-input-group:focus-within .register-toggle-pw-btn {
    border-color: #059669 !important;
}

/* Register Requirements Box & Grid */
body.theme-dark .register-reqs-box,
body:not(.theme-light) .register-reqs-box {
    background: rgba(15, 23, 42, 0.65) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
}

body.theme-light .register-reqs-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.register-reqs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 6px 8px;
}

.register-req-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.775rem;
    padding: 3px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

body.theme-dark .register-req-pill.is-met,
body:not(.theme-light) .register-req-pill.is-met {
    color: #34d399 !important;
}

body.theme-light .register-req-pill.is-met {
    color: #059669 !important;
}

.register-strength-progress {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    overflow: hidden;
}

.register-strength-progress .progress-bar {
    border-radius: 999px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Register Submit Button */
.register-submit-btn {
    min-height: 48px;
    border-radius: 12px;
    transition: var(--transition);
}

body.theme-dark .register-submit-btn,
body:not(.theme-light) .register-submit-btn {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    border: 1px solid #34d399 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35) !important;
}

body.theme-dark .register-submit-btn:hover:not(:disabled),
body:not(.theme-light) .register-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
    border-color: #6ee7b7 !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.48) !important;
    transform: translateY(-1px);
}

body.theme-light .register-submit-btn {
    background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
    border: 1px solid #047857 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25) !important;
}

body.theme-light .register-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    border-color: #047857 !important;
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35) !important;
    transform: translateY(-1px);
}

/* Register Cancel Button */
.register-cancel-btn {
    min-height: 42px;
    border-radius: 12px;
    transition: var(--transition);
}

body.theme-dark .register-cancel-btn,
body:not(.theme-light) .register-cancel-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    color: #cbd5e1 !important;
}

body.theme-dark .register-cancel-btn:hover:not(:disabled),
body:not(.theme-light) .register-cancel-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(226, 232, 240, 0.55) !important;
    color: #ffffff !important;
}

body.theme-light .register-cancel-btn {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
}

body.theme-light .register-cancel-btn:hover:not(:disabled) {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* Callout Box */
.register-login-callout {
    border-radius: 14px;
    transition: all 0.2s ease;
}

body.theme-dark .register-login-callout,
body:not(.theme-light) .register-login-callout {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
}

body.theme-light .register-login-callout {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.register-error-alert {
    animation: alertSlideIn 0.2s ease-out;
}

/* ==========================================================================
   Improved Client Profile Form Styling - Theme-Aware
   ========================================================================== */
.client-profile-card {
    border-radius: 16px !important;
    overflow: hidden;
    transition: all 0.25s ease;
}

body.theme-dark .client-profile-card,
body:not(.theme-light) .client-profile-card {
    background: linear-gradient(180deg, #131d31 0%, #0d1527 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
}

body.theme-light .client-profile-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08) !important;
}

.client-profile-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.theme-dark .client-profile-icon-badge,
body:not(.theme-light) .client-profile-icon-badge {
    background: rgba(56, 189, 248, 0.15) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

body.theme-light .client-profile-icon-badge {
    background: rgba(13, 43, 86, 0.08) !important;
    color: #0d2b56 !important;
    border: 1px solid rgba(13, 43, 86, 0.2) !important;
}

body.theme-dark .client-profile-card-title,
body:not(.theme-light) .client-profile-card-title {
    color: #f8fafc !important;
}

body.theme-light .client-profile-card-title {
    color: #0d2b56 !important;
}

body.theme-dark .client-form-field-icon,
body:not(.theme-light) .client-form-field-icon {
    color: #60a5fa !important;
}

body.theme-light .client-form-field-icon {
    color: #1d4f91 !important;
}

/* Input Groups for Client Profile */
.client-profile-input-group {
    border-radius: 10px;
}

.client-profile-input-group .input-group-text {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.client-profile-input-group .form-control,
.client-profile-input-group .form-select {
    border-radius: 0;
    padding: 0.6rem 0.8rem;
    font-size: 0.95rem;
}

body.theme-dark .client-profile-input-group .input-group-text,
body:not(.theme-light) .client-profile-input-group .input-group-text {
    background: rgba(15, 23, 42, 0.75) !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
    color: #94a3b8 !important;
}

body.theme-dark .client-profile-input-group .form-control,
body.theme-dark .client-profile-input-group .form-select,
body:not(.theme-light) .client-profile-input-group .form-control,
body:not(.theme-light) .client-profile-input-group .form-select {
    background: rgba(15, 23, 42, 0.85) !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
    color: #f8fafc !important;
}

body.theme-dark .client-profile-input-group:focus-within .input-group-text,
body:not(.theme-light) .client-profile-input-group:focus-within .input-group-text {
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
}

body.theme-dark .client-profile-input-group:focus-within .form-control,
body.theme-dark .client-profile-input-group:focus-within .form-select,
body:not(.theme-light) .client-profile-input-group:focus-within .form-control,
body:not(.theme-light) .client-profile-input-group:focus-within .form-select {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.2) !important;
}

body.theme-light .client-profile-input-group .input-group-text {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
}

body.theme-light .client-profile-input-group .form-control,
body.theme-light .client-profile-input-group .form-select {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.theme-light .client-profile-input-group:focus-within .input-group-text {
    border-color: #1d4f91 !important;
    color: #1d4f91 !important;
}

body.theme-light .client-profile-input-group:focus-within .form-control,
body.theme-light .client-profile-input-group:focus-within .form-select {
    border-color: #1d4f91 !important;
    box-shadow: 0 0 0 0.2rem rgba(29, 79, 145, 0.14) !important;
}

/* Save Button */
.client-profile-save-btn {
    border-radius: 10px;
    transition: var(--transition);
}

body.theme-dark .client-profile-save-btn,
body:not(.theme-light) .client-profile-save-btn {
    background: linear-gradient(135deg, #1d4f91 0%, #2563eb 100%) !important;
    border: 1px solid #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
}

body.theme-dark .client-profile-save-btn:hover,
body:not(.theme-light) .client-profile-save-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
    border-color: #60a5fa !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.48) !important;
    transform: translateY(-1px);
}

body.theme-light .client-profile-save-btn {
    background: linear-gradient(135deg, #0d2b56 0%, #1d4f91 100%) !important;
    border: 1px solid #0d2b56 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(13, 43, 86, 0.25) !important;
}

body.theme-light .client-profile-save-btn:hover {
    background: linear-gradient(135deg, #1d4f91 0%, #2a4d82 100%) !important;
    border-color: #1d4f91 !important;
    box-shadow: 0 6px 16px rgba(13, 43, 86, 0.32) !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   Client Panel News / Bulletin Bar
   ========================================================================== */
.client-news-bar-card {
    position: relative;
    border-radius: 12px;
    padding: 0.55rem 0.95rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-dark .client-news-bar-card,
body:not(.theme-light) .client-news-bar-card {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
    border: 1px solid rgba(59, 130, 246, 0.32);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.theme-light .client-news-bar-card {
    background: linear-gradient(90deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.client-news-pill {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.42rem 0.75rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
    white-space: nowrap;
}

.client-news-pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    animation: newsPulse 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes newsPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.85);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.client-news-track-wrapper {
    position: relative;
    mask-image: linear-gradient(to right, transparent 0%, black 2.5%, black 97.5%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 2.5%, black 97.5%, transparent 100%);
    cursor: default;
}

.client-news-ticker-content {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation: clientNewsMarquee 85s linear infinite;
    will-change: transform;
}

@keyframes clientNewsMarquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.client-news-track-wrapper:hover .client-news-ticker-content,
.client-news-track-wrapper.is-paused .client-news-ticker-content {
    animation-play-state: paused !important;
}

.client-news-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding-right: 0.75rem;
    font-size: 0.885rem;
}

.client-news-tag {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.client-news-title {
    font-weight: 700;
}

body.theme-dark .client-news-title,
body:not(.theme-light) .client-news-title {
    color: #4ade80 !important;
}

body.theme-light .client-news-title {
    color: #15803d !important;
}

.client-news-text {
    font-weight: 500;
}

body.theme-dark .client-news-text,
body:not(.theme-light) .client-news-text {
    color: #cbd5e1 !important;
}

body.theme-light .client-news-text {
    color: #334155 !important;
}

.client-news-separator {
    color: #64748b;
    margin: 0 0.65rem;
    font-size: 1.1rem;
    opacity: 0.6;
}

.client-news-ctrl-btn {
    border-radius: 6px;
    padding: 0.22rem 0.5rem;
    font-size: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: transparent;
    transition: all 0.2s ease;
}

body.theme-dark .client-news-ctrl-btn,
body:not(.theme-light) .client-news-ctrl-btn {
    color: #94a3b8;
}

body.theme-dark .client-news-ctrl-btn:hover,
body:not(.theme-light) .client-news-ctrl-btn:hover {
    color: #f8fafc;
    background: rgba(148, 163, 184, 0.2);
    border-color: #60a5fa;
}

body.theme-light .client-news-ctrl-btn {
    color: #475569;
}

body.theme-light .client-news-ctrl-btn:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.08);
    border-color: #94a3b8;
}

@media (max-width: 576px) {
    .client-news-pill {
        font-size: 0.65rem;
        padding: 0.35rem 0.55rem;
    }
    .client-news-item {
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   Visit Countdown Timer - Dark Theme Widget
   ========================================================================== */
.countdown-dark-widget {
    background: radial-gradient(circle at 50% 0%, #172338 0%, #0c1322 70%, #060b14 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    padding: 0.65rem 0.75rem !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    color: #f1f5f9 !important;
    position: relative;
    overflow: hidden;
    margin: 0.65rem 0 !important;
    transition: all 0.3s ease;
}

.countdown-dark-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), transparent);
}

/* Status variants */
.countdown-dark-widget.theme-normal {
    border-color: rgba(56, 189, 248, 0.3) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(56, 189, 248, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.countdown-dark-widget.theme-soon {
    border-color: rgba(245, 158, 11, 0.35) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(245, 158, 11, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    background: radial-gradient(circle at 50% 0%, #281a0c 0%, #140d06 70%, #090603 100%) !important;
}
.countdown-dark-widget.theme-soon::before {
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.6), transparent);
}

.countdown-dark-widget.theme-urgent {
    border-color: rgba(239, 68, 68, 0.4) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(239, 68, 68, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    background: radial-gradient(circle at 50% 0%, #2b1115 0%, #15090b 70%, #0a0405 100%) !important;
}
.countdown-dark-widget.theme-urgent::before {
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.7), transparent);
}

.countdown-dark-widget.theme-past {
    border-color: rgba(148, 163, 184, 0.15) !important;
    background: #090e18 !important;
    opacity: 0.88;
}
.countdown-dark-widget.theme-past::before {
    display: none;
}

/* Header bar inside countdown */
.countdown-dark-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.4rem;
    margin-bottom: 0.5rem;
}

.countdown-dark-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #94a3b8 !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.countdown-dark-widget.theme-normal .countdown-dark-title {
    color: #7dd3fc !important;
}
.countdown-dark-widget.theme-soon .countdown-dark-title {
    color: #fde68a !important;
}
.countdown-dark-widget.theme-urgent .countdown-dark-title {
    color: #fca5a5 !important;
}
.countdown-dark-widget.theme-past .countdown-dark-title {
    color: #94a3b8 !important;
}

/* Status badge pills in countdown */
.countdown-dark-pill {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    padding: 0.2rem 0.6rem !important;
    border-radius: 9999px !important;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

.countdown-dark-pill.badge-normal {
    background: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

.countdown-dark-pill.badge-soon {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

.countdown-dark-pill.badge-urgent {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
}

.countdown-dark-pill.badge-past {
    background: rgba(148, 163, 184, 0.12) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
}

/* Digits container & cards */
.countdown-dark-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    padding: 0.15rem 0;
}

.countdown-dark-tile {
    background: #060913 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    min-width: 52px;
    padding: 0.35rem 0.3rem 0.25rem 0.3rem;
    text-align: center;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.75), 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.countdown-dark-tile:hover {
    border-color: rgba(255, 255, 255, 0.22) !important;
    transform: translateY(-1px);
}

.countdown-dark-val {
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace !important;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    color: #ffffff !important;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.countdown-dark-val.sec {
    color: #38bdf8 !important;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.countdown-dark-widget.theme-soon .countdown-dark-val.sec {
    color: #fbbf24 !important;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.countdown-dark-widget.theme-urgent .countdown-dark-val.sec {
    color: #f87171 !important;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.65);
}

.countdown-dark-lbl {
    font-size: 0.58rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #94a3b8 !important;
    margin-top: 0.22rem;
    line-height: 1;
}

.countdown-dark-colon {
    font-size: 1.15rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35) !important;
    line-height: 1;
    margin-bottom: 0.35rem;
    animation: countdownColonPulse 1s infinite alternate;
}

@keyframes countdownColonPulse {
    0% { opacity: 0.35; transform: scale(0.95); }
    100% { opacity: 0.95; transform: scale(1.05); }
}

.countdown-dark-passed {
    padding: 0.35rem 0;
    text-align: center;
    color: #94a3b8 !important;
    font-size: 0.82rem;
    font-weight: 600;
}

/* ==========================================================================
   Time Slot (Max 3) Dropdown - Dark Theme Styles
   ========================================================================== */
.time-slot-select {
    cursor: pointer;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-repeat: no-repeat !important;
    background-position: right 0.85rem center !important;
    background-size: 16px 12px !important;
    padding-right: 2.35rem !important;
    transition: all 0.2s ease;
}

body.theme-dark .time-slot-select,
body:not(.theme-light) .time-slot-select {
    background-color: #0c1424;
    color: #f8fafc;
    -webkit-text-fill-color: currentColor !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    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='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M2.5 5.5l5.5 5.5 5.5-5.5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.85rem center !important;
    background-size: 16px 12px !important;
    padding-right: 2.35rem !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

body.theme-dark .time-slot-select:hover,
body.theme-dark .time-slot-select:focus,
body:not(.theme-light) .time-slot-select:hover,
body:not(.theme-light) .time-slot-select:focus {
    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='%2338bdf8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6' d='M2.5 5.5l5.5 5.5 5.5-5.5'/%3E%3C/svg%3E") !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), 0 4px 12px rgba(0, 0, 0, 0.45) !important;
}

/* Light mode for time-slot-select arrow */
body.theme-light .time-slot-select {
    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='%231e293b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M2.5 5.5l5.5 5.5 5.5-5.5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.85rem center !important;
    background-size: 16px 12px !important;
    padding-right: 2.35rem !important;
}

/* Options list styling inside the dropdown in dark theme */
body.theme-dark .time-slot-select option,
body:not(.theme-light) .time-slot-select option {
    background-color: #0c1424;
    color: #f8fafc;
    -webkit-text-fill-color: currentColor !important;
    padding: 8px 12px;
}

body.theme-dark .time-slot-select option:disabled,
body:not(.theme-light) .time-slot-select option:disabled {
    opacity: 0.65;
}

/* ==========================================================================
   Gate Pass Modal & Preview Sheet
   ========================================================================== */

.gatepass-modal-backdrop {
    background-color: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(6px);
    z-index: 2050;
}

.gatepass-preview-over-details {
    animation: fadeIn 0.2s ease-in-out;
}

.gatepass-dialog {
    max-width: 860px;
}

.gatepass-modal-card {
    border-radius: 1rem;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

.gatepass-modal-card .modal-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.gatepass-modal-card .modal-footer {
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.gatepass-modal-card .modal-body {
    background-color: #f1f5f9;
}

.gatepass-header-icon {
    width: 42px;
    height: 42px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.gatepass-sheet {
    background-color: #ffffff !important;
    color: #1e293b;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

.gatepass-sheet-logo {
    max-height: 64px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
    border-radius: 8px;
    transition: var(--transition);
}

/* --------------------------------------------------------------------------
   Gate Pass Dark Theme Adaptations
   -------------------------------------------------------------------------- */

body.theme-dark .gatepass-modal-card,
body:not(.theme-light) .gatepass-modal-card {
    background-color: #0f172a !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2), 0 25px 60px rgba(0, 0, 0, 0.8) !important;
    color: #f8fafc !important;
}

body.theme-dark .gatepass-modal-card .modal-header,
body:not(.theme-light) .gatepass-modal-card .modal-header {
    background-color: #0c1322 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
    color: #f8fafc !important;
}

body.theme-dark .gatepass-modal-card .modal-footer,
body:not(.theme-light) .gatepass-modal-card .modal-footer {
    background-color: #0c1322 !important;
    border-top: 1px solid rgba(148, 163, 184, 0.18) !important;
    color: #f8fafc !important;
}

body.theme-dark .gatepass-modal-card .modal-body,
body:not(.theme-light) .gatepass-modal-card .modal-body {
    background-color: #080d1a !important;
    color: #f8fafc !important;
}

body.theme-dark .gatepass-header-icon,
body:not(.theme-light) .gatepass-header-icon {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    box-shadow: none !important;
}

body.theme-dark .gatepass-sheet-logo,
body:not(.theme-light) .gatepass-sheet-logo {
    background: rgba(255, 255, 255, 0.06);
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

body.theme-dark .gatepass-sheet,
body:not(.theme-light) .gatepass-sheet {
    background-color: #0f1a2e !important;
    color: #f1f5f9 !important;
    border-color: rgba(56, 189, 248, 0.28) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55), 0 0 20px rgba(56, 189, 248, 0.08) !important;
}

body.theme-dark .gatepass-sheet .text-dark,
body:not(.theme-light) .gatepass-sheet .text-dark,
body.theme-dark .gatepass-sheet h3,
body:not(.theme-light) .gatepass-sheet h3,
body.theme-dark .gatepass-sheet h6,
body:not(.theme-light) .gatepass-sheet h6 {
    color: #f8fafc !important;
}

body.theme-dark .gatepass-sheet .text-secondary,
body:not(.theme-light) .gatepass-sheet .text-secondary {
    color: #94a3b8 !important;
}

body.theme-dark .gatepass-sheet .text-muted,
body.theme-dark .gatepass-sheet small.text-muted,
body.theme-dark .gatepass-sheet p.text-muted,
body:not(.theme-light) .gatepass-sheet .text-muted,
body:not(.theme-light) .gatepass-sheet small.text-muted,
body:not(.theme-light) .gatepass-sheet p.text-muted {
    color: #94a3b8 !important;
}

body.theme-dark .gatepass-sheet .text-primary,
body:not(.theme-light) .gatepass-sheet .text-primary {
    color: #38bdf8 !important;
}

body.theme-dark .gatepass-sheet .border-bottom,
body.theme-dark .gatepass-sheet .border-top,
body:not(.theme-light) .gatepass-sheet .border-bottom,
body:not(.theme-light) .gatepass-sheet .border-top {
    border-color: rgba(148, 163, 184, 0.2) !important;
}

body.theme-dark .gatepass-sheet .table,
body:not(.theme-light) .gatepass-sheet .table {
    --bs-table-bg: transparent;
    --bs-table-color: #f1f5f9;
    --bs-table-border-color: rgba(148, 163, 184, 0.2);
    color: #f1f5f9 !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
}

body.theme-dark .gatepass-sheet .table th,
body.theme-dark .gatepass-sheet .table td,
body:not(.theme-light) .gatepass-sheet .table th,
body:not(.theme-light) .gatepass-sheet .table td {
    background-color: transparent !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: #f1f5f9 !important;
}

body.theme-dark .gatepass-sheet .table th.bg-light,
body:not(.theme-light) .gatepass-sheet .table th.bg-light {
    background-color: #172641 !important;
    color: #94a3b8 !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
}

body.theme-dark .gatepass-sheet .table thead.table-light th,
body:not(.theme-light) .gatepass-sheet .table thead.table-light th {
    background-color: #172641 !important;
    color: #cbd5e1 !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
}

body.theme-dark .gatepass-sheet .table th.table-primary,
body.theme-dark .gatepass-sheet .table td.table-primary,
body:not(.theme-light) .gatepass-sheet .table th.table-primary,
body:not(.theme-light) .gatepass-sheet .table td.table-primary {
    background-color: rgba(14, 165, 233, 0.16) !important;
    color: #38bdf8 !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
}

body.theme-dark .gatepass-sheet .table td.text-primary,
body:not(.theme-light) .gatepass-sheet .table td.text-primary {
    color: #38bdf8 !important;
}

body.theme-dark .gatepass-sheet .badge.bg-info-subtle,
body:not(.theme-light) .gatepass-sheet .badge.bg-info-subtle {
    background-color: rgba(14, 165, 233, 0.18) !important;
    color: #38bdf8 !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
}

body.theme-dark .gatepass-sheet .border-dark,
body:not(.theme-light) .gatepass-sheet .border-dark {
    border-color: #64748b !important;
}

/* ==========================================================================
   Client Booking History & Details Modal Styles
   ========================================================================== */
.client-history-modal-backdrop {
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(6px);
    z-index: 2050;
}

.client-history-dialog {
    max-width: 900px;
}

.client-history-modal-card {
    border-radius: 1rem;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
}

.client-history-modal-card .modal-header {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.client-history-modal-card .nav-tabs .nav-link {
    font-weight: 600;
    font-size: 0.9rem;
    color: #64748b;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1.25rem;
    background: transparent;
    transition: all 0.2s ease;
}

.client-history-modal-card .nav-tabs .nav-link.active {
    color: #0284c7;
    background: transparent;
    border-bottom: 3px solid #0284c7;
}

.client-history-modal-card .nav-tabs .nav-link:hover:not(.active) {
    color: #0f172a;
    border-bottom: 3px solid #cbd5e1;
}

.client-stat-tile {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.client-stat-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.client-stat-tile-val {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.client-stat-tile-lbl {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #64748b;
}

/* ==========================================================================
   Bus Plate Badge (Theme-adaptive: Light & Dark)
   ========================================================================== */
.bus-plate-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.75rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-weight: 800;
    font-size: 0.88rem;
    border-radius: 6px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

body.theme-light .bus-plate-badge {
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1.5px solid #334155 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12), inset 0 1px 0 #ffffff !important;
}

body.theme-dark .bus-plate-badge,
body:not(.theme-light) .bus-plate-badge {
    background: #060b18 !important;
    color: #38bdf8 !important;
    border: 1.5px solid rgba(56, 189, 248, 0.6) !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25), inset 0 0 6px rgba(56, 189, 248, 0.12) !important;
}

/* ==========================================================================
   NIC Code Badge (Driver, Helper, Teacher, Parent)
   ========================================================================== */
.nic-code-badge {
    display: inline-flex;
    align-items: center;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 5px;
    letter-spacing: 0.4px;
    transition: all 0.2s ease;
}

body.theme-light .nic-code-badge {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
    box-shadow: 0 1px 2px rgba(29, 78, 216, 0.08) !important;
}

body.theme-dark .nic-code-badge,
body:not(.theme-light) .nic-code-badge {
    background: rgba(14, 165, 233, 0.16) !important;
    color: #7dd3fc !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.18) !important;
}

/* ==========================================================================
   Theme-adaptive Text & Micro-components
   ========================================================================== */
.client-driver-name {
    transition: color 0.2s ease;
}

body.theme-light .client-driver-name {
    color: #0f172a !important;
}

body.theme-dark .client-driver-name,
body:not(.theme-light) .client-driver-name {
    color: #f8fafc !important;
}

.client-text-muted {
    transition: color 0.2s ease;
}

body.theme-light .client-text-muted {
    color: #64748b !important;
}

body.theme-dark .client-text-muted,
body:not(.theme-light) .client-text-muted {
    color: #94a3b8 !important;
}

/* Slot Badge */
.client-slot-badge {
    display: inline-flex;
    align-items: center;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.74rem;
    border-radius: 5px;
    padding: 0.22rem 0.55rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

body.theme-light .client-slot-badge {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

body.theme-dark .client-slot-badge,
body:not(.theme-light) .client-slot-badge {
    background: #172641 !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

/* Index Pill Badge (#1, #2...) */
.client-index-badge {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

body.theme-light .client-index-badge {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

body.theme-dark .client-index-badge,
body:not(.theme-light) .client-index-badge {
    background: #1e293b !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
}

/* ==========================================================================
   Client Table Cards (History & Modal Buses)
   ========================================================================== */
body.theme-light .client-table-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body.theme-dark .client-table-card,
body:not(.theme-light) .client-table-card {
    background: #0f172a !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
}

body.theme-light .client-table-card table thead th {
    background: #f8fafc !important;
    color: #334155 !important;
    border-color: #e2e8f0 !important;
}

body.theme-dark .client-table-card table thead th,
body:not(.theme-light) .client-table-card table thead th {
    background: #172641 !important;
    color: #cbd5e1 !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
}

body.theme-light .client-table-card table tbody td {
    color: #1e293b !important;
    border-color: #f1f5f9 !important;
}

body.theme-dark .client-table-card table tbody td,
body:not(.theme-light) .client-table-card table tbody td {
    color: #f1f5f9 !important;
    border-color: rgba(148, 163, 184, 0.15) !important;
}

/* ==========================================================================
   Client Detail Cards in Modal (Schedule, Coordinator, Profile)
   ========================================================================== */
body.theme-light .client-detail-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body.theme-dark .client-detail-card,
body:not(.theme-light) .client-detail-card {
    background: #131f37 !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
}

body.theme-light .client-detail-card-header {
    background: #f8fafc !important;
    color: #475569 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

body.theme-dark .client-detail-card-header,
body:not(.theme-light) .client-detail-card-header {
    background: #172641 !important;
    color: #cbd5e1 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25) !important;
}

body.theme-light .client-detail-card li.border-bottom {
    border-bottom-color: #f1f5f9 !important;
}

body.theme-dark .client-detail-card li.border-bottom,
body:not(.theme-light) .client-detail-card li.border-bottom {
    border-bottom-color: rgba(148, 163, 184, 0.18) !important;
}

/* List group items inside participants tab */
body.theme-light .client-list-item {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #f1f5f9 !important;
}

body.theme-dark .client-list-item,
body:not(.theme-light) .client-list-item {
    background: #131f37 !important;
    color: #f8fafc !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
}

/* ==========================================================================
   Modal Sub-Navigation Bar
   ========================================================================== */
body.theme-light .client-history-modal-subnav {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

body.theme-dark .client-history-modal-subnav,
body:not(.theme-light) .client-history-modal-subnav {
    background: #090e1a !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
}

/* ==========================================================================
   Filter Card in History Toolbar
   ========================================================================== */
body.theme-light .client-filter-card {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

body.theme-light .client-filter-card .input-group-text {
    background-color: #ffffff !important;
    color: #64748b !important;
    border-color: #cbd5e1 !important;
}

body.theme-light .client-filter-card .form-control,
body.theme-light .client-filter-card .form-select {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

body.theme-dark .client-filter-card,
body:not(.theme-light) .client-filter-card {
    background: #131f37 !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
}

body.theme-dark .client-filter-card .input-group-text,
body:not(.theme-light) .client-filter-card .input-group-text {
    background-color: #0f172a !important;
    color: #94a3b8 !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
}

body.theme-dark .client-filter-card .form-control,
body.theme-dark .client-filter-card .form-select,
body:not(.theme-light) .client-filter-card .form-control,
body:not(.theme-light) .client-filter-card .form-select {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
}

/* ==========================================================================
   Stat Tile in Modal & History
   ========================================================================== */
body.theme-light .client-stat-tile {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

body.theme-dark .client-stat-tile,
body:not(.theme-light) .client-stat-tile {
    background: #131f37 !important;
    border-color: rgba(56, 189, 248, 0.25) !important;
    color: #f8fafc !important;
}

.history-table-row {
    transition: background-color 0.15s ease;
}

body.theme-light .history-table-row:hover {
    background-color: rgba(2, 132, 199, 0.05) !important;
}

body.theme-dark .history-table-row:hover,
body:not(.theme-light) .history-table-row:hover {
    background-color: rgba(56, 189, 248, 0.08) !important;
}

/* ==========================================================================
   Modal Card Backgrounds & Theming
   ========================================================================== */
body.theme-light .client-history-modal-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25) !important;
    color: #0f172a !important;
}

body.theme-light .client-history-modal-card .modal-header {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body.theme-light .client-history-modal-card .modal-body {
    background: #ffffff !important;
    color: #0f172a !important;
}

body.theme-light .client-history-modal-card .modal-footer {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

body.theme-light .client-history-modal-card .nav-tabs {
    border-bottom-color: #e2e8f0 !important;
}

body.theme-light .client-history-modal-card .nav-tabs .nav-link {
    color: #475569 !important;
}

body.theme-light .client-history-modal-card .nav-tabs .nav-link:hover {
    color: #0284c7 !important;
}

body.theme-light .client-history-modal-card .nav-tabs .nav-link.active {
    color: #0284c7 !important;
    border-bottom: 3px solid #0284c7 !important;
}

/* Modal Dark Theme */
body.theme-dark .client-history-modal-card,
body:not(.theme-light) .client-history-modal-card {
    background: #0f172a !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2), 0 25px 60px rgba(0, 0, 0, 0.8) !important;
    color: #f8fafc !important;
}

body.theme-dark .client-history-modal-card .modal-header,
body:not(.theme-light) .client-history-modal-card .modal-header {
    background: linear-gradient(135deg, #0c4a6e 0%, #082f49 100%) !important;
    border-bottom: 1px solid rgba(56, 189, 248, 0.3) !important;
}

body.theme-dark .client-history-modal-card .modal-body,
body:not(.theme-light) .client-history-modal-card .modal-body {
    background: #0f172a !important;
    color: #f1f5f9 !important;
}

body.theme-dark .client-history-modal-card .modal-footer,
body:not(.theme-light) .client-history-modal-card .modal-footer {
    background: #0c1322 !important;
    border-top: 1px solid rgba(148, 163, 184, 0.2) !important;
}

body.theme-dark .client-history-modal-card .nav-tabs,
body:not(.theme-light) .client-history-modal-card .nav-tabs {
    border-bottom-color: rgba(148, 163, 184, 0.2) !important;
}

body.theme-dark .client-history-modal-card .nav-tabs .nav-link,
body:not(.theme-light) .client-history-modal-card .nav-tabs .nav-link {
    color: #94a3b8 !important;
}

body.theme-dark .client-history-modal-card .nav-tabs .nav-link:hover,
body:not(.theme-light) .client-history-modal-card .nav-tabs .nav-link:hover {
    color: #38bdf8 !important;
}

body.theme-dark .client-history-modal-card .nav-tabs .nav-link.active,
body:not(.theme-light) .client-history-modal-card .nav-tabs .nav-link.active {
    color: #38bdf8 !important;
    border-bottom: 3px solid #38bdf8 !important;
}

/* Modal Alerts in Dark Theme */
body.theme-dark .client-history-modal-card .alert-danger,
body:not(.theme-light) .client-history-modal-card .alert-danger {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
}

body.theme-dark .client-history-modal-card .alert-success,
body:not(.theme-light) .client-history-modal-card .alert-success {
    background-color: rgba(34, 197, 94, 0.15) !important;
    color: #86efac !important;
    border-color: rgba(34, 197, 94, 0.35) !important;
}

body.theme-dark .client-history-modal-card .alert-secondary,
body:not(.theme-light) .client-history-modal-card .alert-secondary {
    background-color: rgba(148, 163, 184, 0.15) !important;
    color: #cbd5e1 !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
}

body.theme-dark .client-history-modal-card .alert-dark,
body:not(.theme-light) .client-history-modal-card .alert-dark {
    background-color: rgba(30, 41, 59, 0.7) !important;
    color: #e2e8f0 !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
}

body.theme-dark .client-history-modal-card .alert-primary,
body:not(.theme-light) .client-history-modal-card .alert-primary {
    background-color: rgba(14, 165, 233, 0.15) !important;
    color: #7dd3fc !important;
    border-color: rgba(14, 165, 233, 0.35) !important;
}

/* ==========================================================================
   Subtle Badges Theming (Male/Female, Counts, Statuses)
   ========================================================================== */
body.theme-light .badge.bg-primary-subtle {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border-color: #bae6fd !important;
}

body.theme-light .badge.bg-danger-subtle {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
    border-color: #fecaca !important;
}

body.theme-light .badge.bg-success-subtle {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    border-color: #bbf7d0 !important;
}

body.theme-light .badge.bg-info-subtle {
    background-color: #e0f2fe !important;
    color: #0284c7 !important;
    border-color: #bae6fd !important;
}

body.theme-dark .badge.bg-primary-subtle,
body:not(.theme-light) .badge.bg-primary-subtle {
    background-color: rgba(14, 165, 233, 0.18) !important;
    color: #38bdf8 !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
}

body.theme-dark .badge.bg-danger-subtle,
body:not(.theme-light) .badge.bg-danger-subtle {
    background-color: rgba(239, 68, 68, 0.18) !important;
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
}

body.theme-dark .badge.bg-success-subtle,
body:not(.theme-light) .badge.bg-success-subtle {
    background-color: rgba(34, 197, 94, 0.18) !important;
    color: #4ade80 !important;
    border-color: rgba(34, 197, 94, 0.35) !important;
}

body.theme-dark .badge.bg-warning-subtle,
body:not(.theme-light) .badge.bg-warning-subtle {
    background-color: rgba(234, 179, 8, 0.18) !important;
    color: #facc15 !important;
    border-color: rgba(234, 179, 8, 0.35) !important;
}

body.theme-dark .badge.bg-info-subtle,
body:not(.theme-light) .badge.bg-info-subtle {
    background-color: rgba(6, 182, 212, 0.18) !important;
    color: #22d3ee !important;
    border-color: rgba(6, 182, 212, 0.35) !important;
}

body.theme-dark .badge.bg-dark,
body:not(.theme-light) .badge.bg-dark {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
}

/* ==========================================================================
   Pagination Theming in Dark Mode
   ========================================================================== */
body.theme-dark .pagination .page-link,
body:not(.theme-light) .pagination .page-link {
    background-color: #0f172a !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
    color: #94a3b8 !important;
}

body.theme-dark .pagination .page-item.active .page-link,
body:not(.theme-light) .pagination .page-item.active .page-link {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
}

body.theme-dark .pagination .page-item.disabled .page-link,
body:not(.theme-light) .pagination .page-item.disabled .page-link {
    background-color: #090e1a !important;
    border-color: rgba(148, 163, 184, 0.15) !important;
    color: #475569 !important;
}



