/* =========================================================
   SISTEMA CONDOMÍNIO — ESTILO "PREMIUM ESCURO"
   Redesenho visual (20/08/2026): tema escuro elegante com
   acentos dourados, para uma primeira impressão mais forte
   (uso interno + apresentação para os síndicos/gestores).

   IMPORTANTE: este arquivo NÃO controla o boleto bancário em
   si — a "ficha" impressa/baixada (linha digitável, código de
   barras, valores) fica isolada no bloco "FICHA DE BOLETO" lá
   embaixo, com cores fixas (preto/branco), independente do
   tema do site. Nada relacionado ao layout do boleto foi
   alterado nesta atualização.
   ========================================================= */
:root {
    /* ---- Superfícies ---- */
    --cor-fundo: #0a0e1a;              /* fundo geral da página */
    --bg-deep: #070a13;                 /* base dos gradientes profundos (sidebar, login, hero) */
    --bg-deep-2: #10182c;
    --bg-surface: #131a2c;              /* cards */
    --bg-surface-2: #182036;            /* hover / elementos elevados */
    --bg-surface-3: #1c2540;            /* inputs, chips */

    /* ---- Bordas ---- */
    --cor-borda: rgba(255,255,255,0.08);
    --cor-borda-forte: rgba(255,255,255,0.16);

    /* ---- Texto ---- */
    --cor-texto: #dde3f0;               /* texto padrão */
    --cor-texto-secundario: #8b93ab;    /* texto secundário / labels */
    --cor-texto-fraco: #5b6482;         /* texto bem discreto */
    --cor-primaria: #f2f5fb;            /* títulos / destaque de texto (quase branco) */

    /* ---- Acento dourado (marca) ---- */
    --cor-acento: #e3b354;
    --cor-acento-forte: #f4cc7a;
    --cor-acento-suave: rgba(227, 179, 84, 0.14);

    /* ---- Semânticas ---- */
    --cor-sucesso: #34d399;
    --cor-sucesso-suave: rgba(52, 211, 153, 0.14);
    --cor-perigo: #fb7185;
    --cor-perigo-suave: rgba(251, 113, 133, 0.14);
    --cor-info: #60a5fa;
    --cor-info-suave: rgba(96, 165, 250, 0.14);
    --cor-violeta: #a78bfa;
    --cor-violeta-suave: rgba(167, 139, 250, 0.14);

    --sombra: 0 10px 30px -6px rgba(0,0,0,0.55);
    --sombra-forte: 0 20px 60px -12px rgba(0,0,0,0.7);
    --brilho-dourado: 0 0 0 1px rgba(227,179,84,.3), 0 8px 24px -6px rgba(227,179,84,.25);
    --raio: 16px;
    --raio-sm: 10px;
}

* { box-sizing: border-box; }

::selection { background: var(--cor-acento); color: #1a1206; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-surface-3); border-radius: 10px; border: 2px solid var(--cor-fundo); }
::-webkit-scrollbar-thumb:hover { background: var(--cor-borda-forte); }

body {
    background-color: var(--cor-fundo);
    background-image:
        radial-gradient(1100px 550px at 88% -8%, rgba(227,179,84,0.09), transparent 60%),
        radial-gradient(900px 500px at -8% 8%, rgba(96,165,250,0.07), transparent 60%),
        radial-gradient(800px 480px at 50% 115%, rgba(167,139,250,0.055), transparent 60%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--cor-texto);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1, h2, h3, h4, h5, .brand-font {
    font-family: 'Poppins', 'Inter', sans-serif;
}

a { color: var(--cor-acento); }
a:hover { color: var(--cor-acento-forte); }

.text-muted { color: var(--cor-texto-secundario) !important; }

/* ---------- Tela de login ---------- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--cor-fundo);
    background-image:
        radial-gradient(1000px 600px at 15% -10%, rgba(227,179,84,0.12), transparent 60%),
        radial-gradient(900px 600px at 100% 100%, rgba(96,165,250,0.09), transparent 60%);
    padding: 20px;
}

.login-card {
    background: var(--bg-surface);
    border: 1px solid var(--cor-borda);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--sombra-forte);
    max-width: 940px;
    width: 100%;
}

.login-side {
    background: radial-gradient(600px 400px at 20% 0%, rgba(227,179,84,0.16), transparent 55%), linear-gradient(160deg, var(--bg-deep-2) 0%, var(--bg-deep) 100%);
    color: #fff;
    padding: 54px 44px;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.login-side::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(227, 162, 75, 0.22), transparent 70%);
    top: -90px;
    right: -90px;
}

.login-side::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96,165,250,0.16), transparent 70%);
    bottom: -100px;
    left: -60px;
}

.login-side .icon-wrap {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--cor-acento-forte), var(--cor-acento) 70%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #241a0a;
    margin-bottom: 24px;
    box-shadow: var(--brilho-dourado);
    position: relative;
    z-index: 1;
}

.login-side h3, .login-side p, .login-side ul { position: relative; z-index: 1; }

.login-form-side {
    padding: 54px 46px;
    background: var(--bg-surface);
}

.login-msg {
    font-size: 13.5px;
    background: var(--bg-surface-3) !important;
    border: 1px solid var(--cor-borda);
    color: var(--cor-texto-secundario) !important;
}

/* ---------- Layout interno (sidebar + conteúdo) ---------- */
.app-sidebar {
    width: 264px;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--bg-deep-2) 0%, var(--bg-deep) 100%);
    border-right: 1px solid var(--cor-borda);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    transition: transform .3s ease;
}

