/* =========================================
   LANGACADEMY — DESIGN SYSTEM
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand */
    --primary: #1B2934;
    --primary-hover: #007aff;
    --primary-light: rgba(245, 112, 35, 0.637);
    --secondary: #005DA4;

    /* Status Colors */
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.12);
    --info: #3b82f6;
    --info-light: rgba(59, 130, 246, 0.12);

    /* Surfaces */
    --bg: #f1f5f9;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e2e8f0;
    --border-2: rgba(0,0,0,0.06);

    /* Sidebar */
    --sidebar-bg: #0f172a;
    --sidebar-w: 260px;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;

    /* Text */
    --text: #0f172a;
    --text-2: #475569;
    --text-3: #94a3b8;

    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.12);
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   LOGIN SCREEN
   ========================================= */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(360deg, #007aff 0%, #1B2934 50%, #1B2934 100%);
    overflow: hidden;
}

.login-bg { position: absolute; inset: 0; pointer-events: none; }

.login-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: blobFloat 8s ease-in-out infinite;
}
.b1 { width: 500px; height: 500px; background: radial-gradient(circle, #6366f1, #8b5cf6); top: -100px; left: -100px; }
.b2 { width: 400px; height: 400px; background: radial-gradient(circle, #3b82f6, #6366f1); bottom: -80px; right: -80px; animation-delay: -4s; }

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.05); }
}

.login-card {
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 28px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.4);
}

.login-logo { text-align: center; margin-bottom: 2.5rem; }

.login-logo-main {
    max-width: 280px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.2));
}

.login-logo h1 { color: white; font-size: 1.8rem; font-weight: 800; }
.login-logo p { color: rgba(255,255,255,0.5); font-size: 0.9rem; margin-top: 4px; }

.field-group { margin-bottom: 1.25rem; }
.field-group label {
    display: block; color: rgba(255,255,255,0.7);
    font-size: 0.85rem; font-weight: 500;
    margin-bottom: 8px;
}
.field-group label i { margin-right: 6px; }

.field-group input,
.input-eye input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    color: white; font-family: inherit; font-size: 0.95rem;
    transition: border-color var(--transition);
    outline: none;
}
.field-group input::placeholder,
.input-eye input::placeholder { color: rgba(255,255,255,0.3); }
.field-group input:focus,
.input-eye input:focus { border-color: var(--primary); background: rgba(99,102,241,0.1); }

.input-eye { position: relative; }
.input-eye input { padding-right: 48px; }
.eye-btn {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: rgba(255,255,255,0.4);
    cursor: pointer; font-size: 0.9rem; padding: 4px;
}
.eye-btn:hover { color: rgba(255,255,255,0.8); }

.login-error {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: var(--radius-sm);
    color: #fca5a5;
    font-size: 0.85rem;
    padding: 10px 14px;
    margin-bottom: 1rem;
    display: none;
}
.login-error.show { display: block; }

.btn-login {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white; border: none; border-radius: var(--radius-sm);
    font-family: inherit; font-size: 1rem; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    gap: 10px; transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99,102,241,0.5); }
.btn-login:active { transform: translateY(0); }
.btn-login.loading { opacity: 0.7; pointer-events: none; }

.login-hint { text-align: center; color: rgba(255,255,255,0.35); font-size: 0.8rem; margin-top: 1.5rem; }
.login-hint strong { color: rgba(255,255,255,0.6); }

/* =========================================
   APP LAYOUT
   ========================================= */
.app { display: flex; height: 100vh; overflow: hidden; }

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex; flex-direction: column;
    flex-shrink: 0;
    transition: width var(--transition), transform var(--transition);
    position: relative; z-index: 50;
    overflow: hidden;
}

.sidebar-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand { display: flex; align-items: center; gap: 12px; overflow: hidden; width: 100%; }
.brand-logo-main {
    max-width: 100%;
    height: auto;
    padding: 0 10px;
}
.brand-name { color: white; font-size: 1.05rem; font-weight: 700; white-space: nowrap; }
.brand-sub { font-size: 0.7rem; color: rgba(255,255,255,0.35); white-space: nowrap; }

.sidebar-toggle {
    background: none; border: none; color: var(--sidebar-text);
    cursor: pointer; font-size: 1rem; padding: 6px;
    border-radius: 6px; transition: all var(--transition);
}
.sidebar-toggle:hover { color: white; background: rgba(255,255,255,0.08); }

/* NAV */
.nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.nav-section-label {
    font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1.5px;
    color: rgba(255,255,255,0.25); font-weight: 600;
    padding: 1rem 0.75rem 0.4rem;
    white-space: nowrap; overflow: hidden;
}

.nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: 10px;
    color: var(--sidebar-text);
    text-decoration: none; font-size: 0.9rem; font-weight: 500;
    transition: all var(--transition);
    margin-bottom: 2px; white-space: nowrap; overflow: hidden;
    position: relative;
}
.nav-link i { font-size: 1rem; flex-shrink: 0; width: 20px; text-align: center; }
.nav-link span { overflow: hidden; text-overflow: ellipsis; }

