html { font-size: 12.8px !important; } /* 80% scale */
/* Layout: BioShield Ultra-Compact (Garage Standard) */
:root {
    /* Global Reset */
    box-sizing: border-box;

    /* BioShield Brand Colors */
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);

    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #0ea5e9;

    /* Backgrounds */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.95);

    /* Text */
    --text-main: #334155;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Ultra Compact Dimensions (Garage Standard) */
    --sidebar-width: 220px;
    --header-height: 50px;
    --border-radius: 6px;
    /* Reduced from 12px */
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    min-height: 100vh;
    font-size: 0.8rem;
    /* Garage Standard */
    font-weight: 400;
    line-height: 1.4;
    overflow-x: hidden;
    background-image:
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0, transparent 50%),
        radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.05) 0, transparent 50%);
}

/* Typography (Garage Scale) */
h1,
.h1 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

h2,
.h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

h3,
.h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

h4,
.h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

h5,
.h5,
h6,
.h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Utilities */
.glass,
.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm);
    border-radius: var(--border-radius);
    transition: all 0.2s;
}

/* Sidebar (Modernized Floating Glass) */
.sidebar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1.25rem;
    width: var(--sidebar-width);
    position: fixed;
    top: 1rem;
    bottom: 1rem;
    left: 1rem;
    height: calc(100vh - 2rem);
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

.sidebar-header {
    padding: 1.2rem 1.25rem;
    height: auto;
    min-height: 60px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.brand-text {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.nav-links {
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    color: #334155; /* Darker Slate for High Contrast */
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600; /* Bolder text */
    font-size: 0.85rem; /* Larger font */
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 2px;
}

.nav-item i {
    font-size: 1.15rem; /* Larger Icons */
    color: #64748b; /* Better contrast for icons */
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: #f1f5f9;
    color: var(--primary-hover);
    transform: translateX(3px);
}

.nav-item:hover i {
    color: var(--primary-hover);
    transform: scale(1.1);
}

.nav-item.active {
    background: var(--primary-gradient);
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    transform: translateY(-1px);
}

.nav-item.active i {
    color: #ffffff !important;
}

/* Section Headers in Sidebar */
.nav-section-header {
    font-size: 0.7rem; /* Slightly larger */
    font-weight: 800; /* Extra bold */
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #64748b; /* Darker Gray for contrast */
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.nav-section-header:hover {
    color: #64748b;
}

.nav-section-header i.ms-auto {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-section-header[aria-expanded="true"] i.ms-auto {
    transform: rotate(180deg);
}

.sidebar .collapse {
    padding-left: 0.5rem;
    border-left: 2px solid #f1f5f9;
    margin-left: 0.75rem;
    margin-top: 0.25rem;
}

/* Main Content */
.main-content {
    margin-left: calc(var(--sidebar-width) + 1.5rem);
    padding: 1.5rem;
    padding-top: 1rem;
    min-height: 100vh;
    font-size: 80%;
    /* 20% reduction exclusively for inner screens */
}

footer {
    margin-left: calc(var(--sidebar-width) + 1.5rem);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-color);
}

.page-title {
    margin: 0;
    font-size: 1.25rem;
}

/* Specific Utilities */
.text-muted {
    color: #94a3b8 !important;
}

.small {
    font-size: 0.7rem;
}



/* Forms - Micro Sizing (Garage Standard) */
.form-control,
.form-select {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    background-color: var(--bg-card);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-label {
    margin-bottom: 0.15rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Buttons (Garage Standard) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    /* Proper button padding */
    font-size: 0.8rem;
    border-radius: 4px;
    font-weight: 500;
    gap: 0.4rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.4);
    /* Stronger shadow */
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    /* Darker gradient */
    color: white !important;
    /* Force white text */
}

.btn-outline-secondary {
    background: white;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-outline-secondary:hover {
    background: #f1f5f9;
    /* Slightly darker gray */
    border-color: #94a3b8;
    /* Darker border */
    color: var(--primary-color) !important;
    /* Ensure visibility */
}

/* Additional Button Variants (Matching Theme) */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border: none;
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.4);
}

.btn-sm {
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
}

.btn-lg {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
}

/* Tables - Compact */
.table-container {
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 1rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-bottom: 0;
}

.table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    background-color: #f8fafc;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    text-transform: none !important;
    /* Garage rule */
}

.table td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background-color: #f8fafc;
}

