/* ============================================================
   UNIFIED ACADEMIC MANAGEMENT SYSTEM THEME
   Consolidated CSS for consistent design across all pages
   ============================================================ */
/* NOTE: All sidebar styles live exclusively in sidebar.php.
   The old sidebar block was removed from here to prevent
   conflicts with .menu-link i { margin-right } and other
   class-name collisions. */

/* ============================================================
   1. CSS VARIABLES & ROOT CONFIGURATION
   ============================================================ */
:root {
    /* Primary Color Palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --primary-subtle: rgba(99, 102, 241, 0.1);
    
    /* Accent Colors */
    --accent-indigo: #4f46e5;
    --accent-amber: #f59e0b;
    --accent-emerald: #10b981;
    --accent-purple: #8b5cf6;
    
    /* Neutral Colors */
    --bg-main: #eef2f6;
    --bg-gradient-start: #eef2f6;
    --bg-gradient-end: #dfe7f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* UI Element Colors */
    --card-glass: rgba(255, 255, 255, 0.7);
    --card-white: #ffffff;
    --input-bg: rgba(255, 255, 255, 0.8);
    --border-color: rgba(226, 232, 240, 0.8);
    --border-light: #e2e8f0;
    
    /* Status Colors */
    --status-success: #10b981;
    --status-success-bg: rgba(16, 185, 129, 0.1);
    --status-warning: #f59e0b;
    --status-warning-bg: rgba(245, 158, 11, 0.1);
    --status-danger: #ef4444;
    --status-danger-bg: rgba(239, 68, 68, 0.1);
    --status-info: #0ea5e9;
    --status-info-bg: rgba(14, 165, 233, 0.1);
    
    /* Shadows */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 68px;
    
    /* Typography */
    --font-main: 'Plus Jakarta Sans', sans-serif;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-2xl: 35px;
    --radius-pill: 999px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Remove default input number spinners */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* ============================================================
   3. LAYOUT STRUCTURE
   ============================================================ */

/* Main Content Area */
.main-content,
#main-content {
    margin-left: var(--sidebar-width);
    padding: 40px;
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                width      0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed);
    width: calc(100% - var(--sidebar-collapsed));
}

/* Responsive Layout */
@media (max-width: 991px) {
    .main-content,
    #main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }
}

/* ============================================================
   4. TYPOGRAPHY
   ============================================================ */

/* Page Headers */
.page-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Section Headers */
.section-divider {
    display: flex;
    align-items: center;
    margin: 40px 0 25px 0;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(99, 102, 241, 0.3), transparent);
    margin-left: 15px;
}

/* Field Labels */
.field-label,
.small-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    margin-left: 4px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.label-small {
    font-size: 0.7rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 4px;
}

/* Text Utilities */
.caps-input {
    text-transform: uppercase;
}

/* ============================================================
   5. CARDS & PANELS
   ============================================================ */

/* Glass Morphism Cards */
.glass-card,
.glass-panel,
.glass-enrollment-card {
    background: var(--card-glass);
    backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    padding: 30px;
    margin-bottom: 25px;
    width: 100%;
    transition: all var(--transition-medium);
}

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

/* White Cards */
.card-white,
.table-container {
    background: var(--card-white);
    border-radius: var(--radius-xl);
    padding: 30px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    margin-bottom: 25px;
}

/* ATM-Style Cards */
.atm-card {
    width: 100%;
    max-width: 380px;
    min-height: 220px;
    border-radius: 30px;
    border: none;
    position: relative;
    padding: 30px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-slow);
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    margin: 0 auto 25px;
    text-decoration: none !important;
}

.atm-card::before,
.atm-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    z-index: 1;
}

.atm-card::before {
    width: 180px;
    height: 180px;
    top: -60px;
    right: -40px;
}

.atm-card::after {
    width: 120px;
    height: 120px;
    bottom: -40px;
    left: -20px;
}

.atm-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ATM Card Variants */
.card-blue {
    background: linear-gradient(135deg, #0d99ff 0%, #4f46e5 100%);
}

.card-purple {
    background: linear-gradient(135deg, #9333ea 0%, #db2777 100%);
}

.card-green {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
}

/* ATM Card Elements */
.atm-content {
    position: relative;
    z-index: 2;
}

.atm-middle h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 2px 0;
}

.card-number-mock {
    letter-spacing: 3px;
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 8px;
    font-family: 'Courier New', Courier, monospace;
}

.atm-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.brand-circles {
    display: flex;
    align-items: center;
    opacity: 0.8;
}

.circle-1 {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    margin-right: -10px;
}

.circle-2 {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* Card Icon Overlay */
.card-icon-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    object-fit: contain;
    z-index: 3;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform var(--transition-medium);
}

.atm-card:hover .card-icon-overlay {
    transform: scale(1.15) rotate(5deg);
}

/* Subject Tags */
.subject-tag {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
    position: relative;
    z-index: 2;
}

.card-footer-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    margin-top: auto;
    position: relative;
    z-index: 2;
}

/* Filter Section */
.filter-section {
    background: var(--card-glass);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    width: 100%;
}

/* ============================================================
   6. FORMS & INPUTS
   ============================================================ */

/* Form Controls */
.form-control,
.form-select {
    border-radius: var(--radius-md);
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    background-color: #f8fafc;
    font-weight: 500;
    transition: all var(--transition-medium);
    color: var(--text-main);
    font-family: var(--font-main);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    outline: none;
    background-color: var(--card-white);
}

/* Custom Input Groups */
.input-group-custom {
    position: relative;
    background: var(--input-bg);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--transition-medium);
}

.input-group-custom:focus-within {
    background: var(--card-white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    transform: translateY(-2px);
}

.input-group-custom i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.1rem;
    z-index: 1;
}

.form-control-custom {
    background: transparent !important;
    border: none !important;
    padding: 14px 20px 14px 50px !important;
    font-weight: 600;
    color: var(--text-main) !important;
    width: 100%;
    border-radius: 16px;
}

.form-control-custom:focus {
    outline: none;
    box-shadow: none;
}

/* Score Input (for grading) */
.score-input {
    width: 38px;
    height: 28px;
    border: 1px solid transparent;
    text-align: center;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 400;
    transition: all var(--transition-fast);
}

.score-input:focus {
    background: var(--card-white);
    outline: none;
    border: 1px solid var(--primary);
    box-shadow: 0 2px 6px var(--primary-glow);
}

.score-input:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================================
   7. BUTTONS
   ============================================================ */

/* Primary Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-medium);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-glow);
}

/* Enrollment/Action Button */
.btn-enroll {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
    transition: all var(--transition-medium);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.btn-enroll:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(99, 102, 241, 0.3);
}

.btn-enroll i {
    font-size: 1.2rem;
}

/* Dark Buttons */
.btn-dark {
    background: #1e293b;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    transition: all var(--transition-medium);
}

.btn-dark:hover {
    background: #0f172a;
    transform: translateY(-2px);
}

/* Light Buttons */
.btn-light {
    background: #f8fafc;
    color: var(--text-main);
    border: 1px solid var(--border-light);
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    transition: all var(--transition-medium);
}

.btn-light:hover {
    background: var(--card-white);
    transform: translateY(-2px);
}

/* Action Buttons (Small Circular) */
.action-btn,
.action-circle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: #f8fafc;
    border: 1px solid var(--border-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    color: var(--text-muted);
}

.action-btn:hover,
.action-circle:hover {
    background: var(--card-white);
    transform: scale(1.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Icon Shapes */
.icon-shape {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation Buttons (Month/Term Navigation) */
.nav-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 6px 10px;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-sm);
}

.nav-btn:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-btn:disabled:hover {
    background: transparent;
    color: var(--text-muted);
}

.nav-btn i {
    font-size: 1rem;
}

/* Term Switcher Buttons */
.term-btn {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 700;
    border: none;
    transition: all var(--transition-fast);
}

.term-btn.btn-dark {
    background: var(--text-main);
    color: white;
}

.term-btn.btn-light {
    background: transparent;
    color: var(--text-muted);
}

/* ============================================================
   8. TABLES
   ============================================================ */

/* Standard Table Styles */
.table,
.custom-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.custom-table tbody tr {
    background: var(--card-white);
    border-radius: 15px;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.custom-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.custom-table td {
    padding: 16px 20px;
    border: none;
    vertical-align: middle;
}

.custom-table td:first-child {
    border-radius: 15px 0 0 15px;
}

.custom-table td:last-child {
    border-radius: 0 15px 15px 0;
}

/* Table Headers */
.table thead th,
.custom-table thead th {
    background-color: #f8fafc;
    padding: 16px 20px;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-light);
    font-weight: 700;
}

/* Grading Sheet Table Styles */
.table-scroll-area {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    background: var(--card-white);
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-md);
}

/* Name Column (Sticky) */
.name-col,
.name-column {
    position: sticky;
    left: 0;
    z-index: 5;
    background: var(--card-white) !important;
    min-width: 220px;
    border-right: 3px solid var(--primary) !important;
    padding: 6px 12px !important;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: left !important;
    padding-left: 12px !important;
}

.num-col {
    position: sticky;
    left: 0;
    z-index: 151 !important;
    width: 40px;
    background: #f8fafc !important;
    border-right: 1px solid var(--border-light) !important;
    font-size: 0.7rem;
}

/* Sticky Headers */
.custom-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-light);
}

.custom-table thead th.name-col,
.custom-table thead th.name-column {
    z-index: 15;
}

/* Category Separator */
.cat-sep {
    border-left: 1px solid var(--border-light) !important;
}

/* Row Highlighting */
.row-active {
    background-color: #eff6ff !important;
    transition: background-color var(--transition-fast);
}

.row-active .name-col,
.row-active .name-column {
    background-color: #eff6ff !important;
    font-weight: 600;
    color: var(--primary);
}

/* Dropped Student Styles */
.dropped-row {
    background-color: #fef2f2 !important;
    opacity: 0.7;
}

.dropped-row .name-col,
.dropped-row .name-column {
    background-color: #fef2f2 !important;
}

.dropped-row .num-col {
    background-color: #fecaca !important;
}

.student-name-dropped {
    text-decoration: line-through;
    text-decoration-color: var(--status-danger);
    text-decoration-thickness: 2px;
    color: #991b1b !important;
    font-style: italic;
}

.dropped-badge {
    display: inline-block;
    background: #fee2e2;
    color: #991b1b;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 600;
    text-decoration: none;
}

/* Attendance Matrix Styles */
.matrix-container {
    border-radius: var(--radius-lg);
    background: var(--card-white);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    overflow-x: auto;
    position: relative;
}

