﻿@import url('/css/inter.css');

:root {
    /* Modern Color Palette */
    --primary-color: #6366f1;
    /* Indigo 500 */
    --primary-hover: #4f46e5;
    /* Indigo 600 */
    --primary-light: #e0e7ff;
    /* Indigo 100 */

    --secondary-color: #64748b;
    /* Slate 500 */

    --success-color: #10b981;
    /* Emerald 500 */
    --success-bg: #d1fae5;

    --danger-color: #ef4444;
    /* Red 500 */
    --danger-bg: #fee2e2;

    --warning-color: #f59e0b;
    /* Amber 500 */
    --warning-bg: #fef3c7;

    --text-main: #0f172a;
    /* Slate 900 */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-light: #94a3b8;
    /* Slate 400 */

    --bg-body: #f8fafc;
    /* Slate 50 */
    --bg-card: #ffffff;
    --bg-sidebar: #1e293b;
    /* Slate 800 */

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    --header-height: 64px;
    --sidebar-width: 260px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.auth-body {
    background-image: url('/images/bg-v3.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    height: 100vh;
    overflow: hidden;
}

/* Typography */
/* Typography Styling */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

/* Global No-Select / Default Cursor Fix */
h1,
h2,
h3,
h4,
h5,
h6,
.title,
.subtitle,
.badge,
.kpi-value,
.kpi-label,
.b-day,
.b-mon,
.avatar-mini,
.detail-item p,
.user-avatar,
.kpi-icon,
.quick-list-item div,
.dashboard-container div:not([onclick]),
label,
.form-label,
.stats-grid .card h3,
.stats-grid .card p,
.stat-card *,
.simple-table td,
.simple-table th,
.official-table td,
.official-table th {
    cursor: default;
    user-select: none;
}

/* Enforce Hand Cursor on Interactive Elements */
a,
a *,
button,
button *,
.btn,
.btn *,
.action-btn,
.action-btn *,
[onclick],
[onclick] *,
.nav-link,
.nav-link * {
    cursor: pointer !important;
}

.title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Responsiveness helpers */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem 0.75rem !important;
    }

    .card {
        padding: 1rem !important;
    }

    .title {
        font-size: 1.25rem;
    }
}


/* Auth Pages Specific */
.auth-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: transparent;
    position: relative;
    overflow: hidden;
}

/* Background decoration hidden when using image background */
.auth-container::before,
.auth-container::after {
    display: none;
}

.auth-box {
    width: 100%;
    max-width: 440px;
    background: var(--glass-bg);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 10;
    position: relative;
    backdrop-filter: blur(10px);
}

/* Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    transition: transform 0.3s ease-in-out;
    padding: 1.5rem 1rem;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    /* Enable scrolling */
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.brand-text h2 {
    font-size: 1.25rem;
    color: white;
    margin: 0;
    letter-spacing: -0.01em;
}

.brand-text p {
    font-size: 0.75rem;
    color: #94a3b8;
    /* Slate 400 */
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: #cbd5e1;
    /* Slate 300 */
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateX(2px);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0) 100%);
    border-left: 3px solid #818cf8;
    color: white;
    padding-left: calc(1rem - 3px);
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 1.25rem;
    /* padding-top: calc(2.5rem + 60px); Mobile header compensation - Removed as per request */
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
}

/* Cards & Containers */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: #fff;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

textarea.form-input {
    resize: vertical;
}

/* Buttons */
.btn,
.btn-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2);
    width: auto;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(99, 102, 241, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid #d1d5db;
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
}

.btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit:hover {
    background: var(--primary-color);
    color: white;
}

.btn-delete {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: #fee2e2;
    color: var(--danger-color);
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete:hover {
    background: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    width: auto;
}

/* Alert/Toast Messages */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-danger {
    background-color: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.alert-warning {
    background-color: #fff7ed;
    /* Orange 50 */
    color: #c2410c;
    /* Orange 700 */
    border-color: #fdba74;
    /* Orange 300 */
}

.alert-success {
    background-color: #ecfdf5;
    /* Emerald 50 */
    color: #047857;
    /* Emerald 700 */
    border-color: #6ee7b7;
    /* Emerald 300 */
}

/* Dashboard Stats Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: #f1f5f9;
    color: var(--secondary-color);
}

.stat-card:nth-child(1) .stat-icon {
    background: #e0e7ff;
    color: #4338ca;
}

.stat-card:nth-child(2) .stat-icon {
    background: #d1fae5;
    color: #059669;
}

.stat-card:nth-child(3) .stat-icon {
    background: #fee2e2;
    color: #dc2626;
}

.stat-card:nth-child(4) .stat-icon {
    background: #fef3c7;
    color: #d97706;
}

.stat-content h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    letter-spacing: -0.03em;
}

/* Tables */
.simple-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.simple-table th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
}

.simple-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    font-size: 0.85rem;
}