/* Stats Cards (Premium) */
.stat-card {
    padding: 1.25rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    /* Slightly rounder */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon-bg {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 4rem;
    opacity: 0.1;
    transform: rotate(15deg);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0.25rem 0;
    line-height: 1.2;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Gradients for Stats */
.bg-gradient-primary-soft {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border-left: 4px solid #3b82f6;
}

.bg-gradient-success-soft {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-left: 4px solid #10b981;
}

.bg-gradient-warning-soft {
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
    border-left: 4px solid #f59e0b;
}

.bg-gradient-danger-soft {
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
    border-left: 4px solid #ef4444;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

/* Quick Action Shortcuts */
.shortcut-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s;
    height: 100%;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-main);
}

.shortcut-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.shortcut-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    background: #eff6ff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.shortcut-card:hover .shortcut-icon {
    background: var(--primary-color);
    color: white;
}

.shortcut-label {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Charts & Calendars */
.fc {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    font-size: 0.85rem !important;
}
.fc-toolbar-title {
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}
.fc-event {
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.fc-event:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    z-index: 50 !important;
}
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Badges */
.badge {
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-primary {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-warning {
    background: #fef3c7;
    color: #a16207;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

/* Login Page Branding (Preserved & Adjusted) */
body.login-body {
    height: 100vh;
    overflow: hidden;
    background: #fff;
}

.login-container {
    height: 100%;
    display: flex;
    width: 100%;
}

.login-brand-side {
    flex: 1;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(37, 99, 235, 0.25) 100%), url('../images/bioshield_login_bg_final.png');
    background-blend-mode: normal;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    /* Reduced */
    color: white;
}

.login-brand-side h1,
.login-brand-side h2,
.login-brand-side p,
.login-brand-side small,
.login-brand-side i {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.login-form-side {
    width: 450px;
    /* Reduced */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    background: #ffffff;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.btn-login {
    width: 100%;
    padding: 0.6rem;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Mobile */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 60px;
    }

    footer {
        margin-left: 0;
    }

    .login-brand-side {
        display: none;
    }

    .login-form-side {
        width: 100%;
        padding: 1.5rem;
        box-shadow: none;
    }
}

/* Hover Utilities */
.hover-primary:hover {
    color: var(--primary-color) !important;
    transition: color 0.2s;
}

/* Premium Login Additions */
.login-input {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.login-input:focus {
    background-color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-floating>label {
    color: #64748b;
    font-weight: 500;
}

.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label {
    color: var(--primary-color);
    transform: scale(0.85) translateY(-0.75rem) translateX(0.15rem);
}

.hover-transform:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(37, 99, 235, 0.25) !important;
}

/* =========================================
   Sidebar Color Coding (Premium Look)
========================================= */

/* Global Admin & Overview (Primary Blue) */
.nav-section-header i.bi-shield-lock, .nav-section-header i.bi-house-door, .nav-section-header i.bi-question-circle { color: #3b82f6 !important; }

/* Audits (Emerald Green) */
.nav-section-header[href="#collapseAudits"] i, #collapseAudits .nav-item i { color: #10b981 !important; }
.nav-section-header[href="#collapseAudits"]:hover { background: #ecfdf5; color: #047857; border-radius: 4px; }
#collapseAudits .nav-item:hover { background: #10b981; color: white; box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2); }
#collapseAudits .nav-item:hover i { color: white !important; }
#collapseAudits .nav-item.active { background: linear-gradient(135deg, #10b981 0%, #059669 100%); box-shadow: 0 4px 12px rgba(16,185,129,0.25); color: white !important;}
#collapseAudits .nav-item.active i { color: white !important; }

/* Surveillance (Amber/Orange) */
.nav-section-header[href="#collapseSurveillance"] i, #collapseSurveillance .nav-item i { color: #f59e0b !important; }
.nav-section-header[href="#collapseSurveillance"]:hover { background: #fffbeb; color: #b45309; border-radius: 4px; }
#collapseSurveillance .nav-item:hover { background: #f59e0b; color: white; box-shadow: 0 4px 6px rgba(245, 158, 11, 0.2); }
#collapseSurveillance .nav-item:hover i { color: white !important; }
#collapseSurveillance .nav-item.active { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); box-shadow: 0 4px 12px rgba(245,158,11,0.25); color: white !important;}
#collapseSurveillance .nav-item.active i { color: white !important; }

/* Operations (Purple) */
.nav-section-header[href="#collapseOps"] i, #collapseOps .nav-item i { color: #8b5cf6 !important; }
.nav-section-header[href="#collapseOps"]:hover { background: #f5f3ff; color: #6d28d9; border-radius: 4px; }
#collapseOps .nav-item:hover { background: #8b5cf6; color: white; box-shadow: 0 4px 6px rgba(139, 92, 246, 0.2); }
#collapseOps .nav-item:hover i { color: white !important; }
#collapseOps .nav-item.active { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); box-shadow: 0 4px 12px rgba(139,92,246,0.25); color: white !important;}
#collapseOps .nav-item.active i { color: white !important; }

/* Employee Health (Rose/Red) */
.nav-section-header[href="#collapseHealth"] i, #collapseHealth .nav-item i { color: #f43f5e !important; }
.nav-section-header[href="#collapseHealth"]:hover { background: #fff1f2; color: #be123c; border-radius: 4px; }
#collapseHealth .nav-item:hover { background: #f43f5e; color: white; box-shadow: 0 4px 6px rgba(244, 63, 94, 0.2); }
#collapseHealth .nav-item:hover i { color: white !important; }
#collapseHealth .nav-item.active { background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%); box-shadow: 0 4px 12px rgba(244,63,94,0.25); color: white !important;}
#collapseHealth .nav-item.active i { color: white !important; }

/* Education (Cyan/Light Blue) */
.nav-section-header[href="#collapseEdu"] i, #collapseEdu .nav-item i { color: #0ea5e9 !important; }
.nav-section-header[href="#collapseEdu"]:hover { background: #f0f9ff; color: #0369a1; border-radius: 4px; }
#collapseEdu .nav-item:hover { background: #0ea5e9; color: white; box-shadow: 0 4px 6px rgba(14, 165, 233, 0.2); }
#collapseEdu .nav-item:hover i { color: white !important; }
#collapseEdu .nav-item.active { background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); box-shadow: 0 4px 12px rgba(14,165,233,0.25); color: white !important;}
#collapseEdu .nav-item.active i { color: white !important; }

/* Analytics (Teal) */
.nav-section-header[data-bs-target="#collapseAnalytics"] i, #collapseAnalytics .nav-item i { color: #14b8a6 !important; }
.nav-section-header[data-bs-target="#collapseAnalytics"]:hover { background: #f0fdfa; color: #0f766e; border-radius: 4px; }
#collapseAnalytics .nav-item:hover { background: #14b8a6; color: white; box-shadow: 0 4px 6px rgba(20, 184, 166, 0.2); }
#collapseAnalytics .nav-item:hover i { color: white !important; }
#collapseAnalytics .nav-item.active { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); box-shadow: 0 4px 12px rgba(20,184,166,0.25); color: white !important;}
#collapseAnalytics .nav-item.active i { color: white !important; }

/* Admin (Indigo) */
.nav-section-header[href="#collapseAdmin"] i, #collapseAdmin .nav-item i { color: #6366f1 !important; }
.nav-section-header[href="#collapseAdmin"]:hover { background: #eef2ff; color: #4338ca; border-radius: 4px; }
#collapseAdmin .nav-item:hover { background: #6366f1; color: white; box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2); }
#collapseAdmin .nav-item:hover i { color: white !important; }
#collapseAdmin .nav-item.active { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); box-shadow: 0 4px 12px rgba(99,102,241,0.25); color: white !important;}
#collapseAdmin .nav-item.active i { color: white !important; }

/* --- Chat Button Overlay Fix --- */
.table th:last-child, .table td:last-child {
    padding-right: 120px !important; /* Safe zone for buttons */
}
body {
    padding-bottom: 90px !important;
}
#bp-web-widget-container, .bpw-floating-button {
    right: 25px !important;
    bottom: 25px !important;
}

/* =========================================
   BioShield Premium - Dark Mode (Navy Blue) & Utility
========================================= */

.dark-mode {
    --bg-body: #0f172a; 
    --bg-card: #1e293b;
    --bg-glass: rgba(30, 41, 59, 0.95);
    --border-color: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    } 

.dark-mode, html.dark-mode body {
    background-color: var(--bg-body) !important;
    background-image: none !important;
}

.dark-mode .sidebar {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right-color: #334155;
}

.dark-mode .sidebar-header {
    background: rgba(30, 41, 59, 0.9);
    border-bottom-color: #334155;
}

.dark-mode .nav-item {
    color: #e2e8f0;
}

.dark-mode .nav-item:hover {
    background-color: #0f172a;
    color: var(--primary-color) !important;
}

.dark-mode .nav-section-header {
    color: #94a3b8;
}

.dark-mode .glass,
.dark-mode .card,
.dark-mode .stat-card,
.dark-mode .table-container,
.dark-mode .bg-white,
.dark-mode .bg-light {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

.dark-mode .table th, 
.dark-mode .table td {
    border-color: var(--border-color);
    color: var(--text-main);
}

.dark-mode .table th {
    background-color: #0f172a;
}

.dark-mode .table tr:hover {
    background-color: #334155;
}

.dark-mode .form-control,
.dark-mode .form-select {
    background-color: #334155;
    border-color: #475569;
    color: #f8fafc;
}

/* Skeleton Loaders */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: #e2e8f0;
    border-color: #cbd5e1;
    border-radius: 4px;
}
.dark-mode .skeleton {
    background-color: #334155;
    border-color: #475569;
}
.skeleton::after {
    display: block;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0; left: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}
.dark-mode .skeleton::after {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
}
@keyframes loading {
    100% { transform: translateX(100%); }
}

/* Timeline Components */
.patient-timeline {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 2rem;
}
.patient-timeline::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}
.timeline-event {
    position: relative;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}
.timeline-event::before {
    content: '';
    position: absolute;
    left: -1.82rem;
    top: 1.2rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid var(--bg-card);
    z-index: 10;
}





/* --- GLASSMORPHISM SYSTEM --- */
:root {
    --hospital-rgb: 59, 130, 246; /* Fallback */
    --aurora-frost-bg: rgba(255, 255, 255, 0.45);
    --aurora-frost-border: rgba(255, 255, 255, 0.6);
    
    --deep-neon-bg: rgba(15, 23, 42, 0.65);
    --deep-neon-border: rgba(255, 255, 255, 0.08);
}

/* Base Body Gradients */
body {
    background: linear-gradient(135deg, #cffafe 0%, #ede9fe 50%, #fce7f3 100%);
    background-image: radial-gradient(at 0% 0%, #a7f3d0 0, transparent 50%),
                      radial-gradient(at 100% 100%, #bae6fd 0, transparent 50%);
    background-attachment: fixed;
    color: #1e293b;
}

html.dark-mode body {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    background-image: radial-gradient(at 10% 10%, rgba(var(--hospital-rgb), 0.25) 0, transparent 50%),
                      radial-gradient(at 90% 90%, rgba(139, 92, 246, 0.15) 0, transparent 50%);
    color: #f8fafc;
}

/* Aurora Frost (Light Mode Glass) */
.glass-card, 
.app-container .card.bg-white, 
.app-container .card.shadow-sm {
    background: var(--aurora-frost-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--aurora-frost-border) !important;
    border-top: 3px solid var(--hospital-color) !important;
    box-shadow: 0 10px 40px 0 rgba(var(--hospital-rgb), 0.1) !important;
    border-radius: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Subtle glare effect */
.glass-card::before {
    content: "";
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    transition: all 0.75s ease;
}
.glass-card:hover::before {
    left: 200%;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 50px 0 rgba(var(--hospital-rgb), 0.2);
    border-color: rgba(var(--hospital-rgb), 0.5) !important;
}

/* Deep Neon Glass (Dark Mode Glass) */
html.dark-mode .glass-card,
html.dark-mode .app-container .card.bg-white,
html.dark-mode .app-container .card.shadow-sm {
    background: var(--deep-neon-bg) !important;
    border-color: var(--deep-neon-border) !important;
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.4) !important;
}

html.dark-mode .glass-card::before {
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 100%);
}

html.dark-mode .glass-card:hover {
    box-shadow: 0 16px 50px 0 rgba(var(--hospital-rgb), 0.4), 
                0 0 20px 0 rgba(var(--hospital-rgb), 0.2);
    border-color: rgba(var(--hospital-rgb), 0.6) !important;
}

/* Ensure child elements respect glass boundaries */
.glass-card .card-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(var(--hospital-rgb), 0.1) !important;
}
html.dark-mode .glass-card .card-header {
    border-bottom: 1px solid rgba(255,255,255, 0.05) !important;
}

html.dark-mode .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.075);
    color: var(--text-main);
}