.app-sidebar .brand {
    padding: 24px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.app-sidebar .brand .icon-wrap {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--cor-acento-forte), var(--cor-acento) 70%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #241a0a;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: var(--brilho-dourado);
}

.app-sidebar .brand-text { line-height: 1.2; }

.app-sidebar .brand-text small {
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    letter-spacing: .5px;
}

.app-sidebar .nav-section-title {
    color: rgba(255,255,255,0.32);
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    padding: 20px 22px 8px;
}

.app-sidebar .nav-link {
    color: rgba(255,255,255,0.72);
    padding: 10.5px 22px;
    margin: 1px 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
    border-left: 3px solid transparent;
    transition: all .18s ease;
}

.app-sidebar .nav-link i { font-size: 17px; width: 20px; text-align: center; }

.app-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.app-sidebar .nav-link.active {
    background: var(--cor-acento-suave);
    color: var(--cor-acento-forte);
    border-left-color: var(--cor-acento);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(227,179,84,.18);
}

.app-sidebar .sidebar-footer {
    margin-top: auto;
    padding: 16px 22px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 12.5px;
    color: rgba(255,255,255,0.5);
}

.app-main {
    margin-left: 264px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    background: rgba(10, 14, 26, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--cor-borda);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.app-content { padding: 28px; flex: 1; }

.sidebar-toggle-btn {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--cor-primaria);
}

.user-chip { display: flex; align-items: center; gap: 10px; }

.user-chip .avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cor-acento-forte), var(--cor-acento) 70%);
    color: #241a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: var(--brilho-dourado);
}

/* ---------- Cards / componentes ---------- */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--cor-borda);
    border-radius: var(--raio);
    box-shadow: var(--sombra);
    color: var(--cor-texto);
}

.stat-card {
    position: relative;
    border-radius: var(--raio);
    padding: 22px;
    background: var(--bg-surface);
    border: 1px solid var(--cor-borda);
    box-shadow: var(--sombra);
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    animation: subirEDesvanecer .45s ease both;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--cor-borda-forte);
    box-shadow: var(--sombra-forte);
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card .stat-value {
    font-size: 25px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: var(--cor-primaria);
    line-height: 1.15;
}

.stat-card .stat-label {
    font-size: 12.5px;
    color: var(--cor-texto-secundario);
}

.stat-card .stat-trend {
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
}
.stat-trend.up { color: var(--cor-sucesso); }
.stat-trend.down { color: var(--cor-perigo); }

.bg-soft-primary { background: var(--cor-info-suave); color: var(--cor-info); }
.bg-soft-success { background: var(--cor-sucesso-suave); color: var(--cor-sucesso); }
.bg-soft-danger  { background: var(--cor-perigo-suave); color: var(--cor-perigo); }
.bg-soft-gold    { background: var(--cor-acento-suave); color: var(--cor-acento-forte); }
.bg-soft-violeta { background: var(--cor-violeta-suave); color: var(--cor-violeta); }

.section-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--cor-primaria);
    letter-spacing: .2px;
}

.table { color: var(--cor-texto); }
.table thead th {
    color: var(--cor-texto-secundario);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .6px;
    border-bottom: 1px solid var(--cor-borda);
    font-weight: 600;
    background: transparent;
}
.table td, .table th { vertical-align: middle; border-color: var(--cor-borda); }
.table-hover > tbody > tr:hover > * { background-color: var(--bg-surface-2); color: var(--cor-texto); }

