/* ==========================================================================
   PLANGEO – VERSÃO 2.0 | IDENTIDADE VERDE GEFORTE & MOLDURA DE ESTÚDIO
   UECE/LABGEO & GEFORTE
   ========================================================================== */

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-deep: #064e3b;
    --primary-light: rgba(16, 185, 129, 0.15);
    --primary-border: rgba(16, 185, 129, 0.32);
    
    --accent: #34d399;
    --accent-dark: #059669;
    
    --neutral-bg: #021b14;
    --card-bg: #062d22;
    --card-bg-elevated: #093b2d;
    --input-bg: #031811;
    
    --text-main: #f0fdf4;
    --text-muted: #a7f3d0;
    --text-dim: #6ee7b7;
    
    --border-color: rgba(16, 185, 129, 0.22);
    --border-focus: #10b981;
    
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 6px 14px -2px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 28px -4px rgba(0, 0, 0, 0.6);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-pill: 9999px;
}

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

body {
    background-color: var(--neutral-bg);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 95px;
}

/* ==========================================================================
   BARRA SUPERIOR (ACESSIBILIDADE E INSTITUCIONAL)
   ========================================================================== */
.app-topbar {
    background: #01140e;
    color: #ffffff;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.25);
}

.topbar-container {
    max-width: 1220px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.topbar-brand {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #a7f3d0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-sigla {
    color: #ffffff;
    font-weight: 800;
}

.brand-divisao {
    opacity: 0.4;
    color: #10b981;
}

.topbar-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tools-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6ee7b7;
    margin-right: 4px;
}

.tool-btn {
    background: rgba(16, 185, 129, 0.12);
    color: #f0fdf4;
    border: 1px solid rgba(16, 185, 129, 0.28);
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-btn:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: #10b981;
}

.tool-btn-voice {
    background: #047857;
    border-color: #10b981;
    color: #ffffff;
}

.tool-btn-voice:hover {
    background: #065f46;
}

/* ==========================================================================
   CORPO PRINCIPAL (APP SHELL)
   ========================================================================== */
.app-shell {
    max-width: 1220px;
    margin: 30px auto;
    padding: 0 20px;
}

/* ==========================================================================
   HERO HEADER 16:9 PROPORCIONAL
   ========================================================================== */
.app-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(16, 185, 129, 0.5);
    padding: 40px;
    margin-bottom: 28px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 24px;
    background: #021b14;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 480px;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #021b14;
    z-index: 1;
    opacity: 0.9;
    filter: brightness(0.9) contrast(1.1);
    pointer-events: none;
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(2, 27, 20, 0.2) 0%, rgba(2, 27, 20, 0.82) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-content,
.hero-status-card {
    position: relative;
    z-index: 3;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.hero-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.hero-badge {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #a7f3d0;
    background: rgba(2, 27, 20, 0.85);
    backdrop-filter: blur(6px);
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.version-badge {
    font-size: 0.74rem;
    font-weight: 800;
    color: #022c22;
    background: #6ee7b7;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.8px;
    line-height: 1.1;
    margin-bottom: 10px;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.9);
}

.hero-subtitle {
    font-size: 1rem;
    color: #f0fdf4;
    max-width: 680px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
    line-height: 1.5;
}

.hero-status-card {
    background: rgba(3, 24, 17, 0.9);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(16, 185, 129, 0.5);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    max-width: 320px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.status-pulse {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.4);
}

.status-text {
    font-size: 0.84rem;
    font-weight: 700;
    color: #a7f3d0;
}

.status-tip {
    font-size: 0.76rem;
    color: #6ee7b7;
    line-height: 1.4;
    opacity: 0.9;
}

/* ==========================================================================
   CARTÕES DE ETAPAS (PLAN-CARD)
   ========================================================================== */
.plan-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.plan-card:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.18);
    padding-bottom: 16px;
    margin-bottom: 18px;
}

.header-icon {
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #031e16;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.header-title-group h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f0fdf4;
}

.header-title-group p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ==========================================================================
   PAINEL DE INSTRUÇÕES E REPETIÇÃO ILIMITADA
   ========================================================================== */
.box-instrucao-ia {
    background: #031e16;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: 14px;
}

.linha-instrucao {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.input-ia-prompt {
    flex: 1;
    min-width: 260px;
    padding: 8px 12px !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.84rem !important;
    background: var(--input-bg) !important;
    color: #f0fdf4 !important;
}

.input-ia-prompt:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25) !important;
}

.btn-ai-copilot {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #022c22;
    border: 1px solid #34d399;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-ai-copilot:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    transform: translateY(-1px);
}

