/* ============================================
   AUTH.CSS
   Login Modal, Profile Dropdown, Dashboard
   ============================================ */

/* ============================================
   CSS Variables for Auth Components
   ============================================ */
:root {
    /* Dashboard specific colors - Dark Theme */
    --dashboard-bg: linear-gradient(135deg, #0a0f1f 0%, #0d1425 50%, #0a1628 100%);
    --dashboard-card-bg: rgba(20, 30, 50, 0.6);
    --dashboard-card-border: rgba(255, 255, 255, 0.08);
    --dashboard-card-hover: rgba(30, 45, 70, 0.7);
    --dashboard-surface: rgba(255, 255, 255, 0.03);
    --dashboard-surface-hover: rgba(255, 255, 255, 0.06);

    /* Attendance colors */
    --attendance-present: #10b981;
    --attendance-absent: #ef4444;
    --attendance-late: #f59e0b;
    --attendance-empty: rgba(255, 255, 255, 0.05);

    /* Status colors */
    --status-paid: #10b981;
    --status-unpaid: #ef4444;
    --status-pending: #f59e0b;
}

.light-theme {
    --dashboard-bg: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    --dashboard-card-bg: rgba(255, 255, 255, 0.9);
    --dashboard-card-border: rgba(0, 0, 0, 0.08);
    --dashboard-card-hover: rgba(255, 255, 255, 1);
    --dashboard-surface: rgba(0, 0, 0, 0.02);
    --dashboard-surface-hover: rgba(0, 0, 0, 0.04);

    --attendance-empty: rgba(0, 0, 0, 0.05);
}

/* ============================================
   Login Button in Navbar
   ============================================ */
.login-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: white;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-glow);
}

.login-btn i {
    font-size: var(--fs-sm);
}

/* ============================================
   Profile Button & Dropdown
   ============================================ */
.profile-container {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1);
    padding-right: var(--space-2);
    background: var(--dashboard-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.profile-btn:hover {
    border-color: var(--accent-primary);
    background: var(--dashboard-surface-hover);
    box-shadow: 0 0 20px var(--shadow-accent);
}

.profile-avatar {
    width: 30px;
    height: 30px;
    padding: 2px;
    margin-left: 2px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.profile-chevron {
    color: var(--text-secondary);
    font-size: var(--fs-xs);
    transition: transform 0.3s var(--ease-out);
}

.profile-container.active .profile-chevron {
    transform: rotate(180deg);
}

/* Profile Dropdown */
.profile-dropdown {
    position: absolute;
    top: calc(100% + var(--space-3));
    right: 0;
    min-width: 220px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s var(--ease-out);
    z-index: var(--z-dropdown);
    overflow: hidden;
}

.profile-container.active .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.profile-dropdown-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-color);
}

.profile-dropdown-name {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
}

.profile-dropdown-class {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.profile-dropdown-menu {
    padding: var(--space-2);
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    text-align: left;
}

.profile-dropdown-item:hover {
    background: var(--dashboard-surface-hover);
    color: var(--text-primary);
}

.profile-dropdown-item i {
    width: 18px;
    color: var(--accent-primary);
}

.profile-dropdown-item.logout i {
    color: var(--color-error);
}

.profile-dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   Login Modal
   ============================================ */
.login-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: var(--z-modal-backdrop);
}

.login-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px var(--shadow-color);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: var(--z-modal);
    overflow: hidden;
}

.login-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.login-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--border-color);
}

