/* ============================================
   LEARNEX ACADEMY - MODERN PROFESSIONAL UI
   Premium Dark Theme with Glassmorphism
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

    /* Secondary Colors */
    --secondary: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Dark Theme Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.8);

    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-dark: #0f172a;

    /* Borders */
    --border-color: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(99, 102, 241, 0.3);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);

    /* Layout */
    --sidebar-width: 260px;
    /* 280 se 260 karo */
    --header-height: 70px;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ============================================
   LOGIN PAGE - MODERN GLASSMORPHISM
   ============================================ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        var(--bg-primary);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--primary-gradient);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.1;
    top: -200px;
    right: -200px;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-30px, 30px) scale(1.1);
    }
}

.login-box {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, 0.1);
    width: 100%;
    max-width: 440px;
    padding: 48px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: white;
    font-size: 36px;
    font-weight: 800;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.login-logo::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;

    background: linear-gradient(to right, var(--text-primary), var(--primary-light));

    /* Standard property */
    background-clip: text;

    /* WebKit support */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Fallback color */
    color: var(--text-primary);
}

.login-header p {
    color: var(--text-muted);
    font-size: 15px;
}

/* Role Selector */
.role-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    background: var(--bg-secondary);
    padding: 6px;
    border-radius: var(--radius);
}

.role-option {
    flex: 1;
    padding: 16px 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    background: transparent;
}

.role-option:hover {
    background: rgba(99, 102, 241, 0.1);
}

.role-option.active {
    background: var(--primary-gradient);
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.role-option i {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
    color: var(--text-secondary);
    transition: var(--transition);
}

.role-option.active i,
.role-option.active div {
    color: white;
}

.role-option div {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

/* Form Styling */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--text-primary);
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: var(--bg-tertiary);
}

.form-control::placeholder {
    color: var(--text-dark);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.invalid-feedback {
    color: var(--danger);
    font-size: 13px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Button Styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    width: 100%;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.login-footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.login-footer a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */

.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    left: 0;
    /* ADD karo */
    top: 0;
    /* ADD karo */
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--transition-slow);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(99, 102, 241, 0.05);
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 800;
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
}

.sidebar-brand {
    flex: 1;
}

.sidebar-brand h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.sidebar-brand span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Sidebar Menu */
.sidebar-menu {
    padding: 20px 12px;
    flex: 1;
}

.menu-category {
    padding: 16px 16px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dark);
    font-weight: 700;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin: 4px 0;
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    font-weight: 500;
    font-size: 14px;
}

.menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary-gradient);
    border-radius: 0 4px 4px 0;
    transition: var(--transition);
}

.menu-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

.menu-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
}

.menu-item.active::before {
    height: 60%;
}

.menu-item i {
    width: 24px;
    text-align: center;
    font-size: 18px;
    transition: var(--transition);
}

.menu-item:hover i,
.menu-item.active i {
    transform: scale(1.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    /* Yeh zaroori hai */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - var(--sidebar-width));
    /* ADD karo */
}

/* Top Navbar */
.top-navbar {
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 16px;
    margin: 16px 24px;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.toggle-sidebar {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: none;
}

.toggle-sidebar:hover {
    background: var(--primary);
    color: white;
}

.search-box {
    position: relative;
    width: 320px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
    box-sizing: border-box;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dark);
    font-size: 14px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    position: relative;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.nav-icon:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 7px;
    border-radius: 20px;
    border: 2px solid var(--bg-primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.user-profile:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.user-info {
    line-height: 1.3;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* Content Area */
.content-area {
    padding: 24px;
    /* 32 se 24 karo */
    flex: 1;
    max-width: 100%;
    /* ADD karo */
    overflow-x: hidden;
    /* ADD karo */
}

.page-header {
    margin-bottom: 32px;
}

.page-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;

    background: linear-gradient(to right, var(--text-primary), var(--primary-light));

    /* Standard property */
    background-clip: text;

    /* WebKit support */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Fallback color */
    color: var(--text-primary);
}

.breadcrumb {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
    align-items: center;
}

.breadcrumb a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--text-dark);
}

