:root {
    /* Sovereign Palette */
    --sovereign-black: #020408;
    --sovereign-dark: #05060A;
    --sovereign-cyan: #06B6D4;
    --sovereign-indigo: #6366F1;
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(5, 6, 10, 0.7);
    --accent-glow: rgba(6, 182, 212, 0.15);
    
    /* Typography */
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Layout Spacing */
    --sidebar-w: 280px;
    --context-w: 320px;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--sovereign-black);
    color: #cbd5e1;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Components */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
}

.glass-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow);
}

/* Layout Utilities */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

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

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Sidebar Specifics */
.student-card {
    padding: 1rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.student-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(6, 182, 212, 0.2);
}

.student-card.active {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
}

.token-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: -0.02em;
}

/* CKEditor Custom Overrides */
.ck-editor__editable {
    min-height: 297mm !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-family: 'Times New Roman', serif;
    color: #000 !important;
}

.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
    border-color: transparent !important;
}

.ck-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.ck-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Animations */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

.animate-shimmer {
    animation: shimmer 2s infinite linear;
}

/* Context Panel Specifics */
select option {
    background-color: #0f172a;
    color: #e2e8f0;
}

/* Responsive Overrides & Horizontal Monitor Optimization */
@media (min-width: 1921px) {
    #dashboard {
        justify-content: center;
        background: radial-gradient(circle at 50% 50%, #0a0d18 0%, #020408 100%);
    }
    #dashboard > aside, #dashboard > main {
        max-width: 2500px;
    }
}

@media (max-width: 1440px) {
    :root {
        --sidebar-w: 240px;
        --context-w: 280px;
    }
}

@media (max-width: 1024px) {
    #dashboard {
        flex-direction: column;
        overflow-y: auto;
    }
    aside {
        width: 100% !important;
        height: auto !important;
        border: none !important;
        border-bottom: 1px solid var(--glass-border) !important;
    }
    main {
        height: auto !important;
        min-height: 100vh;
    }
}

/* Editor Scale for Studio Flow */
#editor-container {
    transition: transform 0.3s ease;
}

#tabAtividades.zoomed-out #editor-container {
    transform: scale(0.8);
    transform-origin: top center;
}
