:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --primary-dark: #4338ca;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --secondary: #64748b;
    --secondary-light: #94a3b8;
    --success: #10b981;
    --success-light: #d1fae5;
    --success-dark: #059669;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #d97706;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #dc2626;
    --info: #06b6d4;
    --info-light: #cffafe;
    --dark: #0f172a;
    --light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --border-light: rgba(255, 255, 255, 0.8);
    --text-dark: #1e293b;
    --text-light: #64748b;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-sm:
        0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg:
        0 10px 15px -3px rgba(0, 0, 0, 0.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);
}

body {
    font-family: "Plus Jakarta Sans", sans-serif;
    background: linear-gradient(135deg, #f1f5f9 0%, #e0e7ff 50%, #fae8ff 100%);
    background-attachment: fixed;
    color: var(--dark);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
    border-right: 1px solid rgba(99, 102, 241, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 4px 0 24px rgba(99, 102, 241, 0.08), 0 0 0 1px rgba(99, 102, 241, 0.05);
    backdrop-filter: blur(10px);
}

.logo {
    padding: 0 0.75rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6, var(--primary));
    border-radius: 2px;
    opacity: 0.4;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover {
    background: linear-gradient(135deg, #eef2ff 0%, rgba(99, 102, 241, 0.08) 100%);
    color: var(--primary);
    transform: translateX(6px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.2), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link.active {
    background: linear-gradient(135deg, #eef2ff 0%, rgba(99, 102, 241, 0.15) 100%);
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25), 0 0 0 1px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(8px);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--primary);
    border-radius: 2px;
}

.nav-link i {
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.nav-link:hover i {
    transform: scale(1.1);
}

/* Support Card */
.support-card {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    color: white;
    margin-top: auto;
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.support-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.08) 0%,
        transparent 50%
    );
    animation: float 6s ease-in-out infinite;
}

.support-card::after {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(
        circle,
        rgba(79, 70, 229, 0.1) 0%,
        transparent 70%
    );
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10px, -10px) rotate(2deg); }
    66% { transform: translate(-5px, 5px) rotate(-1deg); }
}

/* Main Content */
.main-content {
    margin-left: 260px;
    padding: 2.5rem;
    transition: all 0.3s ease;
}

/* Main Content with Right Sidebar (for dashboard) */
.main-content-with-sidebar {
    margin-right: 320px;
}

/* Right Sidebar */
.right-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 320px;
    background: var(--white);
    border-left: 1px solid var(--border);
    padding: 2rem;
    overflow-y: auto;
    z-index: 900;
    transition: transform 0.3s ease;
}

/* Cards */
.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6, var(--primary));
    border-radius: 24px 24px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 24px 48px rgba(99, 102, 241, 0.2), 0 8px 16px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: transform 0.3s;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Welcome Section */
.welcome-header {
    margin-bottom: 3rem;
    position: relative;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 40%, #8b5cf6 80%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.welcome-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6, #a855f7);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* Search Input */
.search-input {
    background: linear-gradient(135deg, var(--white) 0%, #fafbfc 100%);
    border: 1px solid var(--border);
    padding: 1rem 1.25rem 1rem 3.5rem;
    border-radius: 16px;
    width: 100%;
    max-width: 450px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%2364748B' class='bi bi-search' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 1.25rem center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-size: 0.95rem;
    font-weight: 500;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.15), 0 8px 24px rgba(99, 102, 241, 0.15);
    outline: none;
    background: var(--white);
    transform: scale(1.02);
}

.search-input::placeholder {
    color: var(--secondary);
    font-weight: 400;
}

/* Class Cards */
.class-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    padding: 1.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1), 0 1px 2px rgba(99, 102, 241, 0.08);
}

.class-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, #6366f1, #8b5cf6, #a855f7);
    border-radius: 6px 0 0 6px;
    opacity: 0.9;
    box-shadow: 2px 0 8px rgba(99, 102, 241, 0.3);
}