.nav-link:hover { background: rgba(255,255,255,0.07); color: white; }
.nav-link.active {
    background: var(--primary-light);
    color: #a5b4fc;
}
.nav-link.active::before {
    content: '';
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 60%; background: var(--primary);
    border-radius: 0 4px 4px 0;
}

/* SIDEBAR COLLAPSE */
.sidebar.collapsed { width: 68px; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .brand-sub,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-section-label { display: none; }
.sidebar.collapsed .nav-link { justify-content: center; }
.sidebar.collapsed .user-details, .sidebar.collapsed .btn-logout { display: none; }

/* SIDEBAR BOTTOM */
.sidebar-bottom {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.user-card { display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 36px; height: 36px; flex-shrink: 0;
    background: linear-gradient(135deg, #475569, #64748b);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; color: white;
}
.user-name { font-size: 0.85rem; font-weight: 600; color: white; white-space: nowrap; }
.user-role { font-size: 0.72rem; color: rgba(255,255,255,0.4); }
.user-details { flex: 1; overflow: hidden; }

.btn-logout {
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,0.35); font-size: 1rem; padding: 6px;
    border-radius: 6px; transition: all var(--transition);
}
.btn-logout:hover { color: var(--danger); background: var(--danger-light); }

/* MAIN WRAP */
.main-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* TOPBAR */
.topbar {
    height: 68px; padding: 0 2rem;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--surface); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20;
    gap: 1rem;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.page-title { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.search-wrap {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg); border: 1px solid var(--border);
    padding: 9px 16px; border-radius: 10px;
    width: 280px;
}
.search-wrap i { color: var(--text-3); font-size: 0.85rem; }
.search-wrap input {
    background: none; border: none; outline: none;
    font-family: inherit; font-size: 0.9rem; color: var(--text);
    width: 100%;
}

.btn-primary {
    background: var(--primary); color: white;
    border: none; padding: 10px 18px; border-radius: 10px;
    font-family: inherit; font-size: 0.9rem; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: 8px;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,0.35); }

.btn-secondary {
    background: var(--surface); color: var(--text-2);
    border: 1px solid var(--border);
    padding: 10px 18px; border-radius: 10px;
    font-family: inherit; font-size: 0.9rem; font-weight: 500;
    cursor: pointer; transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn-danger {
    background: var(--danger-light); color: var(--danger);
    border: none; padding: 8px 14px; border-radius: 8px;
    font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.btn-sm {
    padding: 6px 12px !important; font-size: 0.8rem !important; border-radius: 7px !important;
}

/* CONTENT */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* =========================================
   DASHBOARD
   ========================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex; align-items: center; gap: 1.25rem;
    transition: all var(--transition);
    cursor: default;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; flex-shrink: 0;
}
.stat-icon.blue { background: var(--info-light); color: var(--info); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.purple { background: rgba(139,92,246,0.12); color: var(--secondary); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }

.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: 0.82rem; color: var(--text-3); margin-top: 2px; }

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
}

/* =========================================
   CARDS & PANELS
   ========================================= */
.panel {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.panel-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.panel-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.panel-body { padding: 1.5rem; }

/* =========================================
   DATA TABLE
   ========================================= */
.table-wrap { overflow-x: auto; }

.data-table {
    width: 100%; border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--text-3);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    user-select: none;
}
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-2);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }

/* =========================================
   BADGES
   ========================================= */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
    white-space: nowrap;
}
.badge-green { background: var(--success-light); color: var(--success); }
.badge-red { background: var(--danger-light); color: var(--danger); }
.badge-orange { background: var(--warning-light); color: var(--warning); }
.badge-blue { background: var(--info-light); color: var(--info); }
.badge-purple { background: rgba(139,92,246,0.12); color: var(--secondary); }
.badge-gray { background: rgba(100,116,139,0.12); color: var(--text-2); }

/* =========================================
   MODULE PAGE HEADER
   ========================================= */
.module-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}
.module-title { font-size: 1.4rem; font-weight: 800; }
.module-subtitle { font-size: 0.85rem; color: var(--text-3); margin-top: 2px; }

.filter-bar {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 1.25rem; flex-wrap: wrap;
}
.filter-bar input, .filter-bar select {
    padding: 9px 14px; border: 1px solid var(--border);
    border-radius: 9px; font-family: inherit; font-size: 0.875rem;
    background: var(--surface); color: var(--text);
    outline: none; transition: border-color var(--transition);
}
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--primary); }

/* =========================================
   MODAL
   ========================================= */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.6);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    visibility: hidden; opacity: 0;
    transition: all 0.25s;
}
.modal-overlay.open { visibility: visible; opacity: 1; }
.modal-box {
    background: #ffffff;
    border-radius: 20px;
    width: 100%; max-width: 580px;
    max-height: 90vh; display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: scale(0.93) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}