.simple-table tr:hover td {
    background-color: #f8fafc;
}

.simple-table tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success-color);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger-color);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning-color);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    background: white;
    border: 1px solid #e5e7eb;
    padding: 0.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    color: var(--text-main);
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 320px;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Mobile Toast Styling */
@media (max-width: 480px) {
    .toast-container {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
        width: auto;
    }

    .toast {
        min-width: 0;
        width: 100%;
        padding: 0.75rem 1rem;
    }
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 5rem 1rem 2rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .form-group div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .auth-box {
        padding: 1.5rem;
    }
}

/* Report Navigation */
.report-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

/* Main Tabs */
.nav-group {
    display: flex;
    gap: 2rem;
}

.nav-btn {
    padding: 1rem 0;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-btn:hover {
    color: var(--text-main);
}

.nav-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

/* Toggle Switch */
.view-toggle {
    display: inline-flex;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 0.5rem;
}

.view-toggle a {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.view-toggle a.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.view-toggle a:hover:not(.active) {
    color: var(--text-main);
}

/* Calendar View */
.calendar-container {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    max-width: 100%;
    margin: 0 auto;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    background: #f8fafc;
    color: var(--text-main);
    border: 1px solid transparent;
}

.calendar-day.empty-day {
    background: transparent;
}

.status-present {
    background-color: var(--success-bg);
    color: var(--success-color);
    border-color: rgba(16, 185, 129, 0.2);
}

.status-absent {
    background-color: var(--danger-bg);
    color: var(--danger-color);
    border-color: rgba(239, 68, 68, 0.2);
}

.status-late {
    background-color: var(--warning-bg);
    color: var(--warning-color);
    border-color: rgba(245, 158, 11, 0.2);
}

.status-holiday {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Annual Report Table */
.annual-table-container {
    overflow-x: auto;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    padding: 1rem;
}

.annual-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 1200px;
}

.annual-table th,
.annual-table td {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.annual-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
}

.annual-table .month-col {
    text-align: left;
    font-weight: 600;
    position: sticky;
    left: 0;
    background: #f8fafc;
    z-index: 10;
    border-right: 2px solid #e2e8f0;
}

.annual-table td.month-col {
    background: white;
}

.status-code-P {
    color: var(--success-color);
    font-weight: bold;
}

.status-code-A {
    color: var(--danger-color);
    font-weight: bold;
}



.status-code-L {
    color: var(--warning-color);
    font-weight: bold;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.2s ease-out;
}

/* Custom Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 20px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    position: sticky;
    top: 0;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e2e8f0;
    color: var(--danger-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #f8fafc;
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 95% !important;
        width: 95% !important;
        margin: 1rem auto !important;
        border-radius: var(--radius-lg);
        max-height: 90vh;
    }

    .modal-body {
        padding: 1.25rem 0.75rem !important;
    }

    /* Force stacking for student details */
    .detail-sections {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .detail-section div {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .detail-item {
        gap: 0.5rem !important;
    }

    .detail-item div div:first-child {
        font-size: 0.65rem !important;
    }

    .detail-item div div:last-child {
        font-size: 0.85rem !important;
    }

    .modal-content .user-avatar {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5rem !important;
    }

    .modal-content h2 {
        font-size: 1.25rem !important;
    }

    .modal-close {
        top: 0.75rem !important;
        right: 0.75rem !important;
        padding: 0.25rem !important;
    }
}


.modal-body-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.detail-item label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
}

.detail-item p {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 500;
}

/* Modern Print Button Styling */
.btn-print {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.btn-print:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
}

.btn-print svg {
    width: 18px;
    height: 18px;
}


@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Official DataTable Overhaul */
.table-container {
    border-radius: var(--radius-xl);
    border: 1px solid #e2e8f0;
    background: white;
    overflow-x: scroll !important;
    /* Force visibility */
    display: block !important;
    width: 100%;
    max-width: 100%;
    position: relative;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    /* Small buffer for scrollbar */
}

/* Highly Visible Custom Scrollbar */
.table-container::-webkit-scrollbar {
    height: 12px !important;
    display: block !important;
}

.table-container::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 6px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #6366f1 !important;
    /* Indigo 500 */
    border-radius: 6px;
    border: 3px solid #f8fafc;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #4f46e5 !important;
}

.official-table {
    width: max-content !important;
    min-width: 1600px;
    border-collapse: collapse;
    font-size: 0.925rem;
    color: #334155;
    /* Removed table-layout fixed to allow natural expansion */
}

.official-table thead th {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
}

.official-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.official-table tbody tr:last-child {
    border-bottom: none;
}

.official-table tbody tr:hover {
    background-color: #f8fafc;
}

.official-table td {
    padding: 1rem;
    vertical-align: middle;
    white-space: nowrap;
}

/* Mobile Responsive Table (Card View) */
@media (max-width: 1024px) {
    .official-table thead {
        display: none;
        /* Hide header row on tablets/mobile */
    }

    .official-table,
    .official-table tbody,
    .official-table tr,
    .official-table td {
        display: block;
        width: 100%;
        min-width: 0 !important;
    }

    .official-table tr {
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: white;
        padding: 0.5rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    }

    .official-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f1f5f9;
        text-align: right;
        white-space: normal !important;
        /* Allow text wrap in mobile cards */
    }

    .official-table td:last-child {
        border-bottom: none;
    }

    .official-table td::before {
        content: attr(data-label);
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.7rem;
        color: #64748b;
        text-align: left;
        flex: 1;
        padding-right: 1rem;
    }

    /* Special handling for Name cell in mobile card to make it more like a title */
    .official-table td[data-label="Name"] {
        background: #f8fafc;
        border-radius: 8px 8px 0 0;
        margin-bottom: 0.5rem;
        padding: 1rem;
        border-bottom: 1px solid #e2e8f0;
    }

    .official-table td[data-label="Name"]::before {
        display: none;
        /* Hide the 'Name' label for the title cell */
    }

    .official-table td[data-label="Name"]>div {
        width: 100%;
        justify-content: flex-start !important;
    }

    .official-table td[data-label="Actions"] {
        justify-content: center;
        background: #f8fafc;
        border-radius: 0 0 8px 8px;
        margin-top: 0.5rem;
        border-top: 1px solid #e2e8f0;
    }

    .official-table td[data-label="Actions"]::before {
        display: none;
    }
}

