/* style.css - Expanded Student Management & Biometric Attendance System Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    /* Refined Modern Light/White Theme (Default) */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-input: #ffffff;
    --bg-secondary: #f8fafc;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --border-color: #e2e8f0;
    --border-color-hover: #cbd5e1;

    --color-primary: #0b9444;
    --color-primary-light: rgba(11, 148, 68, 0.08);
    --color-primary-hover: #087535;

    --color-success: #10b981;
    --color-success-light: rgba(16, 185, 129, 0.1);
    --color-warning: #f59e0b;
    --color-warning-light: rgba(245, 158, 11, 0.1);
    --color-danger: #ef4444;
    --color-danger-light: rgba(239, 68, 68, 0.08);
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 0 20px rgba(11, 148, 68, 0.18);
    --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(226, 232, 240, 0.9);

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-title: 'Outfit', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-input: #ffffff;
    --bg-secondary: #f8fafc;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --border-color: #e2e8f0;
    --border-color-hover: #cbd5e1;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(226, 232, 240, 0.9);
}

[data-theme="dark"] {
    --bg-main: #0a0e1a;
    --bg-card: #111827;
    --bg-card-hover: #1a2035;
    --bg-sidebar: #060810;
    --bg-input: #151b2e;
    --bg-secondary: #0d1220;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: rgba(148, 163, 184, 0.12);
    --border-color-hover: rgba(148, 163, 184, 0.2);

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.25);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.2), 0 0 0 1px rgba(148,163,184,0.1);
}

/* Micro-animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-in { animation: fadeIn var(--transition-normal) forwards; }
.animate-fade-in-up { animation: fadeInUp var(--transition-smooth) forwards; }
.animate-scale-in { animation: scaleIn var(--transition-smooth) forwards; }

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    line-height: 1.5;
}

input, select, textarea, button {
    font-family: inherit;
}
input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

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

/* Layout Shell */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 24px 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.brand-logo {
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 0 2px rgba(11, 148, 68, 0.3);
}

.brand-logo img,
.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.brand-name {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    cursor: pointer;
    border-left: 3px solid transparent;
}

.nav-item a:hover {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
    transform: translateX(2px);
}

.nav-item.active a {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
    border-left: 3px solid var(--color-primary);
    padding-left: 13px; /* Compensate for border */
    font-weight: 600;
}

.nav-item a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    border: 2px solid rgba(11, 148, 68, 0.2);
    box-shadow: var(--shadow-sm);
}

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

.user-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px 32px;
}

/* Top Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin: -24px -32px 32px -32px; /* Pull out to edges */
}

[data-theme="dark"] .top-header {
    background: rgba(10, 14, 26, 0.88);
}

.page-title {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: rotate(15deg);
}

/* Role Switcher in Header */
.role-select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}
.role-select-wrapper:hover {
    border-color: var(--border-color-hover);
    background-color: var(--bg-card-hover);
}

.role-select-wrapper label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.role-select {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    appearance: none;
}

/* Panel Layout (SPA Tab panels) */
.tab-panel {
    display: none;
    animation: fadeInUp var(--transition-smooth) forwards;
}

.tab-panel.active {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Dashboard Modules / Grid layouts */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-card);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

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

