/* =========================================
   1. GLOBAL VARIABLES & CORE RESET
   ========================================= */
:root {
    --primary-blue: #003366;
    --accent-gold: #C5934D;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --sidebar-width: 260px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: 'Segoe UI', sans-serif; 
    background-color: var(--bg-light); 
    min-height: 100vh;
}

/* =========================================
   2. FIXED SIDEBAR & NAVIGATION (THE GOLD THEME)
   ========================================= */
.sidebar {
    width: var(--sidebar-width); 
    background: var(--primary-blue); 
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
}

.sidebar-brand {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-nav ul { list-style: none; padding-top: 15px; }

.nav-link {
    display: block;
    padding: 15px 25px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: 0.3s ease;
    border-left: 5px solid transparent; /* The highlight indicator */
}

/* HOVER EFFECT */
.nav-link:hover {
    background: rgba(197, 147, 77, 0.1);
    color: var(--accent-gold);
}

/* ACTIVE STATE: Changes item to Gold */
.sidebar-nav li.active {
    background: rgba(197, 147, 77, 0.15) !important;
}

.sidebar-nav li.active .nav-link {
    color: var(--accent-gold) !important;
    border-left-color: var(--accent-gold) !important;
    font-weight: 700;
}

/* =========================================
   3. MAIN CONTENT WORKSPACE
   ========================================= */
.dashboard-layout { display: flex; }

.dashboard-main { 
    flex: 1; 
    margin-left: var(--sidebar-width); /* Crucial: Keeps content from going under sidebar */
    padding: 40px; 
    min-height: 100vh;
}

/* UI Cards */
.action-section {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-left: 5px solid var(--accent-gold);
}




/* Header & Footer Styling */
.main-header {
    background: #fff;
    padding: 10px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent-gold);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.main-footer {
    background: var(--primary-blue);
    color: #fff;
    text-align: center;
    padding: 15px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
}

.logout-link {
    background: var(--accent-gold);
    color: #fff;
    padding: 5px 15px;
    text-decoration: none;
    border-radius: 4px;
    margin-left: 15px;
}

.login-wrapper {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 100px; /* footer space */
}
.reg-link { text-align: center; margin-top: 15px; font-size: 0.9em; }
.reg-link a { color: var(--accent-gold); font-weight: bold; text-decoration: none; }

.site-header {
    background: #ffffff;
    height: 70px;
    display: flex;
    align-items: center;
    border-bottom: 4px solid var(--accent-gold);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
}

/* User Meta Area */
.header-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-welcome {
    text-align: right;
    line-height: 1.2;
}

.welcome-text {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-name {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 15px;
}

.user-badge {
    background: #f0f4f8;
    color: var(--primary-blue);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    border: 1px solid #d1d9e0;
}

.header-divider {
    width: 1px;
    height: 30px;
    background: #e0e0e0;
}

.logout-btn {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover {
    color: var(--primary-blue);
}

/* --- Dashboard Layout Architecture --- */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 80px - 60px); /* Adjust for header/footer height */
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 30px 0;
    flex-shrink: 0;
}

.sidebar-nav ul { list-style: none; padding: 0; }

.sidebar-nav ul li a {
    display: block;
    padding: 15px 25px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.95rem;
    border-left: 4px solid transparent;
    transition: 0.3s;
}

.sidebar-nav ul li a:hover, 
.sidebar-nav ul li a.active {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-left-color: var(--accent-gold);
}

/* Main Content Area */
.dashboard-main {
    flex: 1;
    padding: 40px;
    background-color: var(--bg-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-left: 5px solid var(--primary-blue);
}

.stat-card h3 { font-size: 0.9rem; color: #64748b; margin-bottom: 10px; }
.stat-card .value { font-size: 2rem; font-weight: 700; color: var(--primary-blue); }

/* 2. Standard Header (Shared across all pages) */
.main-header {
    background: var(--white);
    height: var(--header-height);
    border-bottom: 3px solid var(--accent-gold);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    width: 100%;
    max-width: 100%;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left { display: flex; align-items: center; gap: 20px; }
.header-logo { height: 50px; width: auto; }
.brand-divider { width: 1px; height: 35px; background: var(--border-color); }
.portal-title { font-size: 1.25rem; font-weight: 700; color: var(--primary-blue); }
/* ================================
   LOGIN PAGE (ISOLATED & FIXED)
================================ */

/* Prevent sidebar/dashboard CSS from affecting login */
body:not(.dashboard) .sidebar,
body:not(.dashboard) .dashboard-container {
    display: none;
}

/* Centered login box */
.login-wrapper {
    min-height: calc(100vh - 70px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Login card */
.login-container {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    padding: 35px 40px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-top: 5px solid var(--accent-gold);
}

/* Headline */
.login-container h2 {
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: 700;
}

/* Form groups */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--primary-blue);
}

/* Inputs */
.form-control {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #d1d9e0;
    font-size: 0.95rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 2px rgba(197, 147, 77, 0.2);
}

/* Login button */
.btn-primary {
    width: 100%;
    background: var(--primary-blue);
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s ease;
}

.btn-primary:hover {
    background: var(--accent-gold);
}

/* Alerts */
.alert {
    padding: 10px 12px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.alert-warning {
    background: #fff7e6;
    border: 1px solid #f0c36d;
    color: #8a5a00;
}

/* Register link */
.reg-link {
    margin-top: 18px;
    text-align: center;
    font-size: 0.9rem;
}
/* =====================================================
   DASHBOARD LAYOUT PATCH (SAFE – NON-DESTRUCTIVE)
   Fixes spacing, height, sidebar, header gaps
   ===================================================== */

/* 1. Remove unwanted gap below header */
body.dashboard .site-header {
    margin-bottom: 0 !important;
}

/* 2. Fix dashboard main area height & spacing */
body.dashboard .dashboard-main {
    margin-top: 0 !important;
    padding-top: 30px;
    min-height: calc(100vh - 70px);
}

/* 3. Ensure content is not vertically constrained */
body.dashboard .action-section,
body.dashboard .content-card {
    height: auto !important;
    overflow: visible !important;
}

/* 4. Sidebar should start BELOW header, not behind it */
body.dashboard .sidebar {
    top: 70px; /* header height */
    height: calc(100vh - 70px);
}

/* 5. Improve visible area so more rows show */
body.dashboard .dashboard-main table {
    margin-bottom: 40px;
}

/* 6. Professional header right alignment (no clutter) */
body.dashboard .header-user {
    gap: 12px;
}

body.dashboard .user-welcome {
    text-align: right;
}

body.dashboard .welcome-text {
    font-size: 11px;
    letter-spacing: 0.6px;
}

/* 7. Footer should not overlap dashboard content */
body.dashboard .main-footer {
    position: relative;
}
/* =====================================================
   SIDEBAR VISUAL CLARITY PATCH (LOW RISK)
   Improves active vs inactive link distinction
   ===================================================== */

/* Inactive links – slightly muted */
.sidebar-nav ul li a {
    color: rgba(255, 255, 255, 0.75);
}

/* Hover – subtle gold cue */
.sidebar-nav ul li a:hover {
    background: rgba(197, 147, 77, 0.12);
    color: var(--accent-gold);
}

/* ACTIVE PAGE – clearly highlighted */
.sidebar-nav ul li a.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--accent-gold);
    font-weight: 700;
    border-left: 5px solid var(--accent-gold);
}

/* Ensure inactive items do NOT look active */
.sidebar-nav ul li:not(.active) a {
    border-left: 5px solid transparent;
}
/* =========================================
   DASHBOARD TOP SPACING MICRO FIX (SAFE)
   ========================================= */
body.dashboard .dashboard-main {
    padding-top: 20px;   /* was visually too large */
}
/* =========================================
   DASHBOARD TOP SPACING MICRO FIX (SAFE)
   ========================================= */
body.dashboard .dashboard-main {
    padding-top: 20px;   /* was visually too large */
}
/* =========================================
   DASHBOARD HEADING GAP FIX (ULTRA SAFE)
   ========================================= */
body.dashboard .dashboard-main h2 {
    margin-top: 0;
}
/* ================================
   MEMBER DASHBOARD (SAFE ISOLATION)
================================ */

.member-dashboard {
    padding: 40px 20px;
}

.member-container {
    max-width: 1200px;
    margin: 0 auto;
}

.member-welcome {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 30px;
}
.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-danger { background:#fee2e2; color:#b91c1c; }
.badge-info { background:#e0f2fe; color:#0369a1; }
.badge-new { background:#dbeafe; color:#1d4ed8; }
.badge-ack { background:#fef3c7; color:#92400e; }
.badge-done { background:#dcfce7; color:#166534; }
/* Domain section headers inside alerts table */
.domain-header td {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 16px;
    border-top: 2px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

/* Keep domain visually separate from rows */
.domain-header + tr td {
    padding-top: 14px;
}
.alert-type {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.status-new {
    background: #e74c3c;
}

.status-acknowledged {
    background: #f39c12;
}

.status-resolved {
    background: #2ecc71;
}
/* =====================================================
   PROFILE PAGE – SAFE FINAL OVERRIDE (NON-DESTRUCTIVE)
   ===================================================== */

/* Page identity */
body.dashboard {
    background: var(--bg-light);
}

/* Ensure layout always shows sidebar */
body.dashboard .dashboard-layout {
    display: flex;
}

/* Sidebar – never hidden, never overlapping */
body.dashboard .sidebar {
    position: fixed;
    top: 70px; /* header height */
    left: 0;
    width: 260px;
    height: calc(100vh - 70px);
    z-index: 900;
}

/* Main content aligned with sidebar */
body.dashboard .dashboard-main {
    margin-left: 260px;
    padding: 30px 40px;
    min-height: calc(100vh - 70px);
}

/* =========================
   PROFILE PAGE LAYOUT
   ========================= */

.profile-page h2 {
    margin-bottom: 20px;
    color: var(--primary-blue);
}

.profile-page h3 {
    margin: 30px 0 15px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--accent-gold);
    color: var(--primary-blue);
    font-size: 1.1rem;
}

/* Grid rows */
.profile-page .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Form groups */
.profile-page .form-group {
    display: flex;
    flex-direction: column;
    width: 220px;
}

.profile-page .form-group label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #334155;
}

.profile-page .form-control {
    padding: 9px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
}

.profile-page .form-control:focus {
    border-color: var(--accent-gold);
    outline: none;
}

/* Full width elements */
.profile-page .form-group.full {
    width: 100%;
}

/* Buttons */
.profile-page .btn-primary {
    margin-top: 25px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
}

/* Tabs */
.profile-tabs {
    margin-bottom: 25px;
}

.profile-tabs button {
    padding: 8px 16px;
    margin-right: 10px;
    border-radius: 5px;
    border: 1px solid var(--accent-gold);
    background: #fff;
    cursor: pointer;
    font-weight: 600;
}

.profile-tabs button.active {
    background: var(--primary-blue);
    color: #fff;
}

/* Alerts */
.success {
    background: #dcfce7;
    color: #166534;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* Medical uploads hint */
.upload-hint {
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
}

/* Hide switch reason by default */
#switch-reason-box {
    display: none;
}
/* ===== Medical History Page ===== */

.page-title {
    font-size: 24px;
    margin-bottom: 4px;
}

.page-subtitle {
    color: #666;
    margin-bottom: 20px;
}

.medical-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    margin-bottom: 30px;
    padding: 20px;
}

.medical-card-header {
    font-size: 18px;
    font-weight: 600;
    color: #003366;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.medical-section {
    margin-bottom: 20px;
}

.medical-section h4 {
    margin-bottom: 10px;
    color: #333;
}

.medical-table {
    width: 100%;
    border-collapse: collapse;
}

.medical-table th {
    background: #f4f6f8;
    text-align: left;
    padding: 10px;
}

.medical-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.document-list {
    list-style: none;
    padding-left: 0;
}

.document-list li {
    margin-bottom: 6px;
}

.document-list a {
    text-decoration: none;
    color: #0056b3;
}

.document-list a:hover {
    text-decoration: underline;
}

.muted {
    color: #888;
}
.page-header {
    margin-bottom: 25px;
}

.page-subtitle {
    color: #666;
    margin-top: 4px;
}

.medical-card {
    margin-bottom: 30px;
}

.card-header {
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.medical-section {
    margin-bottom: 25px;
}

.document-list {
    list-style: none;
    padding-left: 0;
}

.document-list li {
    margin-bottom: 6px;
}

.muted {
    color: #888;
    font-style: italic;
}

/* =====================================================
   UNIVERSAL PRINT FIX — CHROME / FIREFOX / IE
   ===================================================== */
@media print {

    /* RESET EVERYTHING */
    * {
        position: static !important;
        float: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    html, body {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        color: #000 !important;
    }

    /* HARD REMOVE ALL UI */
    .sidebar,
    .site-header,
    .main-header,
    .main-footer,
    .header-user,
    .logout-btn,
    .document-search,
    input,
    button,
    select,
    textarea,
    .btn,
    .btn-primary {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
    }

    /* REMOVE LAYOUT CONSTRAINTS */
    .dashboard-layout {
        display: block !important;
    }

    .dashboard-main {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* PRINT-FRIENDLY REPORT */
    h2 {
        text-align: center;
        font-size: 22px;
        margin: 20px 0;
    }

    h3 {
        font-size: 16px;
        margin-top: 25px;
    }

    h4 {
        font-size: 14px;
        margin-top: 15px;
    }

    table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-bottom: 20px;
    }

    th, td {
        border: 1px solid #000 !important;
        padding: 8px !important;
        font-size: 12px !important;
        text-align: left !important;
    }

    th {
        background: #f2f2f2 !important;
        font-weight: bold !important;
    }

    /* KEEP DOCTOR BLOCKS IN ONE PAGE */
    .medical-card,
    .action-section {
        page-break-inside: avoid !important;
    }

    /* REMOVE URL / PAGE UI */
    @page {
        margin: 15mm;
    }
}
/* ===== Print Button (Professional Utility Style) ===== */
.print-btn {
    background: #f8fafc;
    color: #003366;
    border: 1px solid #cbd5e1;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.print-btn:hover {
    background: #003366;
    color: #ffffff;
    border-color: #003366;
}
    /* ===== ADMIN MEMBER LIST – ACTION FIX ===== */




/* Button variants */
.btn-approve { background:#16a34a; color:#fff; }
.btn-alert   { background:#f59e0b; color:#fff; }
.btn-edit    { background:#64748b; color:#fff; }
.btn-medical { background:#003366; color:#fff; }

/* Prevent table stretching */
.table td {
    vertical-align: middle;
}
.data-table {
    width:100%;
    border-collapse:collapse;
}

.data-table th {
    background:#f8fafc;
    padding:12px;
    text-align:left;
    border-bottom:2px solid #e5e7eb;
}

.data-table td {
    padding:12px;
    border-bottom:1px solid #e5e7eb;
}

.action-cell {
    display:flex;
    gap:8px;
    justify-content:center;
    flex-wrap:wrap;
}

.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding:6px 10px;
    border-radius:6px;
    font-size:12px;
    font-weight:600;
    text-decoration:none;
    border:none;
    cursor:pointer;
    color:#fff;
}



.btn-approve { background:#16a34a; color:#fff; }
.btn-alert   { background:#f59e0b; color:#fff; }
.btn-edit    { background:#64748b; color:#fff; }
.btn-medical { background:#003366; color:#fff; }

.status-badge {
    padding:4px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:600;
}

.status-badge.active {
    background:#dcfce7;
    color:#166534;
}
.status-badge.pending {
    background:#fef3c7;
    color:#92400e;
}
.status-badge.rejected {
    background:#fee2e2;
    color:#991b1b;
}
.profile-page form {
    display: flex;
    flex-direction: column;
}

.profile-page form button {
    margin-top: 20px;
}
/* Disable blinking for alert status */
.alert-new,
.alert-read,
.filter-tabs {
    margin-bottom: 20px;
}

.filter-tab {
    margin-right: 15px;
    font-weight: 600;
    text-decoration: none;
    color: #6b7280;
}

.filter-tab.active {
    color: #1d4ed8;
    border-bottom: 3px solid #1d4ed8;
    padding-bottom: 4px;
}
/* Alert history polish */
.filter-bar {
    margin: 15px 0 25px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}

.filter-tabs a {
    margin-right: 10px;
}

/* Table refinements */
.profile-page table {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
}

.profile-page table thead th {
    background: #f8fafc;
    font-weight: 600;
    color: #0f172a;
    padding: 14px;
}

.profile-page table tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.profile-page table tbody tr:hover {
    background: #f9fafb;
}

.profile-page table td {
    padding: 14px;
    vertical-align: middle;
}

/* Badge alignment */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
}
/* --- Alert History filter tab alignment fix --- */
.filter-tabs {
    display: flex;
    align-items: center;   /* key fix */
    gap: 12px;
}

.filter-tabs a {
    display: inline-flex;  /* key fix */
    align-items: center;
    justify-content: center;
    height: 36px;          /* force equal height */
    padding: 0 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

/* Active tab */
.filter-tabs a.active {
    background: #003366;
    color: #ffffff;
}

/* Inactive tabs */
.filter-tabs a:not(.active) {
    color: #4f46e5;
}
.status-new         { background:#dbeafe; color:#1d4ed8; }
.status-pending     { background:#fef3c7; color:#92400e; }
.status-switch      { background:#ede9fe; color:#6d28d9; }
.status-active      { background:#dcfce7; color:#166534; }
.status-processed   { background:#ccfbf1; color:#065f46; }
.status-ack         { background:#e0f2fe; color:#0369a1; }
.status-terminated  { background:#fee2e2; color:#991b1b; }
.status-deprecated  { background:#e5e7eb; color:#374151; }
/* =====================================================
   DASHBOARD OVERVIEW CARDS (SCOPED – SAFE)
   ===================================================== */

body.dashboard .overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

body.dashboard .overview-grid a {
    text-decoration: none;
    color: inherit;
}

body.dashboard .overview-card {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    border-left: 5px solid var(--primary-blue);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
}

body.dashboard .overview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

body.dashboard .overview-card h3 {
    margin-bottom: 8px;
    color: var(--primary-blue);
}

body.dashboard .overview-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}
.main-content {
    margin-left: 260px;
    padding: 30px;
    background: var(--bg-light);
    min-height: 100vh;
}

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

.card-table {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.05);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: var(--primary-blue);
    color: #fff;
    padding: 12px;
    text-align: left;
}

.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.admin-table tr:hover {
    background: #f5f9ff;
}

.btn-primary {
    background: var(--accent-gold);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
}

.btn-action {
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
}

.btn-edit {
    background: #0d6efd;
    color: #fff;
}

.btn-delete {
    background: #dc3545 !important;
    color: #fff !important;
    text-decoration: none !important;
    display: inline-block;
}

.btn-delete:hover {
    background: #b02a37;
    color: #fff !important;
}

.badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
}

.badge-success {
    background: #28a745;
    color: #fff;
}

.badge-warning {
    background: #ffc107;
    color: #000;
}

.alert-success {
    background: #d4edda;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.alert-danger {
    background: #f8d7da;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
}
a.btn-delete {
    background: #dc3545;
    color: #fff;
    padding:6px 10px;
    border-radius:6px;
}
/* ===== REPORT MODERN UI ===== */

.page-title {
    margin-bottom: 15px;
}

/* Summary grid */
.summary-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.summary-card {
    background: #ffffff;
    padding: 12px 18px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    min-width: 120px;
}

.summary-status {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.summary-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-blue);
}

/* Filter toolbar */
.report-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.report-toolbar input,
.report-toolbar select {
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 13px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-reset {
    font-size: 13px;
    color: #dc3545;
    font-weight: 600;
    text-decoration: none;
}

/* Table card */
.table-card {
    background: #ffffff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Compact table */
.admin-table.compact th,
.admin-table.compact td {
    padding: 8px 10px;
    font-size: 13px;
}

/* Status pill */
.status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-pending { background:#fef3c7; color:#92400e; }
.status-active { background:#dcfce7; color:#166534; }
.status-processed { background:#ccfbf1; color:#065f46; }
.status-inactive { background:#e5e7eb; color:#374151; }
.status-switch { background:#ede9fe; color:#6d28d9; }
.status-terminated { background:#fee2e2; color:#991b1b; }
.status-deprecated { background:#f3f4f6; color:#374151; }