.filter-input-cell {
    padding: 0.5rem !important;
    background: #f8fafc;
}

.filter-input-cell input,
.filter-input-cell .custom-dropdown {
    font-size: 0.825rem;
    background: white !important;
}

.sortable-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    user-select: none;
}

.sort-icon {
    font-size: 0.8rem;
    opacity: 0.3;
    transition: opacity 0.2s;
}

.sortable-header:hover .sort-icon {
    opacity: 0.6;
}

.sortable-header.active .sort-icon {
    opacity: 1;
    color: var(--primary-color);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    color: white;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    color: var(--text-main);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

/* Action Icon Buttons - Modern Replacement for Text Buttons */
.action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    padding: 0;
    flex-shrink: 0;
}

.action-icon-btn.edit {
    background: #eff6ff;
    color: #2563eb;
    border-color: #dbeafe;
}

.action-icon-btn.edit:hover {
    background: #2563eb;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.action-icon-btn.delete {
    background: #fef2f2;
    color: #dc2626;
    /* More vibrant red */
    border-color: #fee2e2;
}

.action-icon-btn.delete:hover {
    background: #dc2626;
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.action-icon-btn svg {
    transition: transform 0.2s;
}

.action-icon-btn:hover svg {
    transform: scale(1.1);
}

.action-icon-btn:active {
    transform: scale(0.95);
}

/* Responsive Table / Card View */
@media (max-width: 768px) {
    .simple-table thead {
        display: none;
    }

    .simple-table,
    .simple-table tbody,
    .simple-table tr,
    .simple-table td {
        display: block;
        width: 100%;
    }

    .simple-table tr {
        background: white;
        margin-bottom: 1rem;
        border-radius: var(--radius-lg);
        border: 1px solid #e2e8f0;
        box-shadow: var(--shadow-sm);
        padding: 1rem;
    }

    .simple-table td {
        padding: 0.5rem 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #f1f5f9;
        text-align: right;
    }

    .simple-table td:last-child {
        border-bottom: none;
        padding-top: 1rem;
        justify-content: stretch;
    }

    .simple-table td:last-child .action-btn {
        width: 100%;
        text-align: center;
    }

    /* Add labels via data attributes if needed, or just rely on layout */
    .simple-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.85rem;
        color: var(--text-muted);
        text-transform: uppercase;
        margin-right: 1rem;
        text-align: left;
    }


    .detail-grid {
        grid-template-columns: 1fr;
    }
}



.status-code-H {
    color: var(--primary-color);
    font-weight: bold;
}

.status-code-SU {
    color: #cbd5e1;
    background: #f8fafc;
}

.status-code-hyphen {
    color: #e2e8f0;
}

.stat-col {
    background: #fefce8;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Cleaned up CSS Section */
/* --- Rich Table View Styles (Added for Release 1.1.0) --- */

.attendance-react-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.master-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.stats-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.stat-pill .value {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1rem;
}

.stat-pill.total {
    border-left: 3px solid var(--primary-color);
}

.stat-pill.present {
    border-left: 3px solid var(--success-color);
}

.stat-pill.absent {
    border-left: 3px solid var(--danger-color);
}

.actions-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1;
}

.btn-mark-all {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #cbd5e1;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-mark-all:hover {
    border-color: var(--success-color);
    color: var(--success-color);
    background: var(--success-bg);
}

.btn-save {
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
    transition: all 0.2s;
}

.btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
}

.btn-save:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Modern Table */
.table-container {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
}

.modern-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    vertical-align: middle;
}

.modern-table tr:hover {
    background: #fcfcfc;
}

.student-name {
    font-weight: 500;
}

.name-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #bfdbfe;
    color: #1e40af;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.avatar-mini.present {
    background: #d1fae5;
    color: #065f46;
}

.avatar-mini.absent {
    background: #fee2e2;
    color: #991b1b;
}

.avatar-mini.late {
    background: #fef3c7;
    color: #92400e;
}

/* Segmented Control - ensure overrides */
.segmented-pill {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 6px;
}

.segment-btn {
    padding: 4px 12px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.segment-btn.active {
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.segment-btn.active.present {
    color: var(--success-color);
}

.segment-btn.active.absent {
    color: var(--warning-color);
}

/* Dashboard Segmented Control */
.segmented-control {
    display: inline-flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.segmented-item {
    padding: 6px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s;
    user-select: none;
}

.segmented-item.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.segmented-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    color: var(--primary-color);
}

@media (max-width: 640px) {
    .segmented-control {
        display: flex;
        width: 100%;
        border-radius: 12px;
    }

    .segmented-item {
        flex: 1;
        text-align: center;
        padding: 10px 4px;
        font-size: 0.75rem;
    }
}


/* Custom Tooltip */
.tooltip-container {
    position: relative;
    cursor: pointer;
}

.tooltip-content {
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: white;
    color: var(--text-main);
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    width: auto;
    min-width: 180px;
    max-width: 220px;
    overflow-wrap: break-word;
    /* Handle long names */
    z-index: 100;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid #e2e8f0;
    pointer-events: none;
    text-align: left;
}

.tooltip-container:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent white transparent;
}

.tooltip-header {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.25rem;
}

.tooltip-row {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
}

.btn-mark-all,
.btn-mark-absent {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-mark-all:hover {
    color: var(--success-color);
    border-color: var(--success-color);
    background: var(--success-bg);
}

.btn-mark-absent:hover {
    color: var(--danger-color);
    border-color: var(--danger-color);
    background: var(--danger-bg);
}

.tooltip-label {
    color: var(--text-muted);
}

.tooltip-value {
    font-weight: 600;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

.toast {
    background: white;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    transform: translateX(120%);
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    border: 1px solid #e2e8f0;
    pointer-events: auto;
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--danger-color);
}

.toast.info {
    border-left: 4px solid var(--primary-color);
}

.toast-icon {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast.success .toast-icon {
    color: var(--success-color);
}

.toast.error .toast-icon {
    color: var(--danger-color);
}

.toast-message {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
}

.toast.hiding {
    animation: fadeOutRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* Dashboard Overhaul V2 */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .kpi-card {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .kpi-value {
        font-size: 1.25rem;
    }

    .kpi-label {
        font-size: 0.65rem;
    }

    .kpi-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.kpi-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s;
}

.kpi-card:hover {
    transform: translateY(-5px);
}

/* Custom Scrollbar Utility */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Firefox */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* Hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    line-height: 1.2;
    cursor: default;
    user-select: none;
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    cursor: default;
    user-select: none;
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    height: 100%;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.segmented-control {
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 0.75rem;
    display: inline-flex;
    position: relative;
    user-select: none;
}

.segmented-item {
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    z-index: 1;
}

.segmented-item.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Quick List */
.quick-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.quick-list-item:last-child {
    border-bottom: none;
}

.b-date {
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.25rem 0.75rem;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.b-day {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.b-mon {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Global Page Loader */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-body);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

#global-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--primary-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-text {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    animation: pulse 1.5s ease-in-out infinite;
}

/* React Component Loader (Placeholder) */
.react-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: var(--text-muted);
    font-weight: 500;
    gap: 0.75rem;
}

.react-loading::before {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary-light);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}


/* Global Tab Styles (Refactored from Settings) */
.settings-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.settings-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    text-decoration: none;
    /* Ensure links act like buttons */
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -2px;
    font-size: 0.95rem;
    flex-shrink: 0;
    display: inline-block;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2.5px solid var(--primary-color);
    font-weight: 600;
}

.tab-btn:hover:not(.active) {
    color: var(--primary-hover);
}

/* Responsive Header for Sections (Global) */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-header h3 {
        margin-bottom: 0.25rem;
    }

    .section-header button,
    .section-header a.btn {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}


/* Enhanced Tab Styling for 'Official' Look - Redesigned for Reports */
.all-tabs-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    margin: -1.25rem -1.25rem 1.5rem -1.25rem;
    padding: 1.25rem 1.5rem 0 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Main Tabs - Primary Navigation with Gradients */
.settings-tabs.main-tabs {
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.25rem;
    gap: 1.5rem;
    display: flex;
}

.settings-tabs.main-tabs .tab-btn {
    font-size: 0.95rem;
    color: var(--text-muted);
    padding-bottom: 0.875rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-tabs.main-tabs .tab-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.settings-tabs.main-tabs .tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
}

.settings-tabs.main-tabs .tab-btn.active svg {
    transform: scale(1.1);
}

.settings-tabs.main-tabs .tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), #8b5cf6);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.settings-tabs.main-tabs .tab-btn.active::after {
    width: 100%;
}

