/* ========================================
   CSS VARIABLES - Government Theme
   ======================================== */
:root {
    /* Primary Colors - India Post Brand */
    --indiapost-red: #C8102E;
    --indiapost-dark-red: #A00D24;
    --indiapost-maroon: #800020;
    --indiapost-gold: #FFB81C;
    --indiapost-light-gold: #FFD700;

    /* Government Theme Colors */
    --govt-blue: #003366;
    --govt-dark-blue: #002244;
    --header-gradient-start: #1a0a0e;
    --header-gradient-end: #3d1a22;

    /* Background Colors */
    --bg-primary: #FDF8F4;
    --bg-secondary: #FFF5EB;
    --bg-light: #FFFAF6;
    --bg-cream: #FFFEF9;

    /* Text Colors */
    --text-primary: #2C1810;
    --text-secondary: #5D4037;
    --text-muted: #8D6E63;
    --text-light: #A1887F;

    /* UI Colors */
    --white: #FFFFFF;
    --border-color: #E8D5C4;
    --border-light: #F0E6DC;
    --shadow-color: rgba(200, 16, 46, 0.08);
    --shadow-dark: rgba(0, 0, 0, 0.1);

    /* Status Colors */
    --success-color: #2E7D32;
    --success-light: #E8F5E9;
    --warning-color: #F57C00;
    --warning-light: #FFF3E0;
    --danger-color: #C62828;
    --danger-light: #FFEBEE;
    --info-color: #1565C0;
    --info-light: #E3F2FD;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s ease;
}

/* ========================================
   BASE STYLES & RESET
   ======================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   GOVERNMENT HEADER - Top Banner
   ======================================== */
.govt-top-banner {
    background: linear-gradient(90deg, #000428 0%, #004e92 50%, #000428 100%);
    padding: 8px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
}

.govt-top-banner a {
    color: var(--indiapost-gold);
    text-decoration: none;
    transition: var(--transition-fast);
}

.govt-top-banner a:hover {
    color: var(--white);
    text-decoration: underline;
}

.govt-links {
    display: flex;
    gap: 20px;
}

/* ========================================
   MAIN HEADER
   ======================================== */
.main-header {
    background: linear-gradient(135deg, var(--header-gradient-start) 0%, var(--header-gradient-end) 50%, var(--indiapost-dark-red) 100%);
    padding: 24px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 5px solid var(--indiapost-gold);
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

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

.emblem-container {
    position: relative;
}

.emblem {
    width: 90px;
    height: 90px;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.emblem img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-text {
    color: var(--white);
}

.govt-name {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.85;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.dept-name {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.9;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.portal-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(180deg, #FFFFFF 0%, #E0E0E0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.division-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--indiapost-gold);
    margin-top: 6px;
    letter-spacing: 1px;
}

/* System Status Panel */
.system-status-panel {
    background: linear-gradient(135deg, rgba(255, 184, 28, 0.15) 0%, rgba(255, 184, 28, 0.08) 100%);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    border: 2px solid rgba(255, 184, 28, 0.4);
    color: var(--white);
    backdrop-filter: blur(10px);
}

.status-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.8;
    margin-bottom: 12px;
    font-weight: 600;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    margin-bottom: 8px;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4CAF50;
    box-shadow: 0 0 10px #4CAF50, 0 0 20px rgba(76, 175, 80, 0.5);
    animation: pulse-glow 2s infinite;
}

.status-indicator.offline {
    background: #f44336;
    box-shadow: 0 0 10px #f44336;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.95); }
}

.status-label {
    opacity: 0.85;
}

.status-value {
    font-weight: 600;
    color: var(--indiapost-gold);
}

/* ========================================
   NAVIGATION TABS
   ======================================== */
.nav-container {
    background: var(--white);
    box-shadow: 0 2px 15px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-tabs {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    padding: 0 40px;
    gap: 8px;
}

.nav-tab {
    padding: 20px 36px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 4px solid transparent;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    position: relative;
}

.nav-tab i {
    font-size: 16px;
    transition: var(--transition-normal);
}

.nav-tab:hover {
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--white) 100%);
    color: var(--indiapost-red);
}

.nav-tab:hover i {
    transform: scale(1.1);
}

.nav-tab.active {
    border-bottom-color: var(--indiapost-red);
    color: var(--indiapost-red);
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--white) 100%);
}

.nav-tab.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--indiapost-gold);
    border-radius: 0 0 3px 3px;
}