.btn-primary {
    background: linear-gradient(135deg, var(--cor-acento-forte), var(--cor-acento));
    border-color: var(--cor-acento);
    color: #241a0a;
    font-weight: 600;
    box-shadow: 0 4px 14px -4px rgba(227,179,84,.45);
}
.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #ffdd99, var(--cor-acento-forte));
    border-color: var(--cor-acento-forte);
    color: #241a0a;
    box-shadow: 0 6px 20px -4px rgba(227,179,84,.6);
}

.btn-gold {
    background: linear-gradient(135deg, var(--cor-acento-forte), var(--cor-acento));
    border-color: var(--cor-acento);
    color: #241a0a;
    font-weight: 600;
}
.btn-gold:hover { filter: brightness(1.07); color: #241a0a; }

.btn-outline-primary {
    color: var(--cor-acento-forte);
    border-color: rgba(227,179,84,.55);
}
.btn-outline-primary:hover {
    background: var(--cor-acento);
    border-color: var(--cor-acento);
    color: #241a0a;
}

.btn-light {
    background: var(--bg-surface-3);
    border-color: var(--cor-borda-forte);
    color: var(--cor-texto);
}
.btn-light:hover { background: var(--bg-surface-2); color: var(--cor-primaria); }

.badge { font-weight: 500; padding: 6px 10px; border-radius: 8px; }

.avatar-sm {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--cor-acento-forte), var(--cor-acento) 70%);
    color: #241a0a;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
}

.aviso-card {
    border-left: 4px solid var(--cor-acento);
    background: var(--bg-surface-2);
    border: 1px solid var(--cor-borda);
    border-left: 4px solid var(--cor-acento);
    border-radius: 10px;
    padding: 16px 18px;
}
.aviso-card.importante { border-left-color: var(--cor-perigo); }

/* ---------- Widgets criativos do dashboard ---------- */

/* Anel de progresso (ex.: taxa de inadimplência) desenhado só em CSS */
.gauge-ring {
    --pct: 0;
    --cor-anel: var(--cor-acento);
    width: 108px;
    height: 108px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--cor-anel) calc(var(--pct) * 1%), var(--bg-surface-3) 0);
    flex-shrink: 0;
    position: relative;
}
.gauge-ring::before {
    content: '';
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: var(--bg-surface);
}
.gauge-ring .gauge-valor {
    position: relative;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 21px;
    color: var(--cor-primaria);
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--cor-borda);
}
.ranking-item:last-child { border-bottom: none; }
.ranking-item .ranking-pos {
    width: 26px; height: 26px;
    border-radius: 8px;
    background: var(--bg-surface-3);
    color: var(--cor-texto-secundario);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; flex-shrink: 0;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--cor-borda);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-dot {
    width: 10px; height: 10px; border-radius: 50%;
    margin-top: 5px; flex-shrink: 0;
    background: var(--cor-info);
    box-shadow: 0 0 0 4px var(--cor-info-suave);
}
.timeline-dot.venceu-hoje { background: var(--cor-acento); box-shadow: 0 0 0 4px var(--cor-acento-suave); }
.timeline-dot.atrasado { background: var(--cor-perigo); box-shadow: 0 0 0 4px var(--cor-perigo-suave); }

