/* Custom styles for Procurement Management Portal - Liquid Glass theme */

:root {
    --primary-color: #4f46e5;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;

    /* Accent */
    --accent-1: #4f46e5;
    --accent-2: #7c3aed;
    --accent-dark: #3730a3;
    --accent-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --accent-glass: linear-gradient(135deg, rgba(79, 70, 229, 0.82) 0%, rgba(124, 58, 237, 0.82) 100%);

    /* Liquid glass material (light) */
    --lg-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.66) 0%, rgba(255, 255, 255, 0.46) 100%);
    --lg-bg-strong: linear-gradient(145deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.72) 100%);
    --lg-blur: blur(24px) saturate(185%) brightness(1.04);
    --lg-border: rgba(255, 255, 255, 0.55);
    --lg-shadow:
        0 12px 40px rgba(15, 23, 42, 0.24),
        0 2px 6px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        inset 0 -1px 0 rgba(255, 255, 255, 0.22),
        inset 0 0 24px rgba(255, 255, 255, 0.18);
    --lg-shadow-hover:
        0 18px 52px rgba(15, 23, 42, 0.3),
        0 2px 6px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(255, 255, 255, 0.25),
        inset 0 0 28px rgba(255, 255, 255, 0.22);

    /* Liquid glass material (dark tint - navbar, sidebar) */
    --lg-dark-bg: linear-gradient(145deg, rgba(30, 27, 75, 0.42) 0%, rgba(15, 23, 42, 0.52) 100%);
    --lg-dark-shadow:
        0 12px 40px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06),
        inset 0 0 24px rgba(255, 255, 255, 0.05);

    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --text-main: #1f2937;
    --radius: 20px;

    /* Bootstrap overrides so every component uses the same accent and rounded shapes */
    --bs-primary: #4f46e5;
    --bs-primary-rgb: 79, 70, 229;
    --bs-link-color: #4f46e5;
    --bs-link-color-rgb: 79, 70, 229;
    --bs-link-hover-color: #3730a3;
    --bs-link-hover-color-rgb: 55, 48, 163;
    --bs-border-radius: 12px;
    --bs-border-radius-sm: 10px;
    --bs-border-radius-lg: 16px;
    --bs-body-font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Page background ---------- */
html {
    background: #1e1b4b;
}

body {
    font-family: var(--bs-body-font-family);
    background: transparent;
    color: var(--text-main);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    z-index: -2;
    background: #1e1b4b url('../img/page-bg.webp') center / cover no-repeat;
}

body::after {
    z-index: -1;
    background:
        radial-gradient(60% 50% at 15% 10%, rgba(124, 58, 237, 0.18) 0%, transparent 70%),
        radial-gradient(50% 45% at 90% 85%, rgba(79, 70, 229, 0.16) 0%, transparent 70%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.28) 0%, rgba(15, 23, 42, 0.08) 45%, rgba(15, 23, 42, 0.4) 100%);
}

body.auth-page::before {
    background-image: url('../img/login-bg.webp');
}

body.auth-page::after {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.02) 0%, rgba(15, 23, 42, 0.22) 100%);
}

@media (min-width: 1921px), (min-width: 1200px) and (min-resolution: 1.5dppx) {
    body::before { background-image: url('../img/page-bg-4k.webp'); }
    body.auth-page::before { background-image: url('../img/login-bg-4k.webp'); }
}

/* ---------- Liquid glass surfaces ---------- */
.card,
.modal-content,
.glass,
.alert,
.dropdown-menu,
main > .border-bottom:first-child {
    background: var(--lg-bg);
    -webkit-backdrop-filter: var(--lg-blur);
    backdrop-filter: var(--lg-blur);
    border: 1px solid var(--lg-border);
    box-shadow: var(--lg-shadow);
}

/* Specular rim: bright top-left and bottom-right edges like light hitting curved glass */
.card::before,
.modal-content::before,
.glass::before,
.alert::before,
.dropdown-menu::before,
.navbar.glass-nav::before,
.sidebar::before,
main > .border-bottom:first-child::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.15) 30%,
        rgba(255, 255, 255, 0) 50%,
        rgba(255, 255, 255, 0.12) 70%,
        rgba(255, 255, 255, 0.75) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
}

/* Surface sheen: soft light reflection behind the content */
.card::after,
.modal-content::after,
.glass::after,
main > .border-bottom:first-child::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(120% 70% at 0% 0%, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0) 55%),
        radial-gradient(90% 60% at 100% 100%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
    z-index: -1;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .card,
    .modal-content,
    .glass,
    .alert,
    .dropdown-menu,
    main > .border-bottom:first-child {
        background: rgba(255, 255, 255, 0.92);
    }
}

@media (prefers-reduced-transparency: reduce) {
    .card,
    .modal-content,
    .glass,
    .dropdown-menu,
    main > .border-bottom:first-child {
        background: rgba(255, 255, 255, 0.94);
    }
}