.stat-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-title);
    line-height: 1.1;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.stat-icon-wrapper.primary {
    background: linear-gradient(135deg, var(--color-primary), #0da34d);
    color: #fff;
}
.stat-icon-wrapper.success {
    background: linear-gradient(135deg, var(--color-success), #34d399);
    color: #fff;
}
.stat-icon-wrapper.warning {
    background: linear-gradient(135deg, var(--color-warning), #fbbf24);
    color: #fff;
}
.stat-icon-wrapper.danger {
    background: linear-gradient(135deg, var(--color-danger), #fb7185);
    color: #fff;
}

/* Analytics Charts Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

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

.chart-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-card);
}

.chart-title {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Setup Module Nav Header */
.setup-tabs-header {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    padding-bottom: 16px;
}

.setup-tab-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.setup-tab-btn:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
}

.setup-tab-btn.active {
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.setup-tab-btn[data-students-subtab] { border: 1px solid transparent; }
.setup-tab-btn[data-students-subtab="Approved"]:hover { color: var(--color-success); background: var(--color-success-light); }
.setup-tab-btn[data-students-subtab="Pending"]:hover { color: var(--color-warning); background: var(--color-warning-light); }
.setup-tab-btn[data-students-subtab="Waitlisted"]:hover { color: #6366f1; background: rgba(99, 102, 241, 0.1); }
.setup-tab-btn[data-students-subtab="Rejected"]:hover { color: var(--color-danger); background: var(--color-danger-light); }

.setup-tab-btn[data-students-subtab="Approved"].active { background-color: var(--color-success); color: #fff; }
.setup-tab-btn[data-students-subtab="Pending"].active { background-color: var(--color-warning); color: #fff; }
.setup-tab-btn[data-students-subtab="Waitlisted"].active { background-color: #6366f1; color: #fff; }
.setup-tab-btn[data-students-subtab="Rejected"].active { background-color: var(--color-danger); color: #fff; }

.tab-count-badge {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 4px;
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.setup-tab-btn.active .tab-count-badge {
    background-color: rgba(255,255,255,0.25);
    color: #fff;
    border-color: transparent;
}

.setup-tab-panel {
    display: none;
    animation: fadeIn var(--transition-smooth);
}

.setup-tab-panel.active {
    display: block;
}

/* Table Card & Modern Table Styling */
.table-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-card);
    margin-bottom: 32px;
}

.table-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.table-title {
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.table-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Search and Filters */
.search-input-wrapper {
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input {
    background-color: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 16px 0 40px;
    height: 44px;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 240px;
    transition: var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
    background-color: var(--bg-card);
}

.filter-select {
    background-color: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 16px;
    height: 44px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
    background-color: var(--bg-card);
}

/* Modern Data Table */
.data-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table thead th {
    padding: 14px 20px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.75px;
}

.data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.data-table tbody tr {
    transition: var(--transition-fast);
    position: relative;
    background-color: var(--bg-card);
}

.data-table tbody tr:hover {
    background-color: var(--bg-card-hover);
}

.data-table tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--color-primary);
}

/* Badges for Statuses */
.badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge.status-pending { background-color: var(--color-warning-light); color: var(--color-warning); border-color: rgba(245,158,11,0.2); }
.badge.status-pending::before { background-color: var(--color-warning); }

.badge.status-waitlisted { background-color: rgba(99, 102, 241, 0.15); color: #6366f1; border-color: rgba(99,102,241,0.2); }
.badge.status-waitlisted::before { background-color: #6366f1; }

.badge.status-approved, .badge.status-present { background-color: var(--color-success-light); color: var(--color-success); border-color: rgba(16,185,129,0.2); }
.badge.status-approved::before, .badge.status-present::before { background-color: var(--color-success); }

.badge.status-rejected, .badge.status-absent { background-color: var(--color-danger-light); color: var(--color-danger); border-color: rgba(244,63,94,0.2); }
.badge.status-rejected::before, .badge.status-absent::before { background-color: var(--color-danger); }

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

.badge.status-early.departure, .badge.status-early { background-color: rgba(236, 72, 153, 0.15); color: #ec4899; border-color: rgba(236,72,153,0.2); }
.badge.status-early.departure::before, .badge.status-early::before { background-color: #ec4899; }

.badge.status-excused { background-color: var(--color-primary-light); color: var(--color-primary); border-color: rgba(11,148,68,0.2); }
.badge.status-excused::before { background-color: var(--color-primary); }

.badge.status-half.day { background-color: rgba(6, 182, 212, 0.15); color: #06b6d4; border-color: rgba(6,182,212,0.2); }
.badge.status-half.day::before { background-color: #06b6d4; }

.badge.status-weekend, .badge.status-holiday, .badge.status-not-recorded { background-color: rgba(148, 163, 184, 0.1); color: var(--text-secondary); border-color: rgba(148,163,184,0.2); }
.badge.status-weekend::before, .badge.status-holiday::before, .badge.status-not-recorded::before { background-color: var(--text-secondary); }

/* Attendance options */
.attendance-radio-group {
    display: flex;
    gap: 8px;
}

.attendance-btn-label {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.attendance-radio { display: none; }
.attendance-radio:checked + .attendance-btn-label.p-label { background-color: var(--color-success); color: #fff; border-color: var(--color-success); }
.attendance-radio:checked + .attendance-btn-label.a-label { background-color: var(--color-danger); color: #fff; border-color: var(--color-danger); }
.attendance-radio:checked + .attendance-btn-label.l-label { background-color: var(--color-warning); color: #fff; border-color: var(--color-warning); }
.attendance-radio:checked + .attendance-btn-label.e-label { background-color: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* Standard Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    height: 40px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-fast);
    text-decoration: none;
    letter-spacing: 0.2px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(180deg, var(--color-primary-hover), var(--color-primary));
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #10b355, var(--color-primary-hover));
    box-shadow: var(--shadow-md);
    color: #fff;
}

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

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

.btn-success { background-color: var(--color-success); color: #fff; }
.btn-success:hover { background-color: #059669; }
.btn-danger { background-color: var(--color-danger); color: #fff; }
.btn-danger:hover { background-color: #e11d48; }
.btn-warning { background-color: var(--color-warning); color: #fff; }
.btn-warning:hover { background-color: #d97706; }
.btn-info { background-color: #6366f1; color: #fff; }
.btn-info:hover { background-color: #4f46e5; }

.btn-sm {
    height: 34px;
    padding: 0 14px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.3px;
}

.btn-lg {
    height: 48px;
    padding: 0 26px;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

/* Biometric Swipe Simulator Drawer */
.simulator-drawer {
    position: fixed;
    right: -400px;
    top: 0;
    width: 360px;
    height: 100vh;
    background-color: var(--bg-card);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 1050;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    transition: right var(--transition-smooth);
}

.simulator-drawer.open { right: 0; }

.simulator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.simulator-body {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.simulator-drawer-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1040;
    display: none;
    animation: fadeIn var(--transition-fast);
}

/* Modal Overlay Styling */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 20px;
    animation: fadeIn var(--transition-fast);
}

.modal-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 1040px;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--shadow-lg);
    animation: scaleIn var(--transition-smooth);
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}
.modal-container::-webkit-scrollbar { width: 5px; }
.modal-container::-webkit-scrollbar-track { background: transparent; }
.modal-container::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 9px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
}

.modal-title {
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.modal-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--color-primary);
    border-radius: 4px;
    display: inline-block;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

.modal-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-color: var(--bg-card);
}

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

/* ── Info Sections inside detail modal ── */
.info-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition-fast);
}
.info-section:hover { box-shadow: var(--shadow-sm); }
.info-section:last-child { margin-bottom: 0; }

.info-section-title {
    font-family: var(--font-title);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--sec-color, var(--color-primary));
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}
.info-section-title i {
    width: 24px;
    height: 24px;
    background: var(--sec-color, var(--color-primary));
    color: #fff;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0;
}

.info-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 20px;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}
.info-field:hover { background: var(--bg-card-hover); }

.info-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
}

/* Edit / Create Form Control Styles */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-control {
    background-color: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 16px;
    height: 44px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
    background-color: var(--bg-card);
}
textarea.form-control {
    height: auto;
    padding: 12px 16px;
}

/* Dynamic Notification Alert box */
.notification-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--color-primary);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 300px;
    animation: slideInRight var(--transition-smooth);
}

.notification.success { border-left-color: var(--color-success); }
.notification.error { border-left-color: var(--color-danger); }
.notification.warning { border-left-color: var(--color-warning); }

/* Custom layout for Declaration section */
.declaration-box {
    background-color: var(--bg-secondary);
    border: 1.5px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

[data-theme="light"] .declaration-box {
    background-color: var(--bg-secondary);
}

.attachment-btn {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    transition: var(--transition-fast);
}

.attachment-btn:hover {
    background-color: var(--color-primary);
    color: #fff;
}

/* Loader Styles */
.loader-spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* PORTAL SPECIFIC AESTHETICS */
/* Calendar Layout Grid */
.attendance-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.calendar-day-header {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    padding-bottom: 8px;
}

.calendar-day-box {
    aspect-ratio: 1;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-fast);
}

.calendar-day-box:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
}

.calendar-day-number {
    font-size: 0.9rem;
    font-weight: 700;
}

.calendar-day-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    align-self: flex-end;
}

.day-present { background-color: var(--color-success-light); border-color: rgba(16, 185, 129, 0.2); }
.day-present .calendar-day-status-dot { background-color: var(--color-success); }

.day-absent { background-color: var(--color-danger-light); border-color: rgba(244, 63, 94, 0.2); }
.day-absent .calendar-day-status-dot { background-color: var(--color-danger); }

.day-late { background-color: var(--color-warning-light); border-color: rgba(245, 158, 11, 0.2); }
.day-late .calendar-day-status-dot { background-color: var(--color-warning); }

.day-excused { background-color: var(--color-primary-light); border-color: rgba(11, 148, 68, 0.2); }
.day-excused .calendar-day-status-dot { background-color: var(--color-primary); }

.day-holiday { background-color: var(--bg-card); border-color: var(--border-color); opacity: 0.6; }
.day-holiday .calendar-day-status-dot { background-color: var(--text-muted); }

/* Parent Alert Log Items */
.alert-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.alert-item-card {
    background-color: var(--bg-card);
    border: none;
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-fast);
}
.alert-item-card:hover { transform: translateX(4px); }

.alert-item-card.alert-late { border-left-color: var(--color-warning); }
.alert-item-card.alert-absent { border-left-color: var(--color-danger); }
.alert-item-card.alert-check-in { border-left-color: var(--color-success); }
.alert-item-card.alert-check-out { border-left-color: var(--color-primary); }

.alert-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert-late .alert-icon { background-color: var(--color-warning-light); color: var(--color-warning); }
.alert-absent .alert-icon { background-color: var(--color-danger-light); color: var(--color-danger); }
.alert-check-in .alert-icon { background-color: var(--color-success-light); color: var(--color-success); }
.alert-check-out .alert-icon { background-color: var(--color-primary-light); color: var(--color-primary); }

.alert-msg-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.alert-text {
    font-size: 0.95rem;
    font-weight: 600;
}

.alert-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Audit logs visual aesthetics */
.audit-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.audit-item-row {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-family: monospace;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-card);
}

.audit-action-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.audit-action-badge.setup { background-color: var(--color-primary-light); color: var(--color-primary); }
.audit-action-badge.device { background-color: var(--color-success-light); color: var(--color-success); }
.audit-action-badge.shift { background-color: var(--color-warning-light); color: var(--color-warning); }
.audit-action-badge.manual { background-color: var(--color-danger-light); color: var(--color-danger); }

/* Printable media layout optimization */
@media print {
    body { background: #fff; color: #000; }
    .sidebar, .top-header, .header-actions, .theme-toggle, .btn, .search-input-wrapper, .filter-select { display: none !important; }
    .main-content { margin-left: 0 !important; padding: 0 !important; }
    .table-card { border: none !important; box-shadow: none !important; }
    .data-table th, .data-table td { border-bottom: 1px solid #ddd !important; color: #000 !important; }
}

/* ==============================================
   STUDENT FORM FULL-PAGE PANEL STYLES
   ============================================== */

#panel-student-form,
#panel-student-form .sf-page-wrap,
#panel-student-form form {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.sf-page-wrap {
    width: 100%;
    box-sizing: border-box;
}

/* ── Breadcrumb Bar ── */
.sf-breadcrumb {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    width: 100%;
    box-sizing: border-box;
}

.sf-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}
.sf-back-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.sf-breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex: 1;
}

/* ── Main two-column layout (FLEXBOX) ── */
.sf-layout {
    display: flex !important;
    flex-direction: row !important;
    gap: 32px;
    width: 100% !important;
    align-items: flex-start;
    box-sizing: border-box;
}

/* ── LEFT SIDEBAR ── */
.sf-sidebar-col {
    flex: 0 0 260px;
    width: 260px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Photo Card */
.sf-photo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-card);
    width: 100%;
    box-sizing: border-box;
}

.sf-photo-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary);
    align-self: flex-start;
}

.sf-photo-frame {
    width: 160px;
    height: 180px;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
}
.sf-photo-frame:hover {
    border-color: var(--color-primary);
    border-style: solid;
}

.sf-photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 148, 68, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity var(--transition-fast);
    border-radius: var(--radius-lg);
}
.sf-photo-frame:hover .sf-photo-overlay {
    opacity: 1;
}

.sf-upload-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--color-primary-light);
    border: 1px solid transparent;
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-sizing: border-box;
}
.sf-upload-btn:hover {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(11, 148, 68, 0.3);
}

.sf-photo-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

/* Identity Card */
.sf-identity-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    width: 100%;
    box-sizing: border-box;
}

.sf-identity-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}
.sf-identity-row:last-child { border-bottom: none; }
.sf-identity-row:hover { background: var(--bg-card-hover); }

.sf-id-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.sf-id-label i { color: var(--color-primary); }

.sf-id-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-word;
}
.sf-id-value--sm { font-size: 0.85rem; font-weight: 600; }

