/* 
   ========================================
   EDUSMART ADVANCED DESIGN SYSTEM
   Premium ERP Aesthetics
   ========================================
*/

/* --- GOOGLE FONTS IMPORT --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- DESIGN TOKENS --- */
:root {
    /* Primary Colors */
    --brand-primary: #6366f1;
    --brand-primary-light: #818cf8;
    --brand-primary-dark: #4f46e5;
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Neutral Palette */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    
    /* Backgrounds */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    
    /* Text Colors */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-main: #e2e8f0;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 25px 50px -12px rgba(99, 102, 241, 0.15);
    
    /* Transitions */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- DARK MODE TOKENS --- */
.dark {
    --bg-main: #020617;
    --bg-card: #0f172a;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-main: #1e293b;
    --slate-50: #0f172a;
    --slate-100: #1e293b;
    --slate-200: #334155;
    --glass-bg: rgba(15, 23, 42, 0.8);
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'tnum';
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 10px;
    border: 2px solid transparent;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--slate-400);
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shine {
    0% { transform: translateX(-100%) skewX(-15deg); }
    50% { transform: translateX(100%) skewX(-15deg); }
    100% { transform: translateX(100%) skewX(-15deg); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 0 20px 5px rgba(99, 102, 241, 0.2); }
}

/* Animation Utility Classes */
.animate-fade-up { animation: fadeInUp 0.5s ease-out forwards; }
.animate-scale { animation: fadeInScale 0.4s ease-out forwards; }
.animate-slide-left { animation: slideInLeft 0.5s ease-out forwards; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* --- GLASSMORPHISM --- */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- COMPONENT ENHANCEMENTS --- */

/* Premium Cards */
.card-premium {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    overflow: hidden;
}

.card-premium:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-premium);
    border-color: var(--brand-primary-light);
}

/* Interactive Buttons */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.875rem;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-premium.primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
    color: white;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
    position: relative;
    overflow: hidden;
}

.btn-premium.primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%) skewX(-15deg);
    transition: none;
}

.btn-premium.primary:hover::after {
    animation: shine 1.5s infinite;
}

.btn-premium.primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    filter: brightness(1.1);
}

.btn-pulse {
    animation: pulse-glow 2s infinite;
}

.btn-premium.secondary {
    background: white;
    color: var(--slate-700);
    border: 1.5px solid var(--border-main);
}

.btn-premium.secondary:hover {
    background: var(--slate-50);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-1px);
}

.btn-social {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border: 1.5px solid var(--border-main);
    background: white;
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-social:hover {
    background: var(--slate-50);
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-social img {
    width: 18px;
    height: 18px;
}

.btn-premium:active {
    transform: scale(0.98);
}

/* Form Styles */
.input-premium {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border-radius: 1rem;
    border: 1.5px solid var(--border-main);
    background: var(--slate-50);
    transition: var(--transition-fast);
    font-size: 0.875rem;
    color: var(--text-main);
    outline: none;
}

.input-premium:focus {
    background: var(--bg-card);
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Sidebar Links */
.nav-link-premium {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-radius: 1rem;
    color: var(--slate-400);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: var(--transition-normal);
}

.nav-link-premium:hover, .nav-link-premium.active {
    background: rgba(99, 102, 241, 0.1);
    color: white;
}

.nav-link-premium i {
    font-size: 1.125rem;
    transition: var(--transition-normal);
}

.nav-link-premium:hover i {
    transform: translateX(3px);
    color: var(--brand-primary-light);
}

/* --- DATA TABLES --- */
.table-premium {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-premium th {
    background: var(--slate-50);
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-500);
    border-bottom: 2px solid var(--slate-100);
}

.table-premium td {
    padding: 1.25rem 1.5rem;
    font-size: 0.875rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--slate-100);
    transition: var(--transition-fast);
}

.table-premium tr:hover td {
    background: var(--slate-50);
}

/* Badge Styles */
.badge-premium {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* --- PRINT OPTIMIZATION --- */
@media print {
    .no-print { display: none !important; }
    body { background: white !important; }
    .card-premium { border: 1px solid #ddd !important; box-shadow: none !important; }
}