/**
 * ============================================================================
 * Sum-Ag NHS Attendance System - Global Theme Stylesheet
 * ============================================================================
 * Unified Modern Slate & Warm Gold Design System
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette - Modern Slate Dark (Default) */
    --primary: #E8B931;       /* Warm Gold */
    --primary-light: #F5D565; /* Hover Gold */
    --primary-dark: #C49B1A;  /* Active Gold */
    --accent: #3B82F6;        /* Slate Blue */
    --accent-light: #60A5FA;
    
    --bg-primary: #0F172A;    /* Slate 900 */
    --bg-secondary: #1E293B;  /* Slate 800 */
    --bg-tertiary: #334155;   /* Slate 700 */
    
    --text-primary: #F8FAFC;  /* Slate 50 */
    --text-secondary: #94A3B8;/* Slate 400 */
    --text-tertiary: #64748B; /* Slate 500 */
    
    --border: rgba(148, 163, 184, 0.12);
    --border-hover: rgba(148, 163, 184, 0.25);
    
    /* Semantic Status Colors */
    --success: #22C55E;       /* Emerald 500 */
    --success-bg: rgba(34, 197, 94, 0.1);
    --success-border: rgba(34, 197, 94, 0.2);
    
    --warning: #F59E0B;       /* Amber 500 */
    --warning-bg: rgba(245, 158, 11, 0.1);
    --warning-border: rgba(245, 158, 11, 0.2);
    
    --danger: #EF4444;        /* Red 500 */
    --danger-bg: rgba(239, 68, 68, 0.1);
    --danger-border: rgba(239, 68, 68, 0.2);
    
    --info: #06B6D4;          /* Cyan 500 */
    --info-bg: rgba(6, 182, 212, 0.1);
    --info-border: rgba(6, 182, 212, 0.2);

    /* Glassmorphism & UI Properties */
    --glass: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    --border-radius-sm: 8px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(232, 185, 49, 0.15);
}

/* Light Mode Overrides */
body.light-mode {
    --bg-primary: #F8FAFC;    /* Slate 50 */
    --bg-secondary: #FFFFFF;  /* White */
    --bg-tertiary: #E2E8F0;   /* Slate 200 */
    
    --text-primary: #0F172A;  /* Slate 900 */
    --text-secondary: #475569;/* Slate 600 */
    --text-tertiary: #94A3B8; /* Slate 400 */
    
    --border: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(15, 23, 42, 0.15);
    
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -2px rgba(15, 23, 42, 0.02);
    --shadow-glow: 0 0 20px rgba(232, 185, 49, 0.08);
}

/* ============================================================================ */
/* BASE RESET & TYPOGRAPHY */
/* ============================================================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition), color var(--transition);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-light);
}

/* ============================================================================ */
/* LAYOUT & GRID SYSTEM */
/* ============================================================================ */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.75rem;
}

.col {
    flex: 1 0 0%;
    padding: 0.75rem;
}

.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0.75rem; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; padding: 0.75rem; }
.col-6 { flex: 0 0 50%; max-width: 50%; padding: 0.75rem; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; padding: 0.75rem; }
.col-3 { flex: 0 0 25%; max-width: 25%; padding: 0.75rem; }

@media (max-width: 992px) {
    .col-8, .col-4, .col-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }
    .col, .col-12, .col-8, .col-6, .col-4, .col-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ============================================================================ */
/* CARDS & PANELS */
/* ============================================================================ */

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 1.5rem;
    flex: 1 1 auto;
}

.card-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.05);
}

/* ============================================================================ */
/* STATS / KPI CARDS */
/* ============================================================================ */

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.stat-card-details {
    display: flex;
    flex-direction: column;
}