.pill-dias {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.hero-banner {
    border-radius: 20px;
    padding: 28px 30px;
    background: radial-gradient(700px 280px at 100% 0%, rgba(227,179,84,0.14), transparent 60%), linear-gradient(135deg, var(--bg-deep-2), var(--bg-deep));
    border: 1px solid var(--cor-borda);
    position: relative;
    overflow: hidden;
}

@keyframes subirEDesvanecer {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.stat-card:nth-of-type(1) { animation-delay: .02s; }
.stat-card:nth-of-type(2) { animation-delay: .07s; }
.stat-card:nth-of-type(3) { animation-delay: .12s; }
.stat-card:nth-of-type(4) { animation-delay: .17s; }

.card { animation: subirEDesvanecer .45s ease both; }

/* ---------- Boleto (pré-visualização simples, não usada na ficha real) ---------- */
.boleto-box {
    background: #fff;
    border: 1px solid #e6e9f0;
    border-radius: var(--raio);
    padding: 30px;
    max-width: 780px;
    margin: 0 auto;
    color: #2b2f38;
}
.boleto-box .linha-digitavel {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    font-size: 15px;
    background: #f4f6fa;
    padding: 10px 14px;
    border-radius: 8px;
}
.barcode-fake {
    height: 50px;
    background: repeating-linear-gradient(90deg, #111 0px, #111 2px, transparent 2px, transparent 4px, #111 4px, #111 5px, transparent 5px, transparent 9px);
}

/* =========================================================
   FICHA DE BOLETO — documento bancário real (Recibo do
   Pagador + Ficha de Compensação). Cores INTENCIONALMENTE
   fixas em preto/branco, independentes do tema do site, e
   NÃO foram alteradas nesta atualização visual — é o mesmo
   documento já validado no banco.
   ========================================================= */
.ficha-boleto {
    background: #fff;
    max-width: 800px;
    margin: 0 auto 24px auto;
    font-family: Arial, Helvetica, sans-serif;
    color: #111;
    font-size: 11.5px;
}
.ficha-tabela {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.ficha-tabela td {
    border: 1px solid #333;
    padding: 3px 6px;
    vertical-align: top;
    line-height: 1.3;
}
.ficha-tabela .sem-borda-inf { border: none; padding: 0; }
.ficha-tabela .sub-tabela { width: 100%; border-collapse: collapse; }
.ficha-tabela .sub-tabela td { border: 1px solid #333; border-top: none; }
.ficha-tabela .celula-topo { border: none; border-bottom: 3px solid #111; padding: 6px 4px 8px; }
.ficha-tabela .celula-barra { border: none; padding-top: 10px; }
.c-label { font-size: 8.5px; color: #444; text-transform: uppercase; letter-spacing: 0.2px; }
.c-valor { display: inline-block; font-size: 12px; color: #111; font-weight: 600; text-transform: none; margin-top: 2px; }
.c-valor-sec { display: inline-block; font-size: 10px; color: #555; font-weight: 400; margin-top: 1px; }
.c-valor.destaque { font-size: 13px; }
.instrucoes-cel { font-size: 8.5px; }
.instrucoes-txt { font-size: 10.5px; font-weight: 400; line-height: 1.5; }
.banco-nome { font-weight: 800; font-size: 17px; letter-spacing: 0.3px; }
.banco-emblema { color: #1a8f4c; }
.banco-codigo { border-left: 2px solid #111; padding-left: 8px; margin-left: 6px; font-size: 15px; }
.recibo-titulo { font-size: 11px; font-weight: 600; color: #333; }
.linha-digitavel { font-family: 'Courier New', monospace; font-weight: 700; font-size: 13px; letter-spacing: 0.5px; }
.linha-corte { text-align: center; border-top: 1px dashed #999; margin: 10px 0 14px; position: relative; }
.linha-corte span { position: relative; top: -9px; background: #fff; padding: 0 10px; font-size: 9px; color: #999; }

/* ---------- Impressão: sempre em papel claro, independente do tema escuro da tela ---------- */
@media print {
    :root {
        --cor-fundo: #f4f6fa;
        --cor-texto: #2b2f38;
        --cor-texto-secundario: #8891a5;
        --cor-primaria: #1b2a4a;
        --cor-borda: #e6e9f0;
        --bg-surface: #fff;
        --bg-surface-2: #fff;
        --bg-surface-3: #f4f6fa;
    }
    .no-print { display: none !important; }
    .app-sidebar, .app-topbar { display: none !important; }
    .app-main { margin-left: 0 !important; }
    body { background: #fff !important; color: #2b2f38 !important; }
    .card, .stat-card, .aviso-card {
        background: #fff !important;
        border: 1px solid #e6e9f0 !important;
        box-shadow: none !important;
        color: #2b2f38 !important;
        animation: none !important;
    }
    .table thead th { color: #8891a5 !important; border-bottom: 2px solid #e6e9f0 !important; }
    .bg-soft-primary { background: #e9edf7 !important; color: #1b2a4a !important; }
    .bg-soft-success { background: #e2f7ec !important; color: #1e9e5f !important; }
    .bg-soft-danger  { background: #fbe7e9 !important; color: #d94452 !important; }
    .bg-soft-gold    { background: #f4e9d0 !important; color: #a5813a !important; }
    .bg-soft-violeta { background: #ece7fb !important; color: #6c4fd9 !important; }
    .ficha-boleto { margin-bottom: 0; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0,0,0,0.4);
    }
    .app-sidebar.show { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .sidebar-toggle-btn { display: block; }
    .sidebar-backdrop {
        display: none;
        position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 1025;
    }
    .sidebar-backdrop.show { display: block; }
}

@media (max-width: 575.98px) {
    .app-content { padding: 16px; }
    .stat-card { padding: 16px; }
}