.login-modal-title {
    margin: auto 0;
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.login-modal-title i {
    color: var(--accent-primary);
}

.login-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: var(--fs-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.login-modal-close:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.login-modal-body {
    padding: var(--space-6);
}

.login-form .form-group {
    margin-bottom: var(--space-5);
}

.login-form .form-label {
    font-size: var(--fs-base);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.login-form .form-label i {
    color: var(--accent-primary);
    font-size: var(--fs-base);
}

.login-form .form-control {
    padding: var(--space-4);
}

.login-error {
    display: none;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    color: var(--color-error);
    font-size: var(--fs-sm);
}

.login-error.show {
    display: flex;
}

.login-error i {
    flex-shrink: 0;
}

.login-btn-submit {
    width: 100%;
    padding: var(--space-4);
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: white;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.login-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-glow);
}

.login-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-btn-submit .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.login-btn-submit.loading .spinner {
    display: block;
}

.login-btn-submit.loading .btn-text {
    display: none;
}

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

.login-modal-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.login-help-text {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.login-help-text a {
    color: var(--accent-primary);
    font-weight: var(--fw-medium);
}

.login-help-text a:hover {
    text-decoration: underline;
}

/* ============================================
   Dashboard Section
   ============================================ */
.dashboard-section {
    display: none;
    min-height: 100vh;
    padding-top: calc(var(--navbar-height) + var(--space-6));
    padding-bottom: var(--space-16);
    background: var(--dashboard-bg);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
}

.dashboard-section.active {
    display: block;
    animation: dashboardFadeIn 0.5s var(--ease-out) forwards;
}

.dashboard-section.closing {
    animation: dashboardFadeOut 0.3s var(--ease-in) forwards;
}

@keyframes dashboardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dashboardFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Hide main content when dashboard is active */
body.dashboard-active main>*:not(.dashboard-section) {
    display: none;
}

body.dashboard-active .dashboard-section {
    display: block;
}

body.dashboard-active footer {
    display: none;
}

/* Dashboard Back Button */
.dashboard-back-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    margin-bottom: var(--space-6);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-secondary);
    background: var(--dashboard-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.dashboard-back-btn:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: var(--dashboard-surface-hover);
    transform: translateX(-5px);
}

.dashboard-back-btn i {
    transition: transform 0.3s ease;
}

.dashboard-back-btn:hover i {
    transform: translateX(-3px);
}

/* ============================================
   Dashboard Header / Welcome Card
   ============================================ */
.dashboard-header {
    margin-bottom: var(--space-8);
    animation: fadeInUp 0.5s var(--ease-out) 0.1s backwards;
}

.dashboard-welcome {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-8);
    background: var(--dashboard-card-bg);
    border: 1px solid var(--dashboard-card-border);
    border-radius: var(--radius-2xl);
    position: relative;
    overflow: hidden;
}

/* Gradient accent on welcome card */
.dashboard-welcome::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

.dashboard-avatar {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 4px solid var(--accent-primary);
    flex-shrink: 0;
    box-shadow: 0 0 30px var(--shadow-accent);
    transition: transform 0.3s ease;
}

.dashboard-avatar:hover {
    transform: scale(1.05);
}

.dashboard-welcome-text {
    flex: 1;
    position: relative;
    z-index: 1;
}

.dashboard-welcome-text h1 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    font-weight: var(--fw-bold);
}

.dashboard-welcome-text h1 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-welcome-text p {
    color: var(--text-secondary);
    font-size: var(--fs-base);
    margin: 0;
}

.dashboard-status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-full);
    margin-top: var(--space-3);
}

.dashboard-status-badge.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.dashboard-status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.dashboard-status-badge.inactive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.dashboard-status-badge i {
    font-size: var(--fs-sm);
}

/* ============================================
   Dashboard Grid Layout
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.dashboard-grid-full {
    grid-column: 1 / -1;
}

/* Responsive Grid */
@media (max-width: 1023px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Dashboard Cards - Base Styles
   ============================================ */
.dashboard-card {
    background: var(--dashboard-card-bg);
    border: 1px solid var(--dashboard-card-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
    animation: fadeInUp 0.5s var(--ease-out) backwards;
}

.dashboard-card:nth-child(1) {
    animation-delay: 0.15s;
}

.dashboard-card:nth-child(2) {
    animation-delay: 0.2s;
}

.dashboard-card:nth-child(3) {
    animation-delay: 0.25s;
}

.dashboard-card:nth-child(4) {
    animation-delay: 0.3s;
}

.dashboard-card:nth-child(5) {
    animation-delay: 0.35s;
}

.dashboard-card:nth-child(6) {
    animation-delay: 0.4s;
}

.dashboard-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--dashboard-card-border);
    background: var(--dashboard-surface);
}

