/**
 * Dashboard CSS - Guru POL
 * Theme: Warm Academic Heritage
 * A sophisticated, professional design for educational excellence
 */

/* ============================================
   GOOGLE FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,400;0,500;0,600;0,700;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ============================================
   CSS VARIABLES - WARM ACADEMIC PALETTE
   ============================================ */
:root {
    /* Primary - Deep Burgundy/Maroon */
    --primary: #881337;
    --primary-dark: #6b1028;
    --primary-light: #a91d4a;
    --primary-subtle: #fdf2f4;

    /* Secondary - Rich Amber Gold */
    --secondary: #b45309;
    --secondary-light: #d97706;
    --secondary-subtle: #fef3e2;

    /* Accent Colors */
    --accent-emerald: #166534;
    --accent-emerald-light: #22c55e;
    --accent-sky: #0369a1;

    /* Status Colors */
    --success: #16a34a;
    --warning: #ca8a04;
    --danger: #dc2626;
    --info: #0284c7;

    /* Neutrals - Warm Undertones */
    --bg-body: #faf8f5;
    --bg-cream: #fdfcfa;
    --bg-paper: #ffffff;
    --bg-muted: #f5f3ef;

    --border: #e8e4dd;
    --border-dark: #d4cfc5;

    --text-dark: #1c1917;
    --text: #44403c;
    --text-muted: #78716c;
    --text-light: #a8a29e;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.06), 0 1px 3px rgba(28, 25, 23, 0.04);
    --shadow-lg: 0 12px 32px rgba(28, 25, 23, 0.08), 0 4px 8px rgba(28, 25, 23, 0.04);
    --shadow-xl: 0 24px 48px rgba(28, 25, 23, 0.12), 0 8px 16px rgba(28, 25, 23, 0.06);

    /* Typography */
    --font-display: 'Crimson Pro', Georgia, 'Times New Roman', serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BASE STYLES & RESET
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-body);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle paper texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.015;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ============================================
   HEADER - HERITAGE STYLE
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: white;
    padding: 0;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 40%);
    pointer-events: none;
}

/* Decorative bottom border */
.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--secondary) 0%,
        var(--secondary-light) 25%,
        var(--secondary) 50%,
        var(--secondary-light) 75%,
        var(--secondary) 100%
    );
}

.header .container {
    padding-top: 36px;
    padding-bottom: 40px;
}