/* ============================================
   STATS CARDS - MODERN GLASSMORPHISM
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    position: relative;
    overflow: hidden;
}

.stat-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.2;
    border-radius: inherit;
}

.stat-icon.primary {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
}

.stat-icon.primary::after {
    background: var(--primary-gradient);
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.stat-icon.success::after {
    background: var(--success);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.stat-icon.warning::after {
    background: var(--warning);
}

.stat-icon.danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.stat-icon.danger::after {
    background: var(--danger);
}

.stat-details h3 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 4px;

    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));

    /* Standard property */
    background-clip: text;

    /* Webkit support */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Fallback color (important) */
    color: var(--text-primary);
}

.stat-details p {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   CARDS & WIDGETS
   ============================================ */

.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-glow);
}

.card-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(99, 102, 241, 0.03);
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 28px;
}

/* Widget Grid */
.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.widget {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.widget:hover {
    border-color: var(--border-glow);
}

.widget-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.widget-body {
    padding: 24px;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    text-align: center;
}

.quick-action-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary-light);
    transform: translateY(-2px);
}

.quick-action-btn i {
    font-size: 28px;
    color: var(--primary);
    transition: var(--transition);
}

.quick-action-btn:hover i {
    transform: scale(1.1);
}

.quick-action-btn span {
    font-size: 13px;
    font-weight: 600;
}

/* Activity List */
.activity-list {
    list-style: none;
}

.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    padding-left: 8px;
}

.activity-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    position: relative;
    overflow: hidden;
}

.activity-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.2;
    border-radius: inherit;
}

.activity-icon.login {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
}

.activity-icon.login::after {
    background: var(--primary);
}

.activity-icon.create {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.activity-icon.create::after {
    background: var(--success);
}

.activity-icon.delete {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.activity-icon.delete::after {
    background: var(--danger);
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.5;
}

.activity-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.activity-time {
    font-size: 12px;
    color: var(--text-dark);
    font-weight: 500;
}

/* ============================================
   TABLES
   ============================================ */

.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    white-space: nowrap;
}

.data-table tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    border: 1px solid transparent;
}

.status-present {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

.status-absent {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.status-late {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.3);
}

.status-warning {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
    border-color: rgba(59, 130, 246, 0.3);
}

/* ============================================
   FORMS
   ============================================ */

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-zone i {
    font-size: 48px;
    color: var(--text-dark);
    margin-bottom: 16px;
    transition: var(--transition);
}

.upload-zone:hover i {
    color: var(--primary);
    transform: scale(1.1);
}

.upload-zone p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.3);
}

/* ============================================
   MODALS
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(99, 102, 241, 0.05);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.close-modal {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: var(--danger);
    color: white;
}

.modal-body {
    padding: 28px;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(99, 102, 241, 0.03);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    font-weight: 500;
    transition: var(--transition);
    min-width: 40px;
    text-align: center;
}

.pagination a:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary-light);
}

.pagination .active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

/* ============================================
   ATTENDANCE GRID
   ============================================ */