/* ========================================
   MAIN CONTAINER
   ======================================== */
.main-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 32px 40px;
    flex: 1;
    width: 100%;
}

/* Section Styles */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

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

/* ========================================
   STATISTICS CARDS
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--bg-cream) 100%);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px var(--shadow-color), 0 1px 3px var(--shadow-dark);
    border-top: 5px solid var(--indiapost-red);
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.05) 0%, transparent 70%);
    border-radius: 0 0 0 100%;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px var(--shadow-color), 0 4px 12px var(--shadow-dark);
}

.stat-card .stat-icon {
    position: absolute;
    right: 24px;
    top: 24px;
    font-size: 48px;
    color: var(--indiapost-red);
    opacity: 0.12;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 6px;
}

.stat-sublabel {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-sublabel i {
    font-size: 10px;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 12px;
}

.stat-change.positive {
    background: var(--success-light);
    color: var(--success-color);
}

.stat-change.negative {
    background: var(--danger-light);
    color: var(--danger-color);
}

/* ========================================
   CARD COMPONENT
   ======================================== */
.card {
    background: var(--white);
    padding: 28px 32px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px var(--shadow-color), 0 1px 3px var(--shadow-dark);
    margin-bottom: 28px;
    border: 1px solid var(--border-light);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--indiapost-red);
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--indiapost-gold);
}

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

.card-title i {
    color: var(--indiapost-red);
    font-size: 20px;
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.card-actions {
    display: flex;
    gap: 12px;
}

/* ========================================
   CHARTS GRID
   ======================================== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-bottom: 32px;
}

.chart-container {
    background: var(--white);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px var(--shadow-color);
    border: 1px solid var(--border-light);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-title i {
    color: var(--indiapost-red);
}

.chart-legend {
    display: flex;
    gap: 20px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* ========================================
   DATA TABLES
   ======================================== */
.table-container {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    background: linear-gradient(180deg, var(--indiapost-red) 0%, var(--indiapost-dark-red) 100%);
    color: var(--white);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table th:first-child {
    border-radius: var(--radius-md) 0 0 0;
}

.data-table th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

/* Sortable Table Headers */
.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 30px;
}

.data-table th.sortable:hover {
    background: linear-gradient(180deg, var(--indiapost-dark-red) 0%, #6b1515 100%);
}

.data-table th.sortable .sort-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 12px;
}

.data-table th.sortable.sort-asc .sort-icon,
.data-table th.sortable.sort-desc .sort-icon {
    opacity: 1;
}

.data-table th.sortable.sort-asc .sort-icon::before {
    content: "\f0de";
}

.data-table th.sortable.sort-desc .sort-icon::before {
    content: "\f0dd";
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--white) 100%);
}

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

.data-table .text-center {
    text-align: center;
}

.data-table .text-right {
    text-align: right;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-track {
    width: 100px;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--indiapost-red) 0%, var(--indiapost-gold) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-value {
    font-weight: 600;
    min-width: 50px;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

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

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

.rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.rank-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #5D4037;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.rank-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #A0A0A0 100%);
    color: #424242;
}

.rank-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
    color: var(--white);
}

.rank-default {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-primary);
}

.form-label .required {
    color: var(--indiapost-red);
    margin-left: 2px;
}

.form-label i {
    margin-right: 8px;
    color: var(--indiapost-red);
}

.form-input,
.form-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition-normal);
    background: var(--white);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--indiapost-red);
    box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* File Upload */
.upload-area {
    border: 3px dashed var(--border-color);
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--white) 100%);
    position: relative;
}

.upload-area:hover {
    border-color: var(--indiapost-red);
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--white) 100%);
}

.upload-area.dragover {
    border-color: var(--indiapost-red);
    background: var(--bg-secondary);
    transform: scale(1.01);
}

.upload-area input[type="file"] {
    display: none;
}

.upload-icon {
    font-size: 52px;
    color: var(--indiapost-red);
    margin-bottom: 16px;
    opacity: 0.8;
}