.dashboard-card-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.dashboard-card-header i {
    font-size: var(--fs-lg);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-card-header h3 {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    margin: 0;
}

.dashboard-card-body {
    padding: var(--space-6);
}

/* ============================================
   Course Type Badge
   ============================================ */
.course-type-badge {
    padding: var(--space-1) var(--space-3);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-type-badge.academic {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-primary);
}

.course-type-badge.preparation {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.course-type-badge.admission {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

.course-type-badge.cadet {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.course-type-badge.scholarship {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

/* ============================================
   Fee Type Badge
   ============================================ */
.fee-type-badge {
    padding: var(--space-1) var(--space-3);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-full);
}

.fee-type-badge.monthly {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-primary);
}

.fee-type-badge.package {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

/* ============================================
   Student Info Card
   ============================================ */
.student-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
}

.student-info-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-4);
    background: var(--dashboard-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--dashboard-card-border);
    transition: all 0.3s ease;
}

.student-info-item:hover {
    background: var(--dashboard-surface-hover);
    border-color: var(--accent-primary);
}

.student-info-item.full-width {
    grid-column: 1 / -1;
}

.student-info-label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: var(--fw-medium);
}

.student-info-value {
    font-size: var(--fs-sm);
    color: var(--text-primary);
    font-weight: var(--fw-semibold);
}

/* ============================================
   Notices Card
   ============================================ */
.notices-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-height: 300px;
    max-height: 496px;
    overflow-y: auto;
    padding-right: var(--space-2);
}

.notice-item {
    padding: var(--space-5);
    background: var(--dashboard-surface);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--accent-primary);
    transition: all 0.3s ease;
}

.notice-item:hover {
    background: var(--dashboard-surface-hover);
}

.notice-item.high-priority {
    border-left-color: var(--color-error);
    background: rgba(239, 68, 68, 0.05);
}

.notice-item.high-priority:hover {
    background: rgba(239, 68, 68, 0.1);
}

.notice-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.notice-title {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    flex: 1;
}

.notice-date {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

.notice-content {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: var(--lh-relaxed);
    margin: 0;
}

.no-notices {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 250px;
    text-align: center;
    padding: var(--space-8);
    color: var(--text-muted);
}

.no-notices i {
    font-size: var(--fs-4xl);
    margin-bottom: var(--space-4);
    opacity: 0.3;
}

.no-notices p {
    margin: 0;
    font-size: var(--fs-sm);
}

/* ============================================
   Results Card
   ============================================ */
.results-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    max-height: 390px;
    overflow-y: auto;
    padding-right: var(--space-2);
}

.result-item {
    padding: var(--space-5);
    background: var(--dashboard-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--dashboard-card-border);
    transition: all 0.3s ease;
}

.result-item:hover {
    border-color: var(--accent-primary);
    background: var(--dashboard-surface-hover);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.result-info h4 {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-1) 0;
}

