/* =============================================
   Aulas de Matemática 2026 — Estilos
   ============================================= */

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --success: #28a745;
    --danger: #dc3545;
    --purple: #6f42c1;
    --sidebar-width: 260px;
    --header-height: 60px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fb;
    margin: 0;
}

/* ---- LOGIN ---- */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, #0d47a1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.login-logo {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4px;
}

.login-title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.login-subtitle {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 28px;
}

/* ---- LAYOUT COM SIDEBAR ---- */
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: #1a1a2e;
    color: #c8cce8;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo .course-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.sidebar-logo .prof-name {
    font-size: 0.78rem;
    color: #8899aa;
}

.sidebar-user {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user .avatar {
    width: 36px; height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem; color: white;
    flex-shrink: 0;
}

.sidebar-user .user-info .name { font-size: 0.85rem; color: white; font-weight: 600; }
.sidebar-user .user-info .role { font-size: 0.72rem; color: #8899aa; }

.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-section-label {
    padding: 8px 20px 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #556677;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    color: #c8cce8;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
    position: relative;
}

.nav-item:hover { background: rgba(255,255,255,0.06); color: white; }
.nav-item.active { background: rgba(26,115,232,0.2); color: #60a5fa; }
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}

.nav-item .icon { width: 20px; text-align: center; font-size: 1rem; }

.nav-item .badge-concluido {
    margin-left: auto;
    background: var(--success);
    color: white;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 10px;
}

.nav-item .badge-locked {
    margin-left: auto;
    color: #556677;
    font-size: 0.8rem;
}

.sidebar-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* ---- CONTEÚDO PRINCIPAL ---- */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: white;
    height: var(--header-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e8ecf0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title { font-weight: 600; font-size: 1.05rem; color: #1a1a2e; }

.page-body { padding: 28px 28px; flex: 1; }

/* ---- CARDS ---- */
.module-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e8ecf0;
    padding: 20px;
    transition: box-shadow 0.2s, transform 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.module-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.1); transform: translateY(-2px); }

.module-card.locked {
    opacity: 0.6;
    pointer-events: none;
    background: #f8f9fa;
}

.module-card .icon { font-size: 2rem; margin-bottom: 10px; }
.module-card .trilha-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 8px;
}

.module-card h5 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; color: #1a1a2e; }
.module-card .horas { font-size: 0.8rem; color: #888; margin-bottom: 12px; }
.module-card .progress { height: 6px; margin-bottom: 12px; }
.module-card .btn-modulo { margin-top: auto; }

/* trilha cores */
.trilha-Fundamentos { background: #e8f5e9; color: #2e7d32; }
.trilha-EM-Completo { background: #e3f2fd; color: #1565c0; }
.trilha-Nivel-Superior { background: #fce4ec; color: #880e4f; }
.trilha-Bonus-ENEM { background: #f3e5f5; color: #4a148c; }
.trilha-purple { background: #f3e5f5; color: #4a148c; }

/* ---- CONTEÚDO DO MÓDULO ---- */
.modulo-header {
    background: linear-gradient(135deg, var(--primary) 0%, #0d47a1 100%);
    color: white;
    padding: 32px 28px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.modulo-header h1 { font-size: 1.6rem; margin-bottom: 8px; }
.modulo-header .meta { opacity: 0.85; font-size: 0.9rem; }

.topico-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e8ecf0;
    margin-bottom: 16px;
    overflow: hidden;
}

.topico-header {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafbfc;
    border-bottom: 1px solid #e8ecf0;
}

.topico-body { padding: 20px; }

/* ---- EXERCÍCIOS ---- */
.exercicio-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e8ecf0;
    padding: 20px;
    margin-bottom: 16px;
}

.exercicio-card .pergunta { font-weight: 600; margin-bottom: 14px; font-size: 1rem; }

.opcao-label {
    display: block;
    padding: 10px 16px;
    border: 2px solid #e8ecf0;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.opcao-label:hover { border-color: var(--primary); background: #f0f7ff; }
.opcao-label.correta { border-color: var(--success); background: #f0fff4; }
.opcao-label.errada { border-color: var(--danger); background: #fff5f5; }

.explicacao {
    display: none;
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.explicacao.show { display: block; }

/* ---- ADMIN ---- */
.stat-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e8ecf0;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card .stat-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: #1a1a2e; line-height: 1; }
.stat-card .stat-label { font-size: 0.8rem; color: #888; }

/* ---- RESPONSIVO ---- */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .page-body { padding: 16px; }
}
