/* ============================================
   EduAdmin Pro - Colorful Theme v2.0
   ============================================ */

:root {
    /* 🎨 PRIMARY COLORS - Vibrant Gradients */
    --primary: #667eea;
    --primary-light: #764ba2;
    --primary-dark: #5a67d8;
    --primary-bg: #EEF2FF;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* 🌟 SECONDARY - Fresh Mint */
    --secondary: #11998e;
    --secondary-light: #38ef7d;
    --secondary-bg: #E6FFFA;
    --secondary-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    
    /* 🔥 ACCENT - Warm Sunset */
    --accent: #fa709a;
    --accent-light: #fee140;
    --accent-bg: #FFF0F5;
    --accent-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    /* 🎯 STATUS COLORS */
    --success: #10B981;
    --success-bg: #D1FAE5;
    --success-gradient: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    
    --danger: #EF4444;
    --danger-bg: #FEE2E2;
    --danger-gradient: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
    
    --warning: #F59E0B;
    --warning-bg: #FEF3C7;
    --warning-gradient: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
    
    --info: #3B82F6;
    --info-bg: #DBEAFE;
    --info-gradient: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
    
    /* 🎨 PRINSIP COLORS - Distinct & Vibrant */
    --berkesadaran: #8B5CF6;
    --berkesadaran-gradient: linear-gradient(135deg, #8B5CF6 0%, #C084FC 100%);
    --bermakna: #06B6D4;
    --bermakna-gradient: linear-gradient(135deg, #06B6D4 0%, #67E8F9 100%);
    --bergembira: #F97316;
    --bergembira-gradient: linear-gradient(135deg, #F97316 0%, #FBBF24 100%);
    
    /* 📐 TEXT COLORS */
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --text-white: #FFFFFF;
    
    /* 🖼️ BACKGROUND */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --bg-page: linear-gradient(135deg, #f5f7fa 0%, #e8ecf3 100%);
    
    /* 🎭 BORDERS & SHADOWS */
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.4);
    
    /* 📏 SIZING */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* 📝 FONT */
    --font-xs: 11px;
    --font-sm: 13px;
    --font-md: 14px;
    --font-lg: 16px;
    --font-xl: 20px;
    --font-2xl: 24px;
    --font-3xl: 32px;
    
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --bottom-nav-height: 70px;
}

/* ============================================
   🌑 DARK MODE - Vibrant Dark Theme
   ============================================ */
[data-theme="dark"] {
    --bg-primary: #1E293B;
    --bg-secondary: #0F172A;
    --bg-tertiary: #334155;
    --bg-page: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-light: #94A3B8;
    --border: #334155;
    --border-light: #475569;
    --primary-bg: #1E1B4B;
    --secondary-bg: #064E3B;
    --accent-bg: #4C0519;
}

/* ============================================
   🎨 GLOBAL STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background: var(--bg-page);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hidden { display: none !important; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-tertiary); }
::-webkit-scrollbar-thumb { 
    background: var(--primary-gradient); 
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { 
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* ============================================
   🌟 SPLASH SCREEN - Animated Gradient
   ============================================ */
.splash-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.splash-content {
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

.splash-logo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 64px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
    animation: floatLogo 3s ease-in-out infinite;
}

@keyframes floatLogo {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-15px) rotate(3deg); }
}

.splash-content h1 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.splash-content p {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 32px;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   📐 LAYOUT
   ============================================ */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   📍 SIDEBAR - Glassmorphism Style
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-light);
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header strong,
.sidebar-header .logo-text {
    color: white !important;
    font-weight: 700;
    font-size: 18px;
}

.logo-small {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-small .material-icons-round {
    font-size: 28px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px;
    border-radius: 8px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav .nav-item {
    margin-bottom: 4px;
}

.sidebar-nav .nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.sidebar-nav .nav-item a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
    z-index: -1;
}

.sidebar-nav .nav-item a:hover {
    color: var(--primary);
    background: var(--primary-bg);
    transform: translateX(4px);
}

.sidebar-nav .nav-item.active a {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.sidebar-nav .nav-item.active a::before {
    width: 100%;
}

.sidebar-nav .material-icons-round {
    font-size: 20px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(250, 112, 154, 0.3);
}

.user-avatar .material-icons-round {
    color: white;
    font-size: 22px;
}

.user-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.user-role {
    color: var(--text-light);
    font-size: 11px;
}

/* ============================================
   📍 MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-page);
}

.topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.topbar h2 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-menu, 
.btn-toggle-sidebar, 
.btn-notification, 
.btn-logout {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-menu:hover, 
.btn-toggle-sidebar:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.btn-notification {
    position: relative;
    background: var(--primary-bg);
}

.btn-notification:hover {
    background: var(--primary);
    color: white;
}

.btn-notification::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 2px white;
}

.page-content {
    padding: 32px;
    padding-bottom: 100px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================
   📱 BOTTOM NAV (Mobile)
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    display: flex;
    z-index: 90;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.bottom-nav-item .material-icons-round {
    font-size: 22px;
    transition: all 0.3s;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 0 0 4px 4px;
}

.bottom-nav-item.active .material-icons-round {
    transform: scale(1.2);
    color: var(--primary);
}

/* ============================================
   📦 PAGE HEADER
   ============================================ */
.page-header {
    background: white;
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0.05;
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.page-header h2 {
    font-size: 24px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 13px;
}

.page-header-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================
   🎨 UTILITIES
   ============================================ */
.text-muted { color: var(--text-secondary); }
.text-light { color: var(--text-light); }
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-welcome h2 {
    font-size: 26px;
    margin-bottom: 6px;
    font-weight: 700;
}

.required {
    color: var(--danger);
}
