/* Keep existing variables and basic reset */
:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --bg-color: #ffffff;
    --text-color: #333333;
    --text-muted: #666666;
    --border-color: #dfe6e9;
    --header-bg: #f8f9fa;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    font-size: 14px;
}

/* Auth / Centered Layout */
.auth-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f8f9fa;
}

/* Card Component */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.auth-card {
    width: 100%;
    max-width: 400px;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
    line-height: 1;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-block {
    width: 100%;
}

/* Admin Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Admin Form Container */
.form-container {
    max-width: 600px;
    /* Limit width for readability */
    margin: 0 auto;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    background: #e2e8f0;
    color: var(--primary-color);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* 
   HEADER RESTRUCTURED - ATOM LEFT, LOGOS RIGHT
   Grid: Atom (fixed width) | Title (flexible) | Logos (auto)
*/
.main-header {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 3rem;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
    gap: 2rem;
}

.header-left {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 160px;
    height: 160px;
}

.header-center {
    text-align: center;
    z-index: 5;
}

.header-center h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.header-center p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
    /* Space between logos */
}

.header-logo {
    height: 85px;
    width: auto;
    transition: transform 0.2s;
}

.header-logo:hover {
    transform: scale(1.05);
}


/* 
   PASTEL 3D ATOM ANIMATION (Retained)
*/
.atom-container {
    position: relative;
    width: 140px;
    height: 140px;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Orbits - Pastel Colors - True 3D Rotation */
.atom-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    transform-style: preserve-3d;
    margin-top: -50%;
    margin-left: -50%;
}

.o1 {
    border-color: #ffb3ba;
    animation: orbit-1 5s linear infinite;
}

.o2 {
    border-color: #bae1ff;
    animation: orbit-2 6s linear infinite;
}

.o3 {
    border-color: #baffc9;
    animation: orbit-3 7s linear infinite;
}

.o4 {
    border-color: #e0c3fc;
    animation: orbit-4 5.5s linear infinite;
}

/* Electrons */
.atom-orbit::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
}

.o1::before {
    background: #ffb3ba;
    box-shadow: 0 0 10px #ffb3ba;
}

.o2::before {
    background: #bae1ff;
    box-shadow: 0 0 10px #bae1ff;
}

.o3::before {
    background: #baffc9;
    box-shadow: 0 0 10px #baffc9;
}

.o4::before {
    background: #e0c3fc;
    box-shadow: 0 0 10px #e0c3fc;
}

/* 3D Orbit Keyframes */
@keyframes orbit-1 {
    0% {
        transform: rotate3d(1, 1, 1, 0deg) rotateZ(0deg);
    }

    100% {
        transform: rotate3d(1, 1, 1, 360deg) rotateZ(360deg);
    }
}

@keyframes orbit-2 {
    0% {
        transform: rotate3d(1, -1, 0, 0deg) rotateZ(0deg);
    }

    100% {
        transform: rotate3d(1, -1, 0, 360deg) rotateZ(360deg);
    }
}

@keyframes orbit-3 {
    0% {
        transform: rotate3d(0, 1, 0, 0deg) rotateX(60deg) rotateZ(0deg);
    }

    100% {
        transform: rotate3d(0, 1, 0, 360deg) rotateX(60deg) rotateZ(360deg);
    }
}

@keyframes orbit-4 {
    0% {
        transform: rotate3d(1, 0, 1, 0deg) rotateY(45deg) rotateZ(0deg);
    }

    100% {
        transform: rotate3d(1, 0, 1, 360deg) rotateY(45deg) rotateZ(360deg);
    }
}


/* Nucleus - Spinning Cluster */
.atom-nucleus {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%);
    animation: nucleus-spin 10s linear infinite;
}

.nucleus-part {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #ffdfd3);
    box-shadow: 0 0 8px rgba(255, 223, 211, 0.8);
}

.n1 {
    top: 2px;
    left: 10px;
    transform: translateZ(8px);
    background: #ffb3ba;
}

.n2 {
    bottom: 2px;
    left: 2px;
    transform: translateZ(-8px);
    background: #bae1ff;
}

.n3 {
    bottom: 2px;
    right: 2px;
    transform: translateZ(0);
    background: #baffc9;
}

.n4 {
    top: 10px;
    left: 5px;
    transform: translateZ(4px);
    background: #ffffba;
}

@keyframes nucleus-spin {
    0% {
        transform: translate(-50%, -50%) rotateY(0deg) rotateX(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateY(360deg) rotateX(360deg);
    }
}

@media (max-width: 900px) {
    .main-header {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        justify-items: center;
        gap: 1.5rem;
    }

    .header-right {
        justify-content: center;
        width: 100%;
    }
}

.table-responsive {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.lesson-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.lesson-table th,
.lesson-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.lesson-table th {
    background: var(--header-bg);
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.lesson-table tr:hover {
    background: #fafbfc;
}

/* Badges */
.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-teorica {
    background: #e6f7ff;
    color: #096dd9;
}

.badge-pratica {
    background: #f6ffed;
    color: #389e0d;
}

.badge-prova {
    background: #fff1f0;
    color: #cf1322;
}

.badge-feriado {
    background: #fff7e6;
    color: #d46b08;
}

.badge-janela {
    background: #f5f5f5;
    color: #595959;
}

/* Typography */
h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}