.class-card:hover {
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.18), 0 4px 8px rgba(99, 102, 241, 0.12);
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.3);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
}

/* Table */
.table-container {
    background: linear-gradient(135deg, var(--white) 0%, #fafbfc 100%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6, var(--success));
    z-index: 1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.table th {
    background: #f8fafc;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--secondary);
    font-weight: 700;
    padding: 1.25rem 1.75rem;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.table td {
    padding: 1.25rem 1.75rem;
    vertical-align: middle;
    color: var(--dark);
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

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

.table tr:hover td {
    background-color: #f8fafc;
}

/* Enhanced table styling */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
    background: linear-gradient(135deg, #fafbff 0%, #ffffff 100%);
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
    background-color: #fafbff !important;
}

/* Table action buttons */
.table-action-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.table-action-btn:hover {
    transform: scale(1.1);
}

/* Empty state for tables */
.table-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--secondary);
}

.table-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Enhanced table card for better space handling */
.table-card {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 380px);
    min-height: 400px;
}

.table-card .card-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.table-scroll {
    flex: 1;
    overflow: auto;
    max-height: 100%;
}

.table-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
    opacity: 0.7;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Flexible table columns */
.table th,
.table td {
    white-space: nowrap;
}

.table th:nth-child(2),
.table td:nth-child(2) {
    min-width: 200px;
    white-space: normal;
}

.table th:last-child,
.table td:last-child {
    position: sticky;
    right: 0;
    background: inherit;
    z-index: 5;
}

.status-badge {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-transform: uppercase;
    border: 1px solid transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.status-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.status-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: currentColor;
    box-shadow: 0 0 4px currentColor;
}

.status-active,
.badge-active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-color: #6ee7b7;
}
.status-warning,
.badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #78350f;
    border-color: #fcd34d;
}
.status-danger,
.badge-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #7f1d1d;
    border-color: #fca5a5;
}
.status-pending,
.badge-pending {
    background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
    color: #5b21b6;
    border-color: #a78bfa;
}

/* Enhanced badge styles */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-color: #6ee7b7;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.badge-primary {
    background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
    color: #5b21b6;
    border-color: #a78bfa;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

/* Calendar in Right Sidebar */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
}
.calendar-day {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.calendar-day:hover:not(.active) {
    background-color: var(--light);
    color: var(--primary);
}
.calendar-day.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
    font-weight: 600;
}

