/* ========================================================
   MAIL OPERATIONS PORTAL - UNIFIED STYLESHEET
   Aesthetics matching the Digital Transaction Management Portal
   ======================================================== */

/* ========================================================
   DESIGN SYSTEM TOKENS & THEMING
   ======================================================== */
:root {
    /* Primary Colors */
    --primary: #b91c1c;
    --primary-dark: #7f1d1d;
    --primary-light: #fca5a5;
    --primary-glow: rgba(185, 28, 28, 0.12);

    /* Accent & Brand Colors */
    --accent: #fbbf24;
    --accent-dark: #d97706;
    --accent-light: #fef08a;

    /* Semantic Indicators */
    --success: #10b981;
    --success-light: #d1fae5;
    --success-dark: #065f46;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #0ea5e9;
    --info-light: #e0f2fe;

    /* Surface & Background Levels */
    --bg-body: #f1f3f7;
    --bg-surface: #ffffff;
    --bg-surface-2: #f8fafc;
    --bg-surface-hover: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.75);

    /* Typography Color Palette */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;

    /* Borders & Shadows */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 8px 16px -2px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 16px 28px -4px rgba(0, 0, 0, 0.1), 0 8px 12px -4px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 24px 38px -6px rgba(0, 0, 0, 0.12);

    /* Layout Elements */
    --header-bg: linear-gradient(135deg, #450a0a 0%, #7f1d1d 50%, #b91c1c 100%);
    --nav-bg: var(--bg-surface);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --trans: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --trans-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Color Palette overrides */
[data-theme="dark"] {
    --primary: #fb7185;
    --primary-dark: #991b1b;
    --primary-light: #fecaca;
    --primary-glow: rgba(248, 113, 113, 0.15);

    --accent: #fbbf24;
    --accent-dark: #d97706;

    --success: #34d399;
    --success-light: rgba(16, 185, 129, 0.15);
    --success-dark: #34d399;
    --warning: #fbbf24;
    --warning-light: rgba(245, 158, 11, 0.15);
    --danger: #fb7185;
    --danger-light: rgba(239, 68, 68, 0.15);
    --info: #38bdf8;
    --info-light: rgba(14, 165, 233, 0.15);

    --bg-body: #090d16;
    --bg-surface: #131c2e;
    --bg-surface-2: #1e293b;
    --bg-surface-hover: #29354f;
    --bg-glass: rgba(19, 28, 46, 0.8);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-inverse: #0f172a;

    --border: #232e48;
    --border-light: #1c273c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.25), 0 2px 4px -1px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 8px 16px -2px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 16px 28px -4px rgba(0, 0, 0, 0.4), 0 8px 12px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 24px 38px -6px rgba(0, 0, 0, 0.5);

    --header-bg: linear-gradient(135deg, #180202 0%, #300505 50%, #131c2e 100%);
}

/* ========================================================
   GLOBAL RESETS & CORE COMPONENTS
   ======================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background var(--trans), color var(--trans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

/* Scrollbar customizations */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

a {
    color: inherit;
    text-decoration: none;
}

/* ========================================================
   HEADER & SYSTEM BANNER
   ======================================================== */
.govt-top-banner {
    background: linear-gradient(90deg, #000428 0%, #004e92 50%, #000428 100%);
    padding: 6px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.6px;
    font-weight: 500;
}

.govt-top-banner .govt-links a {
    color: var(--accent);
    text-decoration: none;
    margin-left: 15px;
    font-weight: 600;
    transition: opacity var(--trans);
}

.govt-top-banner .govt-links a:hover {
    opacity: 0.8;
}

.govt-header {
    background: var(--header-bg);
    padding: 16px 32px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 100;
    border-bottom: none;
    transition: background var(--trans);
}

.govt-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--accent), var(--success), var(--info), var(--primary-light));
    background-size: 200% auto;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.emblem {
    width: 68px;
    height: 52px;
    background: #ffffff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--accent);
    padding: 4px;
    flex-shrink: 0;
}

.header-text {
    color: #ffffff;
}

.dept-name {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.75;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.portal-title {
    font-size: 21px;
    font-weight: 800;
    margin-top: 2px;
    letter-spacing: -0.3px;
    background: linear-gradient(90deg, #ffffff, #fef08a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Developer Capsule Credit Badge */
.developer-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #7f1d1d, #450a0a);
    border: 2px solid var(--accent-dark);
    border-radius: var(--radius-full);
    padding: 4px 16px 4px 6px;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    box-shadow: var(--shadow-md);
    gap: 10px;
    max-width: 280px;
    height: 44px;
    transition: transform var(--trans), box-shadow var(--trans);
    cursor: pointer;
    text-decoration: none;
}

.developer-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
}

.dev-photo-frame {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fbbf24;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #ffffff;
}

.dev-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dev-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.dev-title {
    font-size: 8px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #f3f4f6;
    opacity: 0.85;
    font-weight: 700;
}

.dev-name {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-top: 1px;
}

.dev-code-icon {
    margin-left: auto;
    color: #fbbf24;
    font-size: 13px;
    font-weight: bold;
    opacity: 0.9;
    display: flex;
    align-items: center;
    padding-left: 5px;
}

/* ========================================================
   NAVIGATION SYSTEM (TABS)
   ======================================================== */
.nav-container {
    background: var(--nav-bg);
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 95;
    transition: background var(--trans), border var(--trans);
}

.nav-tabs {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    padding: 0 32px;
    gap: 4px;
    overflow-x: auto;
}

.nav-tab {
    padding: 16px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12.5px;
    letter-spacing: 0.02em;
    border: none;
    border-bottom: 3.5px solid transparent;
    transition: all var(--trans);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    white-space: nowrap;
    text-transform: uppercase;
}

.nav-tab i {
    font-size: 14px;
    transition: color var(--trans);
}

.nav-tab:hover {
    color: var(--primary);
    background: var(--primary-glow);
}

.nav-tab.active {
    color: var(--primary);
    background: var(--primary-glow);
    border-bottom-color: var(--primary);
}

/* ========================================================
   LAYOUT CONTAINER
   ======================================================== */
.main-container, .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 32px;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

.section-divider {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.section-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title i {
    color: var(--primary);
}

/* ========================================================
   KPI STATISTICS CARDS SYSTEM
   ======================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-surface);
    padding: 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.stat-icon-wrapper, .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 12px var(--primary-glow);
}

.stat-label {
    font-size: 11.5px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.stat-sublabel {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Card variant stylings */
.stat-card.card-total::before { background: linear-gradient(90deg, #1e293b, #475569); }
.stat-card.card-total .stat-icon-wrapper { background: linear-gradient(135deg, #1e293b, #475569); box-shadow: 0 4px 12px rgba(30, 41, 59, 0.15); }

.stat-card.card-retail::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.card-retail .stat-icon-wrapper { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2); }

.stat-card.card-contractual::before { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.stat-card.card-contractual .stat-icon-wrapper { background: linear-gradient(135deg, #0ea5e9, #0369a1); box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2); }

.stat-card.card-speed-doc::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card.card-speed-doc .stat-icon-wrapper { background: linear-gradient(135deg, #f59e0b, #b45309); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2); }

/* ========================================================
   CARDS AND INTERACTION FORM SYSTEMS
   ======================================================== */
.card, .chart-container {
    background: var(--bg-surface);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 24px;
    transition: background var(--trans), border-color var(--trans), box-shadow var(--trans);
}

.card-header, .chart-header {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color var(--trans), border var(--trans);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.card-header i, .chart-header i {
    color: var(--primary);
    font-size: 16px;
}

.chart-card {
    background: var(--bg-surface);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: background var(--trans), border var(--trans);
}

.dashboard-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media(max-width: 992px) {
    .dashboard-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Form layouts */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group label i {
    color: var(--primary);
    margin-right: 4px;
}

.form-control, .form-input, select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    background: var(--bg-surface-2);
    color: var(--text-primary);
    transition: all var(--trans);
    outline: none;
}

.form-control:focus, .form-input:focus, select:focus {
    border-color: var(--primary);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ========================================================
   PREMIUM BUTTONS SYSTEM
   ======================================================== */
.btn {
    padding: 11px 22px;
    border-radius: var(--radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
    filter: brightness(1.05);
}

.btn-secondary {
    background: var(--bg-surface-2);
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--text-tertiary);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-glow);
}

/* ========================================================
   MODERN TABULAR SYSTEMS
   ======================================================== */
.table-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 550px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    transition: border var(--trans);
    scrollbar-width: thin;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    text-align: left;
}

th {
    background: var(--bg-surface-2);
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 11px;
    padding: 14px 16px;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    transition: background var(--trans), border var(--trans);
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    vertical-align: middle;
    transition: background var(--trans), border var(--trans);
}

tbody tr:hover td {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
}

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

/* Table accents & tags */
.status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.badge-success {
    background: var(--success-light);
    color: var(--success-dark);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--primary-dark);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--accent-dark);
}

/* ========================================================
   REPORT SELECTIONS (GRID CARDS)
   ======================================================== */
.report-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.report-type-card {
    background: var(--bg-surface);
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--trans);
}

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

.report-type-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: linear-gradient(135deg, var(--bg-surface-2) 0%, var(--bg-surface) 100%);
}

.report-type-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.report-type-info h4 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.report-type-info p {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ========================================================
   ADMIN GATEWAY & SECURITY FORM
   ======================================================== */
.login-box {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    margin: 80px auto;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .login-box {
    border-color: rgba(255, 255, 255, 0.04);
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4.5px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.login-logo {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--primary-glow);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
    border: 1.5px solid rgba(185, 28, 28, 0.15);
}

.secure-gate-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--success-light);
    color: var(--success-dark);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.login-input-wrap {
    position: relative;
    margin-bottom: 18px;
}

.login-input-wrap .form-control {
    padding-left: 40px;
    padding-right: 40px;
}

.login-input-wrap .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 14px;
    pointer-events: none;
}

.login-input-wrap .pwd-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 14px;
    transition: color var(--trans);
    outline: none;
}

.login-input-wrap .pwd-toggle:hover {
    color: var(--primary);
}

/* ========================================================
   LOADING SPINNER
   ======================================================== */
#loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

/* ========================================================
   DATE BADGE & PERIOD SELECTORS
   ======================================================== */
.data-period-badge {
    background: var(--bg-surface);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    font-size: 12.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    gap: 10px;
    transition: background var(--trans), border var(--trans);
}

/* ========================================================
   MOBILE RESPONSIENESS PRESENTS
   ======================================================== */
@media (max-width: 768px) {
    .govt-header { padding: 16px; }
    .header-content { flex-direction: column; text-align: center; gap: 14px; }
    .logo-section { flex-direction: column; }
    .nav-tabs { padding: 0 16px; }
    .nav-tab { padding: 12px 16px; font-size: 11.5px; }
    .main-container, .container { padding: 16px; }
    .form-grid { grid-template-columns: 1fr; gap: 14px; }
    .report-type-grid { grid-template-columns: 1fr; }
}

/* ========================================================
   GLOBAL FOOTER STYLING
   ======================================================== */
.footer {
    background: linear-gradient(135deg, #180202, #450a0a);
    color: rgba(255, 255, 255, 0.7);
    padding: 24px 32px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    border-top: none;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    width: 100%;
    box-sizing: border-box;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--accent), var(--success));
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}

/* Custom premium scrollbar for horizontal scrolling data periods container */
#dataPeriodsBody::-webkit-scrollbar {
    height: 6px;
}
#dataPeriodsBody::-webkit-scrollbar-track {
    background: transparent;
}
#dataPeriodsBody::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 10px;
    transition: background-color var(--trans);
}
#dataPeriodsBody::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-tertiary);
}

/* Custom premium scrollbar for table container vertical and horizontal scroll */
.table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.table-container::-webkit-scrollbar-track {
    background: transparent;
}
.table-container::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 10px;
    transition: background-color var(--trans);
}
.table-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-tertiary);
}