.attendance-matrix {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.attendance-matrix thead th {
    background-color: #0f172a !important;
    color: var(--card-white) !important;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 6px;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
} 

.attendance-matrix thead th.student-name-header {
    text-align: left;
    padding-left: 20px;
    width: 220px;
    max-width: 220px;
}

.attendance-matrix thead th.date-header {
    text-align: center;
    width: 35px;
    min-width: 35px;
    padding: 10px 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

/* Master Table (Grade Summary) */
.master-table {
    width: max-content;
    border-collapse: separate !important;
    border-spacing: 0;
}

.master-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.75rem;
    text-align: center;
}

.master-table thead th {
    position: sticky;
    z-index: 10;
    background: #f8fafc !important;
    color: var(--text-muted);
    font-size: 0.65rem;
    text-transform: uppercase;
    padding: 8px;
    border-bottom: 1px solid var(--border-light);
    border-right: 1px solid #f1f5f9;
}

.master-table thead tr:nth-child(1) th {
    top: 0;
    z-index: 100;
    color: var(--primary) !important;
    font-size: 0.8rem;
}

.table-horizontal-wrapper {
    width: 100%;
    overflow-x: auto;
    background: var(--card-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

/* Copy Mode (Grade Summary) */
.copy-mode-active .score-cell {
    cursor: pointer !important;
}

.copy-mode-active .score-cell:hover {
    background-color: #eef2ff !important;
}

.selected-column {
    background-color: var(--primary) !important;
    color: white !important;
    font-weight: bold;
}

/* ============================================================
   9. BADGES & STATUS INDICATORS
   ============================================================ */

/* Status Badges */
.badge-pill-status,
.status-badge {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-enrolled {
    background: var(--status-success-bg);
    color: var(--status-success);
}

.status-dropped {
    background: var(--status-danger-bg);
    color: var(--status-danger);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Avatars */
.avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: #e0e7ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.bg-male {
    background: #3b82f6;
    color: white;
}

.bg-female {
    background: #ec4899;
    color: white;
}

/* ============================================================
   10. MODALS
   ============================================================ */

.modal-content {
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    border: none;
    padding: 24px 24px 0 24px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border: none;
    padding: 0 24px 24px 24px;
}

/* ============================================================
   11. SPECIAL COMPONENTS
   ============================================================ */

/* Month Navigation */
.month-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #f8fafc, var(--card-white));
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.month-display {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    min-width: 130px;
    text-align: center;
    letter-spacing: 0.3px;
}

/* Page Header Wrapper */
.page-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* Dashboard Stats */
.stat-card {
    background: var(--card-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    height: 100%;
    transition: all var(--transition-medium);
}

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

/* Activity Cards (Dashboard) */
.activity-card {
    background: var(--card-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
    transition: all var(--transition-medium);
}

.activity-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.activity-subject {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}

.activity-lesson {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.activity-status-pill {
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.activity-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-ongoing {
    background: var(--status-success-bg);
    color: var(--status-success);
}

.status-next {
    background: var(--status-warning-bg);
    color: var(--status-warning);
}

.status-done {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

.activity-content {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.activity-icon {
    font-size: 2rem;
}

.activity-details {
    flex: 1;
}

.activity-number {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.activity-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.activity-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
}

.activity-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.activity-progress-container {
    margin-top: 12px;
}

.activity-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.activity-progress-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.activity-progress-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
}

.activity-progress-bar {
    height: 6px;
    background: #f1f5f9;
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.activity-progress-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width 0.3s ease;
}

.activity-progress-fill.status-ongoing {
    background: var(--status-success);
}

.activity-progress-fill.status-next {
    background: var(--status-warning);
}

.activity-progress-fill.status-done {
    background: #64748b;
}

/* Schedule Items */
.schedule-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.schedule-item {
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    transition: all var(--transition-fast);
}

.completed-schedule {
    opacity: 0.6;
}

.current-schedule {
    background: var(--status-success-bg);
    border-left: 3px solid var(--status-success);
}

.next-schedule {
    background: var(--status-warning-bg);
    border-left: 3px solid var(--status-warning);
}

/* Empty State */
.empty-state {
    width: 100%;
    text-align: center;
    padding: 100px 0;
    background: var(--card-white);
    border-radius: var(--radius-lg);
    border: 2px dashed rgba(0, 0, 0, 0.05);
}

/* Toast Notifications */
#copyToast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--status-success);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    display: none;
    z-index: 9999;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
}

/* Term Switcher */
#term_switcher {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-white);
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

#save-indicator {
    font-size: 0.7rem;
    color: var(--status-success);
    font-weight: 600;
}

/* ============================================================
   12. UTILITY CLASSES
   ============================================================ */

/* Spacing */
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Text */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted) !important; }
.fw-bold { font-weight: 700 !important; }
.fw-bolder { font-weight: 800 !important; }
.small { font-size: 0.875rem; }

/* Display */
.d-flex { display: flex; }
.d-none { display: none; }
.d-block { display: block; }

/* Flex */
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.flex-column { flex-direction: column; }

/* Width */
.w-100 { width: 100%; }

/* Rounded */
.rounded-pill { border-radius: var(--radius-pill); }
.rounded { border-radius: var(--radius-md); }

/* Shadow */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Border */
.border { border: 1px solid var(--border-light); }
.border-0 { border: none; }

/* Background */
.bg-light { background: #f8fafc; }
.bg-white { background: var(--card-white); }

/* ============================================================
   13. RESPONSIVE DESIGN
   ============================================================ */

@media (max-width: 1200px) {
    .atm-card {
        max-width: 100%;
    }
}

@media (max-width: 991px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .glass-card,
    .glass-panel,
    .glass-enrollment-card {
        padding: 20px;
    }
    
    .card-white,
    .table-container {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 1.25rem;
    }
    
    .name-col,
    .name-column {
        min-width: 180px;
    }
    
    .activity-card {
        padding: 16px;
    }
}

/* ============================================================
   14. PRINT STYLES
   ============================================================ */

@media print {
    .main-content,
    #main-content {
        margin-left: 0;
        width: 100%;
        padding: 0;
    }
    
    .no-print {
        display: none !important;
    }
    
    .glass-card,
    .glass-panel,
    .card-white {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}

/* ============================================================
   15. ANIMATIONS
   ============================================================ */

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.4s ease;
}

/* Spinner */
.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.spinner-border-sm {
    width: 0.875rem;
    height: 0.875rem;
    border-width: 0.12em;
}

/* ============================================================
   16. CUSTOM SCROLLBAR
   ============================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================================
   17. DASHBOARD SPECIFIC STYLES
   ============================================================ */

/* Dashboard Glass Panel Override */
.glass-panel {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(15px) saturate(180%);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 35px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
}

/* Dashboard Layout */
#main-content {
    padding: 40px 35px;
    position: relative;
}

/* Ghost Clock / Time Watermark */
.header-container { 
    position: relative; 
    margin-bottom: 4rem; 
}

.time-watermark-wrapper {
    position: absolute; 
    top: -35px; 
    right: 0; 
    text-align: right;
    pointer-events: none; 
    user-select: none; 
    z-index: 1;
}

#digital-clock {
    font-weight: 900; 
    font-size: 11rem; 
    color: var(--primary);
    opacity: 0.12; 
    line-height: 0.8; 
    letter-spacing: -8px;
    -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 90%);
}

#current-date {
    display: block; 
    font-size: 1.2rem; 
    font-weight: 700; 
    color: var(--primary);
    opacity: 0.4; 
    margin-top: -30px; 
    padding-right: 10px;
    text-transform: uppercase; 
    letter-spacing: 2px;
}

/* Dashboard Welcome Section */
.dashboard-welcome-title {
    color: #1e293b; 
    font-size: 2.2rem;
}

.dashboard-welcome-subtitle {
    font-size: 1rem;
}

/* KPI Cards */
.kpi-card {
    border-radius: 32px; 
    padding: 30px; 
    color: white;
    position: relative; 
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
}

.kpi-card:hover { 
    transform: translateY(-5px); 
}

.kpi-card i.bg-icon {
    position: absolute; 
    right: -15px; 
    bottom: -15px;
    font-size: 7rem; 
    opacity: 0.15; 
    transform: rotate(-10deg);
}

.grad-blue { 
    background: linear-gradient(135deg, #4f46e5, #3b82f6); 
}

.grad-rose { 
    background: linear-gradient(135deg, #e11d48, #f43f5e); 
}

.grad-purple { 
    background: linear-gradient(135deg, #7c3aed, #9333ea); 
}

/* Next Class Highlight Banner */
.next-class-banner {
    background: linear-gradient(160deg, #0b0f19 0%, #1e1b4b 100%);
    border-radius: 28px;
    padding: 0;
    color: white;
    box-shadow: 
        0 20px 60px rgba(139, 92, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Animated gradient background */
.next-class-banner::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    animation: rotateGlow 20s linear infinite;
    z-index: 0;
}

/* Floating particles animation */
.next-class-banner::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: 
        radial-gradient(circle, rgba(139, 92, 246, 0.3) 1px, transparent 1px),
        radial-gradient(circle, rgba(167, 139, 250, 0.2) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px;
    background-position: 0 0, 40px 40px;
    opacity: 0.3;
    animation: particleFloat 30s linear infinite;
    z-index: 0;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes particleFloat {
    from { background-position: 0 0, 40px 40px; }
    to { background-position: 50px 50px, 90px 90px; }
}

.next-class-content {
    position: relative;
    z-index: 1;
    padding: 35px 40px;
}

.next-class-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.4);
    backdrop-filter: blur(10px);
    color: #f8fafc;
    animation: labelPulse 3s ease-in-out infinite;
}

@keyframes labelPulse {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 25px rgba(139, 92, 246, 0.8);
        transform: scale(1.02);
    }
}

.next-class-label::before {
    content: '⏰';
    font-size: 1.1rem;
    animation: ringBell 2s ease-in-out infinite;
}

@keyframes ringBell {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-15deg); }
    20%, 40% { transform: rotate(15deg); }
    50% { transform: rotate(0deg); }
}

.next-class-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
    letter-spacing: -0.5px;
    animation: titleShine 4s ease-in-out infinite;
}

@keyframes titleShine {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.next-class-details {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    font-size: 0.95rem;
}

.next-class-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    color: #f8fafc;
    font-weight: 600;
}

.next-class-detail-item:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
}

.next-class-detail-item i {
    font-size: 1.3rem;
    color: #8b5cf6;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

.next-class-detail-item:nth-child(1) i { animation-delay: 0s; }
.next-class-detail-item:nth-child(2) i { animation-delay: 0.2s; }
.next-class-detail-item:nth-child(3) i { animation-delay: 0.4s; }
.next-class-detail-item:nth-child(4) i { animation-delay: 0.6s; }

/* No class variant */
.next-class-banner.no-class-variant {
    background: linear-gradient(160deg, #1e293b 0%, #334155 100%);
    border-color: rgba(148, 163, 184, 0.3);
}

.next-class-banner.no-class-variant::before {
    background: radial-gradient(circle, rgba(148, 163, 184, 0.1) 0%, transparent 70%);
}

.next-class-banner.no-class-variant .next-class-label {
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.4);
}

.next-class-banner.no-class-variant .next-class-title {
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.next-class-banner.no-class-variant .next-class-detail-item i {
    color: #94a3b8;
}

/* Activity Card Grid */
.activity-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #a855f7);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.activity-card:hover::before {
    transform: scaleX(1);
}

.activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.2);
}

/* Activity Card Status Pills */
.in-progress {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.in-progress .activity-status-dot {
    background: #10b981;
}

.not-started {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.not-started .activity-status-dot {
    background: #f59e0b;
}

.completed {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

.completed .activity-status-dot {
    background: #64748b;
    animation: none;
}

.no-class {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
}

.no-class .activity-status-dot {
    background: #94a3b8;
    animation: none;
}

/* Activity Icon */
.activity-card .activity-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 12px;
}

/* Activity Progress Fill Variants */
.activity-progress-fill.in-progress {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.activity-progress-fill.not-started {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.activity-progress-fill.completed {
    background: linear-gradient(90deg, #64748b, #94a3b8);
}

/* Schedule Item Variants */
.schedule-item.completed-schedule {
    opacity: 0.6;
    background: #e2e8f0;
}

.schedule-item.current-schedule {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid #10b981;
}

.schedule-item.next-schedule {
    background: rgba(245, 158, 11, 0.1);
    border: 2px solid #f59e0b;
}

/* Schedule Time Text */
.schedule-time-text {
    font-size: 0.75rem; 
    color: #64748b;
}

/* Room Location Badge */
.room-location-badge {
    margin-left: auto;
}

/* Dashboard Icons */
.dashboard-icon-lg {
    font-size: 2rem;
}

.dashboard-icon-sm {
    font-size: 0.5rem;
}

/* System Health Progress */
.system-health-progress {
    height: 6px; 
    border-radius: 10px; 
    background: rgba(0,0,0,0.05);
}

.system-health-progress-bar {
    width: 100%;
}

/* ============================================================
   18. CORE LAYOUT SHELL & UTILITIES (MIGRATED FROM HEADER.PHP)
   ============================================================ */

.app-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: block;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

/* Minimalist icon action buttons */
.btn-action {
    width: 35px;
    height: 35px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-action.btn-edit {
    color: #3b82f6;
    border-color: #dbeafe;
}

.btn-action.btn-edit:hover {
    background: #eff6ff;
    border-color: #3b82f6;
}

.btn-action.btn-delete {
    color: #ef4444;
    border-color: #fee2e2;
}

.btn-action.btn-delete:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

.btn-action.btn-view {
    color: #10b981;
    border-color: #d1fae5;
}

.btn-action.btn-view:hover {
    background: #ecfdf5;
    border-color: #10b981;
}

/* Page header utilities */
.page-header {
    margin-bottom: 30px;
}

.page-header h1,
.page-header h2,
.page-header h3,
.page-header h4 {
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
}

.page-header .subtitle {
    color: #64748b;
    font-size: 0.95rem;
}

/* Full-page loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: sas-spin 0.8s linear infinite;
}

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

/* Sidebar specific scrollbar styling */
#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-track {
    background: #0f172a;
}

#sidebar::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ── End of original theme sections 1-18 ─────────────────── */

/* ============================================================
   21. SHARED PAGE KEYFRAMES
   Single source of truth — removes duplication across all pages
   ============================================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes cpulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%       { transform: scale(1.4); opacity: 0.6; }
}
@keyframes sas-spin {
    to { transform: rotate(360deg); }
}
/* ============================================================
   19. RESPONSIVE DESIGN — COMPREHENSIVE BREAKPOINTS
   Full adaptive layout for all screen sizes & resolutions
   ============================================================ */

/* ── 19a. Sidebar collapse sync with main content ────────── */

/* When sidebar is collapsed (desktop) */
#sidebar.collapsed ~ .main-content,
#sidebar.collapsed ~ #main-content {
    margin-left: var(--sidebar-collapsed);
    width: calc(100% - var(--sidebar-collapsed));
}

/* ── 19b. Extra Large (≥ 1400px) ─────────────────────────── */
@media (min-width: 1400px) {
    .main-content,
    #main-content {
        padding: 48px 56px;
    }

    .glass-card,
    .glass-panel,
    .glass-enrollment-card {
        padding: 40px;
    }

    #digital-clock {
        font-size: 12rem;
    }

    .kpi-card {
        padding: 35px;
    }

    .next-class-title {
        font-size: 2.8rem;
    }
}

/* ── 19c. Large Desktop (1200px – 1399px) ────────────────── */
@media (max-width: 1399px) and (min-width: 1200px) {
    .main-content,
    #main-content {
        padding: 40px 44px;
    }

    #digital-clock {
        font-size: 10rem;
    }
}

/* ── 19d. Laptop / Small Desktop (992px – 1199px) ────────── */
@media (max-width: 1199px) and (min-width: 992px) {
    .main-content,
    #main-content {
        padding: 32px 30px;
    }

    .next-class-title {
        font-size: 2rem;
    }

    #digital-clock {
        font-size: 8rem;
    }

    .next-class-content {
        padding: 28px 30px;
    }

    .kpi-card {
        padding: 22px;
    }

    .atm-card {
        max-width: 100%;
    }

    .activity-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* ── 19e. Tablet (768px – 991px) ─────────────────────────── */