.header h1 {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 600;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header .subtitle {
    font-size: 15px;
    margin: 0;
    opacity: 0.9;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.header-meta {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-meta a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: var(--transition-fast);
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
}

.header-meta a:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ============================================
   NAVIGATION - ELEGANT TABS
   ============================================ */
.nav {
    background: var(--bg-paper);
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

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

.nav-list {
    list-style: none;
    margin: 0;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.nav-item {
    flex-shrink: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    position: relative;
}

.nav-link:hover {
    background: var(--bg-muted);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(136, 19, 55, 0.25);
}

.nav-year-selector {
    display: flex;
    align-items: center;
    padding: 0 16px;
    margin-left: auto;
    border-left: 1px solid var(--border);
}

.nav-year-selector select {
    background: var(--bg-muted);
    border: 1px solid var(--border);
    color: var(--primary);
    border-radius: var(--radius-md);
    min-width: 90px;
}

.nav-year-selector select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(136, 19, 55, 0.1);
}

/* ============================================
   CARDS - REFINED PAPER STYLE
   ============================================ */
.card {
    background: var(--bg-paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    margin-bottom: 28px;
    overflow: hidden;
    transition: var(--transition-base);
}

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

.card-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(to bottom, var(--bg-cream), var(--bg-paper));
    position: relative;
}

.card-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.card-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    letter-spacing: -0.01em;
}

.card-body {
    padding: 28px;
}

/* ============================================
   KPI CARDS - PRESTIGIOUS METRICS
   ============================================ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.kpi-card {
    background: var(--bg-paper);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
}

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

.kpi-card.info::before { background: linear-gradient(90deg, var(--info), #38bdf8); }
.kpi-card.success::before { background: linear-gradient(90deg, var(--accent-emerald), var(--accent-emerald-light)); }
.kpi-card.warning::before { background: linear-gradient(90deg, var(--secondary), var(--secondary-light)); }
.kpi-card.danger::before { background: linear-gradient(90deg, var(--danger), #f87171); }

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

.kpi-value {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.1;
    margin-bottom: 8px;
}

.kpi-subtext {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   SUMMARY CARDS - GRADIENT STYLE
   ============================================ */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.summary-card {
    padding: 28px;
    border-radius: var(--radius-lg);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.summary-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.summary-card.emerald {
    background: linear-gradient(135deg, #166534 0%, #22c55e 100%);
}

.summary-card.amber {
    background: linear-gradient(135deg, #b45309 0%, #fbbf24 100%);
}

.summary-card.blue {
    background: linear-gradient(135deg, #1e40af 0%, #60a5fa 100%);
}

.summary-card.rose {
    background: linear-gradient(135deg, #9f1239 0%, #fb7185 100%);
}

.summary-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.9;
    margin-bottom: 12px;
}

.summary-value {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 8px;
}

.summary-note {
    font-size: 13px;
    opacity: 0.85;
}

/* ============================================
   BUTTONS - REFINED & TACTILE
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    text-align: center;
    vertical-align: middle;
    line-height: 1.4;
}

.btn svg {
    flex-shrink: 0;
    vertical-align: middle;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent);
    pointer-events: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(136, 19, 55, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(136, 19, 55, 0.35);
}

.btn-secondary {
    background: var(--bg-muted);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    border-color: var(--border-dark);
}

.btn-success {
    background: var(--accent-emerald);
    color: white;
    box-shadow: 0 2px 8px rgba(22, 101, 52, 0.25);
}

.btn-success:hover {
    background: #15803d;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-warning {
    background: var(--secondary);
    color: white;
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.25);
}

.btn-warning:hover {
    background: #92400e;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* ============================================
   FORMS - ELEGANT INPUTS
   ============================================ */
.form-group {
    margin-bottom: 24px;
}

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-dark);
    background: var(--bg-paper);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    outline: none;
}

.form-control:hover {
    border-color: var(--border-dark);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(136, 19, 55, 0.1);
}

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

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    appearance: none;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ============================================
   TABLES - PROFESSIONAL DATA DISPLAY
   ============================================ */
.table-container {
    overflow-x: auto;
    margin: -8px;
    padding: 8px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

table th,
table td {
    padding: 14px 18px;
    text-align: left;
}

table thead th {
    background: linear-gradient(to bottom, var(--bg-muted), var(--bg-cream));
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    border-bottom: 2px solid var(--border-dark);
    position: sticky;
    top: 0;
}

table tbody td {
    border-bottom: 1px solid var(--border);
    transition: var(--transition-fast);
}

table tbody tr:hover td {
    background: var(--primary-subtle);
}

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

table tfoot td {
    background: var(--primary);
    color: white;
    font-weight: 700;
    padding: 16px 18px;
}

.table-striped tbody tr:nth-child(even) td {
    background: var(--bg-cream);
}

.table-striped tbody tr:nth-child(even):hover td {
    background: var(--primary-subtle);
}

/* ============================================
   BADGES - REFINED LABELS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-primary {
    background: var(--primary-subtle);
    color: var(--primary);
}

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

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

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

.badge-info {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-secondary {
    background: var(--bg-muted);
    color: var(--text-muted);
}

/* ============================================
   ALERTS - INFORMATIVE NOTICES
   ============================================ */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
}

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

.alert-success {
    background: #f0fdf4;
    border-left-color: var(--success);
    color: #166534;
}

.alert-danger {
    background: #fef2f2;
    border-left-color: var(--danger);
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-left-color: var(--warning);
    color: #92400e;
}

.alert-info {
    background: #f0f9ff;
    border-left-color: var(--info);
    color: #0c4a6e;
}

/* ============================================
   FILTERS - SEARCH & FILTER BAR
   ============================================ */
.filters {
    background: var(--bg-paper);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 160px;
}

.filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

/* ============================================
   MODALS - ELEGANT DIALOGS
   ============================================ */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(28, 25, 23, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 24px;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-backdrop.show {
    display: flex;
}

.modal {
    background: var(--bg-paper);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, var(--bg-cream), var(--bg-paper));
}

.modal-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--border);
    color: var(--text-dark);
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-cream);
}

/* ============================================
   LOGIN PAGE - DISTINGUISHED ENTRY
   ============================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(136, 19, 55, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(180, 83, 9, 0.06) 0%, transparent 50%),
        var(--bg-body);
    position: relative;
}

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

.login-box {
    background: var(--bg-paper);
    border-radius: var(--radius-xl);
    padding: 48px 44px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    position: relative;
}

.login-logo {
    text-align: center;
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.login-logo h1 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.login-logo p {
    color: var(--text-muted);
    margin: 0;
    font-size: 15px;
}

.login-logo .org-name {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 16px;
    background: var(--primary-subtle);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

/* ============================================
   PAGINATION - ELEGANT PAGE NAVIGATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-base);
}

.pagination a {
    background: var(--bg-paper);
    color: var(--text);
    border: 1px solid var(--border);
}

.pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    box-shadow: 0 2px 8px rgba(136, 19, 55, 0.25);
}

/* ============================================
   FOOTER - PROFESSIONAL CLOSING
   ============================================ */
.footer {
    text-align: center;
    padding: 36px 24px;
    margin-top: 48px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    background: linear-gradient(to bottom, var(--bg-body), var(--bg-muted));
}

.footer p {
    margin: 0;
}

/* ============================================
   CHARTS
   ============================================ */
.chart-container {
    position: relative;
    width: 100%;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -14px;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 14px;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 14px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 12px; }
.mb-2 { margin-bottom: 24px; }
.mb-3 { margin-bottom: 36px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 12px; }
.mt-2 { margin-top: 24px; }
.mt-3 { margin-top: 36px; }

.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
}