.attendance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.attendance-item {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.attendance-item:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.attendance-item .avatar {
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 16px;
    box-shadow: var(--shadow-glow);
}

.attendance-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.attendance-item p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.attendance-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.att-btn {
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.att-btn.present {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.att-btn.absent {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.att-btn.late {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.att-btn:hover {
    transform: scale(1.05);
}

.att-btn.selected {
    box-shadow: 0 0 0 2px currentColor;
}

/* ============================================
   QUIZ INTERFACE
   ============================================ */

.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-header {
    background: var(--bg-card);
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
}

.timer {
    font-size: 28px;
    font-weight: 800;
    color: var(--danger);
    font-family: 'Courier New', monospace;
    background: rgba(239, 68, 68, 0.1);
    padding: 12px 24px;
    border-radius: var(--radius);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.question-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.question-card:hover {
    border-color: var(--border-glow);
}

.question-number {
    color: var(--primary-light);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.question-text {
    font-size: 18px;
    margin-bottom: 28px;
    line-height: 1.6;
    color: var(--text-primary);
    font-weight: 500;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    padding: 18px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 14px;
}

.option-item:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.option-item.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.option-item input[type="radio"] {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .toggle-sidebar {
        display: flex;
    }

    .search-box {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .mobile-greeting {
        display: block !important;
    }

    .top-navbar {
        margin: 10px 16px;
        top: 10px;
        padding: 0 16px;
    }

    .brand-text,
    .nav-date {
        display: none !important;
    }

    .mobile-welcome {
        display: block !important;
    }

    .content-area {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .widget-grid {
        grid-template-columns: 1fr;
    }

    .page-header h2 {
        font-size: 24px;
    }

    .search-box {
        display: none;
    }

    .user-info {
        display: none;
    }

    .nav-right {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 32px 24px;
    }

    .role-selector {
        flex-direction: column;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .attendance-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 16px;
    }
}

/* Loading Animation */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* --- IMPORTED FROM student-dashboard.css --- */
/* Student Profile Card */
.student-profile-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.profile-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-details {
    flex: 1;
    min-width: 250px;
}

.profile-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.profile-row:last-child {
    border-bottom: none;
}

.profile-label {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 150px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.profile-label i {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    display: inline-block;
}

.profile-value {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

/* Attendance Section */
.attendance-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.month-badge {
    background: #dbeafe;
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.attendance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.attendance-circle-wrapper {
    text-align: center;
}

.attendance-circle {
    width: 150px;
    height: 150px;
    margin: 0 auto 16px;
    position: relative;
}

.circular-chart {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 12;
}

.circle-progress {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease;
}

.circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-dark);
}

.circle-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Weekly Days */
.weekly-attendance {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.week-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 500;
}

.days-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.day-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    position: relative;
    transition: all 0.3s ease;
}

.day-circle.present {
    background: var(--success);
    color: white;
}

.day-circle.absent {
    background: var(--danger);
    color: white;
}

.day-circle.today {
    box-shadow: 0 0 0 3px var(--primary);
}

.day-circle.today::after {
    content: '';
    position: absolute;
    top: -8px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--primary-dark);
}

/* Pagination Dots */
.pagination-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--primary);
}

/* Timeline Section */
.timeline-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.timeline-tabs {
    display: flex;
    gap: 24px;
}

.timeline-tab {
    padding: 12px 0;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.timeline-tab.active {
    color: var(--primary);
}

.timeline-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.timeline-actions {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: var(--primary);
    color: white;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-item {
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.timeline-item:hover {
    border-color: var(--border-color);
    transform: translateX(4px);
}

.timeline-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.timeline-icon.quiz {
    background: var(--warning);
}

.timeline-icon.assignment {
    background: var(--success);
}

.timeline-icon.announcement {
    background: var(--info);
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 15px;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.timeline-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.timeline-meta i {
    margin-right: 4px;
}

.timeline-time {
    text-align: right;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    min-width: 100px;
}

.timeline-time .date {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
}

/* Search Box */
.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: flex;
    }

    .attendance-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 0;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-image {
        width: 100px;
        height: 100px;
    }

    .profile-row {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .profile-label {
        width: 100%;
        justify-content: center;
    }

    .attendance-grid {
        grid-template-columns: 1fr;
    }

    .days-row {
        gap: 8px;
    }

    .day-circle {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }

    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .timeline-tabs {
        width: 100%;
    }

    .timeline-item {
        flex-direction: column;
    }

    .timeline-time {
        text-align: left;
        width: 100%;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--border-color);
    }
}

@media (max-width: 480px) {
    .days-row {
        gap: 6px;
    }

    .day-circle {
        width: 36px;
        height: 36px;
        font-size: 11px;
    }

    .attendance-circle {
        width: 120px;
        height: 120px;
    }

    .circle-text {
        font-size: 24px;
    }

    .timeline-actions {
        width: 100%;
        justify-content: flex-end;
    }
}