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

/* Color Variables */
:root {
    --color-midnight: #090B18;
    --color-deep-navy: #10152B;
    --color-indigo: #5B5BF7;
    --color-violet: #7C3AED;
    --color-cyan: #22D3EE;
    --color-soft-cyan: #67E8F9;
    --color-emerald: #10B981;
    --color-lime: #A3E635;
    --color-warm-white: #FAFAF8;
    --color-surface: #FFFFFF;
    --color-soft-surface: #F5F7FB;
    --color-text: #111827;
    --color-muted-text: #64748B;
    --color-border: #E5E7EB;
}

/* General resets */
body {
    font-family: 'Inter', sans-serif;
    color: var(--color-text);
    background-color: var(--color-warm-white);
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6, .font-display {
    font-family: 'Manrope', sans-serif;
}

/* 1. BUTTONS Redesign */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8125rem; /* ~13px */
    letter-spacing: -0.01em;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Primary buttons with indigo-violet gradient */
.btn-premium-accent {
    background: linear-gradient(135deg, var(--color-indigo) 0%, var(--color-violet) 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px 0 rgba(91, 91, 247, 0.25);
    background-size: 200% 100%;
}
.btn-premium-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(91, 91, 247, 0.35);
    background-position: right center;
}
.btn-premium-accent:active {
    transform: translateY(0);
}

/* Secondary neutral buttons */
.btn-premium-secondary {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.btn-premium-secondary:hover {
    background-color: var(--color-soft-surface);
    border-color: #d1d5db;
    transform: translateY(-1px);
}

/* 2. CARDS Redesign */
.card-premium {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(9, 11, 24, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px -4px rgba(9, 11, 24, 0.08);
    border-color: rgba(91, 91, 247, 0.2);
}

/* Dark mode bento cards */
.card-premium-dark {
    background-color: var(--color-deep-navy);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
}
.card-premium-dark:hover {
    border-color: rgba(34, 211, 238, 0.2);
    box-shadow: 0 12px 30px -4px rgba(9, 11, 24, 0.6);
}

/* 3. PREMIUM BADGES */
.badge-premium {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
}
.badge-premium-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.badge-premium-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.badge-premium-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.badge-premium-info {
    background-color: rgba(34, 211, 238, 0.1);
    color: var(--color-cyan);
    border: 1px solid rgba(34, 211, 238, 0.2);
}

/* 4. FORM INPUTS */
.input-premium {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    transition: all 0.2s ease-in-out;
}
.input-premium:focus {
    outline: none;
    border-color: var(--color-indigo);
    box-shadow: 0 0 0 4px rgba(91, 91, 247, 0.1);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.float {
    animation: float 4s ease-in-out infinite;
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.float-slow {
    animation: floatSlow 6s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.25; transform: scale(1.05); }
}
.glow-pulse {
    animation: glowPulse 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.gradient-shift {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* Scroll reveal initial states */
.reveal-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right {
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.scale-in {
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.active,
.reveal-left.active,
.reveal-right.active,
.scale-in.active {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Responsive bento grids */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

/* CSS Variables for Premium EdTech SaaS Dark Mode */
.dark {
    --bg-primary: #0F172A;
    --bg-secondary: #111827;
    --bg-tertiary: #172033;
    --bg-card: #1E293B;
    --bg-elevated: #243247;
    --border-color: #334155;
    
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    
    --accent-primary: #2563EB;
    --accent-secondary: #3B82F6;
    --accent-soft: #60A5FA;
    --accent-edu: #14B8A6;
    
    --status-success: #10B981;
    --status-warning: #F59E0B;
    --status-danger: #EF4444;
}

/* Global Dark Theme Aesthetic Overrides */
.dark body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px) !important;
    background-size: 40px 40px !important;
}

/* Standardized Premium Dark Card */
.dark .premium-dark-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem; /* 16px */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.dark .premium-dark-card:hover {
    background-color: var(--bg-elevated);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Light Mode Global Portal Overrides (Active when dark class is toggled off) */
html:not(.dark) body {
    background-color: #F8FAFC !important;
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px) !important;
    background-size: 40px 40px !important;
    color: #0F172A !important;
}

html:not(.dark) header {
    background-color: rgba(255, 255, 255, 0.96) !important;
    border-color: #E2E8F0 !important;
    color: #0F172A !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
}

html:not(.dark) aside {
    background: #FFFFFF !important;
    border-color: #E2E8F0 !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.03) !important;
}

html:not(.dark) aside a {
    color: #334155 !important;
}

html:not(.dark) aside a:hover {
    background-color: #F1F5F9 !important;
    color: #4F46E5 !important;
}

/* Specific light background overrides for dashboard wrappers */
html:not(.dark) aside .bg-\[\#0B1120\],
html:not(.dark) aside .bg-slate-900 {
    background-color: #F8FAFC !important;
    border-color: #E2E8F0 !important;
}

html:not(.dark) aside .text-slate-400,
html:not(.dark) aside .text-slate-500,
html:not(.dark) aside .text-gray-400 {
    color: #374151 !important;
}

/* ── Table cell text ── */
html:not(.dark) td { color: #1E293B !important; }
html:not(.dark) th { color: #374151 !important; }

/* ── Form elements ── */
html:not(.dark) label { color: #1E293B !important; }
html:not(.dark) input,
html:not(.dark) textarea,
html:not(.dark) select {
    color: #0F172A !important;
    background-color: #FFFFFF !important;
    border-color: #D1D5DB !important;
}
html:not(.dark) input::placeholder,
html:not(.dark) textarea::placeholder {
    color: #94A3B8 !important;
}

/* ── Dark container protection: preserve white & gradient text inside dark sections ── */
.dark-container,
.dark-container *,
.banner-dark-container,
.banner-dark-container * {
    -webkit-font-smoothing: antialiased;
}

/* ── Flash toast fade-in animation ── */
@keyframes fade-in-down {
    from { opacity: 0; transform: translate(-50%, -12px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}
.animate-fade-in-down {
    animation: fade-in-down 0.4s ease-out forwards;
}