.result-info .result-date {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.result-grade {
    padding: var(--space-2) var(--space-4);
    background: var(--accent-gradient);
    color: white;
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    border-radius: var(--radius-lg);
    min-width: 50px;
    text-align: center;
}

.result-stats {
    display: flex;
    gap: var(--space-6);
    margin-bottom: var(--space-4);
}

.result-stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.result-stat-label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.result-stat-value {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
}

.result-stat-value.highlight {
    color: var(--accent-primary);
}

/* Result Download Button */
.result-download-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto 0 0 auto;
    color: var(--accent-primary);
    background: var(--dashboard-surface);
    border: 1px solid var(--dashboard-card-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    flex-shrink: 0;
}

.result-download-btn:hover {
    color: white;
    border-color: var(--accent-primary);
    background: var(--dashboard-surface-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 12px var(--shadow-glow);
}

.result-download-btn:active {
    transform: translateY(0);
}

.result-download-btn i {
    font-size: var(--fs-sm);
}

/* Progress bar for percentage */
.result-progress {
    height: 8px;
    background: var(--dashboard-card-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.result-progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width 0.5s var(--ease-out);
}

.no-results {
    text-align: center;
    padding: var(--space-8);
    color: var(--text-muted);
}

.no-results i {
    font-size: var(--fs-4xl);
    margin-bottom: var(--space-4);
    opacity: 0.3;
}

.no-results p {
    margin: 0;
    font-size: var(--fs-sm);
}

/* Results Month Navigation */
.results-month-nav {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.results-nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--dashboard-card-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.results-nav-btn i {
    background: var(--text-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.results-nav-btn:hover:not(:disabled) {
    background: var(--dashboard-surface-hover);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

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

.results-month-label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    min-width: 120px;
    text-align: center;
}

@media (max-width: 767px) {
    .results-month-nav {
        gap: var(--space-2);
    }

    .results-month-label {
        font-size: var(--fs-xs);
        min-width: 100px;
    }

    .results-nav-btn {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .dashboard-card-header {
        flex-wrap: wrap;
        gap: var(--space-3);
    }

    .results-month-nav {
        width: 100%;
        justify-content: center;
    }
}

/* Results List - Horizontal Layout */
.dashboard-grid-full .results-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-4);
}

.dashboard-grid-full .no-results {
    grid-column: 1 / -1;
}

@media (max-width: 767px) {
    .dashboard-grid-full .results-list {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Attendance Card
   ============================================ */

/* Attendance Summary */
.attendance-summary {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.attendance-stat {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--dashboard-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--dashboard-card-border);
}

.attendance-stat-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.attendance-stat.present .attendance-stat-dot {
    background: var(--attendance-present);
}

.attendance-stat.absent .attendance-stat-dot {
    background: var(--attendance-absent);
}

.attendance-stat.late .attendance-stat-dot {
    background: var(--attendance-late);
}

.attendance-stat-info {
    display: flex;
    flex-direction: column;
}

.attendance-stat-value {
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    line-height: 1;
}

.attendance-stat-label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

/* Calendar Container */
.attendance-calendar {
    border: 1px solid var(--dashboard-card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Calendar Header - Month Navigation Centered */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--dashboard-surface);
    border-bottom: 1px solid var(--dashboard-card-border);
}

.attendance-nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--dashboard-card-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.attendance-nav-btn:hover:not(:disabled) {
    background: var(--dashboard-surface-hover);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

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

.attendance-month-label {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    min-width: 140px;
    text-align: center;
}

/* Weekday Headers */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--dashboard-surface);
    border-bottom: 1px solid var(--dashboard-card-border);
}

.calendar-weekday {
    padding: var(--space-2);
    text-align: center;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
}

.calendar-weekday.weekend {
    color: var(--color-error);
    opacity: 0.8;
}

/* Calendar Days Grid */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--dashboard-card-border);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    font-size: var(--fs-xs);
    color: var(--text-secondary);
    position: relative;
    min-height: 36px;
}

.calendar-day.empty {
    background: var(--dashboard-surface);
}

.calendar-day.today {
    font-weight: var(--fw-bold);
    color: var(--text-primary);
}

.calendar-day.today::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
}

/* Vibrant colors for attendance status */
.calendar-day.present {
    background: rgba(16, 185, 129, 0.25);
    color: #0d9f6e;
    font-weight: var(--fw-bold);
}

.calendar-day.absent {
    background: rgba(239, 68, 68, 0.25);
    color: #dc2626;
    font-weight: var(--fw-bold);
}

.calendar-day.late {
    background: rgba(245, 158, 11, 0.3);
    color: #d97706;
    font-weight: var(--fw-bold);
}

/* Light theme - even more vibrant */
.light-theme .calendar-day.present {
    background: rgba(16, 185, 129, 0.2);
    color: #047857;
}

.light-theme .calendar-day.absent {
    background: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

.light-theme .calendar-day.late {
    background: rgba(245, 158, 11, 0.25);
    color: #b45309;
}

.calendar-day.future {
    color: var(--text-muted);
    opacity: 0.5;
}

.calendar-day.weekend {
    background: var(--dashboard-surface);
}

/* Responsive */
@media (max-width: 480px) {
    .attendance-summary {
        flex-direction: column;
        gap: var(--space-2);
    }

    .calendar-day {
        min-height: 32px;
        font-size: 0.65rem;
    }

    .attendance-month-label {
        font-size: var(--fs-sm);
        min-width: 100px;
    }
}

/* ============================================
   Fees Card
   ============================================ */
.fees-overview {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.fees-amount-card {
    padding: var(--space-5);
    background: var(--dashboard-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--dashboard-card-border);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.fees-amount-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.fees-label {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-2);
}

.fees-original {
    font-size: var(--fs-base);
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: var(--space-1);
}

.fees-final {
    font-size: var(--fs-3xl);
    font-weight: var(--fw-bold);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.fees-final span {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
}

.fees-discount-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    margin-top: var(--space-3);
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-full);
}

.fees-discount-reason {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: var(--space-2);
}

/* Current Month Payment Status */
.current-payment-status {
    margin-bottom: var(--space-1);
}

.current-payment-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid;
}

.current-payment-card.paid {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.current-payment-card.unpaid {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.current-payment-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-size: var(--fs-lg);
    flex-shrink: 0;
}

.current-payment-card.paid .current-payment-icon {
    background: rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

.current-payment-card.unpaid .current-payment-icon {
    background: rgba(239, 68, 68, 0.2);
    color: var(--color-error);
}

.current-payment-info h4 {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    margin: 0 0 var(--space-1) 0;
}

.current-payment-card.paid .current-payment-info h4 {
    color: var(--color-success);
}

.current-payment-card.unpaid .current-payment-info h4 {
    color: var(--color-error);
}

.current-payment-info p {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin: 0;
}

/* Payment History */
.payment-history {
    border: 1px solid var(--dashboard-card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.payment-history-header {
    padding: var(--space-3) var(--space-4);
    background: var(--dashboard-surface);
    border-bottom: 1px solid var(--dashboard-card-border);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
}

.payment-list {
    max-height: 200px;
    overflow-y: auto;
}

.payment-list::-webkit-scrollbar {
    width: 4px;
}

.payment-list::-webkit-scrollbar-track {
    background: var(--dashboard-surface);
}

.payment-list::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: var(--radius-full);
}

.payment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--dashboard-card-border);
}

.payment-item:last-child {
    border-bottom: none;
}

.payment-item-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.payment-status-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    flex-shrink: 0;
}

.payment-item.paid .payment-status-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}

.payment-item.unpaid .payment-status-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-error);
}