/* Responsiveness */
@media (max-width: 1400px) {
    .main-content-with-sidebar {
        margin-right: 0;
    }
    .right-sidebar {
        display: none;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    .sidebar.show {
        transform: translateX(0);
    }

    /* Mobile adjustments */
    .welcome-title {
        font-size: 1.8rem;
    }

    .search-input {
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .stat-card {
        margin-bottom: 1.5rem;
    }

    .profile-header {
        padding: 2rem 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
    }

    .info-card {
        margin-bottom: 1.5rem;
    }

    .table-container {
        overflow-x: auto;
    }

    .table {
        min-width: 600px;
    }

    /* Mobile navigation improvements */
    .nav-link {
        padding: 1rem;
        font-size: 1rem;
    }

    .support-card {
        padding: 1.5rem;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .welcome-header {
        margin-bottom: 2rem;
    }

    .welcome-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    /* Stack stat cards vertically on mobile */
    .stat-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Adjust profile layout for mobile */
    .profile-header .d-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .profile-status-badge {
        position: static;
        align-self: center;
        margin-bottom: 1rem;
    }

    /* Better mobile table experience */
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    /* Mobile form improvements */
    .form-control,
    .form-select {
        font-size: 1rem; /* Prevent zoom on iOS */
    }

    /* Mobile button improvements */
    .btn-action {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 280px;
    }

    .logo {
        font-size: 1.25rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    /* Mobile card improvements */
    .card-header {
        padding: 1rem 1.5rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    /* Mobile filter bar */
    .filter-bar,
    .search-filter-bar {
        padding: 1rem;
    }

    /* Mobile calendar */
    .calendar-grid {
        gap: 0.25rem;
    }

    .calendar-day {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* --- Shared Page Styles (Courses, Students, etc) --- */
.page-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--dark) 0%, #6366f1 40%, #8b5cf6 70%, #a855f7 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
    animation: pageGradient 6s ease infinite;
}

@keyframes pageGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.stat-label {
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Forms */
.form-control,
.form-select {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    background-color: var(--white);
}

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

.form-control:invalid,
.form-select:invalid {
    border-color: var(--danger);
}

.form-control:invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

/* Better textarea styling */
.form-control[rows] {
    resize: vertical;
    min-height: 100px;
}

/* Form validation */
.is-valid {
    border-color: var(--success) !important;
}

.is-invalid {
    border-color: var(--danger) !important;
}

.valid-feedback {
    color: var(--success);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.invalid-feedback {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Filter Bar */
.filter-bar,
.search-filter-bar {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.12), 0 2px 8px rgba(99, 102, 241, 0.08);
    position: relative;
    overflow: hidden;
}

.filter-bar::before,
.search-filter-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #10b981, #6366f1);
    background-size: 200% auto;
    opacity: 0.7;
    animation: filterGradient 3s linear infinite;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

@keyframes filterGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* --- Courses Page --- */
.course-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 28px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.12), 0 2px 8px rgba(99, 102, 241, 0.08);
    position: relative;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7, #10b981);
    background-size: 200% auto;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: courseGradient 3s linear infinite;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

@keyframes courseGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.course-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 24px 48px rgba(99, 102, 241, 0.24), 0 8px 16px rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.3);
}

.course-card:hover::before {
    opacity: 1;
}

.course-header {
    padding: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.course-header::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.1) 100%
    );
}

.course-header.blue {
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
}
.course-header.purple {
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
}
.course-header.pink {
    background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
}
.course-header.green {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}
.course-header.orange {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
}
.course-header.teal {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.course-body {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 500;
}

.course-teacher {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.teacher-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: var(--shadow-sm);
}

/* Renamed course action btn to avoid conflict */
.course-action-btn {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    position: relative;
    z-index: 2;
}
.course-action-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.btn-view {
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-left: auto;
    transition: all 0.2s;
}

.btn-view:hover {
    background: #e0e7ff;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.badge-status {
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-add-course {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    background-size: 200% auto;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
    transition: all 0.2s;
}

.btn-add-course:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.4);
    color: white;
}

/* --- Students Page --- */

.card {
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
}

.student-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.student-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
}

.student-name {
    font-weight: 700;
    color: var(--dark);
    font-size: 1rem;
}
.student-email {
    font-size: 0.85rem;
    color: var(--secondary);
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.badge-active {
    background: #dcfce7;
    color: #166534;
}
.badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}
.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

/* Renamed table action btn */
.table-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--secondary);
    transition: all 0.2s;
    margin-right: 6px;
}

