/* ============================================
   Admin Panel CSS - Kelas 6B
   MI Miftahul Ulum Pulosari Lumajang
   Developer: Madzz
   ============================================ */

/* --- Variables --- */
:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #5041c9;
    --secondary: #00cec9;
    --accent: #fd79a8;
    --gradient-1: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #00cec9 100%);
    --gradient-2: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dark-bg: #0a0a1a;
    --dark-surface: #12122a;
    --dark-card: #1a1a3e;
    --dark-card-hover: #222255;
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.45);
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Poppins', sans-serif;
    --sidebar-width: 260px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* --- Particles --- */
#particles-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   LOGIN SCREEN
   ============================================ */
.login-screen {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-bg);
    padding: 20px;
}

.login-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px 36px 36px;
    position: relative;
    z-index: 1;
    animation: loginAppear 0.8s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

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

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
    position: relative;
}

.login-logo::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px dashed var(--primary-light);
    animation: spinSlow 15s linear infinite;
}

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

.login-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 6px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.login-form label i {
    margin-right: 6px;
    color: var(--primary-light);
}

.login-form input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.login-form input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.login-form input::placeholder {
    color: var(--text-muted);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 8px;
}

.password-toggle:hover {
    color: var(--primary-light);
    background: rgba(255, 255, 255, 0.05);
}

.login-error {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: var(--border-radius-sm);
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-bottom: 20px;
    animation: shake 0.4s ease;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(-4px); }
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: var(--gradient-1);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

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

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
}

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

.login-btn.loading span { display: none; }
.login-btn.loading i { animation: spin 1s linear infinite; }
.login-btn.loading::after {
    content: 'Memverifikasi...';
    font-weight: 500;
}

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

.login-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.login-footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.login-footer strong {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   ADMIN DASHBOARD LAYOUT
   ============================================ */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--dark-surface);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
}

.sidebar-logo i {
    font-size: 1.4rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-close {
    display: none;
    width: 32px; height: 32px;
    border: none;
    background: var(--glass-bg);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.sidebar-close:hover {
    background: rgba(255, 68, 68, 0.2);
    color: #ff6b6b;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.sidebar-link.active {
    color: white;
    background: var(--gradient-1);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.logout-link:hover {
    background: rgba(255, 68, 68, 0.1) !important;
    color: #ff6b6b !important;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

/* --- Top Bar --- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 28px;
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.topbar-toggle {
    display: none;
    width: 40px; height: 40px;
    border: none;
    background: var(--glass-bg);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.topbar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.topbar-title {
    flex: 1;
}

.topbar-title h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
}

.topbar-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
}

.topbar-username {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* --- Page Content --- */
.page-content {
    padding: 28px;
}

/* --- Welcome Banner --- */
.welcome-banner {
    background: var(--gradient-1);
    border-radius: var(--border-radius);
    padding: 32px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 300px; height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -40%; left: -10%;
    width: 200px; height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

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

.welcome-text h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.welcome-text .gradient-text {
    background: linear-gradient(135deg, #ffd700, #ffed4a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-text p {
    font-size: 0.9rem;
    opacity: 0.85;
}

.welcome-icon {
    font-size: 3rem;
    opacity: 0.3;
    position: relative;
    z-index: 1;
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--dark-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-card-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}

.stat-card-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Quick Actions --- */
.quick-actions h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.quick-actions h3 i {
    color: #ffd700;
    margin-right: 8px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: var(--dark-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.action-card:hover {
    color: var(--text-primary);
    background: var(--dark-card-hover);
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

.action-card i {
    font-size: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Form Cards --- */
.form-card {
    background: var(--dark-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    max-width: 800px;
}

.form-card-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

.form-card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.form-card-header h3 i {
    margin-right: 10px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge {
    padding: 4px 12px;
    background: var(--gradient-1);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.form-card-body {
    padding: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.15);
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
}

.form-info i {
    color: var(--primary-light);
    margin-top: 2px;
    flex-shrink: 0;
}

.form-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.save-btn {
    padding: 14px 28px;
    background: var(--gradient-1);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
}

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

/* --- Students Edit List --- */
.students-edit-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.student-edit-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.student-edit-row:hover {
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.05);
}

.student-edit-number {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.student-edit-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.student-edit-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.15);
}

.student-delete-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 68, 68, 0.1);
    color: #ff6b6b;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.student-delete-btn:hover {
    background: #ff6b6b;
    color: white;
}

.student-edit-gender {
    padding: 0;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.gender-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    padding-right: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,255,255,0.5)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.gender-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.15);
}

.gender-select.is-l {
    background-color: rgba(108, 92, 231, 0.15);
    border-color: rgba(108, 92, 231, 0.3);
    color: var(--primary-light);
}

.gender-select.is-p {
    background-color: rgba(253, 121, 168, 0.15);
    border-color: rgba(253, 121, 168, 0.3);
    color: #fd79a8;
}

.gender-select option {
    background: #1a1a3e;
    color: white;
}

/* --- Upload Area --- */
.upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: var(--border-radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 24px;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-light);
    background: rgba(108, 92, 231, 0.05);
}

.upload-area i {
    font-size: 2.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.upload-area p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.upload-area span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Gallery Admin Grid --- */
.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-admin-item {
    position: relative;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    aspect-ratio: 4/3;
    background: var(--dark-surface);
}

.gallery-admin-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-admin-item .photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: var(--transition);
}

.gallery-admin-item:hover .photo-overlay {
    opacity: 1;
}

.photo-caption-input {
    width: 80%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-family: var(--font);
    font-size: 0.8rem;
    text-align: center;
    outline: none;
}

.photo-caption-input:focus {
    border-color: var(--primary-light);
}

.photo-delete-btn {
    padding: 6px 16px;
    background: rgba(255, 68, 68, 0.8);
    border: none;
    border-radius: 6px;
    color: white;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.photo-delete-btn:hover {
    background: rgba(255, 68, 68, 1);
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.gallery-empty i {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.3;
}

.gallery-empty p {
    font-size: 0.9rem;
}

/* --- Floating Back Button --- */
.floating-back-btn {
    position: fixed;
    bottom: 28px;
    left: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--gradient-1);
    border-radius: 50px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 200;
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
    transition: var(--transition);
    text-decoration: none;
}

.floating-back-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(108, 92, 231, 0.5);
}

.floating-back-btn i {
    font-size: 0.85rem;
}

/* ============================================
   TOAST
   ============================================ */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: toastIn 0.4s ease;
    min-width: 280px;
}

.toast.success {
    background: linear-gradient(135deg, #00b894, #55efc4);
}

.toast.error {
    background: linear-gradient(135deg, #d63031, #ff7675);
}

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: flex;
    }

    .main-content {
        margin-left: 0;
    }

    .topbar-toggle {
        display: flex;
    }

    .page-content {
        padding: 20px 16px;
    }

    .welcome-banner {
        padding: 24px;
    }

    .welcome-text h2 {
        font-size: 1.2rem;
    }

    .welcome-icon {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .actions-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .form-card-body {
        padding: 20px;
    }

    .student-edit-row {
        flex-wrap: wrap;
    }

    .student-edit-input {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 36px 24px 28px;
    }

    .topbar {
        padding: 12px 16px;
    }

    .topbar-username {
        display: none;
    }
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}
