/* ==========================================================================
   EduPrime International Academy - Premium Modern UI Framework
   Vibrant, Glassmorphic & Ultra-Secure UI Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=Fredoka:wght@600;700&display=swap');

:root {
    --primary: #e11d48;
    --primary-hover: #be123c;
    --primary-light: #fff1f2;
    --secondary: #0f172a;
    --accent: #fbbf24;
    --accent-hover: #d97706;
    --sky: #0284c7;
    --sky-light: #f0f9ff;
    --mint: #10b981;
    --mint-light: #ecfdf5;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0284c7;

    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-surface: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-heading: 'Fredoka', cursive;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-surface: #1e293b;
    --border-color: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --primary-light: #2c1a24;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--bg-card);
    border-right: 2px solid var(--border-color);
    padding: 1.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.logo-badge {
    background: var(--primary);
    color: white;
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 2rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.menu-item:hover, .menu-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.dashboard-main {
    flex: 1;
    padding: 2.25rem;
    overflow-y: auto;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--border-color);
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border-color);
}

.avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.stat-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Custom Table */
.table-responsive {
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.custom-table th {
    background: var(--bg-main);
    padding: 1rem 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.custom-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.badge-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 800;
}

.badge-success { background: #d1fae5; color: #047857; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-info { background: #e0f2fe; color: #0369a1; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--accent); color: var(--secondary); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-sky { background: var(--sky); color: white; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }

/* Form Controls */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    border-left: 5px solid var(--primary);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease forwards;
}

.toast-success { border-left-color: var(--mint); }
.toast-danger { border-left-color: var(--danger); }

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

.theme-toggle-btn {
    background: var(--bg-main);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1.5px solid var(--border-color);
}
