@import url('dashboard.css');
@import url('integracção.css');
@import url('home.css');
@import url('assinatura.css');
@import url('blocob.css');
@import url('blococ.css');
@import url('faq-footer.css');


:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --muted: #000000;
    --text: #000000;
    --accent-blue: #0080ff;
    --accent-green: #23c55f;
    --accent-yellow: #ffbf49;
    --accent-red: #ff2a2a;
    --card-radius: 12px;
    --card-shadow: 0 10px 30px rgba(8, 20, 38, 0.06);
    --glass-border: 1px solid rgba(8, 20, 38, 0.06);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

:root[data-theme="dark"],
html.dark-mode {
    --bg: #0f172a;
    --surface: #1e293b;
    --muted: #94a3b8;
    --text: #f1f5f9;
    --accent-blue: #0b69ff;
    --accent-green: #23c55f;
    --accent-yellow: #ffbf49;
    --accent-red: #ff2a2a;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --glass-border: 1px solid rgba(148, 163, 184, 0.1);
}

body[data-theme="dark"],
html.dark-mode body {
    background-color: var(--bg);
    color: var(--text);
}

/* Base e Reset Básico */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    /* Fundo cinza claro */
    color: #343a40;
    background-color: #ffffff;
}

.container {
    width: 100%;
    max-width: 1250px;
    /* Aumentei um pouco a largura máxima */
    margin: 0 auto;
}


html.dark-mode h1,
html.dark-mode h2 {
    color: #f1f5f9;
}



/* Theme Toggle Button */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-blue);
    background: rgba(11, 105, 255, 0.08);
    color: var(--accent-blue);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 0;
}

.theme-toggle-btn:hover {
    background: var(--accent-blue);
    color: #ffffff;
    transform: rotate(20deg) scale(1.05);
    box-shadow: 0 6px 16px rgba(11, 105, 255, 0.3);
}

.theme-toggle-btn i {
    transition: transform 0.3s ease;
}

/* Login Button */
.login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--accent-blue), #0854cc);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(11, 105, 255, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 105, 255, 0.4);
}

.login-btn i {
    font-size: 1rem;
}

/* Old theme-toggle (compatibility) */
.theme-toggle {
    display: none;
}


/* --- Conteúdo da Página de Integração (main-content) --- */
.main-content {
    padding: 30px 0;
}

.page-title h1 {
      font-size: 3.2rem;
      font-weight: 800;
      line-height: 1.1;
      margin-bottom: 25px;
      color: var(--text);
      position: relative;
      z-index: 2;
}

.page-title p {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 30px;
}

/* --- Status da Conexão (Integração) --- */
.status-grid {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.status-item {
    flex-grow: 1;
}

.status-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0 0 5px 0;
}

.status-value {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.status-connected {
    color: #28a745;
    /* Verde para "Conectado" */
    font-weight: bold;
}

.status-disconnected {
    color: #dc3545;
    /* Vermelho para "Desconectado" */
    font-weight: bold;
}

/* Link e Erro */
.link-info,
.error-info {
    margin-bottom: 20px;
}

.link-box {
    background-color: #e9ecef;
    border-radius: 4px;
    padding: 10px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #495057;
    overflow-x: auto;
}

.error-message {
    color: #dc3545;
    /* Destaque em vermelho para erros */
    margin: 0;
}

/* Formulário de Conexão */
.form-group {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
    /* Permite quebrar em telas pequenas */
}

.form-group label {
    font-size: 0.95rem;
    color: #495057;
    width: 100%;
    /* Faz o label ocupar toda a largura */
    margin-bottom: 5px;
}

.form-group input {
    flex-grow: 1;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    color: #495057;
    min-width: 200px;
}

/* Instruções (Integração) */
.instruction-card {
    background-color: #f7f9fc;
    border-color: #007bff;
    border-left: 5px solid #007bff;
}

.instruction-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #007bff;
}

.instruction-header i {
    font-size: 1.2rem;
    margin-right: 10px;
}

.instruction-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #007bff;
}

.instruction-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-size: 0.95rem;
}

.instruction-list li {
    margin-bottom: 8px;
    padding-left: 10px;
    counter-increment: step-counter;
}

.instruction-list li:before {
    content: counter(step-counter) ".";
    font-weight: bold;
    color: #495057;
    margin-right: 5px;
}

/* --- Responsividade Geral --- */
@media (max-width: 992px) {
    .container {
        width: 95%;
    }

    .kpi-card {
        flex: 1 1 45%;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .nav {
        margin-top: 15px;
    }

    .nav a {
        margin: 0 10px;
    }

    .status-grid {
        flex-direction: column;
        gap: 15px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-secondary {
        margin-top: 10px;
    }

    .form-group {
        flex-direction: column;
    }

    .form-group input,
    .btn-primary {
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .kpi-card {
        flex: 1 1 100%;
    }

    .sync-status-card {
        flex-direction: column;
        align-items: stretch;
    }

    .sync-details {
        margin-bottom: 10px;
    }

    .sync-button {
        width: 100%;
        margin-top: 0;
    }

    .data-table th,
    .data-table td {
        padding: 8px 5px;
        font-size: 0.85rem;
    }
}

/* ===== Ajustes de legibilidade para modo escuro ===== */
/* Garante contraste para títulos, valores e metadados dos KPIs */
:root[data-theme="dark"] .kpi-card,
html.dark-mode .kpi-card {
        background: var(--card) !important;
        border-color: rgba(148, 163, 184, 0.14) !important;
        box-shadow: 0 6px 18px rgba(0,0,0,0.35) !important;
}

:root[data-theme="dark"] .kpi-card h4,
html.dark-mode .kpi-card h4,
:root[data-theme="dark"] .kpi-card .label,
html.dark-mode .kpi-card .label {
        color: #f1f5f9 !important;
}

:root[data-theme="dark"] .kpi-card .valor,
html.dark-mode .kpi-card .valor,
:root[data-theme="dark"] .kpi-card .value,
html.dark-mode .kpi-card .value {
        color: #f8fafc !important;
}

:root[data-theme="dark"] .kpi-card .meta,
html.dark-mode .kpi-card .meta,
:root[data-theme="dark"] .kpi-card .muted,
html.dark-mode .kpi-card .muted {
        color: #94a3b8 !important;
}