/* ========================================================
   ADMIN SIDEBAR LAYOUT (Digital Transaction Admin Theme)
   ======================================================== */
:root {
    --sidebar-width: 260px;
}

body.admin-body {
    background-color: var(--bg-body);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background var(--trans), color var(--trans);
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #180202 0%, #300505 50%, #131c2e 100%);
    color: #FFFFFF;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 25px rgba(185, 28, 28, 0.12);
    z-index: 100;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: background var(--trans);
}

[data-theme="dark"] .admin-sidebar {
    background: linear-gradient(180deg, #090d16 0%, #131c2e 100%);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.5);
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand img {
    width: 44px;
    height: 44px;
    background: #FFFFFF;
    border-radius: 8px;
    padding: 3px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.brand-text {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.5px;
    color: #FFFFFF;
    line-height: 1.25;
}

.brand-subtext {
    font-size: 11px;
    color: var(--accent); /* Gold accent */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.sidebar-user {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    margin: 20px 15px 10px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.12);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    border: 1.5px solid rgba(251, 191, 36, 0.3);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #FFFFFF;
}

.user-status {
    font-size: 10px;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
}

.user-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 6px #10b981;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.menu-item button, .menu-item a {
    width: 100%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    outline: none;
}

.menu-item button:hover, .menu-item a:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.menu-item.active a, .menu-item.active button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px var(--primary-glow);
    border: 1px solid rgba(255,255,255,0.08);
}

.menu-item.active a:hover, .menu-item.active button:hover {
    transform: none;
}

.sidebar-footer {
    padding: 16px 20px;
    font-size: 10.5px;
    color: rgba(255,255,255,0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    line-height: 1.4;
}

.admin-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-body);
    transition: background var(--trans);
}