/* ── RIGHT FORM COLUMN ── */
.sf-form-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Form Title Row */
.sf-form-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-card);
}

.sf-form-title {
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.sf-form-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.sf-form-actions-top {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Form Sections */
.sf-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
    width: 100%;
    box-sizing: border-box;
}
.sf-section:focus-within {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.sf-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.sf-section-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--color-primary), #0da34d);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sf-section-title {
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Fields Grid (inside each section) */
.sf-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 24px;
    box-sizing: border-box;
}
.sf-fields-grid--3col {
    grid-template-columns: repeat(3, 1fr);
}

.sf-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.sf-field--full { grid-column: 1 / -1; }

.sf-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sf-required { color: var(--color-danger); }

.sf-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-sans);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    outline: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    min-width: 0;
}
.sf-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
    background: var(--bg-card);
}
.sf-input:hover:not(:focus) {
    border-color: var(--border-color-hover);
}

select.sf-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.sf-textarea {
    height: auto;
    padding: 12px 16px;
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* Bottom Actions Bar */
.sf-bottom-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    padding: 24px 0 8px;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
}

/* ══════════════════════════════════════════════════ */
/* UTILITY CLASSES                                    */
/* ══════════════════════════════════════════════════ */

/* Flexbox utilities */
.flex-row { display: flex; align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Gap utilities */
.gap-xs { gap: 4px; }
.gap-sm { gap: 8px; }
.gap-md { gap: 14px; }
.gap-lg { gap: 24px; }
.gap-xl { gap: 32px; }

/* Margin utilities */
.mt-sm { margin-top: 10px; }
.mt-md { margin-top: 20px; }
.mt-lg { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: 10px; }
.mb-md { margin-bottom: 20px; }
.mb-lg { margin-bottom: 32px; }

/* Padding utilities */
.p-md { padding: 20px; }
.p-lg { padding: 24px; }
.pb-md { padding-bottom: 16px; }

/* Border utilities */
.border-bottom { border-bottom: 1px solid var(--border-color); }

/* Grid utilities */
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; }
.grid-3col { display: grid; grid-template-columns: repeat(3, 1fr); }
.grid-4col { display: grid; grid-template-columns: repeat(4, 1fr); }

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

