﻿/* =====================================================
   SINAC - Estilo Global
   Tema Claro / Escuro (somente CSS)
   ===================================================== */

/* =========================
   TEMA CLARO (PADRÃO)
   ========================= */
:root {
    --sinac-blue: #1f3c88;
    --sinac-blue-light: #2f5fd0;
    --sinac-orange: #f7941d;
    --bg: #f5f7fb;
    --bg-card: #ffffff;
    --bg-hero: linear-gradient(180deg, #ffffff 0%, #eef2f9 100%);
    --bg-navbar: linear-gradient(90deg, #1f3c88, #2f5fd0);
    --bg-footer: #0f172a;
    --text: #1e293b;
    --text-muted: #4b5563;
    --border: #e5e7eb;
    --input-bg: #ffffff;
    --input-text: #1e293b;
}

/* =========================
   TEMA ESCURO
   ========================= */
body[data-theme="dark"] {
    --bg: #0f172a;
    --bg-card: #020617;
    --bg-hero: linear-gradient(180deg, #020617 0%, #020617 100%);
    --bg-navbar: linear-gradient(90deg, #020617, #020617);
    --bg-footer: #020617;
    --text: #e5e7eb;
    --text-muted: #94a3b8;
    --border: #334155;
    --input-bg: #020617;
    --input-text: #e5e7eb;
}

/* =========================
   GLOBAL
   ========================= */
html, body {
    height: 100%;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    transition: background-color .25s, color .25s;
}

/* =========================
   LINKS
   ========================= */
a {
    color: var(--sinac-blue);
    text-decoration: none;
}

    a:hover {
        color: var(--sinac-orange);
    }

/* =========================
   NAVBAR
   ========================= */
.navbar {
    background: var(--bg-navbar);
}

.nav-link {
    color: #ffffff !important;
    font-weight: 500;
}

    .nav-link:hover {
        color: var(--sinac-orange) !important;
    }

/* =========================
   HERO
   ========================= */
.hero {
    padding: 100px 20px;
    background: var(--bg-hero);
}

    .hero h1 {
        color: var(--sinac-blue);
        font-weight: 700;
    }

    .hero .lead {
        color: var(--text-muted);
    }

/* =========================
   CARDS / BOOTSTRAP
   ========================= */
.card,
.card-body,
.bg-white,
.bg-light {
    background-color: var(--bg-card) !important;
    color: var(--text);
    border: none;
    border-radius: 14px;
}

/* =========================
   CONTAINERS
   ========================= */
.container,
.container-fluid {
    background-color: transparent;
}

/* =========================
   INPUTS
   ========================= */
input,
select,
textarea {
    background-color: var(--input-bg);
    color: var(--input-text);
    border-color: var(--border);
}

/* =========================
   DROPDOWNS
   ========================= */
.dropdown-menu {
    background-color: var(--bg-card);
    color: var(--text);
}

.dropdown-item {
    color: var(--text);
}

    .dropdown-item:hover {
        background-color: var(--border);
    }

/* =========================
   FOOTER
   ========================= */
footer {
    background-color: var(--bg-footer);
    color: var(--text-muted);
    font-size: 14px;
}

/* =========================
   CORREÇÃO FINAL - FUNDO REAL
   ========================= */

/* garante que o fundo escuro apareça */
main {
    background-color: var(--bg);
}

/* containers não podem ficar transparentes */
body[data-theme="dark"] main,
body[data-theme="dark"] .container,
body[data-theme="dark"] .container-fluid {
    background-color: var(--bg);
}

/* cards continuam em destaque */
body[data-theme="dark"] .card {
    background-color: var(--bg-card);
}


    /* =========================
   POLIMENTO VISUAL - DARK MODE
   ========================= */


        body[data-theme="dark"] main > .container,
        body[data-theme="dark"] main > .container-fluid {
            max-width: 1140px;
            padding-top: 40px;
            padding-bottom: 40px;
        }

    /* Cards mais destacados no escuro */
    body[data-theme="dark"] .card {
        background-color: #020617;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0,0,0,.45);
    }

    /* Títulos mais vivos */
    body[data-theme="dark"] h1,
    body[data-theme="dark"] h2,
    body[data-theme="dark"] h3 {
        color: #e5e7eb;
    }

    /* Texto secundário */
    body[data-theme="dark"] .text-muted {
        color: #94a3b8 !important;
    }

    /* Inputs mais confortáveis */
    body[data-theme="dark"] input,
    body[data-theme="dark"] select,
    body[data-theme="dark"] textarea {
        border-radius: 10px;
    }

    /* Centralização visual da tela Configurações */
    body[data-theme="dark"] .config-card,
    body[data-theme="dark"] .settings-card {
        margin: auto;
    }

    /* =========================
   NAVBAR – COR ÚNICA (DARK)
   ========================= */

    body[data-theme="dark"] .navbar {
        background: #020617 !important; /* azul-preto sólido */
        box-shadow: 0 2px 12px rgba(0,0,0,.6);
    }

        /* container da navbar não herda fundo estranho */
        body[data-theme="dark"] .navbar .container {
            background: transparent !important;
        }

    /* links */
    body[data-theme="dark"] .nav-link {
        color: #e5e7eb !important;
    }

        body[data-theme="dark"] .nav-link:hover {
            color: #fbbf24 !important; /* destaque suave */
        }

    /* dropdown */
    body[data-theme="dark"] .dropdown-menu {
        background-color: #020617 !important;
        border: 1px solid #1e293b;
    }

    /* logo levemente mais visível */
    body[data-theme="dark"] .navbar-brand img {
        filter: brightness(1.15);
    }

/* =========================
   CORREÇÃO DEFINITIVA DE ALTURA
   CLARO E ESCURO
   ========================= */

/* main sempre ocupa o mesmo espaço */
main {
    flex: 1;
    min-height: calc(100vh - 70px - 60px); /* navbar + footer */
    padding-top: 48px;
    padding-bottom: 48px;
    background-color: var(--bg);
}

/* garante que o fundo comece no mesmo ponto */
body[data-theme="light"] main,
body[data-theme="dark"] main {
    background-color: var(--bg);
}

/* container central idêntico */
main > .container,
main > .container-fluid {
    max-width: 1140px;
}

/* card não altera tamanho entre temas */
.card {
    padding: 24px;
    border-radius: 16px;
}

/* =====================================================
   DOWNLOADS – SINAC
   ===================================================== */

.downloads-page {
    padding: 60px 20px;
}

/* =========================
   CABEÇALHO
   ========================= */

.downloads-header {
    text-align: center;
    margin-bottom: 60px;
}

    .downloads-header h1 {
        font-weight: 700;
        margin-bottom: 10px;
    }

    .downloads-header p {
        max-width: 720px;
        margin: 0 auto;
        color: #6b7280;
        font-size: 16px;
    }

/* =========================
   GRID
   ========================= */

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 🔥 2 por linha */
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

/* MOBILE */
@media (max-width: 768px) {
    .downloads-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* =========================
   CARD
   ========================= */

.download-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0,0,0,.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

    .download-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 26px 60px rgba(0,0,0,.12);
    }

/* =========================
   ÍCONE
   ========================= */

.download-icon {
    font-size: 58px;
    margin-bottom: 20px;
}

/* =========================
   TÍTULO
   ========================= */

.download-card h4 {
    font-weight: 700;
    margin-bottom: 16px;
}

/* =========================
   TEXTO
   ========================= */

.download-card p {
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 32px;
}

/* =========================
   BOTÃO
   ========================= */

.download-card .btn {
    padding: 12px 34px;
    font-weight: 600;
    border-radius: 999px;
}

/* =====================================================
   DARK MODE
   ===================================================== */

body[data-theme="dark"] .downloads-header p {
    color: #9ca3af;
}

body[data-theme="dark"] .download-card {
    background: #020617;
    color: #e5e7eb;
    box-shadow: 0 20px 60px rgba(0,0,0,.55);
}

    body[data-theme="dark"] .download-card p {
        color: #cbd5f5;
    }

/* =========================
   CONTATOS
   ========================= */

.contatos-page {
    min-height: calc(100vh - 90px);
    padding: 80px 20px;
    text-align: center;
}

.contatos-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.contatos-subtitle {
    color: #94a3b8;
    margin-bottom: 50px;
}

/* GRID */
.contatos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

/* CARD */
.contato-card {
    background: rgba(2, 6, 23, 0.8);
    border-radius: 18px;
    padding: 35px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .contato-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    }

    .contato-card h3 {
        margin: 15px 0;
        font-weight: 600;
    }

    .contato-card p {
        font-size: 0.95rem;
        color: #cbd5f5;
        margin-bottom: 20px;
    }

/* ÍCONE */
.contato-icon {
    font-size: 2.5rem;
}

/* INFO */
.contato-info {
    font-size: 1rem;
    color: #e5e7eb;
    line-height: 1.6;
}

/* MODO CLARO */
body[data-theme="light"] .contato-card {
    background: #ffffff;
    color: #1e293b;
}

    body[data-theme="light"] .contato-card p {
        color: #475569;
    }

body[data-theme="light"] .contato-info {
    color: #1e293b;
}

/* BOTÃO WHATSAPP – DESTAQUE */
.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #1ebe5d);
    color: #ffffff;
    border-radius: 999px;
    padding: 14px 36px;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .btn-whatsapp i {
        font-size: 1.3rem;
    }

    .btn-whatsapp:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 40px rgba(37, 211, 102, 0.6);
        color: #ffffff;
    }

/* FIXO */
.contato-fixo {
    margin-top: 90px; /* 🔥 mais para baixo */
    padding-top: 30px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 1rem;
    color: #cbd5f5;
    text-align: center;
}

/* =========================
   TABELA USUÁRIOS
   ========================= */

.usuarios-table th {
    font-weight: 600;
}

body[data-theme="dark"] .usuarios-table {
    color: #e5e7eb;
}

    body[data-theme="dark"] .usuarios-table thead {
        background: #020617;
    }

    body[data-theme="dark"] .usuarios-table tbody tr:hover {
        background-color: #1e293b;
    }
body[data-theme="dark"] .card {
    background-color: #020617;
    color: #e5e7eb;
}

body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select {
    background-color: #020617;
    color: #e5e7eb;
    border-color: #334155;
}

body[data-theme="dark"] .usuarios-table thead {
    background-color: #020617;
}
/* EDITOR */
.editor-toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

    .editor-toolbar button,
    .editor-toolbar select {
        padding: 6px 10px;
        border: 1px solid #cbd5f5;
        background: #fff;
        border-radius: 6px;
        cursor: pointer;
    }

.editor-box {
    min-height: 220px;
    padding: 12px;
    border: 1px solid #cbd5f5;
    border-radius: 8px;
    background: #fff;
}

/* DARK MODE */
body[data-theme="dark"] .editor-box {
    background-color: #020617;
    color: #e5e7eb;
    border-color: #334155;
}

body[data-theme="dark"] .editor-toolbar button,
body[data-theme="dark"] .editor-toolbar select {
    background-color: #020617;
    color: #e5e7eb;
    border-color: #334155;
}
.manual-page {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.manual-card {
    width: 100%;
    max-width: 1000px;
    background: var(--sinac-card-bg, #fff);
    border-radius: 14px;
    padding: 28px;
}

.manual-title {
    color: var(--sinac-blue);
    margin-bottom: 20px;
}

.manual-video {
    margin-bottom: 25px;
}

.manual-descricao {
    line-height: 1.7;
    margin-bottom: 25px;
}

.manual-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    opacity: .8;
}

.manual-actions {
    margin-top: 25px;
    display: flex;
    gap: 12px;
}

.editor {
    border: 1px solid #ccc;
    min-height: 160px;
    padding: 12px;
    border-radius: 8px;
    background: #fff;
}

/* DARK MODE */
body[data-theme="dark"] .manual-card {
    background: #020617;
}

body[data-theme="dark"] .editor {
    background: #020617;
    color: #e5e7eb;
    border-color: #334155;
}

/* =========================
   INPUT DE BUSCA – DARK MODE
   ========================= */
body[data-theme="dark"] input[type="text"],
body[data-theme="dark"] input[type="search"] {
    background-color: #0b1220;
    color: #e5e7eb;
    border: 1px solid #1f2a44;
}

body[data-theme="dark"] input::placeholder {
    color: #9ca3af; /* cinza claro, legível */
    opacity: 1;
}

/* foco */
body[data-theme="dark"] input:focus {
    background-color: #0b1220;
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.15rem rgba(59, 130, 246, 0.25);
}
/* ===== EDITOR DE TEXTO ===== */

.editor-toolbar {
    display: flex;
    gap: 6px;
    padding: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px 8px 0 0;
}

    .editor-toolbar button {
        background: transparent;
        border: 1px solid #3b82f6;
        color: #3b82f6;
        padding: 6px 10px;
        border-radius: 6px;
        cursor: pointer;
    }

        .editor-toolbar button:hover {
            background: #3b82f6;
            color: #fff;
        }

.editor-content {
    min-height: 180px;
    padding: 12px;
    border-radius: 0 0 10px 10px;
    border: 1px solid #334155;
    background: #020617;
    color: #e5e7eb;
    outline: none;
}

/* Tema claro */
body[data-theme="light"] .editor-content {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5f5;
}

/* =========================
   BOLETOS
   ========================= */

.boleto-card {
    border-radius: 14px;
    overflow: hidden;
}

.boleto-table thead th {
    font-weight: 600;
    white-space: nowrap;
}

/* DARK MODE */
body[data-theme="dark"] .boleto-card {
    background-color: #020617;
}

body[data-theme="dark"] .boleto-table {
    color: #e5e7eb;
}

    body[data-theme="dark"] .boleto-table thead {
        background-color: #020617;
    }

    body[data-theme="dark"] .boleto-table tbody tr:hover {
        background-color: #1e293b;
    }

body[data-theme="dark"] .card {
    background-color: #020617;
}
/* Dark mode tabela */
body[data-theme="dark"] .card {
    background-color: #0f172a;
    color: #e5e7eb;
}

body[data-theme="dark"] .table {
    color: #e5e7eb;
}

body[data-theme="dark"] .table-light {
    background-color: #020617 !important;
    color: #cbd5f5;
}

body[data-theme="dark"] .dark-thead th {
    background-color: #020617 !important;
    color: #cbd5f5;
    border-color: #1e293b;
}

body[data-theme="dark"] .table td,
body[data-theme="dark"] .table th {
    border-color: #1e293b;
}

body[data-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}
.manual-card {
    min-height: 280px; /* altura fixa do card */
}

/* Descrição curta com corte elegante */
.manual-descricao {
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* máximo de linhas */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Dark mode */
body[data-theme="dark"] .manual-descricao {
    color: #cbd5f5;
}