.upload-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.upload-formats {
    font-size: 12px;
    color: var(--text-light);
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.upload-filename {
    margin-top: 16px;
    padding: 12px 20px;
    background: var(--success-light);
    color: var(--success-color);
    border-radius: var(--radius-md);
    font-weight: 600;
    display: none;
}

.upload-filename.show {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    font-family: inherit;
}

.btn i {
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--indiapost-red) 0%, var(--indiapost-dark-red) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--text-secondary) 0%, #4E342E 100%);
    color: var(--white);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(93, 64, 55, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #1B5E20 100%);
    color: var(--white);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #E65100 100%);
    color: var(--white);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 124, 0, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #B71C1C 100%);
    color: var(--white);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(198, 40, 40, 0.3);
}

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

.btn-outline:hover {
    border-color: var(--indiapost-red);
    color: var(--indiapost-red);
    background: var(--bg-light);
}

.btn-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    padding: 16px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    font-size: 20px;
}

.alert-success {
    background: linear-gradient(90deg, var(--success-light) 0%, #C8E6C9 100%);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background: linear-gradient(90deg, var(--danger-light) 0%, #FFCDD2 100%);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: linear-gradient(90deg, var(--warning-light) 0%, #FFE0B2 100%);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: linear-gradient(90deg, var(--info-light) 0%, #BBDEFB 100%);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

/* ========================================
   INFO BOX
   ======================================== */
.info-box {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-light) 100%);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    margin-top: 24px;
    border: 1px solid var(--border-color);
}

.info-box-title {
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.info-box-title i {
    color: var(--info-color);
}

.info-box-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.info-box code {
    background: var(--white);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    border: 1px solid var(--border-color);
    color: var(--indiapost-red);
}

/* ========================================
   MASTER DATA SECTION
   ======================================== */
.master-stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.master-stat-item {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.master-stat-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--indiapost-red) 0%, var(--indiapost-dark-red) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
}

.master-stat-info h4 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.master-stat-info p {
    font-size: 12px;
    color: var(--text-muted);
}