@media (max-width: 991px) {
    /* Layout: sidebar hidden, full-width content */
    .main-content,
    #main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 24px 20px;
    }

    /* Page headers */
    .page-title {
        font-size: 1.4rem;
    }

    .dashboard-welcome-title {
        font-size: 1.6rem;
    }

    /* Cards */
    .glass-card,
    .glass-panel,
    .glass-enrollment-card {
        padding: 20px;
        border-radius: var(--radius-xl);
    }

    .card-white,
    .table-container {
        padding: 18px;
        border-radius: var(--radius-lg);
    }

    /* KPI Cards */
    .kpi-card {
        padding: 20px;
        border-radius: 24px;
    }

    .kpi-card i.bg-icon {
        font-size: 5rem;
    }

    /* Next Class Banner */
    .next-class-content {
        padding: 24px 22px;
    }

    .next-class-title {
        font-size: 1.7rem;
    }

    .next-class-details {
        gap: 12px;
    }

    .next-class-detail-item {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    /* Ghost clock hide on tablet */
    .time-watermark-wrapper {
        display: none;
    }

    /* Page header wrapper stack */
    .page-header-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Activity grid */
    .activity-card-grid {
        grid-template-columns: 1fr;
    }

    /* Filter section */
    .filter-section {
        padding: 18px;
    }

    /* Modal full-width */
    .modal-dialog {
        margin: 10px;
    }

    /* Table */
    .custom-table td,
    .table thead th,
    .custom-table thead th {
        padding: 12px 14px;
    }

    /* Print: hide sidebar */
    @media print {
        #sidebar { display: none !important; }
    }
}