.stat-card-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.stat-card-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--border-radius);
    background: rgba(232, 185, 49, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Color variations */
.stat-card-success .stat-card-icon {
    background: rgba(34, 197, 94, 0.08);
    color: var(--success);
}
.stat-card-danger .stat-card-icon {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
}
.stat-card-info .stat-card-icon {
    background: rgba(6, 182, 212, 0.08);
    color: var(--info);
}

/* ============================================================================ */
/* BUTTONS */
/* ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    outline: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #0F172A;
}

.btn-primary:hover {
    background: var(--primary-light);
    color: #0F172A;
    box-shadow: 0 0 12px rgba(232, 185, 49, 0.25);
}

.btn-primary:active {
    background: var(--primary-dark);
}

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

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #0F172A;
}

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #16a34a; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-warning { background: var(--warning); color: #0f172a; }
.btn-warning:hover { background: #d97706; }

.btn-info { background: var(--info); color: white; }
.btn-info:hover { background: #0891b2; }

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border-radius: var(--border-radius-sm);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--border-radius-lg);
}

.btn-icon {
    padding: 0.625rem;
    border-radius: var(--border-radius);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================================ */
/* FORMS */
/* ============================================================================ */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-input, .form-select, textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    background-color: rgba(15, 23, 42, 0.2);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    transition: var(--transition);
    outline: none;
}

body.light-mode .form-input, body.light-mode .form-select, body.light-mode textarea {
    background-color: #FFFFFF;
}

.form-input:focus, .form-select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 185, 49, 0.15);
}

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

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    accent-color: var(--primary);
}

/* ============================================================================ */
/* TABLES */
/* ============================================================================ */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.table th {
    background: var(--bg-secondary);
    padding: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    transition: var(--transition);
}

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

.table-hover tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

body.light-mode .table-hover tbody tr:hover td {
    background-color: rgba(15, 23, 42, 0.02);
}

.table-striped tbody tr:nth-child(even) td {
    background-color: rgba(255, 255, 255, 0.01);
}

/* ============================================================================ */
/* BADGES / STATUS PILLS */
/* ============================================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.badge-info { background: var(--info-bg); color: var(--info); border: 1px solid var(--info-border); }

/* Custom Attendance Status Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-present {
    background: rgba(34, 197, 94, 0.08);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.15);
}
.status-present::before { background: var(--success); }

.status-absent {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.15);
}
.status-absent::before { background: var(--danger); }

.status-late {
    background: rgba(245, 158, 11, 0.08);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.15);
}
.status-late::before { background: var(--warning); }

/* ============================================================================ */
/* ALERTS */
/* ============================================================================ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.alert-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.alert-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.alert-info { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }

/* ============================================================================ */
/* MODALS */
/* ============================================================================ */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.05);
}

/* ============================================================================ */
/* TABS */
/* ============================================================================ */

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    gap: 1.5rem;
}

.tab-item {
    padding: 0.75rem 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.tab-item:hover, .tab-item.active {
    color: var(--primary);
}

.tab-item.active {
    border-color: var(--primary);
}

/* ============================================================================ */
/* TIMELINE */
/* ============================================================================ */

.timeline {
    position: relative;
    padding-left: 1.75rem;
    margin-left: 0.5rem;
    border-left: 2px solid var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

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

.timeline-marker {
    position: absolute;
    left: calc(-1.75rem - 6px);
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(232, 185, 49, 0.15);
}

.timeline-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.timeline-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ============================================================================ */
/* ANIMATIONS */
/* ============================================================================ */

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

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

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 15px rgba(232, 185, 49, 0.1); }
    50% { box-shadow: 0 0 25px rgba(232, 185, 49, 0.25); }
}

