/* ==========================================================================
   VARIÁVEIS E TOKENS (INSPIRADOS NO LOGIN.HTML)
   ========================================================================== */
@font-face {
    font-family: 'AmpleAlt';
    src: url('_next/static/media/58bd8a34998dea4c-s.p.woff') format('woff2');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'AmpleAlt';
    src: url('_next/static/media/19752a5264a5bb90-s.p.woff') format('woff2');
    font-weight: 700;
    font-style: normal;
}

:root {
    --color-brand: #8c52ff;
    --color-brand-hover: #7540e8;
    --color-bg-page: #fcfcfd; /* Fundo limpo, levemente off-white */
    --color-bg-alt: #f3f4f6;
    --color-surface: #ffffff;
    
    --color-text-main: #070D26; 
    --color-text-muted: #6E707A; 
    --color-border: #e5e7eb;
    
    --font-main: 'AmpleAlt', 'Inter', sans-serif;
    
    --radius-lg: 24px;
    --radius-md: 16px;
    
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 8px 24px rgba(140, 82, 255, 0.35);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-main);
    color: var(--color-text-main);
    background-color: var(--color-bg-page);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button { border: none; background: none; font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* Tipografia */
.text-main { color: var(--color-text-main); }
.text-muted { color: var(--color-text-muted); }
.text-brand { color: var(--color-brand); }

/* Layout Geral */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section-padding { padding: 5rem 0; }
.bg-alt { background-color: var(--color-bg-alt); }

/* ==========================================================================
   TELA DE CARREGAMENTO (LOADER)
   ========================================================================== */
.loader-screen {
    position: fixed;
    inset: 0;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    padding: 2rem;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(140, 82, 255, 0.2);
    border-top-color: var(--color-brand);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 2rem;
    transition: opacity 0.5s ease;
}

.loader-text {
    font-size: 1.5rem;
    color: var(--color-text-main);
    font-weight: 400;
    transition: opacity 0.4s ease;
}

.loader-logo {
    margin-top: 2rem;
    max-width: 180px;
    opacity: 0;
    transition: opacity 1s ease;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* ==========================================================================
   TUTORIAL OVERLAY (ONBOARDING GUIADO)
   ========================================================================== */
.tutorial-overlay {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9998;
    display: flex;
    opacity: 1;
    transition: var(--transition);
    pointer-events: none; /* Permite que o usuário clique fora do tutorial */
}

.tutorial-box {
    background: var(--color-surface);
    width: 100%;
    max-width: 380px;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--color-brand); /* Borda roxa para destacar o card */
    pointer-events: auto; /* Reativa o clique dentro do card */
    transform: translateY(0);
    animation: slideUpFloat 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.tut-header { margin-bottom: 1rem; }
.tut-step { font-size: 0.85rem; font-weight: 700; color: var(--color-brand); text-transform: uppercase; letter-spacing: 1px; }
.tut-title { font-size: 1.4rem; color: var(--color-text-main); margin-bottom: 0.5rem; }
.tut-text { color: var(--color-text-muted); margin-bottom: 2rem; font-size: 1rem; line-height: 1.6; }
.tut-actions { display: flex; justify-content: space-between; align-items: center; }

/* Efeito de destaque (Highlight) na seção que está sendo mostrada */
.section-highlight {
    background-color: rgba(140, 82, 255, 0.03) !important; /* Fundo levemente roxo */
    border-radius: var(--radius-lg);
    box-shadow: 0 0 0 2px var(--color-brand);
    position: relative;
    z-index: 10;
    transition: all 0.5s ease;
}

@keyframes slideUpFloat {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsivo para o tutorial flutuante */
@media (max-width: 768px) {
    .tutorial-overlay {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
    .tutorial-box {
        max-width: 100%;
    }
}

/* ==========================================================================
   CABEÇALHO
   ========================================================================== */
.header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-container { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.header-logo { height: 40px; }
.nav-list { display: flex; gap: 2rem; list-style: none; }
.nav-link { color: var(--color-text-muted); font-weight: 700; transition: var(--transition); }
.nav-link:hover { color: var(--color-brand); }

/* ==========================================================================
   BOTÕES E COMPONENTES (Inspirados no Login)
   ========================================================================== */
.btn-primary {
    background-color: var(--color-brand);
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-glow { box-shadow: var(--shadow-glow); }
.btn-glow:hover { background-color: var(--color-brand-hover); box-shadow: 0 12px 28px rgba(140, 82, 255, 0.45); transform: translateY(-2px); }
.btn-text { color: var(--color-text-muted); font-weight: 700; font-size: 0.95rem; transition: var(--transition); }
.btn-text:hover { color: var(--color-text-main); }

.bento-card {
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}
.bento-card:hover { border-color: var(--color-brand); box-shadow: var(--shadow-glow); transform: translateY(-4px); }

/* ==========================================================================
   SEÇÕES DA PÁGINA
   ========================================================================== */
.hero { text-align: center; padding: 6rem 0; }
.hero-project-logo { height: 60px; margin: 0 auto 2rem auto; display: block; }
.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; margin-bottom: 1.5rem; line-height: 1.1; }
.hero-subtitle { font-size: 1.15rem; max-width: 700px; margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-title { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }

/* Bento Library Grid */
.bento-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Os itens ganham visual de pastas limpas */
.bento-doc-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.doc-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.doc-icon {
    width: 48px; height: 48px;
    background: rgba(140, 82, 255, 0.1);
    color: var(--color-brand);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.doc-info h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.25rem; color: var(--color-text-main); }
.doc-info p { font-size: 0.95rem; color: var(--color-text-muted); }

.doc-files {
    display: flex; flex-direction: column; gap: 0.75rem;
    margin-top: auto; padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.file-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--color-bg-alt);
    border-radius: 12px;
    font-size: 0.9rem; font-weight: 700; color: var(--color-text-main);
    transition: var(--transition);
}
.file-link:hover { background: var(--color-brand); color: #fff; }

.contact-card { display: flex; align-items: center; justify-content: space-between; gap: 2rem; text-align: left; }

/* ==========================================================================
   RODAPÉ (Inspirado no mobile-footer do Login)
   ========================================================================== */
.modern-footer {
    padding: 3rem 0;
    background: var(--color-surface);
    display: flex;
    justify-content: center;
    align-items: center;
}
.footer-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 700;
}
.footer-logo { height: 24px; width: auto; }

/* Animações base */
.fade-in { opacity: 0; animation: fadeIn 1s ease forwards; }
@keyframes fadeIn { to { opacity: 1; } }

@media (max-width: 768px) {
    .nav-list { display: none; } /* Ocultar no mobile para máximo minimalismo ou adicionar menu hambúrguer futuramente */
    .contact-card { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   TELA DE ACESSO (CÓDIGO) E ADMIN
   ========================================================================== */
.access-screen {
    position: fixed; inset: 0; z-index: 10000;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s ease;
}

.access-box {
    background: var(--color-surface);
    width: 90%; max-width: 450px;
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow);
    text-align: center;
}

.access-logo { height: 45px; margin: 0 auto 2rem auto; }
.access-title { font-size: 1.8rem; font-weight: 700; color: var(--color-text-main); margin-bottom: 0.5rem; }
.access-desc { font-size: 1rem; margin-bottom: 2rem; }

.input-group { text-align: left; margin-bottom: 1.5rem; }
.input-group label { display: block; font-size: 0.9rem; font-weight: 700; color: var(--color-text-main); margin-bottom: 0.5rem; }
.input-group input {
    width: 100%; padding: 16px 20px;
    background: #fcfcfd; border: 1.5px solid var(--color-border);
    border-radius: 12px; font-size: 1.1rem; color: var(--color-text-main);
    transition: var(--transition);
}
.input-group input:focus { border-color: var(--color-brand); outline: none; box-shadow: 0 0 0 4px rgba(140, 82, 255, 0.1); }

.full-width { width: 100%; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 2rem; }
.access-error { color: #ff4757; font-size: 0.9rem; font-weight: 600; margin-top: 1rem; }

/* Logomarca do Município no Header */
.municipio-brand { display: flex; align-items: center; justify-content: center; padding-left: 1rem; border-left: 1px solid var(--color-border); }
.municipio-brand img { max-height: 40px; width: auto; object-fit: contain; }

/* Hero Box Description */
.hero-content-box { max-width: 800px; margin: 2rem auto 0 auto; text-align: left; padding: 2rem; }

/* Seção Retravi for School */
.docente-container { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.docente-subtitle { font-size: 1.2rem; font-weight: 400; color: var(--color-text-muted); }

/* Mockup visual de sistema minimalist */
.dashboard-mockup { background: #f8f9fa; border-radius: 12px; border: 1px solid var(--color-border); overflow: hidden; height: 250px; display: flex; flex-direction: column; }
.mockup-header { height: 40px; background: #fff; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; padding: 0 1rem; }
.mockup-body { padding: 1.5rem; display: flex; gap: 1rem; height: 100%; }
.mockup-chart { width: 40%; background: rgba(140, 82, 255, 0.1); border-radius: 8px; }
.mockup-lines { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.mockup-lines::before, .mockup-lines::after { content: ''; height: 20px; background: #e5e7eb; border-radius: 4px; width: 100%; }
.mockup-lines::after { width: 70%; }

@media (max-width: 768px) {
    .docente-container { grid-template-columns: 1fr; }
    .hero-title { font-size: 2.2rem; }
}

/* Ajustes no Card do Tutorial baseados na imagem e70182 */
.tutorial-box {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
.tut-title { font-weight: 400; }
.tut-step { color: var(--color-brand); font-weight: 400; font-size: 0.8rem; }