/* ── 19f. Mobile (≤ 767px) ───────────────────────────────── */
@media (max-width: 767px) {
    /* Body padding for mobile topbar */
    body {
        padding-top: 56px;
    }

    /* Full-width content */
    .main-content,
    #main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 16px 14px;
    }

    /* Page titles */
    .page-title {
        font-size: 1.2rem;
        gap: 8px;
    }

    .page-subtitle {
        font-size: 0.85rem;
    }

    .dashboard-welcome-title {
        font-size: 1.35rem;
    }

    .dashboard-welcome-subtitle {
        font-size: 0.85rem;
    }

    /* Cards */
    .glass-card,
    .glass-panel,
    .glass-enrollment-card {
        padding: 16px;
        border-radius: var(--radius-lg);
        margin-bottom: 16px;
    }

    .card-white,
    .table-container {
        padding: 14px;
        border-radius: var(--radius-md);
    }

    /* KPI Cards */
    .kpi-card {
        padding: 18px;
        border-radius: 20px;
    }

    .kpi-card i.bg-icon {
        font-size: 4rem;
    }

    /* ATM Cards */
    .atm-card {
        max-width: 100%;
        min-height: 180px;
        padding: 22px;
        border-radius: 22px;
    }

    .atm-middle h3 {
        font-size: 1.4rem;
    }

    /* Next Class Banner */
    .next-class-banner {
        border-radius: 20px;
    }

    .next-class-content {
        padding: 18px 16px;
    }

    .next-class-label {
        font-size: 0.65rem;
        padding: 6px 12px;
    }

    .next-class-title {
        font-size: 1.3rem;
        letter-spacing: 0;
        margin-bottom: 14px;
    }

    .next-class-details {
        gap: 8px;
        flex-direction: column;
    }

    .next-class-detail-item {
        padding: 9px 12px;
        font-size: 0.8rem;
    }

    /* Buttons */
    .btn-enroll {
        padding: 12px 24px;
        font-size: 0.9rem;
        border-radius: 14px;
        width: 100%;
        justify-content: center;
    }

    .btn-primary {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    /* Forms */
    .form-control,
    .form-select {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    /* Tables */
    .custom-table td,
    .table thead th,
    .custom-table thead th {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .name-col,
    .name-column {
        min-width: 150px;
    }

    /* Activity Grid */
    .activity-card-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .activity-card {
        padding: 14px;
    }

    /* Section dividers */
    .section-divider {
        font-size: 0.65rem;
        margin: 24px 0 16px;
    }

    /* Stat cards */
    .stat-card {
        padding: 16px;
    }

    /* Filter section */
    .filter-section {
        padding: 14px;
        border-radius: var(--radius-md);
    }

    /* Page header wrapper */
    .page-header-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Month nav */
    .month-navigation {
        padding: 6px 10px;
        gap: 8px;
    }

    .month-display {
        font-size: 0.8rem;
        min-width: 110px;
    }

    /* Modal */
    .modal-dialog {
        margin: 8px;
    }

    .modal-content {
        border-radius: var(--radius-lg);
    }

    /* Score inputs in grade table */
    .score-input {
        width: 32px;
        height: 26px;
        font-size: 0.75rem;
    }

    /* Attendance matrix min-width keeps horizontal scroll */
    .attendance-matrix {
        min-width: 500px;
    }

    /* Hide ghost clock always on mobile */
    .time-watermark-wrapper {
        display: none;
    }

    /* Toast */
    #copyToast {
        top: 70px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
}

/* ── 19g. Small Mobile (≤ 479px) ────────────────────────── */
@media (max-width: 479px) {
    .main-content,
    #main-content {
        padding: 12px 10px;
    }

    .page-title {
        font-size: 1.1rem;
    }

    .glass-card,
    .glass-panel,
    .glass-enrollment-card {
        padding: 14px;
        border-radius: var(--radius-md);
    }

    .next-class-title {
        font-size: 1.1rem;
    }

    .kpi-card {
        border-radius: 16px;
        padding: 14px;
    }

    .btn-action {
        width: 30px;
        height: 30px;
    }

    /* Stack form rows */
    .row > [class*="col-"] {
        margin-bottom: 10px;
    }
}

/* ── 19h. Landscape phone (≤ 767px, landscape) ──────────── */
@media (max-width: 767px) and (orientation: landscape) {
    body {
        padding-top: 48px;
    }

    .main-content,
    #main-content {
        padding: 12px 16px;
    }

    .glass-card,
    .glass-panel,
    .glass-enrollment-card {
        padding: 14px 18px;
    }

    .next-class-details {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* ── 19i. High-DPI / Retina Screens ─────────────────────── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .brand-icon-img,
    .sb-avatar,
    .user-avatar-img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ── 19j. Touch Device Overrides ─────────────────────────── */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover lift animations on touch — prevents stuck states */
    .glass-card:hover,
    .atm-card:hover,
    .stat-card:hover,
    .activity-card:hover,
    .next-class-detail-item:hover {
        transform: none;
    }

    /* Larger tap targets */
    .menu-link {
        padding: 12px 10px;
    }

    .btn-action {
        width: 40px;
        height: 40px;
    }

    .form-control,
    .form-select {
        font-size: 16px; /* Prevents iOS auto-zoom on focus */
    }
}

/* ============================================================
   20. DB BACKUP PAGE — ANIMATIONS
   Migrated from db_backup.php inline <style>
   ============================================================ */

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

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

@keyframes fadeInLeft-backup {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.backup-main-card { animation: fadeInUp-backup 0.6s ease both; }
.backup-header    { animation: fadeInDown 0.5s ease 0.1s both; }
.backup-info-box  { animation: fadeInLeft-backup 0.5s ease 0.2s both; }
.backup-table-wrap{ animation: fadeInUp-backup 0.5s ease 0.3s both; }

/* Backup page responsive tweaks */
@media (max-width: 767px) {
    .backup-main-card .d-flex.align-items-center.mb-4 {
        flex-wrap: wrap;
        gap: 10px;
    }

    .backup-main-card .d-flex.justify-content-between {
        flex-direction: column;
        gap: 8px;
    }
}

/* ============================================================
   END OF UNIFIED THEME
   (Section 19-20 appended for responsive + backup styles)
   ============================================================ */

/* ============================================================
   22. DASHBOARD PAGE STYLES
   ============================================================ */

html { background: #c7d2fe !important; min-height: 100%; }

:root {
    --sw: 260px;
    --surface: rgba(255,255,255,0.55);
    --surface-2: rgba(248,250,252,0.5);
    --border: rgba(255,255,255,0.4);
    --border-outer: rgba(15,23,42,0.08);
    --t1: #0f172a; --t2: #475569; --t3: #94a3b8;
    --r-xl: 24px; --r-lg: 16px; --r-md: 12px; --r-sm: 8px;
    --sh-sm: 0 2px 8px rgba(99,102,241,0.08),0 1px 3px rgba(0,0,0,0.06);
    --sh-md: 0 8px 24px rgba(99,102,241,0.12),0 2px 8px rgba(0,0,0,0.06);
    --sh-lg: 0 16px 48px rgba(99,102,241,0.15),0 4px 16px rgba(0,0,0,0.08);
    --glass-blur: blur(18px);
    --glass-blur-sm: blur(10px);
}

body.dashboard-page {
    background: linear-gradient(135deg,#c7d2fe 0%,#dde8ff 25%,#e0e7ff 50%,#cdd5f5 75%,#b9c5f0 100%) !important;
    background-attachment: fixed !important;
}

#frosted-bg { position:fixed; inset:0; z-index:-1; background:linear-gradient(135deg,#c7d2fe 0%,#dde8ff 25%,#e0e7ff 50%,#cdd5f5 75%,#b9c5f0 100%); pointer-events:none; }
#frosted-bg::before { content:''; position:absolute; inset:0; background: radial-gradient(ellipse 700px 600px at 5% 15%,rgba(139,92,246,0.28) 0%,transparent 65%), radial-gradient(ellipse 600px 500px at 90% 8%,rgba(99,102,241,0.25) 0%,transparent 65%), radial-gradient(ellipse 800px 600px at 55% 85%,rgba(79,70,229,0.2) 0%,transparent 65%), radial-gradient(ellipse 500px 400px at 15% 80%,rgba(167,139,250,0.22) 0%,transparent 65%), radial-gradient(ellipse 550px 400px at 88% 60%,rgba(196,181,253,0.2) 0%,transparent 65%); animation:blobDrift 18s ease-in-out infinite alternate; }
#frosted-bg::after { content:''; position:absolute; inset:0; background-image:radial-gradient(rgba(255,255,255,0.6) 1.5px,transparent 1.5px); background-size:36px 36px; opacity:0.3; }
@keyframes blobDrift { 0%{opacity:1;transform:scale(1) translate(0,0)} 33%{opacity:.85;transform:scale(1.04) translate(12px,-10px)} 66%{opacity:.9;transform:scale(.97) translate(-8px,14px)} 100%{opacity:1;transform:scale(1.02) translate(6px,-6px)} }

#main-content { position:relative; z-index:1; margin-left:var(--sw); padding:36px 40px 64px; }

.dh { position:relative; margin-bottom:40px; overflow:visible; }
.dh-left h2 { font-size:1.7rem; font-weight:800; letter-spacing:-0.5px; color:var(--t1); margin:0 0 4px; position:relative; z-index:2; }
.dh-left p { font-size:.88rem; color:var(--t2); margin:0; position:relative; z-index:2; }
.dh-watermark { position:absolute; top:-30px; right:0; text-align:right; pointer-events:none; user-select:none; z-index:1; line-height:1; }
#digital-clock { display:block; font-size:9.5rem; font-weight:800; letter-spacing:-4px; color:var(--primary); opacity:.12; line-height:.85; -webkit-mask-image:linear-gradient(to bottom,black 40%,transparent 90%); mask-image:linear-gradient(to bottom,black 40%,transparent 90%); }
#current-date { display:block; font-size:.85rem; font-weight:700; color:var(--primary); opacity:.4; letter-spacing:2.5px; text-transform:uppercase; margin-top:-20px; padding-right:2px; text-align:right; }

.hero-grid { display:grid; grid-template-columns:1fr 320px; gap:18px; margin-bottom:22px; margin-top:60px; }
.hero-card { border-radius:var(--r-xl); padding:36px 40px 32px; color:white; position:relative; overflow:hidden; display:flex; flex-direction:column; justify-content:space-between; min-height:250px; }
.hero-card.state-active { background:linear-gradient(140deg,#1e1b4b 0%,#2e1065 55%,#4c1d95 100%); box-shadow:0 20px 60px rgba(79,70,229,.45); }
.hero-card.state-next   { background:linear-gradient(140deg,#1e293b 0%,#0f172a 100%); box-shadow:0 16px 48px rgba(0,0,0,.25); }
.hero-card.state-free   { background:linear-gradient(140deg,#1e293b 0%,#0f172a 100%); box-shadow:0 16px 48px rgba(0,0,0,.2); }
.hero-card.state-break  { background:linear-gradient(140deg,#0f2027 0%,#203a43 55%,#2c5364 100%); box-shadow:0 16px 48px rgba(16,185,129,.2); }
.hero-card::after { content:''; position:absolute; inset:0; background-image:radial-gradient(rgba(255,255,255,.06) 1px,transparent 1px); background-size:26px 26px; pointer-events:none; z-index:0; }
.hero-card::before { content:''; position:absolute; width:440px; height:440px; border-radius:50%; background:radial-gradient(circle,rgba(139,92,246,.2) 0%,transparent 65%); top:-150px; right:-100px; pointer-events:none; z-index:0; }
.hero-card > * { position:relative; z-index:1; }

.hero-badge { display:inline-flex; align-items:center; gap:7px; font-size:.67rem; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; padding:6px 14px; border-radius:50px; margin-bottom:14px; width:fit-content; }
.hb-live  { background:rgba(16,185,129,.18); border:1px solid rgba(16,185,129,.45); color:#6ee7b7; }
.hb-next  { background:rgba(249,115,22,.18); border:1px solid rgba(249,115,22,.4); color:#fdba74; }
.hb-free  { background:rgba(148,163,184,.12); border:1px solid rgba(148,163,184,.3); color:#cbd5e1; }
.hb-break { background:rgba(16,185,129,.18); border:1px solid rgba(16,185,129,.45); color:#6ee7b7; }
.hb-dot { width:6px; height:6px; border-radius:50%; background:currentColor; }
.hb-live .hb-dot { animation:cpulse 2s infinite; }

.hero-title { font-size:2.1rem; font-weight:800; letter-spacing:-.8px; line-height:1.1; margin-bottom:18px; }
.hero-chips { display:flex; flex-wrap:wrap; gap:9px; margin-bottom:26px; }
.hero-chip { display:flex; align-items:center; gap:7px; padding:8px 14px; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.11); border-radius:var(--r-sm); font-size:.82rem; font-weight:500; color:rgba(255,255,255,.88); backdrop-filter:blur(6px); }
.hero-chip i { opacity:.65; font-size:.88rem; }

.hero-prog-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:7px; }
.hero-prog-lbl { font-size:.72rem; font-weight:600; color:rgba(255,255,255,.55); text-transform:uppercase; letter-spacing:.8px; }
.hero-prog-pct { font-size:.85rem; font-weight:700; color:#c4b5fd; }
.hero-prog-bar { height:6px; background:rgba(255,255,255,.1); border-radius:10px; overflow:hidden; }
.hero-prog-fill { height:100%; border-radius:10px; background:linear-gradient(90deg,#8b5cf6,#a78bfa,#c4b5fd); position:relative; transition:width 1s ease; }
.hero-prog-fill.fill-done { background:linear-gradient(90deg,#64748b,#94a3b8); }
.hero-prog-fill::after { content:''; position:absolute; right:0; top:50%; transform:translateY(-50%); width:9px; height:9px; border-radius:50%; background:#e9d5ff; box-shadow:0 0 7px rgba(196,181,253,.9); }
.hero-prog-sub { font-size:.72rem; color:rgba(255,255,255,.42); margin-top:6px; font-weight:500; }

.hero-right { display:flex; flex-direction:column; gap:14px; }
.next-info-card { background:var(--surface); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); border-radius:var(--r-xl); padding:26px 24px; border:1px solid var(--border); box-shadow:var(--sh-md); flex:1; min-height:0; }
.nic-label { font-size:.67rem; font-weight:700; text-transform:uppercase; letter-spacing:1.2px; color:var(--t3); margin-bottom:9px; }
.nic-subject { font-size:1.2rem; font-weight:800; color:var(--t1); margin-bottom:14px; line-height:1.2; }
.nic-meta { display:flex; flex-direction:column; gap:8px; }
.nic-meta-row { display:flex; align-items:center; gap:9px; font-size:.82rem; color:var(--t2); font-weight:500; }
.nic-meta-row i { width:28px; height:28px; border-radius:7px; background:var(--surface-2); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:.75rem; color:var(--primary); flex-shrink:0; }

.countdown-pill { background:linear-gradient(135deg,#f97316,#fb923c); border-radius:var(--r-lg); padding:18px 22px; color:white; display:flex; align-items:center; gap:14px; box-shadow:0 8px 24px rgba(249,115,22,.35); flex-shrink:0; }
.cd-icon { width:42px; height:42px; border-radius:11px; background:rgba(255,255,255,.2); display:flex; align-items:center; justify-content:center; font-size:1.15rem; flex-shrink:0; }
.cd-lbl { font-size:.67rem; font-weight:600; text-transform:uppercase; letter-spacing:1px; opacity:.8; margin-bottom:3px; }
.cd-val { font-size:1.5rem; font-weight:800; line-height:1; }

.hero-empty-right { flex:1; background:rgba(255,255,255,0.45); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); border-radius:var(--r-xl); border:1px solid var(--border); box-shadow:var(--sh-sm); display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:32px 20px; gap:10px; }
.hero-empty-right .he-emoji { font-size:2.2rem; }
.hero-empty-right .he-label { font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:1px; color:var(--t3); }
.hero-empty-right .he-note  { font-size:.8rem; color:var(--t3); font-weight:400; margin:0; }

.kpi-row { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:26px; }
.kpi-card { background:var(--surface); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); border-radius:var(--r-lg); padding:22px; border:1px solid var(--border); box-shadow:var(--sh-sm); display:flex; align-items:center; gap:16px; transition:box-shadow .2s,transform .2s; }
.kpi-card:hover { box-shadow:var(--sh-md); transform:translateY(-2px); }
.kpi-icon { width:50px; height:50px; border-radius:13px; display:flex; align-items:center; justify-content:center; font-size:1.25rem; flex-shrink:0; }
.ki-blue   { background:rgba(99,102,241,.1); color:var(--primary); }
.ki-rose   { background:rgba(244,63,94,.1); color:#f43f5e; }
.ki-violet { background:rgba(124,58,237,.1); color:#7c3aed; }
.kpi-lbl { font-size:.7rem; font-weight:600; text-transform:uppercase; letter-spacing:.8px; color:var(--t3); margin-bottom:4px; }
.kpi-val { font-size:1.85rem; font-weight:800; color:var(--t1); line-height:1; margin-bottom:3px; }
.kpi-sub { font-size:.73rem; color:var(--t3); font-weight:500; }

.sec-head  { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.sec-title { font-size:1.05rem; font-weight:800; color:var(--t1); letter-spacing:-.2px; }
.sec-sub   { font-size:.78rem; color:var(--t3); font-weight:400; margin-top:2px; }

.sched-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(295px,1fr)); gap:14px; }
.sched-card { background:var(--surface); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); border-radius:var(--r-lg); border:1px solid var(--border); box-shadow:var(--sh-sm); overflow:hidden; transition:box-shadow .2s,transform .2s; }
.sched-card:hover { box-shadow:var(--sh-md); transform:translateY(-2px); }
.sched-card-top { display:flex; align-items:center; justify-content:space-between; padding:15px 18px 11px; border-bottom:1px solid var(--border); }
.sc-block-name { font-size:.92rem; font-weight:700; color:var(--t1); margin-bottom:2px; }
.sc-block-meta { font-size:.7rem; color:var(--t3); font-weight:500; }
.sc-badge { display:inline-flex; align-items:center; gap:5px; padding:4px 10px; border-radius:50px; font-size:.65rem; font-weight:700; text-transform:uppercase; letter-spacing:.5px; flex-shrink:0; }
.scb-live { background:rgba(16,185,129,.1); color:#059669; border:1px solid rgba(16,185,129,.25); }
.scb-next { background:rgba(245,158,11,.1); color:#d97706; border:1px solid rgba(245,158,11,.25); }
.scb-done { background:rgba(100,116,139,.08); color:#64748b; border:1px solid rgba(100,116,139,.2); }
.scb-none { background:rgba(148,163,184,.08); color:#94a3b8; border:1px solid rgba(148,163,184,.15); }
.sc-bdot { width:5px; height:5px; border-radius:50%; background:currentColor; }
.scb-live .sc-bdot { animation:cpulse 2s infinite; }
.sched-card-body { padding:14px 18px; }

.timeline { display:flex; flex-direction:column; gap:7px; }
.tl-item { display:flex; align-items:center; gap:10px; padding:9px 11px; border-radius:var(--r-sm); border:1px solid transparent; background:rgba(248,250,252,0.6); backdrop-filter:var(--glass-blur-sm); -webkit-backdrop-filter:var(--glass-blur-sm); }
.tl-item.tl-live { background:rgba(16,185,129,.06); border-color:rgba(16,185,129,.2); }
.tl-item.tl-next { background:rgba(99,102,241,.05); border-color:rgba(99,102,241,.15); }
.tl-item.tl-done { opacity:.45; }
.tl-time  { text-align:right; min-width:68px; flex-shrink:0; }
.tl-start { font-size:.78rem; font-weight:700; color:var(--t1); }
.tl-end   { font-size:.67rem; color:var(--t3); }
.tl-sep   { width:1px; height:28px; background:var(--border); flex-shrink:0; }
.tl-info  { flex:1; min-width:0; }
.tl-subj  { font-size:.8rem; font-weight:600; color:var(--t1); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tl-room  { font-size:.67rem; color:var(--t3); }
.tl-pill  { flex-shrink:0; }

.sched-card-foot { padding:11px 18px 13px; border-top:1px solid var(--border); }
.scf-row  { display:flex; justify-content:space-between; align-items:center; margin-bottom:5px; }
.scf-lbl  { font-size:.7rem; color:var(--t3); font-weight:600; }
.scf-val  { font-size:.7rem; color:var(--primary); font-weight:700; }
.scf-bar  { height:5px; background:#e2e8f0; border-radius:10px; overflow:hidden; }
.scf-fill { height:100%; border-radius:10px; background:linear-gradient(90deg,var(--primary),#818cf8); transition:width .8s ease; }
.scf-fill.sf-live { background:linear-gradient(90deg,#10b981,#34d399); }
.scf-fill.sf-done { background:linear-gradient(90deg,#64748b,#94a3b8); }
.sched-empty { display:flex; align-items:center; gap:9px; padding:13px; background:var(--surface-2); border-radius:var(--r-sm); font-size:.8rem; color:var(--t3); font-weight:500; }

.mgmt-panel { background:var(--surface); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); border-radius:var(--r-lg); padding:22px; border:1px solid var(--border); box-shadow:var(--sh-sm); margin-bottom:14px; }
.mp-head   { display:flex; align-items:center; gap:8px; margin-bottom:4px; }
.mp-head h6 { font-size:.92rem; font-weight:800; color:var(--t1); margin:0; }
.mp-sub    { font-size:.78rem; color:var(--t3); margin-bottom:16px; }
.mp-btn    { display:flex; align-items:center; gap:10px; padding:11px 15px; border-radius:var(--r-md); font-size:.83rem; font-weight:600; text-decoration:none; transition:all .15s; border:1px solid transparent; width:100%; margin-bottom:7px; color:inherit; }
.mp-btn:last-child { margin-bottom:0; }
.mp-btn-icon { width:30px; height:30px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:.85rem; flex-shrink:0; }
.mb-primary { background:var(--primary); color:white; border-color:#4f46e5; box-shadow:0 4px 12px rgba(99,102,241,.3); }
.mb-primary:hover { background:#4f46e5; color:white; transform:translateY(-1px); box-shadow:0 6px 16px rgba(99,102,241,.4); }
.mb-primary .mp-btn-icon { background:rgba(255,255,255,.2); color:white; }
.mb-outline { background:rgba(255,255,255,0.35); color:var(--t1); border-color:var(--border); backdrop-filter:var(--glass-blur-sm); -webkit-backdrop-filter:var(--glass-blur-sm); }
.mb-outline:hover { background:white; color:var(--primary); border-color:rgba(99,102,241,.3); transform:translateY(-1px); box-shadow:var(--sh-sm); }
.mb-outline .mp-btn-icon { background:var(--border); color:var(--t2); }

.sys-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.sys-head h6 { font-size:.92rem; font-weight:800; color:var(--t1); margin:0; }
.sys-online { display:inline-flex; align-items:center; gap:5px; font-size:.67rem; font-weight:700; color:#10b981; background:rgba(16,185,129,.1); border:1px solid rgba(16,185,129,.25); border-radius:50px; padding:3px 9px; }
.sys-bar  { height:5px; background:#e2e8f0; border-radius:10px; overflow:hidden; margin-bottom:11px; }
.sys-fill { height:100%; width:88%; border-radius:10px; background:linear-gradient(90deg,var(--primary),#818cf8); animation:sysAnim 3s ease-in-out infinite alternate; }
@keyframes sysAnim { from{width:83%} to{width:93%} }
.sys-stats { display:flex; justify-content:space-between; }
.sys-stat  { display:flex; align-items:center; gap:5px; font-size:.72rem; color:var(--t3); font-weight:500; }
.sys-stat i { color:var(--primary); }

.countdown-urgent { color:#fca5a5; font-weight:700; font-size:.82rem; animation:urgentPulse 1s ease-in-out infinite; }
@keyframes urgentPulse { 0%,100%{opacity:1} 50%{opacity:.55} }
#secs-countdown { font-size:1.05rem; font-weight:800; }

/* Dashboard animations */
.dh        { animation:fadeInDown 0.6s ease both; }
.hero-grid { animation:fadeInUp   0.6s ease 0.1s both; }
.kpi-row   { animation:fadeInUp   0.6s ease 0.2s both; }
.kpi-row .kpi-card:nth-child(1) { animation:fadeInLeft  0.5s ease 0.25s both; }
.kpi-row .kpi-card:nth-child(2) { animation:fadeInUp    0.5s ease 0.35s both; }
.kpi-row .kpi-card:nth-child(3) { animation:fadeInRight 0.5s ease 0.45s both; }
.hero-card  { animation:fadeInLeft  0.6s ease 0.15s both; }
.hero-right { animation:fadeInRight 0.6s ease 0.2s  both; }
.sched-grid .sched-card              { animation:fadeInUp 0.5s ease both; }
.sched-grid .sched-card:nth-child(1) { animation-delay:0.3s; }
.sched-grid .sched-card:nth-child(2) { animation-delay:0.4s; }
.sched-grid .sched-card:nth-child(3) { animation-delay:0.5s; }
.sched-grid .sched-card:nth-child(4) { animation-delay:0.6s; }
.sched-grid .sched-card:nth-child(5) { animation-delay:0.7s; }
.sched-grid .sched-card:nth-child(6) { animation-delay:0.8s; }
.mgmt-panel { animation:fadeInRight 0.5s ease 0.35s both; }
.sec-head   { animation:fadeIn      0.5s ease 0.25s both; }

/* Dashboard responsive */
@media (max-width:1199px) { .hero-grid{grid-template-columns:1fr;} .hero-right{flex-direction:row;} }
@media (max-width:991px)  { #main-content{margin-left:0!important;padding:24px 20px 60px;} .kpi-row{grid-template-columns:repeat(2,1fr);} .hero-right{flex-direction:column;} .hero-title{font-size:1.7rem;} }
@media (max-width:768px)  { #main-content{margin-left:0!important;padding:16px 14px 72px;} .dh{margin-bottom:20px;} .dh-left h2{font-size:1.25rem;} .dh-watermark{display:none;} .hero-grid{grid-template-columns:1fr;gap:12px;margin-top:10px;margin-bottom:14px;} .hero-card{padding:24px 20px 20px;min-height:200px;} .hero-title{font-size:1.45rem;} .hero-right{flex-direction:row;gap:10px;} .next-info-card{padding:18px 16px;} .kpi-row{grid-template-columns:1fr;gap:10px;} .kpi-card{padding:16px 18px;} .sched-grid{grid-template-columns:1fr;gap:10px;} .col-lg-8,.col-lg-4{width:100%!important;max-width:100%!important;flex:0 0 100%!important;} .mgmt-panel{padding:18px 16px;} }
@media (max-width:479px)  { #main-content{padding:12px 10px 60px;} .hero-card{padding:18px 14px;min-height:180px;} .hero-title{font-size:1.2rem;} .hero-chips{display:none;} .hero-right{flex-direction:column;} .kpi-val{font-size:1.4rem;} }

/* ============================================================
   23. STUDENT LIST PAGE STYLES
   ============================================================ */

.student-list-page body { background-color:#f1f0ed; }
:root {
    --ink: #0f0e11; --ink-soft: #1e1c24; --sl-surface: #f1f0ed;
    --card-bg: #ffffff; --accent: #c0392b; --accent-2: #2c4a8a; --accent-3: #1a6b4a;
    --muted: #7b7880; --sl-border: rgba(15,14,17,0.08);
    --shadow-sm: 0 2px 10px rgba(15,14,17,0.06); --shadow-md: 0 8px 32px rgba(15,14,17,0.1); --shadow-lg: 0 20px 60px rgba(15,14,17,0.16);
    --radius: 18px; --radius-xs: 8px;
}

.main-content { margin-left:260px; padding:48px 40px; min-height:100vh; }

.page-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:24px; gap:20px; }
.page-header h2 { font-size:2.4rem; font-weight:800; letter-spacing:-.03em; line-height:1; margin:0 0 6px; }
.page-header p { color:var(--muted); font-size:.9rem; margin:0; }
.btn-add { background:var(--ink); color:#fff; border:none; border-radius:50px; padding:11px 24px; font-weight:700; font-size:.84rem; letter-spacing:.01em; transition:all .2s; display:inline-flex; align-items:center; gap:8px; text-decoration:none; white-space:nowrap; flex-shrink:0; }
.btn-add:hover { background:var(--accent); color:#fff; transform:translateY(-2px); box-shadow:0 8px 20px rgba(192,57,43,0.3); }

.search-container { position:relative; margin-bottom:36px; z-index:100; isolation:isolate; }
.global-search-wrapper { background:var(--card-bg); border-radius:var(--radius); border:2px solid transparent; box-shadow:var(--shadow-sm); padding:6px 6px 6px 20px; display:flex; align-items:center; gap:10px; transition:border-color .2s,box-shadow .2s; }
.global-search-wrapper:focus-within { border-color:var(--ink); box-shadow:var(--shadow-md); }
.global-search-icon { color:var(--muted); font-size:1.05rem; flex-shrink:0; }
.global-search-input { flex:1; border:none; outline:none; background:transparent; font-size:.94rem; color:var(--ink); padding:9px 0; }
.global-search-input::placeholder { color:var(--muted); }
.search-clear-btn { background:none; border:none; color:var(--muted); cursor:pointer; padding:8px 10px; font-size:.88rem; line-height:1; display:none; transition:color .2s; flex-shrink:0; }
.search-clear-btn:hover { color:var(--ink); }

.live-results-panel { position:absolute; top:calc(100% + 6px); left:0; right:0; background:var(--card-bg); border-radius:var(--radius); box-shadow:var(--shadow-lg); border:1px solid var(--sl-border); z-index:9999; max-height:440px; overflow-y:auto; display:none; }
.live-results-panel.active { display:block; animation:fadeSlide .18s ease; }
@keyframes fadeSlide { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }
.live-results-header { padding:11px 20px 9px; border-bottom:1px solid var(--sl-border); display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; background:var(--card-bg); z-index:2; }
.live-results-label { font-size:.66rem; font-weight:700; text-transform:uppercase; letter-spacing:.14em; color:var(--muted); }
.live-count-pill { background:var(--accent); color:#fff; border-radius:50px; font-size:.68rem; font-weight:700; padding:2px 10px; }
.live-result-item { display:flex; align-items:center; gap:14px; padding:13px 20px; border-bottom:1px solid var(--sl-border); transition:background .12s; }
.live-result-item:last-child { border-bottom:none; }
.live-result-item:hover { background:#f8f7f5; }
.live-no-results { padding:38px 20px; text-align:center; color:var(--muted); font-size:.88rem; }
.live-no-results i { font-size:2rem; display:block; margin-bottom:8px; opacity:.22; }
.live-searching { padding:22px 20px; text-align:center; color:var(--muted); font-size:.84rem; }
.live-searching .spinner { display:inline-block; width:14px; height:14px; border:2px solid var(--sl-border); border-top-color:var(--muted); border-radius:50%; animation:sas-spin .7s linear infinite; margin-right:8px; vertical-align:middle; }

.section-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
/* --accent-h (0-360) is set inline per-card by student_list.php, sampled
   from that block's own uploaded icon (see includes/icon_accent.php). The
   ", 262" fallback in every var() below is the hue of the original fixed
   purple (#4c1d95) — so a card with no icon-derived color, or on a page
   that never sets --accent-h at all, still renders exactly as before. */
.atm-card { border-radius:24px; padding:28px 30px 26px; color:white; min-height:240px; display:flex; flex-direction:column; justify-content:space-between; transition:box-shadow .2s; text-decoration:none!important; position:relative; overflow:hidden; background:linear-gradient(140deg,hsl(var(--accent-h,262),46%,16%) 0%,hsl(var(--accent-h,262),52%,22%) 55%,hsl(var(--accent-h,262),58%,36%) 100%); box-shadow:0 20px 60px hsla(var(--accent-h,262),70%,55%,.35); cursor:pointer; }
.atm-card::after { content:''; position:absolute; inset:0; background-image:radial-gradient(rgba(255,255,255,.055) 1px,transparent 1px); background-size:26px 26px; pointer-events:none; z-index:0; }
.atm-card::before { content:''; position:absolute; width:420px; height:420px; border-radius:50%; background:radial-gradient(circle,hsla(var(--accent-h,262),75%,65%,.22) 0%,transparent 65%); top:-160px; right:-110px; pointer-events:none; z-index:0; }
.atm-card:hover { transform:none!important; }
.atm-card > * { position:relative; z-index:1; }

.card-badge { display:inline-flex; align-items:center; gap:7px; font-size:.63rem; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; padding:5px 13px; border-radius:50px; width:fit-content; margin-bottom:12px; background:hsla(var(--accent-h,262),70%,68%,.2); border:1px solid hsla(var(--accent-h,262),70%,68%,.45); color:hsl(var(--accent-h,262),75%,84%); }
.card-badge-dot { width:6px; height:6px; border-radius:50%; background:currentColor; }
.card-block-name { font-size:2rem; font-weight:800; letter-spacing:-.5px; line-height:1; margin-bottom:12px; }
.card-chips { display:flex; flex-direction:column; gap:8px; margin-bottom:0; }
.card-chip { display:flex; align-items:center; gap:7px; padding:7px 13px; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.12); border-radius:8px; font-size:.8rem; font-weight:500; color:rgba(255,255,255,.88); backdrop-filter:blur(6px); width:fit-content; }
.card-chip i { opacity:.6; font-size:.8rem; }
/* Icon mask: whatever shape the uploaded icon file actually is (square,
   rounded-square, irregular padding, etc.), crop+cover it into a clean
   circle instead of showing its raw shape. */
.card-icon-overlay { position:absolute; top:18px; right:18px; width:48px; height:48px; border-radius:50%; object-fit:cover; z-index:3; background:rgba(255,255,255,.92); border:2px solid rgba(255,255,255,.32); box-shadow:0 4px 10px rgba(0,0,0,.35); transition:transform .3s; }

.section-view-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:24px; gap:16px; flex-wrap:wrap; }
.back-link { display:inline-flex; align-items:center; gap:6px; color:var(--muted); text-decoration:none; font-size:.83rem; transition:color .2s; margin-bottom:8px; }
.back-link:hover { color:var(--ink); }
.section-title { font-size:2rem; font-weight:800; letter-spacing:-.03em; margin:0; line-height:1.1; }
.section-subtitle { color:var(--muted); font-size:.86rem; margin:5px 0 0; }
.table-card { background:var(--card-bg); border-radius:var(--radius); box-shadow:var(--shadow-sm); overflow:hidden; border:1px solid var(--sl-border); }
.table-card-header { padding:16px 24px; border-bottom:1px solid var(--sl-border); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.roster-label { font-weight:600; font-size:.86rem; color:var(--muted); }
.filter-search { border:1.5px solid var(--sl-border); border-radius:50px; padding:8px 18px; font-size:.84rem; outline:none; transition:border-color .2s; width:220px; background:var(--sl-surface); color:var(--ink); }
.filter-search:focus { border-color:var(--ink); background:#fff; }

.custom-table { border-collapse:collapse; width:100%!important; }
.custom-table thead tr { background:#f8f7f5; }
.custom-table thead th { padding:11px 20px; font-size:.62rem; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); font-weight:700; border:none; }
.custom-table tbody tr { border-bottom:1px solid var(--sl-border); transition:background .12s; }
.custom-table tbody tr:last-child { border-bottom:none; }
.custom-table tbody tr:hover { background:#f8f7f5; }
.custom-table td { padding:13px 20px; border:none; vertical-align:middle; }

.student-name { font-weight:600; font-size:.88rem; line-height:1.3; }
.student-mi   { font-size:.74rem; color:var(--muted); }
.status-enrolled { background:rgba(26,107,74,0.1); color:#1a6b4a; }
.status-dropped  { background:rgba(192,57,43,0.1);  color:#c0392b; }
.status-withdraw { background:rgba(123,120,128,0.12); color:#5a5760; }
.gender-tag  { font-size:.67rem; font-weight:700; color:var(--muted); letter-spacing:.07em; text-transform:uppercase; }
.section-chip { display:inline-flex; align-items:center; gap:4px; background:var(--sl-surface); border:1px solid var(--sl-border); border-radius:50px; padding:3px 10px; font-size:.67rem; font-weight:500; color:var(--muted); }
.action-btn { width:32px; height:32px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; border:none; background:var(--sl-surface); transition:all .17s; cursor:pointer; font-size:.82rem; }
.action-btn:hover { transform:scale(1.1); }
.action-btn.edit:hover { background:#dbeafe; }
.action-btn.del:hover  { background:#fee2e2; }
.btn-view-section { display:inline-flex; align-items:center; gap:6px; background:var(--ink); color:#fff; border:none; border-radius:50px; padding:7px 14px; font-weight:700; font-size:.72rem; letter-spacing:.02em; text-decoration:none; white-space:nowrap; transition:all .18s; flex-shrink:0; }
.btn-view-section:hover { background:var(--accent-2); color:#fff; transform:translateY(-1px); box-shadow:0 4px 12px rgba(44,74,138,0.3); }

.dataTables_wrapper .dataTables_filter { display:none; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { background:var(--ink)!important; color:#fff!important; border-color:var(--ink)!important; border-radius:8px; }
.dataTables_wrapper .dataTables_paginate .paginate_button:hover { background:var(--sl-surface)!important; border-color:var(--sl-border)!important; color:var(--ink)!important; border-radius:8px; }
.dataTables_wrapper .dataTables_info { font-size:.8rem; color:var(--muted); }
.dataTables_footer-row { padding:14px 22px; border-top:1px solid var(--sl-border); display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.btn-save { background:var(--ink); color:#fff; border:none; border-radius:50px; padding:11px 28px; font-weight:700; font-size:.84rem; transition:all .2s; cursor:pointer; }
.btn-save:hover { background:var(--accent); color:#fff; }
.delete-icon-wrap { width:68px; height:68px; background:rgba(192,57,43,0.1); border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 16px; }

/* Student list animations */
.page-header      { animation:fadeInDown 0.6s ease both; }
.search-container { animation:fadeInUp 0.5s ease 0.1s both; }
.section-grid .atm-card              { animation:fadeInUp 0.5s ease both; }
.section-grid .atm-card:nth-child(1) { animation-delay:.20s; }
.section-grid .atm-card:nth-child(2) { animation-delay:.28s; }
.section-grid .atm-card:nth-child(3) { animation-delay:.36s; }
.section-grid .atm-card:nth-child(4) { animation-delay:.44s; }
.section-grid .atm-card:nth-child(5) { animation-delay:.52s; }
.section-grid .atm-card:nth-child(6) { animation-delay:.60s; }
.section-grid .atm-card:nth-child(n+7) { animation-delay:.68s; }
.back-link           { animation:fadeInLeft  0.5s ease both; }
.section-view-header { animation:fadeInDown  0.6s ease 0.05s both; }
.table-card          { animation:fadeInUp    0.6s ease 0.15s both; }

/* Student list responsive */
@media (max-width:991px) { .main-content{margin-left:0!important;padding:24px 20px;} .section-grid{grid-template-columns:repeat(2,1fr);} .page-header h2{font-size:1.8rem;} }
@media (max-width:767px) { .main-content{padding:16px 14px;} .section-grid{grid-template-columns:1fr;} .page-header{flex-direction:column;gap:12px;} .page-header h2{font-size:1.4rem;} .btn-add{width:100%;justify-content:center;} .filter-search{width:100%;} .table-card-header{flex-direction:column;align-items:flex-start;} }
@media (max-width:479px) { .section-grid{gap:12px;} .atm-card{padding:20px 22px;min-height:200px;} .card-block-name{font-size:1.6rem;} }

/* ============================================================
   24. SHARED FORM PAGE STYLES (add_block, add_student, add_subject, manage_icons)
   ============================================================ */

.form-page body { background-color:#f1f5f9; }
.main-content { margin-left:260px; padding:40px; min-height:100vh; }
.glass-card { background:#ffffff; border-radius:24px; border:none; box-shadow:0 10px 30px rgba(0,0,0,0.04); padding:30px; }

.form-label { font-size:.75rem; text-transform:uppercase; letter-spacing:1px; font-weight:700; color:#64748b; margin-bottom:8px; }
.form-control,.form-select { background-color:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:12px 15px; transition:all .3s; font-size:.9rem; color:#1e293b; }
.form-control:focus,.form-select:focus { background-color:#fff; border-color:#8b5cf6; box-shadow:0 0 0 4px rgba(139,92,246,0.1); outline:none; }
.form-control:read-only { background-color:#f1f5f9; border-color:#cbd5e1; color:#8b5cf6; font-weight:700; cursor:default; }
.form-control:read-only:focus { box-shadow:none; border-color:#cbd5e1; }
.force-caps { text-transform:uppercase; font-weight:600; }

.section-header { font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:1.5px; color:#8b5cf6; border-bottom:2px solid #ede9fe; padding-bottom:8px; margin-top:10px; margin-bottom:20px; display:flex; align-items:center; gap:8px; }
.term-badge { display:flex; align-items:center; gap:10px; background:#f5f3ff; border:1px solid #ede9fe; border-radius:12px; padding:12px 16px; }
.term-badge i { color:#8b5cf6; font-size:1rem; }
.term-badge .term-label { font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.8px; color:#94a3b8; margin-bottom:2px; }
.term-badge .term-value { font-size:.95rem; font-weight:700; color:#8b5cf6; line-height:1; }

.btn-slate  { background:#0f172a; color:white; border-radius:15px; padding:12px 28px; font-weight:600; border:none; font-size:.9rem; transition:all .3s; cursor:pointer; }
.btn-slate:hover { background:#1e293b; transform:translateY(-1px); box-shadow:0 4px 15px rgba(15,23,42,0.3); }
.btn-update { background:#059669; color:white; border-radius:15px; padding:12px 24px; font-weight:600; border:none; transition:all .3s; }
.btn-update:hover { background:#047857; transform:translateY(-2px); box-shadow:0 10px 20px rgba(5,150,105,0.2); color:white; }
.btn-cancel { background:#6b7280; color:white; border-radius:15px; padding:12px 24px; font-weight:600; border:none; transition:all .3s; text-decoration:none; display:inline-block; text-align:center; }
.btn-cancel:hover { background:#4b5563; transform:translateY(-2px); color:white; }

/* add_block specific */
.block-pill   { background:rgba(139,92,246,0.1); color:#8b5cf6; border-radius:8px; padding:4px 8px; font-weight:700; font-size:.7rem; border:1px solid rgba(139,92,246,0.2); white-space:nowrap; display:inline-flex; align-items:center; gap:4px; }
.subject-badge { background:rgba(245,158,11,0.1); color:#f59e0b; border-radius:6px; padding:3px 8px; font-weight:600; font-size:.7rem; display:inline-block; border:1px solid rgba(245,158,11,0.2); }
.room-badge   { background:rgba(168,85,247,0.1); color:#a855f7; border-radius:6px; padding:3px 8px; font-weight:600; font-size:.7rem; display:inline-flex; align-items:center; gap:3px; }
.day-badge    { background:rgba(59,130,246,0.1); color:#3b82f6; border-radius:5px; padding:2px 5px; font-weight:600; font-size:.65rem; margin:1px; display:inline-block; white-space:nowrap; }
.time-badge   { background:rgba(16,185,129,0.1); color:#10b981; border-radius:5px; padding:2px 5px; font-weight:600; font-size:.65rem; margin:0 1px; white-space:nowrap; display:inline-block; }
.days-grid    { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-top:8px; }
.day-checkbox input[type="checkbox"] { position:absolute; opacity:0; }
.day-checkbox label { display:block; background:#f1f5f9; border:2px solid #e2e8f0; border-radius:10px; padding:8px 12px; text-align:center; font-weight:600; font-size:.8rem; cursor:pointer; transition:all .3s; color:#64748b; }
.day-checkbox input[type="checkbox"]:checked + label { background:#8b5cf6; border-color:#8b5cf6; color:white; }
.day-schedule-container { background:#f8fafc; border-radius:12px; padding:15px; border:2px solid #8b5cf6; }
.day-schedule-header { font-weight:700; color:#8b5cf6; font-size:.85rem; margin-bottom:10px; display:flex; align-items:center; gap:6px; }
.schedule-group { background:#f8fafc; border-radius:12px; padding:15px; margin-bottom:15px; border:1px solid #e2e8f0; }
.action-buttons-container { display:flex; gap:6px; justify-content:flex-end; align-items:center; white-space:nowrap; }
.action-edit   { width:28px; height:28px; border-radius:6px; background:#dbeafe; color:#2563eb; border:none; display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:.75rem; }
.action-delete { width:28px; height:28px; border-radius:6px; background:#fee2e2; color:#ef4444; border:none; display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:.75rem; }

/* add_subject specific */
.subject-pill { background:rgba(139,92,246,0.1); color:#8b5cf6; border-radius:10px; padding:6px 14px; font-weight:700; font-size:.85rem; border:1px solid rgba(139,92,246,0.2); display:inline-block; text-transform:uppercase; }
.editing-row { background:#f0fdf4!important; border-left:4px solid #10b981!important; }
.edit-indicator { display:inline-flex; align-items:center; gap:6px; font-size:.7rem; color:#059669; font-weight:600; }

/* spinner in button */
.spinner-border-sm { width:.85rem; height:.85rem; border-width:.15em; }

/* Form page animations */
.page-title-block { animation:fadeInDown 0.6s ease both; }
.form-glass-card  { animation:fadeInLeft  0.6s ease 0.1s both; }
.table-glass-card { animation:fadeInUp    0.6s ease 0.2s both; }
.glass-card       { animation:fadeInUp    0.6s ease 0.15s both; }
.form-row-1 { animation:fadeInUp 0.5s ease 0.30s both; }
.form-row-2 { animation:fadeInUp 0.5s ease 0.45s both; }
.form-row-3 { animation:fadeInUp 0.5s ease 0.60s both; }
.form-footer { animation:fadeIn  0.5s ease 0.70s both; }

/* Form page responsive */
@media (max-width:991px) { .main-content{margin-left:0!important;padding:24px 20px;} }
@media (max-width:767px) { .main-content{padding:16px 14px;} .glass-card{padding:18px;} .page-title{font-size:1.3rem;} .form-control,.form-select{font-size:16px;} }
@media (max-width:479px) { .main-content{padding:12px 10px;} .glass-card{padding:14px;border-radius:16px;} }

/* ============================================================
   25. MANAGE ICONS PAGE STYLES
   ============================================================ */

.upload-zone { border:2px dashed #cbd5e1; border-radius:20px; padding:40px; text-align:center; transition:.3s; background:#f8fafc; cursor:pointer; }
.upload-zone:hover { border-color:#8b5cf6; background:rgba(139,92,246,0.02); }
.icon-card { background:white; border-radius:20px; border:1px solid #f1f5f9; padding:15px; transition:.3s; position:relative; z-index:1; }
.icon-card:hover { transform:translateY(-5px); box-shadow:0 15px 35px rgba(0,0,0,0.08); border-color:#8b5cf6; z-index:2; }
.icon-card.dropdown-active { z-index:1000!important; }
.icon-preview-box { height:100px; display:flex; align-items:center; justify-content:center; background:radial-gradient(circle,#f8fafc 0%,#ffffff 100%); border-radius:15px; margin-bottom:12px; position:relative; }
.icon-preview-box img { max-width:60px; max-height:60px; object-fit:contain; }
.badges-container { position:absolute; bottom:5px; left:50%; transform:translateX(-50%); display:grid; grid-template-columns:auto auto; gap:4px; z-index:10; }
.btn-use { background:linear-gradient(135deg,#667eea 0%,#764ba2 100%); color:white; font-size:.8rem; font-weight:800; border:none; border-radius:10px; padding:10px 16px; width:100%; margin-bottom:10px; transition:all .3s; box-shadow:0 4px 15px rgba(102,126,234,0.3); display:flex; align-items:center; justify-content:center; gap:6px; text-transform:uppercase; letter-spacing:.5px; }
.btn-use:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(102,126,234,0.4); }
.use-dropdown { position:relative; width:100%; }
.dropdown-menu-custom { display:none; position:absolute; top:0; left:calc(100% + 10px); background:white; border-radius:12px; box-shadow:0 10px 40px rgba(0,0,0,0.25); z-index:9999; overflow:hidden; border:1px solid #e2e8f0; min-width:180px; }
.dropdown-menu-custom.show { display:block; animation:slideInRight .2s ease-out; }
@keyframes slideInRight { from{opacity:0;transform:translateX(-10px)} to{opacity:1;transform:translateX(0)} }
.dropdown-item-custom { padding:12px 16px; cursor:pointer; transition:all .2s; display:flex; align-items:center; gap:12px; font-size:.85rem; font-weight:600; color:#475569; border-bottom:1px solid #f1f5f9; }
.dropdown-item-custom:last-child { border-bottom:none; }
.dropdown-item-custom:hover { background:#f8fafc; color:#8b5cf6; padding-left:20px; }
.dropdown-item-custom i { font-size:1.1rem; width:20px; }
.active-badge { color:white; font-size:.55rem; font-weight:bold; padding:3px 8px; border-radius:8px; white-space:nowrap; display:inline-block; }
.badge-cards   { background:#10b981; box-shadow:0 2px 8px rgba(16,185,129,0.4); }
.badge-favicon { background:#f59e0b; box-shadow:0 2px 8px rgba(245,158,11,0.4); }
.badge-header  { background:#3b82f6; box-shadow:0 2px 8px rgba(59,130,246,0.4); }
.badge-avatar  { background:#ec4899; box-shadow:0 2px 8px rgba(236,72,153,0.4); }
.file-input-hidden { position:absolute; opacity:0; width:1px; height:1px; }
.active-icons-summary { background:linear-gradient(135deg,#667eea 0%,#764ba2 100%); border-radius:20px; padding:25px; color:white; margin-bottom:30px; }
.summary-item { display:flex; align-items:center; gap:15px; padding:15px; background:rgba(255,255,255,0.1); border-radius:12px; margin-bottom:10px; backdrop-filter:blur(10px); }
.summary-item:last-child { margin-bottom:0; }
.summary-icon { width:40px; height:40px; background:white; border-radius:10px; display:flex; align-items:center; justify-content:center; padding:5px; }
.summary-icon img { max-width:100%; max-height:100%; object-fit:contain; }
.summary-text { flex:1; }
.summary-label { font-size:.75rem; opacity:.9; font-weight:600; text-transform:uppercase; letter-spacing:.5px; }
.summary-path  { font-size:.7rem; opacity:.7; font-family:monospace; }

/* Manage icons animations */
.page-title-block     { animation:fadeInDown  0.6s ease both; }
.active-icons-summary { animation:fadeInUp    0.6s ease 0.1s both; }
.upload-glass-card    { animation:fadeInLeft  0.6s ease 0.2s both; }
.icons-glass-card     { animation:fadeInUp    0.6s ease 0.3s both; }

/* Manage icons responsive */
@media (max-width:991px) { .main-content{margin-left:0!important;padding:24px 20px;} }
@media (max-width:768px) { .main-content{padding:16px 14px;} .dropdown-menu-custom{left:auto;right:0;top:100%;margin-top:5px;} .summary-item{gap:10px;padding:12px;} }
@media (max-width:479px) { .active-icons-summary{padding:18px;border-radius:14px;} }

/* ============================================================
   26. GROUPINGS PAGE STYLES
   ============================================================ */

:root {
    --g-primary: #6366f1; --g-primary-dark: #4f46e5; --g-primary-glow: rgba(99,102,241,0.4);
    --g-success: #10b981; --g-success-dark: #059669; --g-danger: #ef4444;
    --g-card-glass: rgba(255,255,255,0.75); --g-input-bg: rgba(255,255,255,0.85);
    --g-shadow-sm: 0 2px 8px rgba(0,0,0,0.04); --g-shadow-md: 0 8px 24px rgba(0,0,0,0.08); --g-shadow-lg: 0 20px 40px rgba(0,0,0,0.12);
}
.groupings-page body { background:linear-gradient(135deg,#eef2f6 0%,#dfe7f0 100%); min-height:100vh; }
.groupings-page .main-content { margin-left:260px; padding:40px; min-height:100vh; width:calc(100% - 260px); transition:margin-left .3s ease; }
.groupings-page .main-content.expanded { margin-left:68px; width:calc(100% - 68px); }

.filter-section   { background:var(--g-card-glass); backdrop-filter:blur(20px); border-radius:20px; padding:28px; margin-bottom:32px; border:1px solid rgba(255,255,255,0.8); box-shadow:var(--g-shadow-md); width:100%; box-sizing:border-box; }
.input-group-custom { position:relative; background:var(--g-input-bg); border-radius:16px; border:2px solid rgba(0,0,0,0.06); transition:all .3s cubic-bezier(.4,0,.2,1); box-shadow:var(--g-shadow-sm); }
.input-group-custom:focus-within { background:#fff; border-color:var(--g-primary); box-shadow:0 0 0 4px var(--g-primary-glow),var(--g-shadow-md); transform:translateY(-2px); }
.input-group-custom i { position:absolute; left:18px; top:50%; transform:translateY(-50%); color:var(--g-primary); font-size:1.15rem; z-index:1; }
.form-control-custom { background:transparent!important; border:none!important; padding:15px 20px 15px 50px!important; font-weight:600; color:#1e293b!important; width:100%; border-radius:16px; font-size:.95rem; }
.form-control-custom:focus { outline:none; box-shadow:none; }

.students-grid { display:grid; grid-template-columns:1fr 1fr; gap:32px; margin-top:32px; min-height:600px; width:100%; box-sizing:border-box; }
.student-pool, .groups-section { background:var(--g-card-glass); backdrop-filter:blur(20px); border-radius:24px; padding:28px; border:1px solid rgba(255,255,255,0.8); box-shadow:var(--g-shadow-lg); min-height:600px; display:flex; flex-direction:column; }
.student-pool { animation:fadeInLeft 0.6s ease; }
.groups-section { animation:fadeInRight 0.6s ease; }

.pool-header { font-size:1.15rem; font-weight:800; margin-bottom:24px; color:#1e293b; display:flex; align-items:center; gap:12px; flex-shrink:0; padding-bottom:20px; border-bottom:2px solid rgba(99,102,241,0.1); }
.pool-header i { color:var(--g-primary); font-size:1.3rem; }
.count-badge { margin-left:auto; background:linear-gradient(135deg,var(--g-primary),var(--g-primary-dark)); color:white; padding:6px 14px; border-radius:12px; font-size:.85rem; font-weight:700; box-shadow:0 4px 12px rgba(99,102,241,0.3); }
.student-list,.groups-list { display:flex; flex-direction:column; gap:12px; flex:1; overflow-y:auto; padding-right:10px; min-height:0; }
.student-list::-webkit-scrollbar,.groups-list::-webkit-scrollbar { width:8px; }
.student-list::-webkit-scrollbar-track,.groups-list::-webkit-scrollbar-track { background:rgba(0,0,0,.03); border-radius:10px; }
.student-list::-webkit-scrollbar-thumb,.groups-list::-webkit-scrollbar-thumb { background:rgba(99,102,241,.3); border-radius:10px; }
.student-list::-webkit-scrollbar-thumb:hover,.groups-list::-webkit-scrollbar-thumb:hover { background:rgba(99,102,241,.5); }

.student-item { background:rgba(255,255,255,0.7); padding:16px 20px; border-radius:16px; cursor:pointer; transition:all .4s cubic-bezier(.4,0,.2,1); border:2px solid rgba(99,102,241,0.08); display:flex; align-items:center; gap:14px; box-shadow:var(--g-shadow-sm); position:relative; overflow:hidden; }
.student-item::before { content:''; position:absolute; top:0; left:0; width:4px; height:100%; background:linear-gradient(135deg,var(--g-primary),var(--g-primary-dark)); transform:scaleY(0); transition:transform .3s ease; }
.student-item:hover { background:rgba(255,255,255,.95); border-color:var(--g-primary); transform:translateX(8px); box-shadow:var(--g-shadow-md); }
.student-item:hover::before { transform:scaleY(1); }
.student-item.removing { animation:slideOutRight .5s ease forwards; }
@keyframes slideOutRight { 0%{opacity:1;transform:translateX(0)} 100%{opacity:0;transform:translateX(100px)} }
.student-avatar { width:46px; height:46px; border-radius:14px; background:linear-gradient(135deg,var(--g-primary),var(--g-primary-dark)); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:.9rem; color:white; flex-shrink:0; box-shadow:0 4px 12px rgba(99,102,241,0.3); transition:all .3s ease; }
.student-item:hover .student-avatar { transform:scale(1.1) rotate(5deg); }
.student-info { flex:1; }
.student-name { font-weight:700; color:#1e293b; font-size:.95rem; margin-bottom:4px; }
.student-id   { font-size:.75rem; color:#64748b; font-weight:600; }

.create-group-form  { display:flex; gap:12px; margin-bottom:24px; flex-shrink:0; padding-bottom:20px; border-bottom:2px solid rgba(99,102,241,0.1); }
.create-group-input { flex:1; width:100%; background:var(--g-input-bg); border:2px solid rgba(0,0,0,0.06); border-radius:14px; padding:14px 18px; font-weight:600; color:#1e293b; transition:all .3s ease; box-shadow:var(--g-shadow-sm); }
.create-group-input:focus { outline:none; background:#fff; border-color:var(--g-primary); box-shadow:0 0 0 4px var(--g-primary-glow),var(--g-shadow-md); transform:translateY(-2px); }
.create-group-btn { display:none; }

.group-card { background:rgba(255,255,255,0.7); border-radius:16px; border:2px solid rgba(99,102,241,0.08); transition:all .4s cubic-bezier(.4,0,.2,1); overflow:hidden; box-shadow:var(--g-shadow-sm); animation:fadeInUp .4s ease backwards; }
.group-card:nth-child(1){animation-delay:.05s} .group-card:nth-child(2){animation-delay:.1s} .group-card:nth-child(3){animation-delay:.15s} .group-card:nth-child(4){animation-delay:.2s} .group-card:nth-child(5){animation-delay:.25s}
.group-card.active { border-color:var(--g-primary); box-shadow:0 0 0 4px var(--g-primary-glow),var(--g-shadow-md); background:rgba(255,255,255,.95); }
.group-header { padding:18px 22px; display:flex; align-items:center; gap:14px; cursor:pointer; transition:all .3s ease; position:relative; }
.group-header::before { content:''; position:absolute; top:0; left:0; width:4px; height:100%; background:linear-gradient(135deg,var(--g-primary),var(--g-primary-dark)); transform:scaleY(0); transition:transform .3s ease; }
.group-card.active .group-header::before { transform:scaleY(1); }
.group-header:hover { background:rgba(99,102,241,.04); }
.group-icon { width:42px; height:42px; border-radius:12px; background:linear-gradient(135deg,var(--g-primary),var(--g-primary-dark)); display:flex; align-items:center; justify-content:center; color:white; font-size:1.1rem; flex-shrink:0; box-shadow:0 6px 16px rgba(99,102,241,0.35); transition:all .3s ease; }
.group-card:hover .group-icon { transform:scale(1.1) rotate(-5deg); }
.group-details { flex:1; }
.group-name    { font-weight:800; color:#1e293b; font-size:1rem; margin-bottom:4px; }
.group-meta    { font-size:.8rem; color:#64748b; font-weight:600; }
.group-actions { display:flex; gap:8px; }
.delete-group-btn { background:rgba(239,68,68,0.1); color:var(--g-danger); border:2px solid transparent; border-radius:10px; padding:8px 14px; font-size:.85rem; font-weight:700; cursor:pointer; transition:all .3s ease; display:flex; align-items:center; gap:6px; }
.delete-group-btn:hover { background:var(--g-danger); color:white; border-color:var(--g-danger); transform:scale(1.05); }
.group-content { max-height:0; overflow:hidden; transition:max-height .4s cubic-bezier(.4,0,.2,1); }
.group-card.active .group-content { max-height:1200px; }
.group-members { padding:0 22px 20px 22px; display:flex; flex-direction:column; gap:10px; }
.member-item { background:rgba(255,255,255,0.9); padding:12px 16px; border-radius:12px; display:flex; align-items:center; gap:12px; transition:all .3s ease; border:2px solid rgba(16,185,129,0.1); box-shadow:var(--g-shadow-sm); animation:slideInLeft .4s ease backwards; }
.member-item:nth-child(1){animation-delay:.05s} .member-item:nth-child(2){animation-delay:.1s} .member-item:nth-child(3){animation-delay:.15s} .member-item:nth-child(4){animation-delay:.2s} .member-item:nth-child(5){animation-delay:.25s}
.member-item:hover { transform:translateX(4px); box-shadow:var(--g-shadow-md); }
.member-avatar { width:36px; height:36px; border-radius:10px; background:linear-gradient(135deg,var(--g-success),var(--g-success-dark)); display:flex; align-items:center; justify-content:center; font-size:.8rem; font-weight:800; color:white; flex-shrink:0; box-shadow:0 4px 12px rgba(16,185,129,0.3); }
.member-name { flex:1; font-weight:700; font-size:.9rem; color:#1e293b; }
.remove-member-btn { background:rgba(239,68,68,0.08); border:none; color:#64748b; cursor:pointer; padding:6px 8px; border-radius:8px; transition:all .3s ease; display:flex; align-items:center; justify-content:center; }
.remove-member-btn:hover { background:var(--g-danger); color:white; transform:scale(1.1); }

.group-grade-section { padding:20px 22px; border-top:2px solid rgba(99,102,241,0.1); background:rgba(99,102,241,.02); margin:0; }
.grade-label { font-size:.72rem; font-weight:800; color:#64748b; margin-bottom:12px; text-transform:uppercase; letter-spacing:1px; }
.grade-input-group { display:flex; gap:12px; margin-bottom:14px; }
.grade-input,.term-select { flex:1; background:rgba(255,255,255,.95); border:2px solid rgba(0,0,0,0.08); border-radius:12px; padding:12px 16px; font-weight:700; color:#1e293b; transition:all .3s ease; box-shadow:var(--g-shadow-sm); }
.grade-input:focus,.term-select:focus { outline:none; border-color:var(--g-primary); box-shadow:0 0 0 4px var(--g-primary-glow),var(--g-shadow-md); transform:translateY(-2px); }
.submit-grade-btn { width:100%!important; background:linear-gradient(135deg,var(--g-success),var(--g-success-dark))!important; color:white!important; border:none!important; border-radius:12px!important; padding:13px!important; font-weight:800!important; cursor:pointer!important; transition:all .3s ease!important; font-size:.9rem!important; box-shadow:0 6px 20px rgba(16,185,129,0.35)!important; display:flex!important; align-items:center!important; justify-content:center!important; gap:8px!important; }
.submit-grade-btn:hover:not(:disabled) { transform:translateY(-3px); box-shadow:0 10px 30px rgba(16,185,129,0.45); }
.submit-grade-btn:disabled { opacity:.5; cursor:not-allowed; box-shadow:none; }

.no-groups-message,.empty-state { text-align:center; padding:60px 20px; color:#64748b; }
.no-groups-icon,.empty-icon { font-size:3rem; margin-bottom:16px; opacity:.3; }

@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }

/* Groupings responsive */
@media (max-width:991px) { .groupings-page .main-content{margin-left:0!important;width:100%!important;padding:24px 20px;} }
@media (max-width:768px) { .groupings-page .main-content{padding:16px 14px;} .students-grid{grid-template-columns:1fr;} }
@media (max-width:479px) { .groupings-page .main-content{padding:12px 10px;} }

/* ============================================================
   27. ATTENDANCE PAGE STYLES
   ============================================================ */

.attendance-page body { background-color:#f1f5f9; }
.attendance-page #main-content { margin-left:260px; padding:40px; width:calc(100% - 260px); min-height:100vh; transition:.3s; }
.glass-card { background:#ffffff; border-radius:24px; border:none; box-shadow:0 10px 30px rgba(0,0,0,0.04); padding:30px; margin-bottom:25px; }
.glass-card,.glass-card:hover,.combined-card,.combined-card:hover { transform:none!important; box-shadow:0 10px 30px rgba(0,0,0,0.04)!important; }
.stats-divider { border:none; border-top:1px solid #f1f5f9; margin:0 0 16px 0; }

.page-header-wrapper { display:flex; justify-content:space-between; align-items:center; margin-bottom:30px; }
.month-navigation { display:flex; align-items:center; gap:12px; background:linear-gradient(135deg,#f8fafc,#ffffff); padding:8px 12px; border-radius:12px; border:1px solid #e2e8f0; box-shadow:0 2px 8px rgba(0,0,0,.02); }
.month-display { font-size:.9rem; font-weight:700; color:#0f172a; min-width:130px; text-align:center; letter-spacing:.3px; }
.nav-btn { background:transparent; color:#64748b; border:none; padding:6px 10px; font-size:.9rem; transition:all .2s ease; cursor:pointer; display:inline-flex; align-items:center; border-radius:8px; }
.nav-btn:hover { background:#f1f5f9; color:#8b5cf6; }
.nav-btn:disabled { opacity:.3; cursor:not-allowed; }
.nav-btn:disabled:hover { background:transparent; color:#64748b; }
.nav-btn i { font-size:1rem; }

.matrix-container { border-radius:20px; background:#ffffff; box-shadow:0 10px 30px rgba(0,0,0,.04); border:1px solid #e2e8f0; overflow-x:auto; position:relative; }
.attendance-matrix { width:100%; border-collapse:collapse; min-width:600px; }
.attendance-matrix thead th { background-color:#0f172a!important; color:#ffffff!important; font-size:.65rem; text-transform:uppercase; letter-spacing:.5px; padding:10px 6px; border:none; position:sticky; top:0; z-index:10; }
.attendance-matrix thead th.student-name-header { text-align:left; padding-left:20px; width:220px; max-width:220px; }
.attendance-matrix thead th.date-header { text-align:center; width:35px; min-width:35px; padding:10px 4px; cursor:pointer; transition:all .2s ease; user-select:none; }
.attendance-matrix thead th.date-header:hover { background-color:#6366f1!important; }
.attendance-matrix thead th.current-date { background-color:#8b5cf6!important; box-shadow:inset 0 -3px 0 0 #a78bfa; }
.gender-divider { background-color:#f8fafc!important; color:#8b5cf6!important; font-weight:800; font-size:.65rem; text-transform:uppercase; letter-spacing:.5px; padding:8px 20px!important; }
.gender-divider td { position:sticky!important; left:0!important; z-index:6!important; background-color:#f8fafc!important; }
.student-name-cell { padding:8px 20px; font-weight:600; color:#0f172a; border-bottom:1px solid #f1f5f9; position:sticky; left:0; background:white; z-index:5; font-size:.85rem; width:220px; max-width:220px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; transition:all .2s ease; }
.student-row.dropped-row { opacity:.7; background-color:#fef2f2!important; }
.student-row.dropped-row:hover { transform:none; }
.student-row.dropped-row .attendance-cell { background-color:#fef2f2!important; }
.student-row.dropped-row .student-name-cell { color:#991b1b!important; font-style:italic!important; background-color:#fef2f2!important; }
.student-row.dropped-row .student-name-text { text-decoration:line-through!important; text-decoration-color:#ef4444!important; text-decoration-thickness:2px!important; }
.student-row.dropped-row .student-number { background:linear-gradient(135deg,#f87171,#ef4444)!important; opacity:.7; }
.attendance-cell { text-align:center; padding:6px 4px; border-bottom:1px solid #f1f5f9; border-right:1px solid #f1f5f9; cursor:pointer; transition:all .2s ease; width:35px; }
.attendance-cell:hover { background-color:#ede9fe; }
.attendance-checkbox { width:18px; height:18px; cursor:pointer; appearance:none; -webkit-appearance:none; -moz-appearance:none; border:2px solid #cbd5e1; border-radius:4px; background-color:#ffffff; transition:all .2s ease; position:relative; }
.attendance-checkbox:hover:not(:disabled) { border-color:#8b5cf6; }
.attendance-checkbox:checked { background-color:#8b5cf6; border-color:#8b5cf6; }
.attendance-checkbox:checked::after { content:'✓'; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); color:white; font-size:12px; font-weight:bold; }
.attendance-checkbox:disabled { opacity:.3!important; cursor:not-allowed!important; background-color:#f1f5f9!important; border-color:#e2e8f0!important; pointer-events:none; }
.dropped-row .attendance-checkbox { opacity:.2!important; background-color:#fecaca!important; border-color:#fca5a5!important; }
.attendance-cell.active-cell { background-color:#ede9fe!important; box-shadow:inset 0 0 0 2px #8b5cf6; }
.student-row.highlighted { background-color:#ede9fe!important; }
.student-row.highlighted .student-name-cell { background-color:#ede9fe!important; font-weight:700; color:#8b5cf6!important; }
.attendance-checkbox:focus { outline:2px solid #8b5cf6; outline-offset:2px; }
.student-number { display:inline-block; background:linear-gradient(135deg,#6366f1,#8b5cf6); color:white; font-weight:700; font-size:.65rem; padding:3px 7px; border-radius:5px; margin-right:8px; min-width:26px; text-align:center; }

.keyboard-help { position:fixed; bottom:20px; right:20px; background:rgba(15,23,42,.95); color:white; padding:16px 20px; border-radius:12px; font-size:.75rem; z-index:1000; box-shadow:0 10px 30px rgba(0,0,0,.3); display:none; }
.keyboard-help.show { display:block; animation:slideUp .3s ease; }
@keyframes slideUp { from{transform:translateY(100px);opacity:0} to{transform:translateY(0);opacity:1} }
.keyboard-help h6 { font-size:.7rem; text-transform:uppercase; letter-spacing:1px; margin-bottom:12px; color:#a78bfa; }
.keyboard-help-item { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.keyboard-help-item:last-child { margin-bottom:0; }
.key-badge { background:#334155; padding:4px 8px; border-radius:4px; font-weight:700; min-width:30px; text-align:center; font-size:.7rem; }
.help-toggle { position:fixed; bottom:20px; right:20px; background:linear-gradient(135deg,#6366f1,#8b5cf6); color:white; border:none; padding:12px 16px; border-radius:50%; cursor:pointer; font-size:1.2rem; box-shadow:0 10px 30px rgba(139,92,246,.4); transition:all .3s ease; z-index:999; width:50px; height:50px; display:flex; align-items:center; justify-content:center; }
.help-toggle:hover { transform:scale(1.1); box-shadow:0 15px 40px rgba(139,92,246,.5); }

.loading-overlay { position:absolute; top:0; left:0; right:0; bottom:0; background:rgba(255,255,255,.95); display:none; align-items:center; justify-content:center; border-radius:20px; z-index:100; }
.loading-overlay.active { display:flex; }
.spinner { width:50px; height:50px; border:4px solid #f1f5f9; border-top:4px solid #8b5cf6; border-radius:50%; animation:sas-spin 1s linear infinite; }

.toast-notification { position:fixed; top:20px; right:20px; color:white; padding:16px 24px; border-radius:12px; z-index:9999; display:none; align-items:center; gap:12px; font-weight:600; animation:slideInAnim .3s ease; }
.toast-notification.success { background:linear-gradient(135deg,#10b981,#059669); box-shadow:0 10px 30px rgba(16,185,129,.3); }
.toast-notification.error   { background:linear-gradient(135deg,#ef4444,#dc2626); box-shadow:0 10px 30px rgba(239,68,68,.3); }
@keyframes slideInAnim { from{transform:translateX(400px);opacity:0} to{transform:translateX(0);opacity:1} }
.toast-notification i { font-size:1.2rem; }
.hidden { display:none!important; }

.today-stats-bar { display:flex; gap:0; }
.stat-card { flex:1; padding:12px 16px; display:flex; align-items:center; gap:10px; border:none; border-right:1px solid #f1f5f9; background:transparent; box-shadow:none; transform:none!important; }
.stat-card:last-child { border-right:none; }
.stat-card:hover { transform:none!important; box-shadow:none!important; background:transparent!important; }
.stat-icon { width:34px; height:34px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-size:1rem; flex-shrink:0; }
.stat-icon.purple { background:linear-gradient(135deg,#ede9fe,#ddd6fe); color:#7c3aed; }
.stat-icon.blue   { background:linear-gradient(135deg,#dbeafe,#bfdbfe); color:#2563eb; }
.stat-icon.pink   { background:linear-gradient(135deg,#fce7f3,#fbcfe8); color:#db2777; }
.stat-icon.green  { background:linear-gradient(135deg,#d1fae5,#a7f3d0); color:#059669; }
.stat-info  { display:flex; flex-direction:column; gap:1px; }
.stat-label { font-size:.6rem; font-weight:700; text-transform:uppercase; letter-spacing:.8px; color:#94a3b8; }
.stat-value { font-size:1.25rem; font-weight:800; color:#0f172a; line-height:1; }
.stat-sub   { font-size:.65rem; color:#64748b; font-weight:500; }

/* Attendance animations */
#pageHeader    { animation:fadeInDown 0.6s ease both; }
.combined-card { animation:fadeInUp   0.6s ease 0.15s both; }
#matrixWrapper { animation:fadeInUp   0.6s ease 0.25s both; }

/* Attendance responsive */
@media (max-width:991px) { .attendance-page #main-content{margin-left:0!important;width:100%!important;padding:24px 20px;} }
@media (max-width:767px) { .attendance-page #main-content{padding:16px 14px;} .page-header-wrapper{flex-direction:column;align-items:flex-start;gap:10px;} .attendance-matrix{min-width:500px;} .matrix-container{overflow-x:auto;} .help-toggle{bottom:80px;right:14px;} .toast-notification{right:10px;left:10px;top:70px;} .keyboard-help{right:10px;left:10px;bottom:140px;} }
@media (max-width:479px) { .attendance-page #main-content{padding:12px 10px;} }

/* ============================================================
   28. ATTENDANCE SUMMARY PAGE STYLES
   ============================================================ */

.attendance-summary-page body { background-color:#f1f5f9; }
.attendance-summary-page #main-content { margin-left:260px; padding:40px; width:calc(100% - 260px); min-height:100vh; transition:.3s; }

.btn-copy { background:linear-gradient(135deg,#8b5cf6,#7c3aed); color:white; border:none; border-radius:12px; padding:10px 20px; font-weight:700; font-size:.8rem; transition:all .3s ease; display:inline-flex; align-items:center; gap:6px; }
.btn-copy:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(139,92,246,.4); background:linear-gradient(135deg,#7c3aed,#6d28d9); color:white; }
.btn-copy.copied { background:linear-gradient(135deg,#10b981,#059669); }
.btn-copy i { font-size:1rem; }
.btn-eclass { background:linear-gradient(135deg,#10b981,#059669); color:white; border:none; border-radius:12px; padding:10px 20px; font-weight:700; font-size:.8rem; transition:all .3s ease; display:inline-flex; align-items:center; gap:6px; cursor:pointer; }
.btn-eclass:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(16,185,129,.4); background:linear-gradient(135deg,#059669,#047857); color:white; }
.btn-eclass:disabled { opacity:.6; cursor:not-allowed; transform:none; }

.ec-modal-backdrop { display:none; position:fixed; inset:0; background:rgba(15,23,42,.6); backdrop-filter:blur(6px); z-index:9999; align-items:center; justify-content:center; }
.ec-modal-backdrop.show { display:flex; }
.ec-modal { background:#fff; border-radius:20px; width:420px; max-width:95vw; box-shadow:0 32px 80px rgba(0,0,0,.25); overflow:hidden; animation:ecModalIn .25s ease; }
@keyframes ecModalIn { from{transform:scale(.92) translateY(20px);opacity:0} to{transform:scale(1) translateY(0);opacity:1} }
.ec-modal-header { background:linear-gradient(135deg,#10b981,#059669); padding:20px 24px; display:flex; align-items:center; justify-content:space-between; color:#fff; }
.ec-modal-header h5 { margin:0; font-weight:800; font-size:1rem; }
.ec-modal-close { background:rgba(255,255,255,.2); border:none; color:#fff; width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:.9rem; transition:background .2s; }
.ec-modal-close:hover { background:rgba(255,255,255,.35); }
.ec-modal-body { padding:24px; }
.ec-section-label { font-size:.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; letter-spacing:.8px; margin-bottom:10px; }
.term-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:16px; }
.term-item { display:flex; align-items:center; gap:10px; background:#f8fafc; border:2px solid #e2e8f0; border-radius:12px; padding:12px 14px; cursor:pointer; transition:all .2s; user-select:none; }
.term-item:hover { border-color:#10b981; background:#f0fdf4; }
.term-item.selected { border-color:#10b981; background:linear-gradient(135deg,#f0fdf4,#dcfce7); }
.term-item input[type="radio"] { display:none; }
.term-radio-icon { width:22px; height:22px; border-radius:50%; border:2px solid #cbd5e1; flex-shrink:0; display:flex; align-items:center; justify-content:center; transition:all .2s; font-size:.75rem; color:#fff; }
.term-item.selected .term-radio-icon { background:#10b981; border-color:#10b981; }
.term-item-label { font-size:.85rem; font-weight:700; color:#334155; text-transform:capitalize; }
.ec-info-box { background:#f0fdf4; border:1px solid #bbf7d0; border-radius:12px; padding:12px 16px; margin-bottom:16px; font-size:.8rem; color:#065f46; }
.ec-info-box strong { color:#047857; }
.ec-modal-footer { padding:16px 24px; border-top:1px solid #f1f5f9; display:flex; gap:10px; justify-content:flex-end; }
.ec-progress-wrap { display:none; margin-top:14px; }
.ec-progress-wrap.show { display:block; }
.ec-progress-bar-outer { background:#e2e8f0; border-radius:99px; height:8px; overflow:hidden; }
.ec-progress-bar-inner { height:100%; background:linear-gradient(90deg,#10b981,#059669); border-radius:99px; width:0%; transition:width .4s ease; }
.ec-progress-label { font-size:.75rem; color:#64748b; margin-top:6px; }

.summary-container { border-radius:20px; background:#ffffff; box-shadow:0 10px 30px rgba(0,0,0,.04); border:1px solid #e2e8f0; overflow:hidden; }
.summary-container.hidden { display:none; }
.summary-table { width:100%; table-layout:fixed; border-collapse:collapse; }
.summary-table thead th { background-color:#0f172a!important; color:#ffffff!important; font-size:.75rem; text-transform:uppercase; letter-spacing:1px; padding:18px 20px; border:none; }
.name-col  { width:65%; padding-left:30px!important; font-weight:700; color:#0f172a; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.total-col { width:35%; text-align:center; }
.summary-table td { padding:15px 20px; border-bottom:1px solid #f1f5f9; vertical-align:middle; }
.badge-present { background:rgba(139,92,246,0.1); color:#8b5cf6; font-weight:700; border-radius:8px; padding:6px 15px; font-size:.85rem; }
.dropped-row .name-col { color:#991b1b!important; font-style:italic!important; }
.dropped-row .student-name-text { text-decoration:line-through!important; text-decoration-color:#ef4444!important; text-decoration-thickness:2px!important; }
.dropped-badge { display:inline-block; background:linear-gradient(135deg,#fca5a5,#ef4444); color:white; font-weight:700; font-size:.65rem; padding:3px 8px; border-radius:6px; margin-left:8px; text-transform:uppercase; letter-spacing:.5px; }

.loading-overlay { position:absolute; top:0; left:0; right:0; bottom:0; background:rgba(255,255,255,.9); display:none; align-items:center; justify-content:center; border-radius:20px; z-index:10; }
.loading-overlay.active { display:flex; }

/* Attendance summary animations */
.page-title-block  { animation:fadeInDown 0.6s ease both; }
.filter-glass-card { animation:fadeInUp   0.6s ease 0.15s both; }

/* Attendance summary responsive */
@media (max-width:991px) { .attendance-summary-page #main-content{margin-left:0!important;width:100%!important;padding:24px 20px;} }
@media (max-width:767px) { .attendance-summary-page #main-content{padding:16px 14px;} .page-title{font-size:1.3rem;} .form-select,.form-control{font-size:16px;} .table-responsive{overflow-x:auto;} }
@media (max-width:479px) { .attendance-summary-page #main-content{padding:12px 10px;} }

/* ============================================================
   29. DB BACKUP PAGE STYLES
   ============================================================ */

.backup-main-card { animation:fadeInUp   0.6s ease both; }
.backup-header    { animation:fadeInDown 0.5s ease 0.1s both; }
.backup-info-box  { animation:fadeInLeft 0.5s ease 0.2s both; }
.backup-table-wrap{ animation:fadeInUp   0.5s ease 0.3s both; }