.empty-state > svg {
    width: 72px;
    height: 72px;
    opacity: 0.25;
    margin-bottom: 20px;
    color: var(--primary);
}

.empty-state .btn svg {
    width: 16px;
    height: 16px;
    opacity: 1;
    margin-bottom: 0;
    color: inherit;
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.empty-state p {
    margin: 0 0 20px 0;
    font-size: 15px;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 24px;
    }

    .col-6:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 26px;
    }

    .header .container {
        padding-top: 28px;
        padding-bottom: 32px;
    }

    .nav-list {
        flex-direction: column;
        gap: 2px;
    }

    .nav-link {
        justify-content: flex-start;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

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

    .card-body {
        padding: 20px;
    }

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

    table {
        font-size: 13px;
    }

    table th,
    table td {
        padding: 10px 12px;
    }

    .login-box {
        padding: 36px 28px;
    }

    .modal {
        max-width: 100%;
        margin: 16px;
        border-radius: var(--radius-lg);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .header h1 {
        font-size: 22px;
    }

    .kpi-value {
        font-size: 28px;
    }

    .summary-value {
        font-size: 26px;
    }

    .btn {
        padding: 10px 18px;
        font-size: 13px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: white;
        font-size: 12px;
    }

    body::before {
        display: none;
    }

    .nav,
    .filters,
    .btn,
    .footer,
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .header {
        background: white;
        color: black;
        border-bottom: 2px solid var(--primary);
    }

    .header::before,
    .header::after {
        display: none;
    }
}