.modal-overlay.open .modal-box { transform: scale(1) translateY(0); }

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 1.15rem; font-weight: 700; }
.modal-close {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--surface-2); border: 1px solid var(--border);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--text-2); transition: all var(--transition);
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); border-color: var(--danger); }

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* =========================================
   FORMS
   ========================================= */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
}
.form-grid .full { grid-column: 1 / -1; }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { 
    font-size: 0.83rem; font-weight: 600; color: var(--text-2);
    display: flex; align-items: center; gap: 6px;
}
.form-field input,
.form-field select,
.form-field textarea {
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-family: inherit; font-size: 0.875rem; color: var(--text);
    background: var(--surface); outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-field input:hover:not(:focus),
.form-field select:hover:not(:focus) { border-color: #cbd5e1; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { 
    border-color: var(--secondary); 
    box-shadow: 0 0 0 3px rgba(0, 93, 164, 0.1);
    background: #fafcff;
}
.form-field textarea { resize: vertical; min-height: 80px; }
.form-field input[type="date"] { cursor: pointer; }

/* Searchable select wrap */
.search-select-wrap {
    display: flex; flex-direction: column; gap: 6px;
}
.search-select-wrap > input {
    padding: 8px 12px; border: 1.5px solid var(--border);
    border-radius: 8px; font-family: inherit; font-size: 0.85rem; color: var(--text);
    background: var(--surface-2); outline: none;
    transition: border-color var(--transition);
}
.search-select-wrap > input:focus { border-color: var(--secondary); }
.search-select-wrap > select { 
    border-radius: 9px; padding: 10px 14px;
    font-family: inherit; font-size: 0.875rem; color: var(--text);
    border: 1.5px solid var(--border); background: var(--surface);
    outline: none; cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.search-select-wrap > select:focus { 
    border-color: var(--secondary); 
    box-shadow: 0 0 0 3px rgba(0, 93, 164, 0.1);
}

.form-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    margin-top: 1.5rem; padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

/* =========================================
   TOAST
   ========================================= */
.toast-container {
    position: fixed; bottom: 2rem; right: 2rem;
    z-index: 999; display: flex; flex-direction: column; gap: 10px;
}
.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    padding: 14px 18px; border-radius: 12px;
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    display: flex; align-items: center; gap: 10px;
    min-width: 280px; max-width: 380px;
    animation: slideInToast 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast i { font-size: 1rem; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast-msg { flex: 1; color: var(--text); }

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

/* =========================================
   EMPTY STATE
   ========================================= */
.empty-state {
    text-align: center; padding: 4rem 2rem;
    color: var(--text-3);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-2); margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.875rem; }

/* =========================================
   QUICK ACTIONS
   ========================================= */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.quick-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center; cursor: pointer;
    transition: all var(--transition);
    display: flex; flex-direction: column;
    align-items: center; gap: 0.75rem;
}
.quick-btn:hover { border-color: var(--primary); background: var(--primary-light); transform: translateY(-2px); }
.quick-btn i { font-size: 1.5rem; color: var(--primary); }
.quick-btn span { font-size: 0.85rem; font-weight: 600; color: var(--text-2); }

/* =========================================
   LOADING SKELETON
   ========================================= */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    border-radius: 6px;
}
@keyframes skeleton {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

/* =========================================
   UTILITY CLASSES
   ========================================= */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.w-full { width: 100%; }

/* ACTION BUTTONS IN TABLE */
.action-btns { display: flex; gap: 6px; }
.action-btn {
    width: 32px; height: 32px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--surface);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; color: var(--text-2);
    transition: all var(--transition);
}
.action-btn:hover { border-color: var(--primary); color: var(--primary); }
.action-btn.del:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-light); }

/* Avatar in table */
.student-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; color: white;
    flex-shrink: 0;
}

.student-info { display: flex; align-items: center; gap: 10px; }
.student-info-text .name { font-weight: 600; font-size: 0.9rem; }
.student-info-text .email { font-size: 0.78rem; color: var(--text-3); }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .sidebar { 
        position: fixed; 
        left: 0; top: 0; bottom: 0;
        transform: translateX(-100%); 
        box-shadow: 20px 0 50px rgba(0,0,0,0.2);
    }
    .sidebar.open { transform: translateX(0); }
    .content-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .search-wrap { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    
    .main-container { width: 100%; margin-left: 0; }
    .topbar { padding: 0 1rem; }
    .content { padding: 1.25rem 1rem; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .modal-box { border-radius: 0; max-height: 100vh; }
    .modal-header, .modal-body { padding: 1.25rem 1rem; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions button { width: 100%; }
    
    .data-table th, .data-table td { padding: 8px 12px; font-size: 0.85rem; }
    .stat-card { padding: 1.25rem; }
}