.btn-ai-repeat {
    background: #093b2d;
    color: #a7f3d0;
    border: 1.5px solid rgba(16, 185, 129, 0.5);
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-ai-repeat:hover {
    background: #064e3b;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.btn-ai-repeat:active,
.btn-ai-copilot:active {
    transform: translateY(0);
}

/* ==========================================================================
   FORMULÁRIOS E CAMPOS DE TEXTO
   ========================================================================== */
.grid-form {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.form-field {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.field-quarter { flex: 1; min-width: 220px; }
.field-half { flex: 2; min-width: 320px; }

label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #a7f3d0;
    margin-bottom: 6px;
}

input[type="text"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--input-bg);
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

textarea {
    resize: vertical;
    line-height: 1.55;
}

/* ==========================================================================
   TIMELINE DOS 3 MOMENTOS (METODOLOGIA)
   ========================================================================== */
.method-timeline {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 14px;
}

.timeline-step {
    background: #031e16;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 16px 18px;
}

.step-badge {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #022c22;
    background: #6ee7b7;
    display: inline-block;
    padding: 3px 9px;
    border-radius: 4px;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

/* ==========================================================================
   UPLOAD DO LOGÓTIPO DA ESCOLA
   ========================================================================== */
.upload-field {
    min-width: 260px;
}

.upload-dropzone {
    border: 1.5px dashed rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    background: var(--input-bg);
}

.upload-dropzone input[type="file"] {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.logo-preview-box {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #093b2d;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.logo-preview-box img {
    height: 40px;
    max-width: 100px;
    object-fit: contain;
}

.btn-remove-logo {
    background: #7f1d1d;
    color: #fecaca;
    border: 1px solid #dc2626;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-remove-logo:hover {
    background: #991b1b;
}

/* ==========================================================================
   BARRA FLUTUANTE DE EXPORTAÇÃO
   ========================================================================== */
.export-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(2, 27, 20, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(16, 185, 129, 0.3);
    padding: 12px 20px;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.export-bar-inner {
    max-width: 1220px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.action-btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.action-btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: #022c22;
    font-weight: 800;
}

.btn-primary:hover {
    background: #34d399;
}

.btn-accent {
    background: #059669;
    color: #ffffff;
    border: 1px solid #10b981;
}

.btn-accent:hover {
    background: #047857;
}

.btn-secondary {
    background: #093b2d;
    color: #f0fdf4;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-secondary:hover {
    background: #064e3b;
}

.btn-danger {
    background: rgba(220, 38, 38, 0.18);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    background: rgba(220, 38, 38, 0.35);
}

/* ==========================================================================
   RODAPÉ: MOLDURA OFICIAL ENVOLVENTE (IDÊNTICO À CAPTURA DE TELA)
   ========================================================================== */
.app-footer {
    margin-top: 55px;
    padding-bottom: 95px;
    background: transparent;
    border: none;
}

/* 1. Moldura externa única envolvente */
.footer-frame-container {
    background: #021b14;
    border: 1px solid rgba(16, 185, 129, 0.32);
    border-radius: 20px;
    padding: 34px 38px 28px 38px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
    margin: 0 auto;
    max-width: 100%;
}

/* 2. Área central com os 3 quadros das logos */
.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}

/* 3. Cada quadro individual contornando o seu logotipo */
.logo-box {
    background: #01140e;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px !important;
    height: 68px !important;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Imagens contidas dentro do seu respectivo quadro */
.logo-box img {
    max-height: 44px !important;
    max-width: 58px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
}

/* 4. Linha horizontal verde fina (sem traço branco/relevo) */
.footer-divider {
    height: 1px;
    background: rgba(16, 185, 129, 0.22);
    border: none;
    margin: 0 0 22px 0;
    width: 100%;
}

/* 5. Texto institucional diagramado */
.footer-institutional-text {
    width: 100%;
    margin: 0;
}

.institutional-statement {
    font-size: 0.84rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0;
    text-align: left;
}

.institutional-statement strong {
    color: #ffffff;
    font-weight: 700;
}

/* ==========================================================================
   MODO ALTO CONTRASTE (ACESSIBILIDADE RIGOROSA)
   ========================================================================== */
body.alto-contraste {
    background: #000000 !important;
    color: #ffffff !important;
}

body.alto-contraste .app-topbar,
body.alto-contraste .app-hero,
body.alto-contraste .hero-status-card,
body.alto-contraste .plan-card,
body.alto-contraste .timeline-step,
body.alto-contraste .upload-dropzone,
body.alto-contraste .export-bar,
body.alto-contraste .footer-frame-container,
body.alto-contraste .logo-box,
body.alto-contraste .box-instrucao-ia {
    background: #000000 !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

body.alto-contraste h1,
body.alto-contraste h2,
body.alto-contraste .tools-label,
body.alto-contraste .hero-title,
body.alto-contraste .step-badge,
body.alto-contraste .institutional-statement strong {
    color: #ffff00 !important;
}

body.alto-contraste label,
body.alto-contraste .brand-sigla {
    color: #00ffff !important;
}

body.alto-contraste input[type="text"],
body.alto-contraste select,
body.alto-contraste textarea,
body.alto-contraste .input-ia-prompt {
    background: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
}

body.alto-contraste button,
body.alto-contraste .action-btn,
body.alto-contraste .btn-ai-copilot,
body.alto-contraste .btn-ai-repeat,
body.alto-contraste .tool-btn {
    background: #ffff00 !important;
    color: #000000 !important;
    border: 2px solid #ffffff !important;
    font-weight: 800 !important;
}

@media (max-width: 768px) {
    .topbar-container {
        justify-content: center;
    }
    .app-hero {
        padding: 24px 18px;
        aspect-ratio: auto;
        min-height: 420px;
        align-items: flex-start;
    }
    .hero-title {
        font-size: 2.1rem;
    }
    .hero-status-card {
        max-width: 100%;
        width: 100%;
    }
    .linha-instrucao {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-ai-copilot,
    .btn-ai-repeat {
        justify-content: center;
    }
    .export-bar-inner {
        flex-direction: column;
    }
    .action-btn-group,
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    .footer-frame-container {
        padding: 22px 18px;
    }
}