/* =========================================
   1. VARIÁVEIS E RESET GERAL
   ========================================= */
:root {
    --primary-color: #D32F2F;       /* Vermelho Mosaico */
    --primary-hover: #B71C1C;       /* Vermelho Escuro */
    --bg-color: #0F0F0F;            /* Preto Fundo */
    --surface-color: #1E1E1E;       /* Cinza Cards */
    --text-color: #F5F5F5;          /* Branco Texto */
    --text-muted: #A0A0A0;          /* Cinza Texto Secundário */
    --border-color: #333333;        /* Bordas Sutis */
    --success-color: #4CAF50;       /* Verde Sucesso */
    --warning-color: #FFC107;       /* Amarelo Alerta */
    --info-color: #00E5FF;          /* Azul Tech */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
}

/* =========================================
   2. TELA DE LOGIN (Index.html)
   ========================================= */
.login-page {
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.login-container {
    background-color: var(--surface-color);
    padding: 3rem;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    text-align: center;
    animation: fadeIn 0.8s ease-in-out;
}

/* --- LOGO EMPILHADA NO LOGIN (FIX DEFINITIVO) --- */
.login-header .login-brand-wrapper {
    display: flex;
    flex-direction: column; /* FORÇA UM EM CIMA DO OUTRO */
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
}

.login-logo-img {
    height: 60px; /* Logo maior para destaque */
    width: auto;
    object-fit: contain;
    margin-bottom: 5px;
}

.login-header .logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1;
}

.highlight { color: var(--primary-color); }

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
}

.input-group { position: relative; margin-bottom: 1.5rem; }

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.login-form input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background-color: #2C2C2C;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(211, 47, 47, 0.3);
}