.settings-tabs.main-tabs .tab-btn:hover:not(.active) {
    color: var(--text-main);
}

.settings-tabs.main-tabs .tab-btn:hover svg {
    transform: translateY(-2px);
}

/* Sub Tabs - Modern Pill Style */
.settings-tabs.sub-tabs {
    display: inline-flex;
    background: #f1f5f9;
    padding: 0.3rem;
    border-radius: 12px;
    gap: 0.25rem;
    border-bottom: none;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.settings-tabs.sub-tabs .tab-btn {
    border-bottom: none;
    border-radius: 9px;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.25s ease;
}

.settings-tabs.sub-tabs .tab-btn svg {
    width: 14px;
    height: 14px;
}

.settings-tabs.sub-tabs .tab-btn.active {
    background: #ffffff;
    color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    font-weight: 600;
    transform: translateY(0);
}

.settings-tabs.sub-tabs .tab-btn:hover:not(.active) {
    color: #334155;
    background: rgba(255, 255, 255, 0.6);
}

/* Modern Print Button Styling */
.btn-print {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.btn-print:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
}

.btn-print svg {
    width: 18px;
    height: 18px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobile Responsiveness Overrides */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1rem 0.75rem !important;
        padding-top: 5rem !important;
    }

    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 2100;
        background: white;
        color: var(--primary-color);
        border: 1px solid #e2e8f0;
        width: 42px;
        height: 42px;
        border-radius: 10px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        cursor: pointer;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.5);
        backdrop-filter: blur(2px);
        z-index: 1000;
        animation: fadeIn 0.3s ease-out;
    }

    .overlay.active {
        display: block;
    }

    .card {
        padding: 1rem !important;
        border-radius: var(--radius-md) !important;
    }
}




/* Global Print Styles - Final Premium Version */

