html {
    font-size: 14px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

body {
    background-color: #f8fafc;
    color: #0f172a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.2s ease, color 0.2s ease;
}

main {
    flex: 1;
}

/* Navbar Corporativa */
.navbar-saas {
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Elevação suave nos Cards */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .card-hover:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.14) !important;
    }

.fw-extrabold {
    font-weight: 800;
}

/* Cards de Parceiros / Afiliados */
.ad-partner-card {
    transition: transform 0.15s ease, border-color 0.15s ease;
}

    .ad-partner-card:hover {
        transform: translateY(-2px);
        border-color: #38bdf8 !important;
    }

/* Rodapé e Links Legais */
.footer-saas {
    background-color: #0f172a;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s ease;
}

    .footer-link:hover {
        color: #38bdf8;
        text-decoration: underline;
    }

/* Banner de Consentimento LGPD / AdSense */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1055;
    background: rgba(15, 23, 42, 0.97);
    border-top: 2px solid #0d6efd;
    padding: 0.9rem 0;
}

/* ==========================================================================
   MODO ESCURO (DARK MODE CORPORATIVO - SLATE PALETTE)
   ========================================================================== */
[data-bs-theme="dark"] body {
    background-color: #0b1120;
    color: #e2e8f0;
}

/* Cartões, Modais e Accordions no Modo Escuro */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .accordion-item,
[data-bs-theme="dark"] .accordion-button {
    background-color: #1e293b;
    color: #f1f5f9;
    border-color: #334155 !important;
}

    [data-bs-theme="dark"] .accordion-button:not(.collapsed) {
        background-color: #26354d;
        color: #38bdf8;
    }

/* Remapeamento de utilitários claros usados nas Views (.bg-white e .bg-light) */
[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .card-header.bg-white {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .bg-light:not(.badge),
[data-bs-theme="dark"] .card-header.bg-light,
[data-bs-theme="dark"] .alert-light {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

/* Preserva o contraste de texto que era .text-dark em fundos claros */
[data-bs-theme="dark"] .text-dark:not(.badge):not(.btn):not(.bg-warning):not(.bg-info) {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-secondary {
    color: #94a3b8 !important;
}

/* Tabelas no Modo Escuro */
[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: #e2e8f0;
    --bs-table-border-color: #334155;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-hover-bg: rgba(56, 189, 248, 0.06);
}

[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .table-light > th,
[data-bs-theme="dark"] .table-light > td {
    --bs-table-bg: #0f172a;
    --bs-table-color: #cbd5e1;
    border-color: #334155;
    background-color: #0f172a !important;
    color: #cbd5e1 !important;
}

/* Inputs, Selects e Textareas */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

    [data-bs-theme="dark"] .form-control:focus,
    [data-bs-theme="dark"] .form-select:focus {
        background-color: #0f172a;
        border-color: #38bdf8;
        color: #ffffff;
    }

/* Botões outline-dark e outline-secondary ficam legíveis no escuro */
[data-bs-theme="dark"] .btn-outline-dark {
    color: #e2e8f0;
    border-color: #475569;
}

    [data-bs-theme="dark"] .btn-outline-dark:hover {
        background-color: #334155;
        color: #ffffff;
    }

[data-bs-theme="dark"] .border {
    border-color: #334155 !important;
}