.btn-login {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login:hover { background-color: var(--primary-hover); }

.error-message {
    color: #ff5252;
    margin-top: 1rem;
    font-size: 0.9rem;
    height: 20px;
}

.login-footer {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   3. LAYOUT GERAL (NAVBAR E CONTENT)
   ========================================= */
.navbar {
    background-color: var(--surface-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

/* Logo na Barra Lateral (Dashboard - Lado a Lado) */
.nav-logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex; 
    align-items: center; 
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active { color: var(--primary-color); }

.btn-logout {
    border: 1px solid var(--border-color);
    padding: 5px 15px;
    border-radius: 4px;
}

.btn-logout:hover { background-color: #333; color: white !important; }

.dashboard-content {
    margin-top: 60px;
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   4. DASHBOARD (HOME - KPI & OPERAÇÕES)
   ========================================= */
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.hero-text h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.status-badge {
    background-color: rgba(0, 229, 255, 0.1);
    color: var(--info-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid var(--info-color);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.kpi-card {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.highlight-card {
    border-color: var(--primary-color);
    background: linear-gradient(145deg, var(--surface-color) 0%, #1a0505 100%);
}

.kpi-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 1.5rem;
    background-color: rgba(211, 47, 47, 0.1);
    padding: 15px;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.kpi-info h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.big-number {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

.desc { font-size: 0.75rem; color: var(--text-muted); }

/* --- NOVAS TABELAS DO DASHBOARD --- */
.operations-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.ops-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
}

.ops-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.ops-header h3 { font-size: 1rem; color: var(--text-color); margin: 0; }

.live-dot {
    height: 8px; width: 8px;
    background-color: var(--success-color);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 5px var(--success-color);
    animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th { text-align: left; color: var(--text-muted); padding: 8px; font-weight: 600; }
.data-table td { padding: 12px 8px; border-top: 1px solid #333; color: #eee; }

.score-badge { padding: 4px 8px; border-radius: 4px; font-weight: bold; font-size: 0.75rem; }
.score-high { background: rgba(76, 175, 80, 0.15); color: var(--success-color); border: 1px solid var(--success-color); }
.score-med { background: rgba(255, 193, 7, 0.15); color: var(--warning-color); border: 1px solid var(--warning-color); }
.score-low { background: rgba(211, 47, 47, 0.15); color: #FF5252; border: 1px solid #FF5252; }

.alert-item { padding: 12px 0; border-bottom: 1px solid #333; display: flex; gap: 12px; align-items: flex-start; }
.alert-icon { color: var(--info-color); margin-top: 2px; }
.alert-content h4 { font-size: 0.85rem; color: #fff; margin-bottom: 4px; }
.alert-content p { font-size: 0.75rem; color: #888; }

.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.chart-container {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.chart-container h3 { font-size: 1rem; margin-bottom: 1.5rem; color: var(--text-color); }

/* =========================================
   5. MOSAICO PLUS (LANDING PAGE & ESTRATÉGIA)
   ========================================= */

.page-header {
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

.page-header h2 { font-family: 'Montserrat', sans-serif; font-size: 1.8rem; }
.page-header p { color: var(--text-muted); }

.content-section {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.section-title h3 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- NEWS GRID --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.news-card {
    background-color: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border-color: #555;
}

.news-image { width: 100%; height: 160px; overflow: hidden; }
.news-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.news-card:hover .news-image img { transform: scale(1.05); }

.news-content {
    padding: 1.2rem;
    display: flex; flex-direction: column;
    justify-content: space-between; flex-grow: 1;
}

.news-title {
    color: #e0e0e0; font-size: 1rem; font-weight: 600;
    line-height: 1.5; margin-bottom: 1rem; font-family: 'Roboto', sans-serif;
}

.news-meta {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.75rem; color: #888; border-top: 1px solid #333; padding-top: 0.8rem;
}

.news-source { color: var(--primary-color); font-weight: bold; }
.news-source i { margin-right: 4px; }

/* --- TESE VISUAL (FIX: ESG Full Width) --- */
.thesis-container {
    background: linear-gradient(145deg, #1a1a1a 0%, #111 100%);
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.thesis-header {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    font-size: 0.8rem; font-weight: bold;
    letter-spacing: 1px; color: var(--primary-color);
    border-bottom: 1px solid #333; text-transform: uppercase;
}

.thesis-grid {
    display: grid;
    /* Mantém 3 colunas para a linha de cima */
    grid-template-columns: repeat(3, 1fr); 
}

.thesis-item { padding: 1.5rem; border-right: 1px solid #333; }

/* Remove borda do 3º item para não fechar a linha visualmente */
.thesis-item:nth-child(3) { border-right: none; }

/* [FIX] O 4º item (ESG) ocupa a largura total e ganha destaque */
.thesis-item:nth-child(4) {
    grid-column: 1 / -1; /* Ocupa de ponta a ponta */
    border-right: none;
    border-top: 1px solid #333; /* Linha separadora */
    background: rgba(76, 175, 80, 0.05); /* Toque verde sutil */
}

.thesis-item h4 {
    color: #fff; margin-bottom: 0.8rem;
    font-size: 1rem; font-family: 'Montserrat', sans-serif;
}

.thesis-item p { font-size: 0.9rem; color: #bbb; line-height: 1.5; }

/* --- SETOR PRIVADO (Dual Track) --- */
.private-sector-box {
    margin-top: 2rem;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    background-color: #1a1a1a;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.private-header {
    background-color: #252525;
    padding: 12px 20px;
    font-size: 0.85rem; font-weight: bold; color: #fff;
    border-bottom: 1px solid #333; letter-spacing: 1px; text-transform: uppercase;
}
.private-header i { margin-right: 10px; color: var(--warning-color); }

.private-body { display: flex; flex-wrap: wrap; }
.private-pain, .private-solution { flex: 1; padding: 1.5rem; min-width: 300px; }

.private-pain { 
    border-right: 1px solid #333; 
    background: linear-gradient(to right, rgba(211, 47, 47, 0.05), transparent);
}
.private-solution {
    background: linear-gradient(to left, rgba(76, 175, 80, 0.05), transparent);
}

.pain-title, .sol-title {
    font-size: 0.8rem; font-weight: 700; margin-bottom: 0.8rem;
    text-transform: uppercase; display: flex; align-items: center; gap: 8px;
}
.pain-title { color: #ff5252; }
.sol-title { color: var(--success-color); }

.private-body p { font-size: 0.9rem; color: #bbb; line-height: 1.6; }

/* --- AIDA GRID --- */
.aida-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.aida-card {
    background-color: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.aida-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.1);
}

.aida-header {
    background-color: #252525;
    padding: 1rem;
    font-weight: bold;
    color: var(--primary-color);
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.aida-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.aida-body h5 { color: #fff; margin-bottom: 0.5rem; font-size: 1.1rem; }
.aida-body small {
    display: block; margin-top: 1rem; color: #888;
    font-style: italic; font-size: 0.8rem; line-height: 1.4;
}

.btn-simulator {
    background-color: transparent;
    border: 1px solid var(--success-color);
    color: var(--success-color);
    padding: 10px 0;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    margin-top: auto;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-simulator:hover {
    background-color: var(--success-color);
    color: #000;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
}

/* --- AUTOMATION FLOW (ESTEIRA) --- */
.automation-flow-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    background: #151515;
    padding: 3rem 2rem;
    border-radius: 10px;
    border: 1px solid #333;
    position: relative;
    overflow: visible;
}

.tech-node {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 0.8rem; width: 130px; position: relative; cursor: help;
    transition: transform 0.3s;
}
.tech-node:hover { transform: translateY(-5px); }

.tech-node i {
    font-size: 1.5rem; color: #fff; background: #252525;
    padding: 18px; border-radius: 50%; border: 1px solid #444;
    transition: all 0.3s; z-index: 2;
}

.tech-node span { font-size: 0.8rem; font-weight: 700; color: #bbb; text-transform: uppercase; }

.highlight-node i { border-color: #ff6f00; color: #ff6f00; box-shadow: 0 0 10px rgba(255, 111, 0, 0.2); }
.success-node i { border-color: var(--success-color); color: var(--success-color); box-shadow: 0 0 10px rgba(76, 175, 80, 0.2); }

.tech-arrow {
    flex: 1; display: flex; justify-content: center; align-items: center;
    color: #333; font-size: 1.2rem;
    animation: pulseFlow 1.5s infinite ease-in-out;
}

@keyframes pulseFlow {
    0% { color: #333; transform: translateX(0); opacity: 0.3; }
    50% { color: var(--primary-color); transform: translateX(5px); opacity: 1; text-shadow: 0 0 8px var(--primary-color); }
    100% { color: #333; transform: translateX(0); opacity: 0.3; }
}

.node-desc {
    position: absolute; bottom: 100%; left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--primary-color); color: white;
    padding: 10px 15px; border-radius: 6px; font-size: 0.75rem;
    width: 200px; text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    opacity: 0; visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10;
}

.node-desc::after {
    content: ''; position: absolute; top: 100%; left: 50%; margin-left: -5px;
    border-width: 5px; border-style: solid;
    border-color: var(--primary-color) transparent transparent transparent;
}

.tech-node:hover .node-desc { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(-10px); }

/* --- TIMELINE DE GROWTH (NEON) --- */
.growth-timeline-container {
    display: flex; align-items: center; justify-content: space-between;
    background: #0a0a0a; padding: 3rem 2rem;
    border-radius: 12px; border: 1px solid #333;
    position: relative;
    box-shadow: inset 0 0 50px rgba(0, 229, 255, 0.05);
}

.timeline-node {
    position: relative; display: flex; flex-direction: column;
    align-items: center; cursor: help; z-index: 2; transition: transform 0.3s;
}
.timeline-node:hover { transform: scale(1.1); }

.node-circle {
    width: 50px; height: 50px; background: #111;
    border: 2px solid var(--info-color); border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    color: var(--info-color); font-weight: bold; font-size: 0.9rem;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
    transition: all 0.3s;
    background: radial-gradient(circle, rgba(0,229,255,0.1) 0%, rgba(0,0,0,1) 100%);
}

.timeline-node:hover .node-circle { background: var(--info-color); color: #000; box-shadow: 0 0 20px rgba(0, 229, 255, 0.6); }

.node-label { margin-top: 10px; font-size: 0.75rem; color: #888; text-transform: uppercase; font-weight: 600; letter-spacing: 1px; }

.timeline-wire {
    flex: 1; height: 2px; background: #222; position: relative;
    margin: 0 5px 20px 5px; overflow: hidden;
}

.timeline-wire::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, var(--info-color), transparent);
    animation: wirePulse 2s infinite linear;
}

@keyframes wirePulse { 0% { left: -100%; } 100% { left: 100%; } }

.node-tooltip {
    position: absolute; bottom: 120%; left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #006064; border: 1px solid var(--info-color); color: #E0F7FA;
    padding: 15px; border-radius: 6px; font-size: 0.75rem;
    width: 280px; text-align: left;
    opacity: 0; visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 100; box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.node-tooltip::after {
    content: ''; position: absolute; top: 100%; left: 50%; margin-left: -5px;
    border-width: 5px; border-style: solid;
    border-color: var(--info-color) transparent transparent transparent;
}

.timeline-node:hover .node-tooltip { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(-5px); }
.node-tooltip ul li { margin-bottom: 4px; color: #B2EBF2; margin-left: 10px; }

/* --- MATRIZ DE RISCOS --- */
.risk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

.risk-card { background-color: #1a1a1a; border: 1px solid #444; border-radius: 8px; overflow: hidden; }

.risk-header {
    background-color: #333; padding: 15px; font-weight: bold;
    color: #ff9800; font-size: 0.9rem; border-bottom: 1px solid #444;
}

.risk-body { padding: 1.5rem; font-size: 0.9rem; color: #ccc; line-height: 1.6; }
.risk-body hr { border: 0; border-top: 1px solid #333; margin: 15px 0; }
.solution strong { color: var(--success-color); }

/* =========================================
   6. CALCULADORA & CHAT (MODAIS)
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none; justify-content: center; align-items: center;
    z-index: 2000; backdrop-filter: blur(5px);
}

.modal-content {
    background: #1a1a1a; width: 90%; max-width: 500px;
    border-radius: 12px; border: 1px solid #333;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    overflow: hidden; animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
    background: #252525; padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid #333;
}
.modal-header h3 { color: #fff; font-size: 1.1rem; margin: 0; }
.modal-close { background: none; border: none; color: #888; cursor: pointer; font-size: 1.2rem; }
.modal-close:hover { color: #fff; }

.modal-body { padding: 20px; text-align: center; }
.calc-subtitle { color: #888; font-size: 0.9rem; margin-bottom: 20px; }

.calc-inputs input[type=range] { width: 100%; cursor: pointer; accent-color: var(--primary-color); }
.range-value { font-size: 1.5rem; color: #fff; font-weight: bold; margin-top: 10px; }

.calc-comparison { display: flex; align-items: stretch; justify-content: space-between; margin: 30px 0; gap: 10px; }
.calc-box { flex: 1; padding: 25px 15px; border-radius: 12px; background: #222; border: 1px solid #333; text-align: center; }

.calc-box.bad { background: linear-gradient(145deg, rgba(211, 47, 47, 0.15) 0%, rgba(26, 26, 26, 0.5) 100%); border-color: rgba(211, 47, 47, 0.4); }
.calc-box.bad .calc-result { color: #ff5252; font-size: 1.2rem; font-weight: bold; display: block; margin: 5px 0; }

.calc-box.good { background: linear-gradient(145deg, rgba(76, 175, 80, 0.15) 0%, rgba(26, 26, 26, 0.5) 100%); border-color: rgba(76, 175, 80, 0.4); }
.calc-box.good .calc-result { color: var(--success-color); font-size: 1.2rem; font-weight: bold; display: block; margin: 5px 0; }

.calc-vs { align-self: center; font-weight: 900; color: #444; background: #111; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid #333; flex-shrink: 0; }

.calc-total {
    background: linear-gradient(to right, #388E3C, #4CAF50); color: #fff;
    padding: 20px; border-radius: 12px; margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.2);
}
.calc-total h2 { font-size: 2.2rem; margin: 5px 0 0 0; }

.btn-cta-modal {
    background: transparent; border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff; padding: 12px 20px; border-radius: 8px; cursor: pointer;
    width: 100%; font-weight: bold; text-transform: uppercase; transition: 0.3s;
}
.btn-cta-modal:hover { background: #fff; color: #000; border-color: #fff; }

/* CHAT WIDGET */
#chat-toggle-btn {
    position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px;
    background-color: var(--primary-color); color: white;
    border: none; border-radius: 50%; font-size: 1.5rem; cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); z-index: 9999;
    display: flex; justify-content: center; align-items: center; transition: transform 0.3s;
}
#chat-toggle-btn:hover { transform: scale(1.1); }

.chat-window {
    position: fixed; bottom: 100px; right: 30px; width: 350px; height: 450px;
    background-color: var(--surface-color); border-radius: 12px;
    border: 1px solid var(--border-color); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 9998; display: flex; flex-direction: column; overflow: hidden;
    opacity: 0; visibility: hidden; transform: translateY(20px) scale(0.95);
    transition: all 0.3s;
}
.chat-window.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.chat-header { background: #151515; padding: 15px; display: flex; justify-content: space-between; border-bottom: 1px solid #333; }
.chat-title { font-weight: 600; font-size: 0.9rem; }
.chat-title i { color: var(--primary-color); margin-right: 8px; }
.chat-close { background: none; border: none; color: #888; cursor: pointer; }

.chat-messages { flex: 1; padding: 15px; overflow-y: auto; background-color: var(--bg-color); display: flex; flex-direction: column; gap: 15px; }
.message { max-width: 85%; display: flex; flex-direction: column; }
.message.bot { align-self: flex-start; }
.message.user { align-self: flex-end; }
.msg-content { padding: 10px 15px; border-radius: 12px; font-size: 0.9rem; }

.message.bot .msg-content { background: var(--surface-color); border: 1px solid #333; border-bottom-left-radius: 2px; }
.message.user .msg-content { background: var(--primary-color); color: white; border-bottom-right-radius: 2px; }

.chat-input-area { padding: 10px; background: #151515; border-top: 1px solid #333; display: flex; gap: 10px; }
.chat-input-area input { flex: 1; background: var(--surface-color); border: 1px solid #333; padding: 10px; border-radius: 6px; color: white; outline: none; }
.chat-input-area button { background: none; border: none; color: var(--primary-color); font-size: 1.2rem; cursor: pointer; }

/* =========================================
   7. RESPONSIVIDADE (MOBILE)
   ========================================= */
@media (max-width: 768px) {
    .dashboard-content { padding: 1rem; margin-top: 80px; }
    
    .navbar { flex-direction: column; padding: 1rem; gap: 1rem; position: relative; }
    .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; }
    
    .hero-section { flex-direction: column; align-items: flex-start; gap: 15px; }
    
    .kpi-grid, .charts-section, .thesis-grid, .aida-grid, .automation-flow-horizontal, .risk-grid, .operations-grid {
        grid-template-columns: 1fr !important;
    }
    
    .tech-arrow { transform: rotate(90deg); margin: 10px 0; }
    .timeline-wire { height: 40px; margin: 5px 0; }
    
    .chat-window { width: 90%; right: 5%; bottom: 90px; height: 60vh; }
    
    /* Reset de bordas no mobile */
    .thesis-item, .private-pain { border-right: none; border-bottom: 1px solid #333; }
    .thesis-item:last-child { border-bottom: none; border-top: 1px solid #333; }
}