.admin-navbar {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: var(--shadow-sm);
    transition: background var(--trans), border var(--trans);
}

.navbar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.navbar-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-content {
    padding: 32px 40px;
    flex: 1;
}

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

.stats-grid .stat-card:nth-child(1)::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stats-grid .stat-card:nth-child(1) .stat-icon { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); box-shadow: 0 4px 14px var(--primary-glow); }
.stats-grid .stat-card:nth-child(1) .stat-value { color: var(--primary); }
.stats-grid .stat-card:nth-child(1):hover { box-shadow: 0 12px 28px var(--primary-glow); border-color: var(--primary-light); }

.stats-grid .stat-card:nth-child(2)::before { background: linear-gradient(90deg, var(--success), var(--success-light)); }
.stats-grid .stat-card:nth-child(2) .stat-icon { background: linear-gradient(135deg, var(--success), var(--success-dark)); box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35); }
.stats-grid .stat-card:nth-child(2) .stat-value { color: var(--success); }
.stats-grid .stat-card:nth-child(2):hover { box-shadow: 0 12px 28px rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.3); }

.stats-grid .stat-card:nth-child(3)::before { background: linear-gradient(90deg, var(--info), var(--info-light)); }
.stats-grid .stat-card:nth-child(3) .stat-icon { background: linear-gradient(135deg, var(--info), #0284c7); box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35); }
.stats-grid .stat-card:nth-child(3) .stat-value { color: var(--info); }
.stats-grid .stat-card:nth-child(3):hover { box-shadow: 0 12px 28px rgba(14, 165, 233, 0.18); border-color: rgba(14, 165, 233, 0.3); }

.stats-grid .stat-card:nth-child(4)::before { background: linear-gradient(90deg, var(--warning), var(--warning-light)); }
.stats-grid .stat-card:nth-child(4) .stat-icon { background: linear-gradient(135deg, var(--warning), var(--accent-dark)); box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35); }
.stats-grid .stat-card:nth-child(4) .stat-value { color: var(--warning); }
.stats-grid .stat-card:nth-child(4):hover { box-shadow: 0 12px 28px rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.3); }

@media (max-width: 768px) {
    .admin-sidebar {
        width: 60px;
        overflow: hidden;
    }
    .admin-sidebar .sidebar-brand span,
    .admin-sidebar .sidebar-user .user-info,
    .admin-sidebar .menu-item span,
    .admin-sidebar .sidebar-footer {
        display: none;
    }
    .admin-sidebar .sidebar-brand {
        padding: 20px 8px;
        justify-content: center;
    }
    .admin-sidebar .sidebar-brand img {
        width: 36px;
        height: 36px;
    }
    .admin-sidebar .sidebar-user {
        margin: 10px 5px;
        padding: 8px;
        justify-content: center;
    }
    .admin-sidebar .menu-item button,
    .admin-sidebar .menu-item a {
        padding: 12px;
        justify-content: center;
    }
    .admin-sidebar .menu-item i {
        font-size: 18px;
        margin: 0;
    }
    .admin-main {
        margin-left: 60px;
    }
    .admin-navbar {
        padding: 0 20px;
    }
    .admin-content {
        padding: 20px;
    }
}