/* ---------- Cards ---------- */
.card {
    border-radius: var(--radius);
    transition: box-shadow 0.35s ease, transform 0.45s var(--spring);
}

.card:hover {
    box-shadow: var(--lg-shadow-hover);
}

.card-header {
    background: rgba(255, 255, 255, 0.22);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.7rem 1.1rem;
    font-weight: 600;
}

.card-header:first-child {
    border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}

.card-header .card-title,
.card-header h5,
.card-header h6 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.1px;
}

.card-body {
    padding: 1rem 1.1rem;
}

.card-footer {
    background: rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.card-footer:last-child {
    border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px);
}

.card.bg-light,
.bg-light {
    background-color: rgba(248, 249, 250, 0.55) !important;
}

/* Inline white card bodies (dashboard charts) blend into the glass */
.card-body[style*="background: white"] {
    background: rgba(255, 255, 255, 0.7) !important;
    border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px) !important;
}

.border-left-primary {
    border-left: 0.25rem solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 0.25rem solid var(--success-color) !important;
}

.border-left-info {
    border-left: 0.25rem solid var(--info-color) !important;
}

.border-left-warning {
    border-left: 0.25rem solid var(--warning-color) !important;
}

/* ---------- Page title bar ---------- */
main > .border-bottom:first-child {
    position: relative;
    z-index: 20;
    margin-top: 1rem;
    margin-bottom: 1rem !important;
    padding: 0.65rem 1.1rem !important;
    border-radius: var(--radius);
    border-bottom: 1px solid var(--lg-border) !important;
}

main > .border-bottom:first-child h1,
main > .border-bottom:first-child .h2 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin: 0;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

main > .border-bottom:first-child .btn-toolbar {
    margin-bottom: 0 !important;
}

main {
    padding-bottom: 1.5rem;
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
    border: 1px solid rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: background-color 0.2s, box-shadow 0.25s, border-color 0.2s;
}

.form-control {
    padding: 0.45rem 0.8rem;
}

.form-control-sm {
    padding: 0.25rem 0.55rem;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(255, 255, 255, 0.92);
    border-color: rgba(79, 70, 229, 0.6);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.16), inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.form-check-input {
    background-color: rgba(255, 255, 255, 0.75);
    border-color: rgba(15, 23, 42, 0.2);
}

.form-check-input:checked {
    background-color: var(--accent-1);
    border-color: var(--accent-1);
}

.form-check-input:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.16);
}

.input-group-text {
    background-color: rgba(255, 255, 255, 0.45);
    border-color: rgba(255, 255, 255, 0.7);
    color: var(--accent-1);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.3rem;
}