/* Global Print Styles - Stable Alignment Version */
@media print {
    @page {
        margin: 1cm;
    }

    html,
    body {
        height: auto !important;
        overflow: visible !important;
        background: white !important;
        margin: 0;
        padding: 0;
        color: black !important;
        font-size: 10pt !important;
    }

    .app-container {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }

    .sidebar,
    .all-tabs-container,
    .no-print,
    .mobile-menu-btn,
    #mobileMenuBtn,
    .overlay,
    .card:has(form),
    #reportFilterForm,
    #academicYearSelect,
    .btn-print,
    .dashboard-controls,
    header {
        display: none !important;
    }

    .card,
    #studentsListCard,
    .report-card,
    .main-content {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        margin-left: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* Premium Stats Cards */
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1rem !important;
        margin-bottom: 2rem !important;
    }

    .stats-grid .card {
        border: 1px solid #cbd5e1 !important;
        padding: 0.75rem !important;
        text-align: center !important;
    }

    .stats-grid .stat-value {
        font-size: 1.4rem !important;
        font-weight: 800 !important;
        color: #1e293b !important;
    }

    .stats-grid h3 {
        font-size: 0.75rem !important;
        text-transform: uppercase !important;
        color: #64748b !important;
        margin-bottom: 0.25rem !important;
    }

    /* STABLE ALIGNMENT RESET: Headers and Rows locked by Browser */
    table,
    .simple-table,
    .official-table,
    .report-grid {
        display: table !important;
        width: 100% !important;
        table-layout: auto !important;
        /* Most stable for alignment */
        border-collapse: collapse !important;
        border: 1px solid #94a3b8 !important;
        font-size: 9.5pt !important;
    }

    thead {
        display: table-header-group !important;
    }

    tbody {
        display: table-row-group !important;
    }

    tr {
        display: table-row !important;
        page-break-inside: avoid !important;
    }

    th,
    td {
        display: table-cell !important;
        padding: 10px 12px !important;
        border: 1px solid #cbd5e1 !important;
        vertical-align: middle !important;
    }



    /* ========================================= */
    /* SPECIFIC TABLE ALIGNMENTS (TARGETED)      */
    /* ========================================= */

    /* 1. ATTENDANCE REPORT (.simple-table) */
    .simple-table th:nth-child(1),
    .simple-table td:nth-child(1) {
        width: 8% !important;
        text-align: center !important;
    }

    /* Roll No */
    .simple-table th:nth-child(2),
    .simple-table td:nth-child(2) {
        width: 52% !important;
        text-align: left !important;
    }

    /* Name */
    .simple-table th:nth-child(3),
    .simple-table td:nth-child(3) {
        width: 20% !important;
        text-align: center !important;
    }

    /* Status */
    .simple-table th:nth-child(4),
    .simple-table td:nth-child(4) {
        width: 20% !important;
        text-align: center !important;
    }

    /* Marked By */

    /* 2. MARKS REPORT - CLASS VIEW (.class-view-table) */
    .class-view-table th:nth-child(1),
    .class-view-table td:nth-child(1) {
        width: 8% !important;
        text-align: center !important;
    }

    /* Roll No */
    .class-view-table th:nth-child(2),
    .class-view-table td:nth-child(2) {
        width: 30% !important;
        text-align: left !important;
    }

    /* Name */
    /* Remaining columns (Subjects) auto-width */

    /* 3. MARKS REPORT - STUDENT VIEW (.student-view-table) */
    .student-view-table th:nth-child(1),
    .student-view-table td:nth-child(1) {
        width: 40% !important;
        text-align: left !important;
    }

    /* Subject */
    .student-view-table th:nth-child(2),
    .student-view-table td:nth-child(2) {
        width: 20% !important;
        text-align: center !important;
    }

    /* Max Marks */
    .student-view-table th:nth-child(3),
    .student-view-table td:nth-child(3) {
        width: 20% !important;
        text-align: center !important;
    }

    /* Obtained */
    .student-view-table th:nth-child(4),
    .student-view-table td:nth-child(4) {
        width: 20% !important;
        text-align: center !important;
    }

    /* Status */

    /* Reset global th/td styles to avoid interference */
    th,
    td {
        white-space: normal !important;
    }



    th {
        background-color: #f8fafc !important;
        color: #334155 !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        font-size: 8pt !important;
        border-bottom: 2px solid #94a3b8 !important;
    }

    /* Fix Multi-line Status Labels */
    td span[style*="font-size: 0.8em"] {
        display: block !important;
        font-size: 7.5pt !important;
        margin-top: 2px !important;
        color: #64748b !important;
    }

    .simple-table td::before,
    .official-table td::before {
        display: none !important;
    }

    .table-container {
        overflow: visible !important;
        border: none !important;
        width: 100% !important;
    }

    .report-header {
        display: block !important;
        text-align: center !important;
        margin-bottom: 1.5rem !important;
    }

    .report-header h2 {
        font-size: 1.5rem !important;
        color: #0f172a !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Official WhatsApp Button Style */
.btn-whatsapp-official {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.6rem 1.25rem;
    background: #ffffff;
    border: 1px solid #25D366;
    color: #25D366;
    border-radius: 0.5rem;
    /* Matches var(--radius-md) usually */
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    /* Matches var(--shadow-sm) */
    margin-bottom: 1.5rem;
}

.btn-whatsapp-official:hover {
    background: #25D366;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp-official:active {
    transform: translateY(0);
}

.btn-whatsapp-official:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Sidebar Dropdown */
.nav-group-wrapper {
    margin-bottom: 0.25rem;
}

.dropdown-btn {
    text-align: left;
    justify-content: space-between !important;
    background: transparent;
    border: none;
    width: 100%;
}

.dropdown-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.dropdown-btn.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0) 100%);
    border-left: 3px solid #818cf8;
    color: white;
}

.submenu {
    display: none;
    /* Hidden by default */
    overflow: hidden;
    transition: all 0.3s ease;
}

.submenu.open {
    display: block !important;
}

.sm-link {
    color: #94a3b8 !important;
    /* Muted */
    padding-left: 1rem !important;
    border-radius: 0.5rem;
    margin-bottom: 0.1rem;
    transition: all 0.2s;
}

.sm-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.05);
    padding-left: 1.25rem !important;
    /* Subtle slide */
}

.active-sub {
    color: #818cf8 !important;
    /* Primary color */
    background: rgba(99, 102, 241, 0.1);
    font-weight: 600;
}

/* Rich Table Styles (Student List) */
.rich-table-container {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    overflow-x: auto;
    /* Handle horizontal scroll */
    box-shadow: var(--shadow-sm);
}

.rich-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
    /* Ensure content spacing */
}

.rich-table th {
    background: #f8fafc;
    padding: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
}

.rich-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: var(--text-main);
    font-size: 0.9rem;
}

.rich-table tr:hover td {
    background-color: #f8fafc;
}

.rich-table tr:last-child td {
    border-bottom: none;
}

/* Profile Column */
.student-profile {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.student-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #4338ca;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.student-info h4 {
    font-size: 0.95rem;
    margin: 0 0 0.25rem 0;
    color: #1e293b;
    /* Slate 900 */
    font-weight: 600;
}

.student-info p {
    font-size: 0.8rem;
    color: #64748b;
    /* Slate 500 */
    margin: 0;
    line-height: 1.4;
}

/* Fees Column */
.fee-info {
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.fee-label {
    color: #64748b;
}

.fee-val {
    font-weight: 600;
    color: #334155;
}

.fee-val.paid {
    color: #059669;
}

.fee-val.balance {
    color: #dc2626;
}

/* Transport Status */
.transport-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 600;
}

