/* ==========================================================================
   Plataforma GeoIncluir — Componentes da Workstation Pedagógica
   LABGEO / GEFORTE — Universidade Estadual do Ceará (UECE)
   Coordenação: Prof. Dr. Stanley Braz de Oliveira (2026)
   ========================================================================== */

/* Cartões com Superfície Glassmorphism */
.card {
    background: var(--surface-card);
    border: 1px solid var(--border-emerald);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 28px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition-smooth);
    position: relative;
}

.card:hover {
    border-color: var(--border-emerald-glow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-emerald);
    flex-wrap: wrap;
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon-box {
    width: 48px;
    height: 48px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid var(--border-emerald-glow);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-emerald-light);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-title {
    font-size: 1.38rem;
    font-weight: 700;
    color: var(--text-pure);
    letter-spacing: -0.01em;
}

.card-description {
    font-size: 0.92rem;
    color: var(--text-mint-muted);
    margin-top: 3px;
}

/* Navegação por Abas Operacionais */
.workspace-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-emerald);
    padding-bottom: 12px;
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-mint-muted);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-mint);
    background: rgba(16, 185, 129, 0.08);
}

.tab-btn.active {
    background: rgba(16, 185, 129, 0.16);
    border-color: var(--border-emerald-glow);
    color: var(--text-emerald-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.tab-panel {
    display: none;
    animation: tabFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-panel.active {
    display: block;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Estrutura de Grelhas e Campos */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.form-grid-full {
    grid-column: 1 / -1;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-mint);
    display: flex;
    align-items: center;
    gap: 6px;
}

.obrigatorio::after {
    content: " *";
    color: var(--accent-danger);
    font-weight: bold;
}

/* Entradas de Dados com Superfície Noturna */
input[type="text"],
select,
textarea {
    width: 100%;
    background: var(--surface-input);
    border: 1px solid var(--border-emerald);
    color: var(--text-mint);
    padding: 13px 18px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    border-color: var(--border-emerald-focus);
    background: var(--surface-input-hover);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22), inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

select option {
    background-color: #021811;
    color: #f0fdf4;
}

textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.55;
}

/* Botões de Assistência Rápida do GeoPlanner IA */
.btn-ai-assist {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid var(--border-emerald-glow);
    color: var(--text-emerald-light);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-ai-assist:hover {
    background: rgba(16, 185, 129, 0.24);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

/* Caixa Curricular da BNCC em Tempo Real */
.bncc-display-box {
    background: rgba(2, 27, 20, 0.9);
    border: 1px solid var(--border-emerald);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 10px;
    font-size: 0.88rem;
    line-height: 1.6;
    display: none;
}

.bncc-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.bncc-code-badge {
    background: rgba(6, 182, 212, 0.18);
    color: #67e8f9;
    border: 1px solid rgba(6, 182, 212, 0.35);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.8rem;
}

.bncc-unit-badge {
    background: rgba(16, 185, 129, 0.18);
    color: var(--text-emerald-light);
    border: 1px solid var(--border-emerald);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Controlos Deslizantes Táteis (Sliders com Rastreio Iluminado) */
.slider-control-wrap {
    background: var(--surface-input);
    border: 1px solid var(--border-emerald);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.slider-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.slider-value-badge {
    font-size: 0.88rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: var(--font-mono);
}

.badge-emerald {
    background: rgba(16, 185, 129, 0.2);
    color: var(--text-emerald-light);
    border: 1px solid var(--border-emerald);
}

.badge-amber {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.interactive-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #063124;
    outline: none;
    transition: var(--transition-smooth);
}

.interactive-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-emerald);
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
    transition: var(--transition-smooth);
}

.interactive-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: #34d399;
}

.interactive-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-emerald);
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.slider-sublabel {
    font-size: 0.8rem;
    color: var(--text-mint-muted);
    line-height: 1.4;
}

/* Alertas de Validação */
.msg-erro {
    display: none;
    background: var(--accent-danger-bg);
    border: 1px solid var(--accent-danger);
    color: #fca5a5;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-top: 24px;
    font-size: 0.95rem;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(8px);
}

/* Botões de Ação Executiva */
.btn-gerar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #01130e;
    border: none;
    padding: 18px 32px;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 28px;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    letter-spacing: 0.02em;
}

.btn-gerar:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.48);
}

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