.table-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: linear-gradient(135deg, #eef2ff 0%, rgba(99, 102, 241, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.table-action-btn.delete:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: linear-gradient(135deg, #fee2e2 0%, rgba(239, 68, 68, 0.1) 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-export {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--dark);
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.btn-export:hover {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

/* --- Attendance Page --- */
.attendance-table-card {
    background: var(--white);
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.attendance-status {
    display: flex;
    gap: 0.5rem;
}

.btn-status {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-status:hover {
    background: var(--light);
    transform: scale(1.1);
}

.btn-present.active {
    background: #dcfce7;
    color: #166534;
    border-color: #166534;
    box-shadow: 0 2px 4px rgba(22, 101, 52, 0.2);
}
.btn-absent.active {
    background: #fee2e2;
    color: #991b1b;
    border-color: #991b1b;
    box-shadow: 0 2px 4px rgba(153, 27, 27, 0.2);
}
.btn-late.active {
    background: #fef3c7;
    color: #92400e;
    border-color: #92400e;
    box-shadow: 0 2px 4px rgba(146, 64, 14, 0.2);
}

/* Calendar Card */
.calendar-card {
    background: linear-gradient(135deg, var(--white) 0%, #fafbfc 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.calendar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--success), #10b981, var(--primary));
    opacity: 0.6;
}

/* Reusing calendar-grid from main styles, but adding day-header */
.calendar-day-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

/* Overriding or extending calendar-day if needed, but looks consistent */
.calendar-day {
    aspect-ratio: 1; /* Specific to attendance calendar */
    font-size: 0.95rem;
}
.calendar-day:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.calendar-day.today {
    background: var(--primary);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.4);
}

/* Quick Actions */
.quick-action-btn {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    text-align: left;
    margin-bottom: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1), 0 1px 3px rgba(99, 102, 241, 0.12);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.08), transparent);
    transition: left 0.6s ease;
}

.quick-action-btn:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2), 0 4px 8px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.quick-action-btn:hover::before {
    left: 100%;
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: transform 0.3s;
}

.quick-action-btn:hover .quick-action-icon {
    transform: scale(1.1) rotate(5deg);
}

.btn-filter {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--dark);
    border-radius: 10px;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
}

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

/* --- Student Enroll Page --- */
.progress {
    height: 10px;
    border-radius: 99px;
    background-color: #e2e8f0;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7);
    background-size: 200% auto;
    border-radius: 99px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    animation: progressShine 2s linear infinite;
}

@keyframes progressShine {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.photo-preview {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--white);
    box-shadow: var(--shadow-lg);
    background-color: var(--light);
}

.btn-secondary-custom {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--secondary);
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
}

.btn-secondary-custom:hover {
    background: var(--light);
    border-color: var(--secondary);
    color: var(--dark);
    transform: translateY(-1px);
}

.btn-submit {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    background-size: 200% auto;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2.5rem;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}
.btn-submit:hover {
    background-position: right center;
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.4);
}

/* --- Button Styles --- */
.btn-white {
    background: linear-gradient(135deg, var(--white) 0%, #fafbfc 100%);
    border: 1px solid var(--border);
    color: var(--dark);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.btn-white::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-white:hover {
    background: linear-gradient(135deg, #fafbfc 0%, var(--white) 100%);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(79, 70, 229, 0.08);
    color: var(--primary);
}

.btn-white:hover::before {
    left: 100%;
}

/* Enhanced primary buttons */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    background-size: 200% auto;
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.4);
    color: white;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Success button variant */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    background-size: 200% auto;
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.4);
    color: white;
}