/* Action Buttons */
.icon-btn {
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
    color: #64748b;
    border: 1px solid transparent;
    margin-right: 0.25rem;
}

.icon-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.icon-btn.edit:hover {
    background: #e0e7ff;
    color: #4338ca;
    border-color: #c7d2fe;
}

.icon-btn.delete:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

/* Filters Bar */
/* Filters Bar Refined */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-container input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 99px;
    /* Pill shape */
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.custom-dropdown {
    position: relative;
    min-width: 200px;
    z-index: 100;
}

.dropdown-trigger {
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    height: 44px;
    user-select: none;
    /* Fix: Remove text selection cursor */
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    display: none;
    padding: 0.5rem;
}

.custom-dropdown.active .dropdown-content {
    display: block !important;
}

.dropdown-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
}

#studentsTableContainer {
    transition: opacity 0.3s ease;
}

#studentsTableContainer.fade-out {
    opacity: 0.4;
    pointer-events: none;
}

/* Student Count Badges in Filter */
.count-badge {
    margin-left: auto;
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.2s ease;
}

.dropdown-option:hover .count-badge {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.05);
}

.count-badge.total {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.2);
}

.dropdown-option:hover .count-badge.total {
    background: rgba(148, 163, 184, 0.2);
}

/* Rich Student Table Modern Styles */
.rich-table-container th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #64748b;
    background: #f8fafc;
    padding: 1rem 1.25rem;
}

.student-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.student-info h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
}