.payment-item-info {
    display: flex;
    flex-direction: column;
}

.payment-item-month {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-primary);
}

.payment-item-date {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.payment-item-right {
    text-align: right;
}

.payment-item-amount {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
}

.payment-item-method {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.no-payments {
    padding: var(--space-6);
    text-align: center;
    color: var(--text-muted);
}

.no-payments i {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-2);
    opacity: 0.5;
}

.no-payments p {
    font-size: var(--fs-sm);
    margin: 0;
}

@media (max-width: 480px) {
    .fees-final {
        font-size: var(--fs-2xl);
    }

    .payment-list {
        max-height: 150px;
    }

    .current-payment-card {
        padding: var(--space-3);
        gap: var(--space-3);
    }

    .current-payment-icon {
        width: 36px;
        height: 36px;
        font-size: var(--fs-base);
    }
}

/* ============================================
   Package Progress
   ============================================ */
.package-progress {
    padding: var(--space-4);
    background: var(--dashboard-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--dashboard-card-border);
}

.package-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.package-progress-label {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

.package-progress-value {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
}

.package-progress-bar {
    height: 8px;
    background: var(--dashboard-card-border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.package-progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.package-progress-remaining {
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    color: var(--color-error);
    text-align: right;
}

.package-progress-remaining.completed {
    color: var(--color-success);
}

/* ============================================
   Mobile Menu Auth Section
   ============================================ */
.mobile-menu-auth {
    padding: var(--space-4) var(--space-2);
    margin-top: var(--space-4);
    border-top: 1px solid var(--border-color);
}

.mobile-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-4);
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: white;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.mobile-login-btn:hover {
    box-shadow: 0 8px 25px var(--shadow-accent);
    transform: translateY(-2px);
}

.mobile-profile-section {
    display: none;
}

.mobile-profile-section.active {
    display: block;
}

.mobile-profile-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--dashboard-surface);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
    border: 1px solid var(--border-color);
}

.mobile-profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--accent-primary);
}