/* --- Utility Classes --- */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-dark { color: var(--dark) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-danger { background-color: var(--danger) !important; }
.bg-light { background-color: var(--light) !important; }
.bg-white { background-color: var(--white) !important; }

.border { border: 1px solid var(--border) !important; }
.rounded { border-radius: 8px !important; }
.rounded-circle { border-radius: 50% !important; }

/* --- Loading States --- */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* --- Print Styles --- */
@media print {
    .sidebar,
    .right-sidebar,
    .btn,
    .nav-link,
    .support-card {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .profile-header,
    .info-card,
    .table-container {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }

    .table th,
    .table td {
        border: 1px solid #000 !important;
    }
}

/* --- High Contrast Mode Support --- */
@media (prefers-contrast: high) {
    :root {
        --border: #000;
        --light: #fff;
        --dark: #000;
    }

    .sidebar {
        border-right: 2px solid var(--border);
    }

    .stat-card,
    .info-card,
    .table-container {
        border: 2px solid var(--border);
    }
}

/* --- Reduced Motion Support --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Animation Classes --- */
.fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.slide-in {
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* --- Student Detail Page --- */
.profile-header {
    background: linear-gradient(135deg, var(--white) 0%, #fafbfc 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    padding: 3rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    margin-bottom: 3rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), #6366f1, var(--success), #10b981);
    opacity: 0.8;
}

.profile-header:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 8px 20px rgba(79, 70, 229, 0.15);
    border-color: var(--primary-light);
}

.profile-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--white);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.profile-photo:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(79, 70, 229, 0.15);
}

.profile-status-badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    padding: 0.5rem 1.25rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.9rem;
    background: #dcfce7;
    color: #166534;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-card {
    background: linear-gradient(135deg, var(--white) 0%, #fafbfc 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.12);
    height: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #6366f1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(79, 70, 229, 0.08);
    border-color: var(--primary-light);
}

.info-card:hover::before {
    opacity: 1;
}

.data-row {
    margin-bottom: 1.25rem;
}

.data-label {
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.data-value {
    font-weight: 600;
    color: var(--dark);
    font-size: 1rem;
}

.btn-action {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: var(--secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
    position: relative;
    overflow: hidden;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-action:hover {
    background: linear-gradient(135deg, var(--light) 0%, rgba(79, 70, 229, 0.05) 100%);
    color: var(--primary);
    transform: translateY(-2px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15);
}

.btn-action:hover::before {
    left: 100%;
}

/* ============================================
   ENHANCED STUDENT DETAIL PAGE STYLES
   ============================================ */

/* Profile Photo Wrapper */
.profile-photo-wrapper {
    position: relative;
    display: inline-block;
}

.profile-photo-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.profile-photo-wrapper:hover .profile-photo-overlay {
    opacity: 1;
    transform: scale(1);
}

/* Profile Info Section */
.profile-info h2 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-meta span {
    background: var(--light);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.profile-meta span:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Profile Actions */
.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-action-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%) !important;
    color: white !important;
    border-color: transparent !important;
}

.btn-action-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #7c3aed 100%) !important;
    color: white !important;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35) !important;
}

.btn-action-danger {
    color: var(--danger) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
}

.btn-action-danger:hover {
    background: var(--danger) !important;
    color: white !important;
    border-color: var(--danger) !important;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35) !important;
}

/* Info Card Header */
.info-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(135deg, #fafbff 0%, #f8fafc 100%);
}

.info-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* Info Card Body */
.info-card-body {
    padding: 1.5rem;
}

/* Data Items */
.data-item {
    padding: 0.75rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.data-item:hover {
    background: var(--light);
}

/* Academic Stat Items */
.academic-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.academic-stat-item:last-of-type {
    border-bottom: none;
}

/* Emergency Contact */
.emergency-contact-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--light);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-info-item:hover {
    background: var(--primary-light);
    transform: translateX(5px);
}

/* Notes Container */
.notes-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.note-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-radius: 12px;
    border-left: 4px solid var(--warning);
    font-size: 0.9rem;
    color: var(--dark);
    transition: all 0.3s ease;
}

.note-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.note-item:last-child {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left-color: var(--danger);
}

.note-item:last-child:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* Breadcrumb Styling */
.breadcrumb {
    background: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-weight: bold;
    color: var(--secondary);
}

.breadcrumb-item a:hover {
    color: var(--primary) !important;
}

/* Responsive Adjustments for Student Detail */
@media (max-width: 991px) {
    .profile-actions {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }
    
    .profile-actions .btn-action {
        flex: 1;
        min-width: 140px;
    }
    
    .profile-info {
        text-align: center;
    }
    
    .profile-meta {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .profile-header .d-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-info h2 {
        font-size: 1.5rem;
    }
    
    .profile-actions {
        flex-direction: column;
    }
    
    .profile-actions .btn-action {
        width: 100%;
    }
    
    .info-card-header {
        padding: 1rem;
    }
    
    .info-card-body {
        padding: 1rem;
    }
    
    .academic-stat-item {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .profile-photo {
        width: 100px !important;
        height: 100px !important;
    }
    
    .profile-photo-overlay {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .profile-status-badge {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
    
    .data-label {
        font-size: 0.7rem;
    }
    
    .data-value {
        font-size: 0.9rem;
    }
}