/* ---------- Buttons (pill shaped) ---------- */
.btn {
    --bs-btn-border-radius: 999px;
    --bs-btn-padding-x: 1.05rem;
    --bs-btn-padding-y: 0.42rem;
    font-weight: 500;
    transition: transform 0.35s var(--spring), box-shadow 0.25s ease, background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-sm {
    --bs-btn-padding-x: 0.7rem;
    --bs-btn-padding-y: 0.25rem;
}

.btn-lg {
    --bs-btn-padding-x: 1.4rem;
    --bs-btn-padding-y: 0.62rem;
}

.btn:hover {
    transform: translateY(-1px) scale(1.02);
}

.btn:active {
    transform: scale(0.97);
}

.input-group .btn {
    --bs-btn-border-radius: var(--bs-border-radius);
}

.btn-primary {
    --bs-btn-bg: #4f46e5;
    --bs-btn-border-color: rgba(255, 255, 255, 0.25);
    --bs-btn-hover-bg: #4338ca;
    --bs-btn-hover-border-color: rgba(255, 255, 255, 0.35);
    --bs-btn-active-bg: #3730a3;
    --bs-btn-active-border-color: transparent;
    --bs-btn-disabled-bg: #4f46e5;
    --bs-btn-disabled-border-color: transparent;
    --bs-btn-focus-shadow-rgb: 79, 70, 229;
    background-image: var(--accent-grad);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -2px 6px rgba(55, 48, 163, 0.35);
}

.btn-primary:hover {
    background-image: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 6px rgba(55, 48, 163, 0.35);
}

.btn-secondary {
    --bs-btn-bg: rgba(100, 116, 139, 0.75);
    --bs-btn-border-color: rgba(255, 255, 255, 0.35);
    --bs-btn-hover-bg: rgba(71, 85, 105, 0.85);
    --bs-btn-hover-border-color: rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-outline-primary {
    --bs-btn-color: #4f46e5;
    --bs-btn-border-color: rgba(79, 70, 229, 0.55);
    --bs-btn-hover-bg: #4f46e5;
    --bs-btn-hover-border-color: #4f46e5;
    --bs-btn-active-bg: #4338ca;
    --bs-btn-active-border-color: #4338ca;
    --bs-btn-focus-shadow-rgb: 79, 70, 229;
}

/* Outline buttons become small glass pills */
.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-info,
.btn-outline-warning,
.btn-outline-dark {
    background-color: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    backdrop-filter: blur(8px) saturate(160%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 3px rgba(15, 23, 42, 0.08);
}

.btn-outline-secondary:hover,
.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-danger:hover,
.btn-outline-info:hover,
.btn-outline-warning:hover,
.btn-outline-dark:hover {
    background-color: var(--bs-btn-hover-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 16px rgba(15, 23, 42, 0.18);
}

/* ---------- Pagination (glass pill group) ---------- */
.pagination {
    --bs-pagination-color: #4f46e5;
    --bs-pagination-bg: rgba(255, 255, 255, 0.55);
    --bs-pagination-border-color: rgba(255, 255, 255, 0.7);
    --bs-pagination-hover-color: #3730a3;
    --bs-pagination-hover-bg: rgba(255, 255, 255, 0.9);
    --bs-pagination-hover-border-color: rgba(255, 255, 255, 0.8);
    --bs-pagination-active-bg: #4f46e5;
    --bs-pagination-active-border-color: #4f46e5;
    --bs-pagination-disabled-bg: rgba(255, 255, 255, 0.35);
    --bs-pagination-focus-box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.16);
    --bs-pagination-border-radius: 999px;
    --bs-pagination-border-radius-sm: 999px;
}

.page-item.active .page-link {
    background-image: var(--accent-grad);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* ---------- Tables ---------- */
.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(79, 70, 229, 0.07);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.table thead tr {
    background: var(--accent-glass);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.table thead th {
    --bs-table-bg: transparent;
    background-color: transparent;
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.4px;
    padding: 0.55rem 0.5rem;
    white-space: nowrap;
}

.table tbody td {
    border-color: rgba(255, 255, 255, 0.45);
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.35);
}

/* ---------- Badges (pills) ---------- */
.badge {
    font-size: 0.72rem;
    padding: 0.38em 0.75em;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Status Colors */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }

/* Respect Bootstrap's .bg-opacity-* helpers */
.bg-primary { background-color: rgba(79, 70, 229, var(--bs-bg-opacity, 1)) !important; }
.bg-success { background-color: rgba(40, 167, 69, var(--bs-bg-opacity, 1)) !important; }
.bg-danger { background-color: rgba(220, 53, 69, var(--bs-bg-opacity, 1)) !important; }
.bg-warning { background-color: rgba(255, 193, 7, var(--bs-bg-opacity, 1)) !important; }
.bg-info { background-color: rgba(23, 162, 184, var(--bs-bg-opacity, 1)) !important; }

/* ---------- Top bar (floating liquid glass) ---------- */
.navbar.glass-nav {
    background: var(--lg-dark-bg) !important;
    -webkit-backdrop-filter: blur(26px) saturate(190%);
    backdrop-filter: blur(26px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--lg-dark-shadow);
    min-height: 56px;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.2px;
}

.navbar-brand i {
    background: var(--accent-grad);
    color: #fff;
    border-radius: 10px;
    padding: 0.38rem;
    font-size: 0.9rem;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.navbar-dark .navbar-nav .nav-link {
    font-size: 0.88rem;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.85);
    transition: background-color 0.2s, color 0.2s, transform 0.35s var(--spring);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus,
.navbar-dark .navbar-nav .nav-link.show {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ---------- Dropdowns ---------- */
.dropdown-menu {
    background: var(--lg-bg-strong);
    border-radius: 16px;
    padding: 0.35rem;
    font-size: 0.9rem;
    overflow: hidden;
}

.dropdown-item {
    border-radius: 10px;
    padding: 0.45rem 0.8rem;
    position: relative;
    z-index: 3;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(79, 70, 229, 0.12);
    color: var(--accent-dark);
}

.dropdown-item:active {
    background: var(--accent-1);
    color: #fff;
}

/* Page Headers */
.page-header {
    background: var(--accent-grad);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 15px 15px;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* ---------- Alerts (tinted liquid glass) ---------- */
.alert {
    border-radius: 16px;
    padding: 0.75rem 1.1rem;
}

.alert-success {
    background: linear-gradient(145deg, rgba(236, 253, 245, 0.88), rgba(209, 250, 229, 0.7));
    color: #166534;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(145deg, rgba(254, 242, 242, 0.9), rgba(254, 226, 226, 0.72));
    color: #b91c1c;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: linear-gradient(145deg, rgba(255, 251, 235, 0.9), rgba(254, 243, 199, 0.72));
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: linear-gradient(145deg, rgba(236, 254, 255, 0.9), rgba(207, 250, 254, 0.72));
    color: #0e7490;
    border-left: 4px solid var(--info-color);
}

/* ---------- Modals ---------- */
.modal-content {
    background: var(--lg-bg-strong);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 30px rgba(255, 255, 255, 0.2);
}

.modal-header {
    background: var(--accent-glass);
    color: white;
    border-radius: 23px 23px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.85rem 1.2rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.modal-header .modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.9;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 0.55rem;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.65rem 1.1rem;
}

.modal-backdrop.show {
    opacity: 1;
    background: rgba(15, 23, 42, 0.35);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    backdrop-filter: blur(6px) saturate(120%);
}

.modal.fade .modal-dialog {
    transform: translateY(16px) scale(0.97);
    transition: transform 0.45s var(--spring), opacity 0.3s ease;
}

.modal.show .modal-dialog {
    transform: none;
}

/* List groups inside glass */
.list-group {
    --bs-list-group-bg: rgba(255, 255, 255, 0.5);
    --bs-list-group-border-color: rgba(255, 255, 255, 0.6);
    --bs-list-group-action-hover-bg: rgba(79, 70, 229, 0.08);
    --bs-list-group-border-radius: 14px;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.45);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.7);
    background-clip: padding-box;
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* ---------- Login / public pages ---------- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 410px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.2) 100%) !important;
    -webkit-backdrop-filter: blur(26px) saturate(190%) brightness(1.05);
    backdrop-filter: blur(26px) saturate(190%) brightness(1.05);
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 28px !important;
    box-shadow:
        0 24px 70px rgba(15, 23, 42, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(255, 255, 255, 0.3),
        inset 0 0 40px rgba(255, 255, 255, 0.25) !important;
}

.auth-logo {
    width: 66px;
    height: 66px;
    border-radius: 20px;
    background: var(--accent-grad);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -3px 8px rgba(55, 48, 163, 0.4);
}

.auth-card .form-control,
.auth-card .input-group-text {
    background-color: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.75);
}

.auth-card .form-control:focus {
    background-color: rgba(255, 255, 255, 0.85);
}

.auth-footer {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

/* ---------- Responsive Design ---------- */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn {
        --bs-btn-padding-x: 0.85rem;
        --bs-btn-padding-y: 0.375rem;
        font-size: 0.875rem;
    }

    main > .border-bottom:first-child {
        margin-top: 0.75rem;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    .sidebar,
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }

    body::before,
    body::after,
    .card::before,
    .card::after,
    main > .border-bottom:first-child::before,
    main > .border-bottom:first-child::after {
        display: none;
    }

    html,
    body {
        background: #fff;
    }
    
    .container-fluid {
        padding: 0;
    }
    
    .card,
    main > .border-bottom:first-child {
        background: #fff;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Custom Utilities */
.text-xs {
    font-size: 0.75rem;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

/* Dashboard specific styles */
.dashboard-card {
    background: var(--lg-bg);
    -webkit-backdrop-filter: var(--lg-blur);
    backdrop-filter: var(--lg-blur);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--lg-shadow);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--lg-shadow-hover);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.primary { background: var(--primary-color); }
.stat-icon.success { background: var(--success-color); }
.stat-icon.warning { background: var(--warning-color); }
.stat-icon.info { background: var(--info-color); }

/* Gradient stat cards keep their colors and get a liquid glass edge + gloss */
.stat-card {
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 0 24px rgba(255, 255, 255, 0.15) !important;
}

.stat-card:hover {
    transform: translateY(-4px) !important;
}

/* =====================================================================
   Dark Liquid Glass - portal pages (<html data-bs-theme="dark">)
   Every inner section uses the same tinted glass, text colour and
   transparency as the sidebar. Login / shared-file pages stay light.
   ===================================================================== */
[data-bs-theme="dark"] {
    --text-main: rgba(255, 255, 255, 0.88);
    --primary-color: #818cf8;
    --bs-body-color: rgba(255, 255, 255, 0.88);
    --bs-body-color-rgb: 255, 255, 255;
    --bs-emphasis-color: #ffffff;
    --bs-secondary-color: rgba(255, 255, 255, 0.6);
    --bs-tertiary-color: rgba(255, 255, 255, 0.45);
    --bs-heading-color: #ffffff;
    --bs-border-color: rgba(255, 255, 255, 0.14);
    --bs-border-color-translucent: rgba(255, 255, 255, 0.12);
    --bs-secondary-bg: rgba(255, 255, 255, 0.08);
    --bs-tertiary-bg: rgba(255, 255, 255, 0.05);
    --bs-link-color: #a5b4fc;
    --bs-link-color-rgb: 165, 180, 252;
    --bs-link-hover-color: #c7d2fe;
    --bs-link-hover-color-rgb: 199, 210, 254;

    /* Same material as the sidebar */
    --lg-dark-bg: linear-gradient(145deg, rgba(30, 27, 75, 0.42) 0%, rgba(15, 23, 42, 0.52) 100%);
    --lg-dark-bg-strong: linear-gradient(145deg, rgba(30, 27, 75, 0.82) 0%, rgba(15, 23, 42, 0.88) 100%);
    --lg-dark-border: rgba(255, 255, 255, 0.16);
    --lg-dark-shadow-hover:
        0 18px 50px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        inset 0 -1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 28px rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] body {
    color: var(--text-main);
}

/* Surfaces */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .glass,
[data-bs-theme="dark"] main > .border-bottom:first-child,
[data-bs-theme="dark"] .dashboard-card {
    background: var(--lg-dark-bg);
    -webkit-backdrop-filter: blur(26px) saturate(190%);
    backdrop-filter: blur(26px) saturate(190%);
    border-color: var(--lg-dark-border) !important;
    box-shadow: var(--lg-dark-shadow);
    color: var(--text-main);
}

[data-bs-theme="dark"] .card:hover,
[data-bs-theme="dark"] .dashboard-card:hover {
    box-shadow: var(--lg-dark-shadow-hover);
}

[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .dropdown-menu {
    background: var(--lg-dark-bg-strong);
    -webkit-backdrop-filter: blur(26px) saturate(190%);
    backdrop-filter: blur(26px) saturate(190%);
    border-color: var(--lg-dark-border);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 0 30px rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

/* Softer specular rim and sheen on dark glass */
[data-bs-theme="dark"] .card::before,
[data-bs-theme="dark"] .modal-content::before,
[data-bs-theme="dark"] .glass::before,
[data-bs-theme="dark"] .alert::before,
[data-bs-theme="dark"] .dropdown-menu::before,
[data-bs-theme="dark"] main > .border-bottom:first-child::before {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.08) 30%,
        rgba(255, 255, 255, 0) 50%,
        rgba(255, 255, 255, 0.06) 70%,
        rgba(255, 255, 255, 0.38) 100%);
}

[data-bs-theme="dark"] .card::after,
[data-bs-theme="dark"] .modal-content::after,
[data-bs-theme="dark"] .glass::after,
[data-bs-theme="dark"] main > .border-bottom:first-child::after {
    background:
        radial-gradient(120% 70% at 0% 0%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 55%),
        radial-gradient(90% 60% at 100% 100%, rgba(124, 58, 237, 0.08) 0%, rgba(255, 255, 255, 0) 60%);
}

[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-footer {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

[data-bs-theme="dark"] .modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

/* Page title: light gradient text on dark glass */
[data-bs-theme="dark"] main > .border-bottom:first-child h1,
[data-bs-theme="dark"] main > .border-bottom:first-child .h2 {
    background: linear-gradient(135deg, #c7d2fe 0%, #e9d5ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Former white / light blocks become glass */
[data-bs-theme="dark"] .card-body[style*="background: white"],
[data-bs-theme="dark"] .card-body[style*="background:white"],
[data-bs-theme="dark"] [style*="background-color: #fff;"],
[data-bs-theme="dark"] [style*="background-color: white"] {
    background: rgba(15, 23, 42, 0.35) !important;
    color: var(--text-main);
}

[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .card.bg-light,
[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] [style*="background-color: #f8f9fa"] {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-main);
}

[data-bs-theme="dark"] .badge.bg-light {
    background-color: rgba(255, 255, 255, 0.85) !important;
    color: #1f2937 !important;
}

[data-bs-theme="dark"] .text-gray-800 {
    color: rgba(255, 255, 255, 0.88) !important;
}

[data-bs-theme="dark"] .text-dark:not(.badge):not(.bg-warning):not(.bg-light) {
    color: rgba(255, 255, 255, 0.88) !important;
}

/* Pastel cell colours used by report tables -> matching translucent tints */
[data-bs-theme="dark"] [style*="#e3f2fd"] { background-color: rgba(33, 150, 243, 0.16) !important; }
[data-bs-theme="dark"] [style*="#f3e5f5"] { background-color: rgba(156, 39, 176, 0.16) !important; }
[data-bs-theme="dark"] [style*="#e8f5e9"] { background-color: rgba(76, 175, 80, 0.16) !important; }
[data-bs-theme="dark"] [style*="#fff3e0"] { background-color: rgba(255, 152, 0, 0.16) !important; }
[data-bs-theme="dark"] [style*="#fce4ec"] { background-color: rgba(233, 30, 99, 0.16) !important; }
[data-bs-theme="dark"] [style*="#e0f2f1"] { background-color: rgba(0, 150, 136, 0.16) !important; }
[data-bs-theme="dark"] [style*="#f1f8e9"] { background-color: rgba(139, 195, 74, 0.16) !important; }
[data-bs-theme="dark"] [style*="#fff9c4"] { background-color: rgba(255, 235, 59, 0.13) !important; }
[data-bs-theme="dark"] [style*="#ede7f6"] { background-color: rgba(103, 58, 183, 0.2) !important; }
[data-bs-theme="dark"] [style*="#e1f5fe"] { background-color: rgba(3, 169, 244, 0.16) !important; }
[data-bs-theme="dark"] [style*="#fbe9e7"] { background-color: rgba(255, 87, 34, 0.16) !important; }
[data-bs-theme="dark"] [style*="#f9fbe7"] { background-color: rgba(205, 220, 57, 0.13) !important; }

/* Forms */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(165, 180, 252, 0.7);
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.22);
}

[data-bs-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-control[readonly] {
    background-color: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.6);
}

[data-bs-theme="dark"] .form-select option,
[data-bs-theme="dark"] .form-select optgroup {
    background-color: #1e1b4b;
    color: #ffffff;
}

[data-bs-theme="dark"] .form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.35);
}

[data-bs-theme="dark"] .form-check-input:checked {
    background-color: #6366f1;
    border-color: #818cf8;
}

[data-bs-theme="dark"] .input-group-text {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
    color: #c7d2fe;
}

[data-bs-theme="dark"] .form-text,
[data-bs-theme="dark"] .text-muted {
    color: rgba(255, 255, 255, 0.58) !important;
}

/* Tables */
[data-bs-theme="dark"] .table {
    --bs-table-color: rgba(255, 255, 255, 0.88);
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(255, 255, 255, 0.08);
    --bs-table-hover-color: #ffffff;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.06);
    --bs-table-striped-color: rgba(255, 255, 255, 0.88);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.035);
    color: var(--bs-table-color);
}

[data-bs-theme="dark"] .table tbody td {
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .table thead.table-light,
[data-bs-theme="dark"] .table thead.table-dark {
    --bs-table-color: #ffffff;
    --bs-table-bg: transparent;
}

/* Buttons */
[data-bs-theme="dark"] .btn-outline-secondary,
[data-bs-theme="dark"] .btn-outline-primary,
[data-bs-theme="dark"] .btn-outline-success,
[data-bs-theme="dark"] .btn-outline-danger,
[data-bs-theme="dark"] .btn-outline-info,
[data-bs-theme="dark"] .btn-outline-warning,
[data-bs-theme="dark"] .btn-outline-dark {
    background-color: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .btn-outline-primary {
    --bs-btn-color: #a5b4fc;
    --bs-btn-border-color: rgba(165, 180, 252, 0.5);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #6366f1;
    --bs-btn-hover-border-color: #818cf8;
}

[data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-color: #cbd5e1;
    --bs-btn-border-color: rgba(203, 213, 225, 0.4);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: rgba(255, 255, 255, 0.2);
    --bs-btn-hover-border-color: rgba(255, 255, 255, 0.5);
}

[data-bs-theme="dark"] .btn-outline-dark {
    --bs-btn-color: #e2e8f0;
    --bs-btn-border-color: rgba(226, 232, 240, 0.45);
    --bs-btn-hover-color: #0f172a;
    --bs-btn-hover-bg: #e2e8f0;
    --bs-btn-hover-border-color: #e2e8f0;
}

[data-bs-theme="dark"] .btn-outline-danger {
    --bs-btn-color: #fca5a5;
    --bs-btn-border-color: rgba(252, 165, 165, 0.5);
}

[data-bs-theme="dark"] .btn-outline-success {
    --bs-btn-color: #86efac;
    --bs-btn-border-color: rgba(134, 239, 172, 0.5);
}

[data-bs-theme="dark"] .btn-outline-info {
    --bs-btn-color: #67e8f9;
    --bs-btn-border-color: rgba(103, 232, 249, 0.5);
}

[data-bs-theme="dark"] .btn-outline-warning {
    --bs-btn-color: #fde68a;
    --bs-btn-border-color: rgba(253, 230, 138, 0.5);
}

[data-bs-theme="dark"] .btn-outline-secondary:hover,
[data-bs-theme="dark"] .btn-outline-primary:hover,
[data-bs-theme="dark"] .btn-outline-success:hover,
[data-bs-theme="dark"] .btn-outline-danger:hover,
[data-bs-theme="dark"] .btn-outline-info:hover,
[data-bs-theme="dark"] .btn-outline-warning:hover,
[data-bs-theme="dark"] .btn-outline-dark:hover {
    background-color: var(--bs-btn-hover-bg);
}

/* Pagination */
[data-bs-theme="dark"] .pagination {
    --bs-pagination-color: #c7d2fe;
    --bs-pagination-bg: rgba(255, 255, 255, 0.06);
    --bs-pagination-border-color: rgba(255, 255, 255, 0.14);
    --bs-pagination-hover-color: #ffffff;
    --bs-pagination-hover-bg: rgba(255, 255, 255, 0.14);
    --bs-pagination-hover-border-color: rgba(255, 255, 255, 0.2);
    --bs-pagination-active-color: #ffffff;
    --bs-pagination-disabled-color: rgba(255, 255, 255, 0.35);
    --bs-pagination-disabled-bg: rgba(255, 255, 255, 0.03);
    --bs-pagination-disabled-border-color: rgba(255, 255, 255, 0.08);
}

/* Dropdown items */
[data-bs-theme="dark"] .dropdown-item {
    color: rgba(255, 255, 255, 0.88);
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

[data-bs-theme="dark"] .dropdown-item.disabled,
[data-bs-theme="dark"] .dropdown-item:disabled {
    color: rgba(255, 255, 255, 0.35);
}

[data-bs-theme="dark"] .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.12);
}

/* List groups */
[data-bs-theme="dark"] .list-group {
    --bs-list-group-color: rgba(255, 255, 255, 0.88);
    --bs-list-group-bg: rgba(255, 255, 255, 0.05);
    --bs-list-group-border-color: rgba(255, 255, 255, 0.1);
    --bs-list-group-action-color: rgba(255, 255, 255, 0.88);
    --bs-list-group-action-hover-color: #ffffff;
    --bs-list-group-action-hover-bg: rgba(255, 255, 255, 0.1);
}

/* Alerts: tinted dark glass */
[data-bs-theme="dark"] .alert {
    -webkit-backdrop-filter: blur(26px) saturate(190%);
    backdrop-filter: blur(26px) saturate(190%);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: var(--lg-dark-shadow);
}

[data-bs-theme="dark"] .alert-success {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.26), rgba(21, 128, 61, 0.2));
    color: #bbf7d0;
}

[data-bs-theme="dark"] .alert-danger {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.26), rgba(153, 27, 27, 0.22));
    color: #fecaca;
}

[data-bs-theme="dark"] .alert-warning {
    background: linear-gradient(145deg, rgba(234, 179, 8, 0.24), rgba(161, 98, 7, 0.2));
    color: #fef08a;
}

[data-bs-theme="dark"] .alert-info {
    background: linear-gradient(145deg, rgba(6, 182, 212, 0.24), rgba(14, 116, 144, 0.2));
    color: #a5f3fc;
}

[data-bs-theme="dark"] .alert .alert-link {
    color: inherit;
}

/* Lighter accent text on dark glass */
[data-bs-theme="dark"] .text-success { color: #4ade80 !important; }
[data-bs-theme="dark"] .text-danger { color: #f87171 !important; }
[data-bs-theme="dark"] .text-info { color: #22d3ee !important; }
[data-bs-theme="dark"] .text-secondary { color: rgba(255, 255, 255, 0.6) !important; }

/* Scrollbars */
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.28);
    background-clip: padding-box;
}

/* Print: always light */
@media print {
    [data-bs-theme="dark"] .card,
    [data-bs-theme="dark"] main > .border-bottom:first-child {
        background: #fff;
        color: #000;
    }
    [data-bs-theme="dark"] .table {
        --bs-table-color: #000;
        color: #000;
    }
}

/* Coloured card headers become tinted glass */
[data-bs-theme="dark"] .card-header.bg-primary { background: var(--accent-glass) !important; }
[data-bs-theme="dark"] .card-header.bg-success { background: linear-gradient(135deg, rgba(34, 197, 94, 0.55), rgba(21, 128, 61, 0.5)) !important; }
[data-bs-theme="dark"] .card-header.bg-info { background: linear-gradient(135deg, rgba(6, 182, 212, 0.55), rgba(14, 116, 144, 0.5)) !important; }
[data-bs-theme="dark"] .card-header.bg-danger { background: linear-gradient(135deg, rgba(239, 68, 68, 0.55), rgba(153, 27, 27, 0.5)) !important; }
[data-bs-theme="dark"] .card-header.bg-warning { background: linear-gradient(135deg, rgba(250, 204, 21, 0.75), rgba(202, 138, 4, 0.65)) !important; }

/* Gradient cards (Dashboard / Reports stat + chart cards) -> same dark glass as the sidebar.
   Each card keeps its original colour as a glowing icon tile and a soft corner glow. */
[data-bs-theme="dark"] .card[style*="linear-gradient"] {
    --card-a: #818cf8;
    --card-b: #a78bfa;
    --card-glow: 129, 140, 248;
    background: var(--lg-dark-bg) !important;
    border: 1px solid var(--lg-dark-border) !important;
    box-shadow: var(--lg-dark-shadow), 0 10px 30px rgba(var(--card-glow), 0.14) !important;
}

[data-bs-theme="dark"] .card[style*="#667eea"] { --card-a: #667eea; --card-b: #764ba2; --card-glow: 102, 126, 234; }
[data-bs-theme="dark"] .card[style*="#f093fb"] { --card-a: #f093fb; --card-b: #f5576c; --card-glow: 240, 147, 251; }
[data-bs-theme="dark"] .card[style*="#4facfe"] { --card-a: #4facfe; --card-b: #00c6fe; --card-glow: 79, 172, 254; }
[data-bs-theme="dark"] .card[style*="#fa709a"] { --card-a: #fa709a; --card-b: #fec140; --card-glow: 250, 112, 154; }

[data-bs-theme="dark"] .card[style*="linear-gradient"]:hover {
    box-shadow: var(--lg-dark-shadow-hover), 0 14px 38px rgba(var(--card-glow), 0.24) !important;
}

[data-bs-theme="dark"] .card[style*="linear-gradient"]::after {
    background:
        radial-gradient(70% 90% at 100% 0%, rgba(var(--card-glow), 0.3) 0%, rgba(var(--card-glow), 0) 65%),
        radial-gradient(120% 70% at 0% 0%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 55%);
}

/* Stat icons become gradient glass tiles */
[data-bs-theme="dark"] .card[style*="linear-gradient"] .col-auto > i {
    opacity: 1 !important;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.35rem !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--card-a) 0%, var(--card-b) 100%);
    box-shadow: 0 8px 22px rgba(var(--card-glow), 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -2px 6px rgba(0, 0, 0, 0.15);
}

/* Stat labels: soft accent colour; numbers stay white */
[data-bs-theme="dark"] .card[style*="linear-gradient"] .text-uppercase {
    color: rgba(255, 255, 255, 0.7) !important;
    letter-spacing: 0.6px;
}

[data-bs-theme="dark"] .card[style*="linear-gradient"] .h3,
[data-bs-theme="dark"] .card[style*="linear-gradient"] .h5 {
    color: #ffffff !important;
}

/* Chart cards: tinted glass header, clear body */
[data-bs-theme="dark"] .card[style*="linear-gradient"] > .card-header {
    background: linear-gradient(135deg, rgba(var(--card-glow), 0.32) 0%, rgba(var(--card-glow), 0.04) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .card[style*="linear-gradient"] > .card-body[style*="background: white"] {
    background: transparent !important;
}

/* Coloured table rows (table-success / danger / warning / info ...) -> translucent tints, white text */
[data-bs-theme="dark"] .table-success,
[data-bs-theme="dark"] .table-danger,
[data-bs-theme="dark"] .table-warning,
[data-bs-theme="dark"] .table-info,
[data-bs-theme="dark"] .table-primary,
[data-bs-theme="dark"] .table-secondary,
[data-bs-theme="dark"] tbody .table-light,
[data-bs-theme="dark"] tbody .table-active {
    --bs-table-color: rgba(255, 255, 255, 0.92);
    --bs-table-striped-color: rgba(255, 255, 255, 0.92);
    --bs-table-hover-color: #ffffff;
    --bs-table-active-color: #ffffff;
    --bs-table-border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.92);
}

[data-bs-theme="dark"] .table-success { --bs-table-bg: rgba(34, 197, 94, 0.18); --bs-table-striped-bg: rgba(34, 197, 94, 0.22); --bs-table-hover-bg: rgba(34, 197, 94, 0.26); --bs-table-active-bg: rgba(34, 197, 94, 0.28); }
[data-bs-theme="dark"] .table-danger { --bs-table-bg: rgba(239, 68, 68, 0.18); --bs-table-striped-bg: rgba(239, 68, 68, 0.22); --bs-table-hover-bg: rgba(239, 68, 68, 0.26); --bs-table-active-bg: rgba(239, 68, 68, 0.28); }
[data-bs-theme="dark"] .table-warning { --bs-table-bg: rgba(234, 179, 8, 0.16); --bs-table-striped-bg: rgba(234, 179, 8, 0.2); --bs-table-hover-bg: rgba(234, 179, 8, 0.24); --bs-table-active-bg: rgba(234, 179, 8, 0.26); }
[data-bs-theme="dark"] .table-info { --bs-table-bg: rgba(6, 182, 212, 0.17); --bs-table-striped-bg: rgba(6, 182, 212, 0.21); --bs-table-hover-bg: rgba(6, 182, 212, 0.25); --bs-table-active-bg: rgba(6, 182, 212, 0.27); }
[data-bs-theme="dark"] .table-primary { --bs-table-bg: rgba(99, 102, 241, 0.2); --bs-table-striped-bg: rgba(99, 102, 241, 0.24); --bs-table-hover-bg: rgba(99, 102, 241, 0.28); --bs-table-active-bg: rgba(99, 102, 241, 0.3); }
[data-bs-theme="dark"] .table-secondary { --bs-table-bg: rgba(148, 163, 184, 0.16); --bs-table-striped-bg: rgba(148, 163, 184, 0.2); --bs-table-hover-bg: rgba(148, 163, 184, 0.24); --bs-table-active-bg: rgba(148, 163, 184, 0.26); }
[data-bs-theme="dark"] tbody .table-light,
[data-bs-theme="dark"] tbody .table-active { --bs-table-bg: rgba(255, 255, 255, 0.07); --bs-table-hover-bg: rgba(255, 255, 255, 0.11); }

/* Brighter accent text inside tinted rows */
[data-bs-theme="dark"] .table .text-success { color: #4ade80 !important; }
[data-bs-theme="dark"] .table .text-danger { color: #fca5a5 !important; }
[data-bs-theme="dark"] .table .text-warning { color: #fde047 !important; }
[data-bs-theme="dark"] .table .text-muted { color: rgba(255, 255, 255, 0.65) !important; }
[data-bs-theme="dark"] .table a:not(.btn) { color: #c7d2fe; }