.mobile-profile-info {
    flex: 1;
}

.mobile-profile-name {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
}

.mobile-profile-class {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.mobile-profile-menu {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.mobile-profile-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    background: var(--dashboard-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    text-align: left;
    width: 100%;
}

.mobile-profile-menu-item:hover {
    background: var(--dashboard-surface-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.mobile-profile-menu-item i {
    width: 20px;
    color: var(--accent-primary);
}

.mobile-profile-menu-item.logout {
    color: var(--color-error);
    border-color: rgba(239, 68, 68, 0.3);
}

.mobile-profile-menu-item.logout i {
    color: var(--color-error);
}

.mobile-profile-menu-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--color-error);
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 1023px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .attendance-grid {
        gap: var(--space-1);
    }

    .attendance-day {
        min-height: 24px;
    }
}

@media (max-width: 767px) {

    /* Hide desktop login button, show in mobile menu */
    .navbar-actions .login-btn,
    .navbar-actions .profile-container {
        display: none;
    }

    .login-modal {
        width: 95%;
        max-width: none;
        border-radius: var(--radius-xl);
    }

    .dashboard-welcome {
        flex-direction: column;
        text-align: center;
        padding: var(--space-6);
    }

    .dashboard-welcome-text h1 {
        font-size: var(--fs-xl);
    }

    .student-info-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-section {
        padding-top: calc(var(--navbar-height) + var(--space-4));
    }

    .attendance-summary {
        gap: var(--space-2);
    }

    .attendance-stat {
        min-width: 80px;
        padding: var(--space-3);
    }

    .attendance-stat-value {
        font-size: var(--fs-xl);
    }

    .result-stats {
        flex-wrap: wrap;
        gap: var(--space-4);
    }

    .fees-final {
        font-size: var(--fs-3xl);
    }
}

@media (max-width: 480px) {
    .login-modal-body {
        padding: var(--space-5);
    }

    .login-modal-header {
        padding: var(--space-5);
    }

    .dashboard-card-body {
        padding: var(--space-5);
    }

    .dashboard-avatar {
        width: 80px;
        height: 80px;
    }

    .attendance-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 3px;
    }

    .attendance-day {
        min-height: 20px;
        border-radius: 3px;
    }

    .week-label {
        font-size: 0.6rem;
    }

    .notices-list,
    .results-list {
        max-height: 300px;
    }
}

/* ============================================
   Show/Hide based on login state
   ============================================ */
.auth-logged-out .profile-container,
.auth-logged-out .mobile-profile-section {
    display: none !important;
}

.auth-logged-in .login-btn,
.auth-logged-in .mobile-login-btn {
    display: none !important;
}

.auth-logged-in .profile-container {
    display: block;
}

.auth-logged-in .mobile-profile-section {
    display: block;
}

@media (max-width: 767px) {
    .auth-logged-in .profile-container {
        display: none;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .dashboard-section {
        background: white !important;
    }

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

    .dashboard-back-btn,
    .login-btn,
    .profile-container {
        display: none !important;
    }
}