.import-export-section {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
    padding: 24px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ========================================
   FOOTER
   ======================================== */
.main-footer {
    background: linear-gradient(135deg, var(--header-gradient-start) 0%, var(--header-gradient-end) 100%);
    color: var(--white);
    padding: 32px 40px;
    border-top: 4px solid var(--indiapost-gold);
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-emblem {
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.footer-emblem img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer-text h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.footer-text p {
    font-size: 12px;
    opacity: 0.8;
}

.footer-right {
    text-align: right;
}

.footer-right p {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 4px;
}

.footer-links {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.footer-links a {
    color: var(--indiapost-gold);
    text-decoration: none;
    font-size: 12px;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--white);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .govt-top-banner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 8px 15px;
    }

    .main-header {
        padding: 15px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .logo-section {
        flex-direction: column;
    }

    .portal-title {
        font-size: 18px;
    }

    .dept-name {
        font-size: 11px;
    }

    .division-name {
        font-size: 11px;
    }

    .emblem {
        width: 60px;
        height: 60px;
    }

    .system-status-panel {
        padding: 12px 16px;
        font-size: 11px;
    }

    .nav-tabs {
        flex-wrap: wrap;
        padding: 8px;
        gap: 4px;
    }

    .nav-tab {
        padding: 8px 4px;
        font-size: 10px;
        flex: 1 1 auto;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
    }

    .nav-tab span {
        display: inline-block;
        font-size: 9px;
        line-height: 1.1;
        text-align: center;
    }

    .nav-tab i {
        font-size: 18px;
    }

    .main-container {
        padding: 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-value {
        font-size: 22px;
    }

    .stat-label {
        font-size: 10px;
    }

    .stat-card .stat-icon {
        font-size: 32px;
        right: 12px;
        top: 12px;
    }

    .card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .card-title {
        font-size: 14px;
    }

    .charts-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .chart-container {
        padding: 12px;
        height: auto !important;
        min-height: 280px;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn {
        padding: 12px 20px;
        font-size: 13px;
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .form-input, .form-select {
        padding: 12px 14px;
        font-size: 14px;
    }

    .table-container {
        max-height: 350px;
    }

    .data-table {
        font-size: 11px;
    }

    .data-table th, .data-table td {
        padding: 8px 6px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }

    .footer-right {
        text-align: center;
    }

    .import-export-section {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .upload-area {
        padding: 20px;
    }

    .upload-icon {
        font-size: 32px;
    }

    .upload-title {
        font-size: 14px;
    }

    .report-type-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .report-type-card {
        padding: 15px;
    }

    .report-type-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .report-summary-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .report-summary-card {
        padding: 15px;
    }

    .report-summary-card .summary-value {
        font-size: 22px;
    }

    .period-selector {
        flex-direction: column;
    }

    .period-btn {
        width: 100%;
        justify-content: center;
    }

    .dashboard-header-row {
        flex-direction: column;
        gap: 10px !important;
    }

    .network-stats {
        flex-wrap: wrap;
        justify-content: center;
    }

    .master-stats-row {
        flex-direction: column;
    }

    .master-stat-item {
        width: 100%;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .report-summary-grid {
        grid-template-columns: 1fr !important;
    }

    .nav-tab {
        padding: 10px 8px;
    }

    .stat-value {
        font-size: 20px;
    }
}

/* ========================================
   LOGIN MODAL
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    transform: scale(0.9) translateY(-20px);
    transition: var(--transition-normal);
    overflow: hidden;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    background: linear-gradient(135deg, var(--indiapost-red) 0%, var(--indiapost-dark-red) 100%);
    color: var(--white);
    padding: 25px;
    text-align: center;
}

.modal-header i {
    font-size: 40px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: 25px;
}

.modal-body .form-group {
    margin-bottom: 18px;
}

.modal-footer {
    padding: 15px 25px 25px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 100px;
}

/* ========================================
   LOADING STATES
   ======================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 20px;
    font-size: 16px;
    color: var(--text-secondary);
}

/* ========================================
   EMPTY STATES
   ======================================== */
.empty-state {
    text-align: center;
    padding: 60px 40px;
}

.empty-state-icon {
    font-size: 72px;
    color: var(--border-color);
    margin-bottom: 24px;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.empty-state-text {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
}

/* ========================================
   REPORT SECTION STYLES
   ======================================== */
.report-type-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--bg-cream) 100%);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 10px var(--shadow-color);
}

.report-type-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--shadow-color);
    border-color: var(--indiapost-red);
}

.report-type-card.active {
    border-color: var(--indiapost-red);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--white) 100%);
    box-shadow: 0 4px 20px rgba(200, 16, 46, 0.15);
}

.report-type-card.active .report-type-icon {
    transform: scale(1.1);
}

.report-type-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 22px;
    flex-shrink: 0;
    transition: var(--transition-normal);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.report-type-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.report-type-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.period-btn {
    padding: 12px 24px;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.period-btn:hover {
    border-color: var(--indiapost-red);
    color: var(--indiapost-red);
    background: var(--bg-light);
}

.period-btn.active {
    border-color: var(--indiapost-red);
    background: linear-gradient(135deg, var(--indiapost-red) 0%, var(--indiapost-dark-red) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.3);
}

.period-btn.active i {
    color: var(--white);
}

.report-summary-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--bg-cream) 100%);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px var(--shadow-color);
    border-left: 5px solid var(--indiapost-red);
    position: relative;
    overflow: hidden;
}

.report-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.08) 0%, transparent 70%);
    border-radius: 0 0 0 100%;
}

.report-summary-card.success {
    border-left-color: var(--success-color);
}

.report-summary-card.warning {
    border-left-color: var(--warning-color);
}

.report-summary-card.danger {
    border-left-color: var(--danger-color);
}

.report-summary-card.info {
    border-left-color: var(--info-color);
}

.report-summary-card .summary-icon {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 36px;
    opacity: 0.1;
}

.report-summary-card .summary-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.report-summary-card .summary-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.report-summary-card .summary-sublabel {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

/* Status indicator badges */
.status-improving {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: var(--success-color);
}

.status-declining {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    color: var(--danger-color);
}

.status-stable {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    color: var(--warning-color);
}

/* Change indicators */
.change-positive {
    color: var(--success-color);
}

.change-negative {
    color: var(--danger-color);
}

.change-neutral {
    color: var(--text-muted);
}

/* Responsive adjustments for report cards */
@media (max-width: 1200px) {
    .report-type-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .report-summary-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .report-type-grid {
        grid-template-columns: 1fr !important;
    }
    .report-summary-grid {
        grid-template-columns: 1fr !important;
    }
    .period-selector {
        flex-direction: column;
    }
    .period-btn {
        width: 100%;
        justify-content: center;
    }
}