.student-info .sub-text {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.info-label {
    color: #94a3b8;
    font-weight: 500;
    min-width: 70px;
}

.info-value {
    color: #334155;
    font-weight: 600;
}

/* Badges */
.badge-pill {
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-male {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-female {
    background: #fce7f3;
    color: #be185d;
}

.badge-other {
    background: #f1f5f9;
    color: #475569;
}

.badge-blood {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid rgba(185, 28, 28, 0.1);
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.contact-link:hover {
    color: #4f46e5;
}

.address-box {
    max-width: 250px;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.table-date {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
}

.table-date .time-ago {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Responsive multi-line table fixes */
.rich-table-container td {
    padding: 1.25rem 1.25rem;
    vertical-align: top;
}

/* Pagination Styles */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-top: 1.5rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: #64748b;
}

.pagination-btns {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pag-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.pag-btn:hover:not(.disabled) {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

.pag-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
}

.page-indicator {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}

/* Vertical Borders & High Density Table */
.rich-table-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
}

.rich-table {
    border-collapse: collapse !important;
}

.rich-table th,
.rich-table td {
    border-right: 1px solid #e2e8f0;
    padding: 0.75rem 0.5rem !important;
    /* Compact padding */
    font-size: 0.85rem;
}

/* Remove last border right */
.rich-table th:last-child,
.rich-table td:last-child {
    border-right: none;
}

.rich-table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

/* Increase density in profile */
.student-profile {
    gap: 8px !important;
}

.student-avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.75rem !important;
}

.student-info h4 {
    font-size: 0.9rem !important;
    margin: 0 !important;
}

/* Info grid compaction */
.info-grid {
    gap: 2px !important;
}

.info-item {
    font-size: 0.75rem !important;
}

.address-box {
    max-width: 250px;
    font-size: 0.75rem !important;
    line-height: 1.3;
}

/* Icon Label & Badge Refinements */
.icon-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #94a3b8;
    margin-right: 6px;
    flex-shrink: 0;
}

.icon-label svg {
    width: 14px;
    height: 14px;
}

.info-item {
    display: flex;
    align-items: center;
    line-height: 1;
    margin-bottom: 4px;
}

.badge-pill.icon-only {
    padding: 4px 6px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.badge-pill.icon-only svg {
    width: 14px;
    height: 14px;
}

/* Specific Label Colors for better visual cues */
.icon-father {
    color: #60a5fa;
}

.icon-mother {
    color: #f472b6;
}

.icon-contact {
    color: #34d399;
}

.icon-aadhar {
    color: #818cf8;
}

.icon-class {
    color: #fbbf24;
}

.icon-roll {
    color: #94a3b8;
}

/* Suppress Unwanted Text Carets & Selection */
.rich-table th,
.rich-table td:first-child,
.icon-label,
.info-label,
.badge-pill,
.student-avatar,
.pagination-bar,
.dropdown-trigger {
    user-select: none;
    cursor: default;
}

/* Ensure links and buttons still feel interactive */
.contact-link,
.icon-btn,
.pag-btn,
.dropdown-option {
    cursor: pointer;
}

/* Remove focus outlines that might look like vertical lines */
.rich-table td:focus,
.rich-table tr:focus {
    outline: none;
}

/* Global Caret & Selection Polish */
body {
    caret-color: transparent !important;
    /* Hide insertion line globally */
}

input,
textarea,
[contenteditable="true"] {
    caret-color: auto !important;
    /* Restore cursor for typing areas */
}

.app-container {
    user-select: none;
    /* Prevent accidental text highlighting globally */
}

/* Allow selection for data values that users might want to copy */
.info-value,
.contact-link,
.address-box,
.student-info h4 {
    user-select: text;
}

/* Page Size Selector Styling */
.page-size-select {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.page-size-select:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.page-size-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

 / *   D a s h b o a r d   L i s t   C o m p o n e n t   S t y l e s   * /   . l i s t - c a r d    {
               d i s p l a y :    f l e x ;
               f l e x - d i r e c t i o n :    c o l u m n ;
       
}

     . l i s t - c o n t e n t    {
               p a d d i n g :    0 . 5 r e m ;
               m a x - h e i g h t :    5 0 0 p x ;
               o v e r f l o w - y :    a u t o ;
       
}

     . l i s t - i t e m    {
               d i s p l a y :    f l e x ;
               a l i g n - i t e m s :    c e n t e r ;
               g a p :    1 r e m ;
               p a d d i n g :    1 r e m ;
               b o r d e r - r a d i u s :    1 2 p x ;
               t r a n s i t i o n :    a l l   0 . 2 s ;
               m a r g i n - b o t t o m :    0 . 2 5 r e m ;
       
}

     . l i s t - i t e m : h o v e r    {
               b a c k g r o u n d :    # f 8 f a f c ;
       
}

     . l i s t - i t e m . c l i c k a b l e    {
               c u r s o r :    p o i n t e r ;
       
}

     . l i s t - i t e m . c l i c k a b l e : h o v e r    {
               b a c k g r o u n d :    # e f f 6 f f ;
               t r a n s f o r m :    t r a n s l a t e X ( 4 p x ) ;
       
}

     . l i s t - a v a t a r    {
               w i d t h :    4 4 p x ;
               h e i g h t :    4 4 p x ;
               b a c k g r o u n d :    # f 1 f 5 f 9 ;
               b o r d e r - r a d i u s :    1 2 p x ;
               d i s p l a y :    f l e x ;
               a l i g n - i t e m s :    c e n t e r ;
               j u s t i f y - c o n t e n t :    c e n t e r ;
               f o n t - s i z e :    1 . 2 5 r e m ;
               f l e x - s h r i n k :    0 ;
               b o x - s h a d o w :    0   2 p x   4 p x   r g b a ( 0 ,  0 ,  0 ,  0 . 0 2 ) ;
       
}

     . l i s t - i n f o    {
               f l e x :    1 ;
               m i n - w i d t h :    0 ;
       
}

     . l i s t - n a m e    {
               f o n t - w e i g h t :    6 0 0 ;
               c o l o r :    v a r ( - - t e x t - m a i n ) ;
               m a r g i n - b o t t o m :    0 . 1 5 r e m ;
               w h i t e - s p a c e :    n o w r a p ;
               o v e r f l o w :    h i d d e n ;
               t e x t - o v e r f l o w :    e l l i p s i s ;
               f o n t - s i z e :    0 . 9 5 r e m ;
       
}

     . l i s t - s u b t e x t    {
               f o n t - s i z e :    0 . 8 r e m ;
               c o l o r :    v a r ( - - t e x t - m u t e d ) ;
       
}

     . l i s t - s t a t    {
               f o n t - w e i g h t :    7 0 0 ;
               f o n t - s i z e :    0 . 8 5 r e m ;
               p a d d i n g :    0 . 4 r e m   0 . 7 5 r e m ;
               b o r d e r - r a d i u s :    8 p x ;
               m i n - w i d t h :    6 0 p x ;
               t e x t - a l i g n :    c e n t e r ;
       
}

     . l i s t - s t a t . s u c c e s s    {
               b a c k g r o u n d :    # d c f c e 7 ;
               c o l o r :    # 1 5 8 0 3 d ;
       
}

     . l i s t - s t a t . d a n g e r    {
               b a c k g r o u n d :    # f e f 2 f 2 ;
               c o l o r :    # d c 2 6 2 6 ;
       
}

     . e m p t y - s t a t e    {
               p a d d i n g :    3 r e m   1 . 5 r e m ;
               t e x t - a l i g n :    c e n t e r ;
               c o l o r :    v a r ( - - t e x t - m u t e d ) ;
               f o n t - s i z e :    0 . 9 r e m ;
               f o n t - s t y l e :    i t a l i c ;
       
}

       

/* Student Name Link in Reports */
.student-name-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.student-name-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
    transform: translateX(2px);
}


/* Student Name Link in Reports - Force No Underline */
.student-name-link {
    color: var(--text-main) !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.student-name-link:hover {
    color: var(--primary-color) !important;
    border-bottom-color: var(--primary-color);
}