/* ============================================================================ */
/* UTILITY CLASSES */
/* ============================================================================ */

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-flex { display: flex; }
.d-none { display: none; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.flex-1 { flex: 1; }

.w-full { width: 100%; }
/* ============================================================================ */
/* APP LAYOUT, SIDEBAR & TOP NAVBAR */
/* ============================================================================ */

.app-layout {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-menu {
    padding: 1.25rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    overflow-y: auto;
}

.sidebar-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    padding: 0.75rem 0.75rem 0.375rem 0.75rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

body.light-mode .sidebar-link:hover {
    background: rgba(15, 23, 42, 0.03);
}

.sidebar-link.active {
    color: #0F172A;
    background: var(--primary);
}

body.light-mode .sidebar-link.active {
    color: #0F172A;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
}

.top-navbar {
    height: 70px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.top-navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-navbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.breadcrumb {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.breadcrumb-active {
    color: var(--text-primary);
    font-weight: 600;
}

.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.user-profile-menu:hover {
    background: rgba(255, 255, 255, 0.03);
}

.user-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid var(--primary);
}

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

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Sidebar Toggle for Mobile */
.mobile-sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-sidebar-toggle {
        display: block;
    }
}

/* ============================================================================ */
/* PRINT STYLES */
/* ============================================================================ */


@media print {
    body {
        background: #FFFFFF !important;
        color: #000000 !important;
        font-size: 12pt;
    }
    
    .card, .stat-card, .timeline-content {
        background: #FFFFFF !important;
        border: 1px solid #CCCCCC !important;
        box-shadow: none !important;
        color: #000000 !important;
        transform: none !important;
    }
    
    .btn, .sidebar, .navbar, .no-print {
        display: none !important;
    }
    
    .table th {
        background: #F0F0F0 !important;
        color: #000000 !important;
        border-bottom: 2px solid #000000 !important;
    }
    
    .table td {
        border-bottom: 1px solid #CCCCCC !important;
    }
    
    /* Student ID Cards - Print specific overrides */
    .card-container {
        margin: 0;
        border: 1px solid #000 !important;
        page-break-inside: avoid;
        height: auto !important;
        min-height: auto;
        box-shadow: none !important;
    }
    .card-front, .card-back {
        padding: 10px !important;
        font-size: 10px !important;
        background: #fff !important;
        color: #000 !important;
    }
    .qr-image {
        width: 1in !important;
        height: 1in !important;
        border: 2px solid #000 !important;
    }
    .card-header-id {
        border-bottom-color: #000 !important;
        color: #000 !important;
    }
    .back-label {
        border-bottom-color: #000 !important;
        color: #000 !important;
    }
    .back-value, .lrn-label, .student-name {
        color: #000 !important;
    }
}

/* ============================================================================ */
/* STUDENT ID CARDS STYLE */
/* ============================================================================ */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 12px;
}
.card-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    page-break-inside: avoid;
    height: 320px;
    overflow: hidden;
}
.card-container.qr-only {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 200px;
}
.card-container.id-only .card-back {
    border-right: 1px solid var(--border);
}
.card-front {
    border-right: 1px solid var(--border);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
}
.card-front.hidden {
    display: none;
}
.card-back {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-secondary);
    font-size: 11px;
    line-height: 1.4;
}
.card-back.hidden {
    display: none;
}
.card-header-id {
    text-align: center;
    font-weight: 700;
    font-size: 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
    color: var(--primary);
    text-transform: uppercase;
}
.qr-image {
    width: 120px;
    height: 120px;
    border: 2px solid var(--primary);
    background: white;
    padding: 5px;
}
.lrn-label {
    font-weight: 800;
    font-size: 13px;
    margin-top: 8px;
    text-align: center;
    color: var(--text-primary);
    letter-spacing: 1px;
}
.student-name {
    font-weight: 600;
    font-size: 11px;
    text-align: center;
    margin-top: 6px;
    color: var(--text-secondary);
}
.back-field {
    margin-bottom: 8px;
}
.back-label {
    font-weight: 700;
    font-size: 9px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2px;
    margin-bottom: 2px;
    color: var(--primary);
}
.back-value {
    font-size: 10px;
    padding: 2px 0;
    color: var(--text-primary);
}

@media(max-width:600px){
    .card-container {
        grid-template-columns: 1fr;
        border: none;
        border-bottom: 1px solid var(--border);
        height: auto;
    }
    .card-front {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}