/* ══════════════════════════════════════════════════ */
/* COMPONENT CLASSES (Dashboard HTML cleanup)         */
/* ══════════════════════════════════════════════════ */

/* Sidebar footer section */
.sidebar-footer-section {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* User profile card in sidebar */
.user-profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Logout button */
.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.06);
    cursor: pointer;
    color: #ef4444;
    height: auto;
    box-shadow: none;
    transition: all var(--transition-fast);
}
.logout-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Brand link */
.brand-link {
    text-decoration: none;
}

/* Attendance control card */
.attendance-control-card {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin-bottom: 0;
    border-bottom: none;
}

/* Mark all bar */
.mark-all-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

/* Attendance submit bar */
.attendance-submit-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 2px solid var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 4%, transparent);
}

/* Attendance empty state */
.attendance-empty-state {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-top: 0;
    text-align: center;
    padding: 56px 24px;
    color: var(--text-muted);
}

/* Panel header icon */
.panel-header-icon {
    color: var(--color-primary);
    font-size: 1rem;
}

/* Panel header info text */
.panel-header-info {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

/* SMS counters bar */
.sms-counters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-input);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 14px;
    font-size: 0.78rem;
}

/* Toolbar card */
.toolbar-card {
    padding: 20px 24px;
}

/* Filter bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* Danger zone card (settings) */
.danger-zone-card {
    border: 1px solid rgba(244, 63, 94, 0.2);
    background: rgba(244, 63, 94, 0.03);
    padding: 24px;
    margin-bottom: 0;
}