/* Área de Resultados */
.relatorio-wrapper {
    display: none;
    animation: studioFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes studioFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Barra do GeoPlanner IA */
.copiloto-bar {
    background: rgba(3, 24, 17, 0.92);
    border: 1px solid var(--border-emerald-glow);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.copiloto-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.copiloto-chip {
    background: rgba(16, 185, 129, 0.2);
    color: var(--text-emerald-light);
    border: 1px solid var(--accent-emerald);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.copiloto-sub {
    font-size: 0.92rem;
    color: var(--text-mint);
}

.btn-variar {
    background: var(--surface-card);
    border: 1px solid var(--border-emerald-glow);
    color: var(--text-emerald-light);
    padding: 11px 20px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn-variar:hover {
    background: var(--accent-emerald-dark);
    color: #ffffff;
    border-color: var(--accent-emerald);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
}

/* Painel Gráfico Psico-Comportamental */
.chart-section {
    background: var(--surface-input);
    border: 1px solid var(--border-emerald);
    border-radius: var(--radius-md);
    padding: 22px;
    margin-bottom: 28px;
}

.chart-section-title {
    font-size: 1.05rem;
    color: var(--text-pure);
    margin-bottom: 16px;
    font-weight: 700;
}

.chart-row {
    margin: 16px 0;
}

.chart-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.chart-track {
    height: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.chart-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.fill-emerald {
    background: linear-gradient(90deg, #059669, #10b981);
}

.fill-amber {
    background: linear-gradient(90deg, #d97706, #f59e0b);
}

/* Grelha de Fundamentação Epistemológica */
.teoria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.teoria-box {
    background: var(--surface-input);
    border: 1px solid var(--border-emerald);
    border-radius: var(--radius-md);
    padding: 22px;
    break-inside: avoid;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.teoria-box-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.14);
    padding-bottom: 10px;
}

.teoria-badge {
    font-size: 0.74rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.18);
    color: var(--text-emerald-light);
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.teoria-box-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-pure);
}

.teoria-content {
    font-size: 0.92rem;
    color: var(--text-mint-muted);
    line-height: 1.65;
}

.teoria-content strong {
    color: var(--text-mint);
}

/* Bloco de Inclusão Especializada */
.inclusao-card {
    background: rgba(6, 45, 34, 0.85);
    border: 1px solid var(--accent-emerald);
    border-radius: var(--radius-md);
    padding: 26px;
    margin-bottom: 28px;
    break-inside: avoid;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.inclusao-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-emerald-light);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.25);
    padding-bottom: 10px;
}

.inclusao-secao {
    margin-top: 14px;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-mint);
}

.inclusao-secao strong {
    color: var(--text-emerald-light);
    display: block;
    margin-bottom: 4px;
}

/* Laboratório GeoMaker */
.geomaker-card {
    background: rgba(3, 24, 17, 0.9);
    border: 1px solid var(--accent-cyan);
    border-radius: var(--radius-md);
    padding: 26px;
    margin-bottom: 28px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.geomaker-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(6, 182, 212, 0.25);
    padding-bottom: 12px;
}

.geomaker-title {
    font-size: 1.22rem;
    font-weight: 700;
    color: #67e8f9;
}

.geomaker-step {
    background: var(--surface-input);
    border-left: 3px solid var(--accent-cyan);
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 12px;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* Gerador de Avaliação Adaptada */
.exam-card {
    background: rgba(3, 24, 17, 0.92);
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius-md);
    padding: 26px;
    margin-bottom: 28px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.exam-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(245, 158, 11, 0.25);
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.exam-title {
    font-size: 1.22rem;
    font-weight: 700;
    color: #fde68a;
}

.exam-question-item {
    background: var(--surface-input);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    margin-top: 16px;
}

.exam-question-header {
    font-weight: 700;
    color: #fbbf24;
    font-size: 1rem;
    margin-bottom: 8px;
}

.exam-rubric-box {
    margin-top: 14px;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.08);
    border-left: 3px solid var(--accent-emerald);
    font-size: 0.88rem;
    color: var(--text-mint-muted);
}

/* Módulo IA Vision */
.vision-workspace {
    background: var(--surface-input);
    border: 1px dashed var(--border-emerald-glow);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-top: 16px;
    text-align: center;
}

.vision-upload-area {
    cursor: pointer;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.vision-output-box {
    text-align: left;
    margin-top: 18px;
    background: rgba(2, 27, 20, 0.8);
    border: 1px solid var(--border-emerald);
    border-radius: var(--radius-md);
    padding: 18px;
    display: none;
}

/* Simulador de Prática e Manejo de Crises */
.simulator-box {
    background: rgba(3, 24, 17, 0.9);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: var(--radius-md);
    padding: 22px;
    margin-top: 18px;
}

.simulator-scenario {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--accent-danger);
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 14px;
    font-size: 0.92rem;
    color: #fecaca;
}

.simulator-feedback {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--accent-emerald);
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 14px;
    font-size: 0.92rem;
    color: var(--text-mint);
    display: none;
}

/* Roteiro Didático e Atividades */
.secao-atividades {
    margin-top: 28px;
}

.secao-atividades-title {
    font-size: 1.2rem;
    color: var(--text-pure);
    margin-bottom: 6px;
    font-weight: 700;
}

.secao-atividades-desc {
    font-size: 0.9rem;
    color: var(--text-mint-muted);
    margin-bottom: 16px;
}

.atividades-wrap {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.atividade-item {
    background: var(--surface-input);
    border-left: 4px solid var(--accent-emerald);
    border-top: 1px solid var(--border-emerald);
    border-right: 1px solid var(--border-emerald);
    border-bottom: 1px solid var(--border-emerald);
    border-radius: var(--radius-md);
    padding: 22px;
    break-inside: avoid;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.atividade-header {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-pure);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.atividade-desc {
    font-size: 0.93rem;
    color: var(--text-mint-muted);
    line-height: 1.65;
}

.atividade-desc strong {
    color: var(--text-mint);
}

.plano-b-box {
    margin-top: 14px;
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px dashed var(--accent-gold);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: #fde68a;
    line-height: 1.5;
}

/* Barra de Exportações */
.export-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin: 32px 0 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border-emerald);
}

.btn-export {
    background: var(--surface-input);
    border: 1px solid var(--border-emerald);
    color: var(--text-mint);
    padding: 13px 22px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.btn-export:hover {
    background: var(--accent-emerald-dark);
    border-color: var(--accent-emerald);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.btn-export-primary {
    background: rgba(16, 185, 129, 0.22);
    border-color: var(--accent-emerald);
    color: var(--text-emerald-light);
}

.link-retorno {
    text-align: center;
    margin-top: 18px;
}

.link-retorno a {
    color: var(--text-emerald-light);
    text-decoration: underline;
    font-size: 0.92rem;
    cursor: pointer;
    font-weight: 600;
}

@media (max-width: 768px) {
    .card { padding: 22px 18px; }
    .copiloto-bar { flex-direction: column; align-items: flex-start; }
    .btn-variar { width: 100%; justify-content: center; }
    .btn-export { width: 100%; justify-content: center; }
}