/* Modal size variants */
.modal-container-lg {
    max-width: 900px;
}
.modal-container-xl {
    max-width: 950px;
}

/* Modal header color variants */
.modal-header-info {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    border-bottom: none;
}
.modal-header-info .modal-title { color: #fff; }
.modal-header-info .modal-close { color: #fff; opacity: 0.8; }
.modal-header-info .modal-close:hover { opacity: 1; }

.modal-header-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff;
    border-bottom: none;
}
.modal-header-purple .modal-title { color: #fff; }
.modal-header-purple .modal-close { color: #fff; opacity: 0.8; }
.modal-header-purple .modal-close:hover { opacity: 1; }

/* Form section headers (student form) */
.form-section-header {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-primary);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Form group compact (no margin) */
.form-group-compact {
    margin: 0;
}

/* Student form header row */
.student-form-header-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

/* Student photo column */
.student-photo-col {
    flex-shrink: 0;
}

/* Student photo frame */
.student-photo-frame {
    width: 150px;
    height: 175px;
    border-radius: var(--radius-md);
    border: 2px dashed var(--border-color-hover);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
}
.student-photo-frame:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
    .sf-layout {
        flex-direction: column;
    }
    .sf-sidebar-col {
        flex: none;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
    }
    .sf-photo-card { flex: 1; min-width: 240px; max-width: 320px; }
    .sf-identity-card { flex: 1; min-width: 240px; }
}
@media (max-width: 768px) {
    .sf-fields-grid { grid-template-columns: 1fr; }
    .sf-fields-grid--3col { grid-template-columns: 1fr 1fr; }
    .sf-form-title-row { flex-direction: column; align-items: flex-start; }
    .sf-form-actions-top { width: 100%; justify-content: flex-end; }
    .sf-bottom-actions { flex-direction: column; }
    .sf-bottom-actions .btn-lg { width: 100%; justify-content: center; }
}
