/* =========================
   CONFIG GLOBAL
========================= */
:root {
    --container-width: 1024px; /* ALTERE AQUI */
    --primary: #4b5320;
}

html, body {
    overflow-x: hidden;
}

/* Mantém a barra de rolagem vertical sempre presente: assim, abrir um modal
   (que esconde a rolagem) não altera a largura útil nem desloca o layout. */
html {
    overflow-y: scroll;
}

/* Ao abrir um modal o Bootstrap adiciona padding-right ao body para compensar
   a barra de rolagem que ele esconde — e soma mais a cada modal empilhado,
   empurrando a tela. Como a barra fica sempre visível, anulamos essa
   compensação para o layout não se mover. */
body.modal-open {
    padding-right: 0 !important;
}

body {
    background: #fff;
    font-family: 'League Spartan', 'Segoe UI', sans-serif;
}

* {
    transition: all .25s cubic-bezier(.4,0,.2,1);
}

/* =========================
   TOPO
========================= */
.topbar {
    width: 100%;
    height: 70px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.container-fixed {
    max-width: var(--container-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

/* =========================
   BUSCA NO HEADER
========================= */
.search-box {
    position: relative;
    width: 260px;
}

.search-box .bi-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    pointer-events: none;
}

.search-box input {
    border-radius: 50px;
    padding-left: 38px;
    background: #f5f5f5;
    border: 1px solid #eee;
}

.search-box input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 .15rem rgba(75,83,32,0.15);
}

/* =========================
   AVATAR + DROPDOWN
========================= */
.avatar-toggle {
    cursor: pointer;
    border: 2px solid transparent;
}

.avatar-toggle:hover {
    border-color: var(--primary);
}

.dropdown-menu .dropdown-item i {
    width: 18px;
    margin-right: 8px;
    color: var(--primary);
}

/* =========================
   CONTENT
========================= */
.content {
    margin-top: 70px;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding: 30px;
    background: #f5f5f5;
    min-height: calc(100vh - 70px);
}

/* =========================
   BANNER
========================= */
.banner {
    background: linear-gradient(135deg, #4b5320, #2f3515);
    color: #fff;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.banner::after {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent);
    top: -50%;
    left: -50%;
    animation: rotateBg 10s linear infinite;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================
   CARDS
========================= */
.card-custom {
    border-radius: 15px;
    border: none;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    cursor: pointer;
    position: relative;
}

.card-custom:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card-dark {
    background: var(--primary);
    color: #fff;
    overflow: hidden;
    padding: 24px;
}

/* "?" decorativo no canto inferior direito */
.card-dark .help-mark {
    position: absolute;
    right: -10px;
    bottom: -30px;
    font-size: 140px;
    font-weight: 700;
    line-height: 1;
    color: rgba(255,255,255,0.08);
    pointer-events: none;
    user-select: none;
}

.card-dark h5 {
    font-weight: 700;
    margin-bottom: 8px;
}

.card-dark p {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
}

.card-dark .btn-falar {
    background: #fff;
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: .5px;
    padding: 8px 20px;
    font-size: 12px;
    text-transform: uppercase;
}

.card-dark .btn-falar:hover {
    background: #f5f5f5;
}

/* ÍCONE EM CAIXINHA */
.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #eef0e6;
    border-radius: 10px;
    color: var(--primary);
    font-size: 20px;
    flex-shrink: 0;
}

.icon-box-sm {
    width: 36px;
    height: 36px;
    font-size: 16px;
}

/* SETA DIAGONAL (canto superior direito) */
.card-arrow {
    position: absolute;
    top: 16px;
    right: 16px;
    color: #b5b5b5;
    font-size: 14px;
}

/* CARD COM ÍCONE LATERAL (horizontal) */
.card-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.card-row .card-row-text {
    flex-grow: 1;
    min-width: 0;
}

.card-row .chevron {
    color: #b5b5b5;
    font-size: 14px;
}

/* CARD ANDAMENTO DA OBRA (imagem em cima, conteúdo em baixo) */
.card-obra {
    padding: 0;
    overflow: hidden;
    background: #fff;
}

.card-obra-img {
    height: 110px;
    background-image: url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?w=800&h=500&fit=crop');
    background-size: cover;
    background-position: center;
}

.card-obra-content {
    padding: 14px 18px 16px;
}

.card-obra-content small {
    display: block;
    color: #888;
    letter-spacing: .5px;
    font-size: 10px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.card-obra-content strong {
    font-size: 15px;
}

.card-obra-content .progress {
    background: #eee;
    height: 5px;
}

/* =========================
   RODAPÉ
========================= */
.footer {
    margin-top: 60px;
    padding: 20px 0;
    border-top: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    letter-spacing: .8px;
    color: #888;
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #888;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary);
}

/* ITEM DE ATENDIMENTO (linha sem fundo de card) */
.support-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 4px;
    cursor: pointer;
    border-radius: 10px;
}

.support-item:hover {
    background: rgba(75,83,32,0.05);
}

.support-item .support-text {
    line-height: 1.2;
}

.support-item .support-text strong {
    font-size: 14px;
    display: block;
}

.support-item .support-text span {
    font-size: 12px;
    color: #888;
}

/* TITULO */
.section-title {
    font-weight: 600;
    margin: 30px 0 15px;
    border-left: 3px solid var(--primary);
    padding-left: 10px;
}

/* =========================
   TABLET (até 992px)
========================= */
@media (max-width: 992px) {

    .container-fixed {
        padding: 0 20px;
    }

    .content {
        padding: 25px 20px;
    }

    .banner {
        padding: 30px;
    }
}

/* =========================
   MOBILE REAL (APP STYLE)
========================= */
@media (max-width: 768px) {

    /* TOPBAR */
    .topbar {
        height: 60px;
    }

    .container-fixed {
        padding: 0 15px;
    }

    .topbar strong {
        font-size: 16px;
    }

    .topbar .bi-bell {
        font-size: 18px;
    }

    .avatar-toggle {
        width: 36px;
        height: 36px;
    }

    /* ESCONDE BUSCA */
    .topbar input {
        display: none !important;
    }

    /* CONTEÚDO */
    .content {
        margin-top: 60px;
        padding: 15px;
        max-width: 100%;
        min-height: calc(100vh - 60px);
    }

    /* Espaçamento vertical entre colunas empilhadas no mobile.
       (Não forçamos width:100% — deixamos as classes responsivas do Bootstrap
       decidirem: col-12 ocupa tudo, col-6 continua lado a lado, col-md-* empilha
       naturalmente abaixo de 768px.) */
    .row > [class*="col-"] {
        margin-bottom: 15px;
    }

    /* CARDS MAIS CLICÁVEIS */
    .card-custom {
        padding: 16px;
        border-radius: 12px;
    }

    /* desativa hover-lift em telas touch (evita travas visuais) */
    .card-custom:hover {
        transform: none;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    /* BOTÕES */
    .btn {
        padding: 10px 14px;
        font-size: 14px;
    }

    /* BANNER */
    .banner {
        padding: 22px;
        border-radius: 15px;
    }

    .banner h2 {
        font-size: 20px;
    }

    .banner p {
        font-size: 14px;
        margin-bottom: 0;
    }

    .section-title {
        margin: 20px 0 12px;
        font-size: 16px;
    }
}

/* =========================
   MOBILE PEQUENO (até 380px)
========================= */
@media (max-width: 380px) {

    .topbar strong {
        font-size: 15px;
    }

    .content {
        padding: 12px;
    }

    .banner {
        padding: 18px;
    }

    .banner h2 {
        font-size: 18px;
    }

    .card-custom {
        padding: 14px;
    }
}

/* =====================================================================
   PORTAL APP — COMPONENTES (padrão visual teste.html aplicado às páginas)
   ===================================================================== */
:root {
    --primary-dark: #2f3515;
    --primary-soft: #eef0e6;
    --danger-cp: #c83545;
    --ink: #2b2b2b;
    --muted: #8a8a8a;
    --line: #ececec;
    --app-width: 1140px;
    --table-head: #22373d;
    /* status (legenda + tabela) */
    --status-pago: #2f9e5f;
    --status-atraso: #e0544e;
    --status-futura: #e0a13a;
    --status-vencehoje: #2f6fd0;
}

body {
    background: #f5f5f5;
    color: var(--ink);
}

/* ---------- TOPBAR (header real) ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .04);
}

.topbar-inner {
    max-width: var(--app-width);
    margin: 0 auto;
    min-height: 68px;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-brand img {
    height: 40px;
    width: auto;
    display: block;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Lado direito do topbar: saudação acima da linha de botões (Alterar Contrato + usuário) */
.topbar-right {
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
}

/* Saudação em uma linha: rótulo discreto "Olá," + nome em destaque */
.topbar-greeting {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    line-height: 1.2;
    max-width: 440px;
}

.topbar-greeting .greeting-hello {
    font-size: 14px;
    font-weight: 500;
    color: #9a9a9a;
    letter-spacing: .4px;
    flex-shrink: 0;
}

.topbar-greeting .greeting-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-btn {
    background: #f5f5f5;
    border: 1px solid var(--line);
    color: #3a3a3a;
    font-size: 13px;
    font-weight: 500;
    border-radius: 50px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 260px;
}

.topbar-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-btn:hover {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: #e2e6d6;
}

.topbar-btn i {
    color: var(--primary);
    font-size: 15px;
}

.notification-icon {
    position: relative;
    display: inline-block;
    cursor: pointer;
    color: #5a5a5a;
    padding: 6px;
}

.notification-icon .bi-bell {
    font-size: 20px;
}

.notification-icon:hover .bi-bell {
    transform: rotate(-10deg);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger-cp);
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    border-radius: 50%;
    padding: 1px 5px;
    line-height: 1.3;
}

/* BUSCA NO TOPBAR */
.topbar-actions .search-box {
    width: clamp(150px, 16vw, 220px);
}

/* AVATAR + SUBMENU DO USUÁRIO (padrão teste.html) */
.user-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 3px 3px 3px 3px;
    border-radius: 50px;
    border: 1px solid transparent;
}

.user-toggle:hover {
    background: #f5f5f5;
    border-color: #ececec;
}

.user-toggle .avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
}

.user-toggle .user-name {
    font-size: 13px;
    font-weight: 600;
    color: #3a3a3a;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-toggle .bi-chevron-down {
    font-size: 11px;
    color: #9a9a9a;
}

.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    padding: 6px;
}

.dropdown-menu .dropdown-item {
    border-radius: 8px;
}

.dropdown-menu .dropdown-header {
    font-weight: 700;
    color: var(--ink);
    font-size: .78rem;
    letter-spacing: .3px;
}

.contratos-menu {
    width: 520px;
    max-width: calc(100vw - 32px);
    font-size: .8rem;
    padding: 12px;
    border: none;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}

/* Alinha o menu pela borda direita do botão (Alterar Contrato e usuário) e
   expande para a esquerda — vale tanto no hover (sem Popper) quanto no clique,
   e impede que o conteúdo ultrapasse o limite da tela. */
.contratos-menu.dropdown-menu,
.user-menu.dropdown-menu {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    margin: 0 !important;
}

.contratos-menu > li {
    overflow-x: auto;
}

.titulo-header-contrato {
    color: var(--primary);
    font-weight: 700;
}

.contratos-table {
    width: 100%;
    font-size: .9em;
    margin-bottom: 0;
    table-layout: fixed;
}

.contratos-table th,
.contratos-table td {
    white-space: normal;
    word-break: break-word;
}

.contratos-table thead th {
    background: var(--table-head);
    color: #fff;
    font-weight: 600;
    border-color: rgba(255, 255, 255, .25);
}

.dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 14px;
}

.dropdown-menu .dropdown-item i {
    width: 18px;
    margin-right: 8px;
    color: var(--primary);
}

.dropdown-menu .dropdown-item.text-danger i {
    color: inherit;
}

.navbar-toggler {
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    padding: 4px 8px;
    color: var(--primary);
    box-shadow: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler i {
    display: block;
}

/* ---------- CONTEÚDO DA PÁGINA ---------- */
.app-content {
    max-width: var(--app-width);
    margin: 0 auto;
    padding: 26px 24px 44px;
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin: 4px 0 22px;
}

.page-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
    border-left: 3px solid var(--primary);
    padding-left: 12px;
}

.page-subtitle {
    color: var(--muted);
    font-size: .95rem;
    margin: 6px 0 0 15px;
}

.page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- BOTÕES ---------- */
.btn-success {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
    --bs-btn-disabled-bg: var(--primary);
    --bs-btn-disabled-border-color: var(--primary);
    --bs-btn-focus-shadow-rgb: 75, 83, 32;
    border-radius: 50px;
    font-weight: 600;
}

.btn-outline-success {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-active-bg: var(--primary);
    --bs-btn-active-border-color: var(--primary);
    --bs-btn-focus-shadow-rgb: 75, 83, 32;
    border-radius: 50px;
}

.btn-white,
.btn-voltar {
    --bs-btn-color: #444;
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #e2e2e2;
    --bs-btn-hover-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-soft);
    --bs-btn-hover-border-color: #e2e6d6;
    border-radius: 50px;
    font-weight: 500;
}

.btn-voltar {
    font-size: .85rem;
    padding: 7px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---------- BARRA DE INFORMAÇÕES (empreendimento) ---------- */
.info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 0;
    padding: 14px 6px;
    margin: 0 0 22px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 2px 22px;
    flex: 1 1 auto;
    min-width: 140px;
}

.info-item:not(:last-child) {
    border-right: 1px solid var(--line);
}

.info-label {
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #9a9a9a;
    font-weight: 700;
    margin-bottom: 2px;
}

.info-value {
    font-size: .92rem;
    font-weight: 600;
    color: #333;
}

.banner-img-wrap {
    margin: 0 0 18px;
}

.banner-img {
    width: 100%;
    border-radius: 14px;
    display: block;
}

@media (max-width: 768px) {
    .info-item {
        flex: 1 1 45%;
        min-width: 0;
    }

    .info-item:nth-child(2n) {
        border-right: none;
    }
}

/* ---------- TABELAS ---------- */
.table-verde-corpal {
    --bs-table-color: #fff;
    --bs-table-bg: var(--table-head);
    --bs-table-border-color: rgba(255, 255, 255, .22);
    --bs-table-striped-color: #fff;
    --bs-table-striped-bg: #34505a;
    --bs-table-hover-color: #fff;
    --bs-table-hover-bg: #34505a;
    color: #fff;
    border-color: rgba(255, 255, 255, .22);
}

.table-verde-corpal th {
    font-weight: 600;
    vertical-align: middle;
}

/* Tabelas elegantes (sem cantos arredondados) */
.tabela-redonda {
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    border: 1px solid #e8e8e8;
    background: #fff;
    --bs-table-striped-bg: #fafbf7;
    --bs-table-striped-color: #333;
    --bs-table-hover-bg: #eef0e6;
    --bs-table-hover-color: #333;
}

.tabela-redonda th,
.tabela-redonda td {
    padding-top: 11px;
    padding-bottom: 11px;
    vertical-align: middle;
    border-color: #ededed;
}

.tabela-redonda thead.table-verde-corpal th {
    border-color: rgba(255, 255, 255, .18);
    text-transform: uppercase;
    font-size: .82em;
    letter-spacing: .4px;
}

/* ---------- BADGES / STATUS ---------- */
.bg-vermelho {
    background-color: var(--status-atraso) !important;
    border: 1px solid var(--status-atraso);
    width: 18px;
    height: 18px;
    display: inline-block;
    border-radius: 5px;
}

.bg-verde {
    background-color: var(--status-pago) !important;
    border: 1px solid var(--status-pago);
    width: 18px;
    height: 18px;
    display: inline-block;
    border-radius: 5px;
}

/* "cinza" = parcela futura / a vencer (agora em âmbar para melhor leitura) */
.bg-cinza {
    background-color: var(--status-futura) !important;
    border: 1px solid var(--status-futura);
    width: 18px;
    height: 18px;
    display: inline-block;
    border-radius: 5px;
}

/* "azul" = parcela que vence no dia corrente */
.bg-azul {
    background-color: var(--status-vencehoje) !important;
    border: 1px solid var(--status-vencehoje);
    width: 18px;
    height: 18px;
    display: inline-block;
    border-radius: 5px;
}

/* ---------- LEGENDA (status pills) ---------- */
.legenda-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.legenda-label {
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9aa0a6;
    margin-right: 2px;
}

.leg-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1;
    padding: 6px 14px 6px 11px;
    border-radius: 50px;
    border: 1px solid transparent;
}

/* ponto no mesmo formato (quadrado arredondado) do marcador da tabela */
.leg-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.leg-pago {
    background: #eaf6ef;
    color: #1f7a48;
    border-color: #cfe9da;
}

.leg-pago .leg-dot {
    background: var(--status-pago);
}

.leg-atraso {
    background: #fdeceb;
    color: #b23b36;
    border-color: #f6d4d2;
}

.leg-atraso .leg-dot {
    background: var(--status-atraso);
}

.leg-futura {
    background: #fdf4e3;
    color: #97681a;
    border-color: #f2e2c4;
}

.leg-futura .leg-dot {
    background: var(--status-futura);
}

.leg-vencehoje {
    background: #e9f1fc;
    color: #22539c;
    border-color: #cfe0f6;
}

.leg-vencehoje .leg-dot {
    background: var(--status-vencehoje);
}

/* compat: oculta a linha divisória antiga caso reste em algum template */
.separador3 {
    display: none;
}

@media (max-width: 768px) {
    .legenda-bar {
        justify-content: flex-start;
    }
}

/* ---------- CARDS MOBILE (duas colunas) ---------- */
.card.duas-colunas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 10px;
    font-size: .82rem;
    border-radius: 12px;
}

.card.duas-colunas strong {
    font-size: 1.05em;
}

.espaco-in-card {
    padding: 2px 0;
}

/* ---------- SELECT CUSTOMIZADO ---------- */
.custom-select {
    position: relative;
    width: 230px;
    max-width: 100%;
    background: #fff;
    border: 1px solid #e2e2e2;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: .85rem;
}

.custom-select:hover {
    border-color: #cfcfcf;
}

.custom-select .selected {
    padding: 0 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.custom-select .selected:after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    border-top: .4em solid #888;
    border-right: .4em solid transparent;
    border-left: .4em solid transparent;
}

.custom-select .options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    display: none;
    z-index: 999;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.custom-select .option {
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.custom-select .option:hover {
    background: #f5f5f5;
}

/* ---------- CARDS DE DADOS (cadastro / cliente) ---------- */
.card-cadastro {
    background: #fff;
    border: 1px solid #efefef;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
    margin-bottom: 16px;
}

.card-list {
    display: grid;
    gap: 14px;
}

.secao-titulo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0 14px;
}

.secao-titulo h4,
.bloco-titulo {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.secao-titulo h4 i,
.bloco-titulo i {
    color: var(--primary);
}

.endereco-header {
    font-weight: 600;
}

.form-label-readonly {
    color: #9a9a9a;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 600;
}

.info-readonly {
    font-weight: 600;
    color: var(--ink);
}

.alert-fixo {
    position: sticky;
    top: 84px;
    z-index: 5;
}

/* ---------- LISTA DE DOCUMENTOS ---------- */
.lista-documentos {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.lista-documentos li {
    background: #fff;
    border: 1px solid #efefef;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
}

.lista-documentos li:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .09);
    border-color: #e2e6d6;
}

.lista-documentos li .icone-doc {
    font-size: 1.6rem;
    color: var(--primary);
    flex-shrink: 0;
}

.lista-documentos li .info-doc {
    flex-grow: 1;
    min-width: 0;
}

.lista-documentos li .info-doc .nome {
    font-weight: 600;
    color: #333;
    word-break: break-word;
}

.lista-documentos li .info-doc .descricao {
    font-size: .82rem;
    color: var(--muted);
    margin-top: 2px;
    word-break: break-word;
}

.lista-documentos li .acao-doc {
    color: var(--primary);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.sem-documentos {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

/* ---------- ACCORDION (dúvidas) ---------- */
.accordion {
    --bs-accordion-border-color: #eee;
    --bs-accordion-btn-focus-box-shadow: 0 0 0 .15rem rgba(75, 83, 32, .18);
    --bs-accordion-active-bg: var(--primary);
    --bs-accordion-active-color: #fff;
}

.accordion-item {
    border: 1px solid #eee;
    border-radius: 12px !important;
    margin-bottom: 10px;
    overflow: hidden;
}

.accordion-button {
    font-weight: 600;
    color: #333;
}

.accordion-button:not(.collapsed) {
    background: var(--primary);
    color: #fff;
    box-shadow: none;
}

.accordion-button:not(.collapsed)::after {
    filter: brightness(0) invert(1);
}

/* ---------- BARRA DE PROGRESSO (obra) ---------- */
.progress {
    height: 18px;
    background-color: #eee !important;
    border-radius: 50px;
    overflow: hidden;
}

.progress-bar {
    background-color: var(--primary) !important;
    font-size: .72rem;
    font-weight: 600;
}

.texto_progress {
    font-size: .92rem;
    padding: 10px 0 5px;
    color: #444;
}

.link {
    cursor: pointer;
    color: var(--primary);
    text-decoration: none;
}

.link:hover {
    color: var(--primary-dark);
}

/* ---------- FORMULÁRIOS ---------- */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .15rem rgba(75, 83, 32, .15);
}

/* ---------- MODAIS ---------- */
.modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}

.modal-header {
    background: #7d4f27;
    color: #fff;
    border-bottom: none;
    padding: 15px 22px;
}

.modal-header .modal-title {
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
}

.modal-header .modal-title i {
    color: #fff;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: .85;
    box-shadow: none;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 22px;
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 14px 22px;
}

.btn-confirmar-ano {
    background: linear-gradient(135deg, #4b5320, #2f3515);
    color: #fff;
    border: none;
    font-weight: 600;
}

.btn-confirmar-ano:hover,
.btn-confirmar-ano:focus {
    background: linear-gradient(135deg, #3f4519, #262b10);
    color: #fff;
}

#demonstrativoModal .form-control:focus {
    border-color: #8a9a4f;
    box-shadow: 0 0 0 .2rem rgba(138, 154, 79, .25);
}

/* ---------- WHATSAPP FLUTUANTE ---------- */
.whatsapp-flutuante {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background-color: #25d366;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    text-decoration: none;
    z-index: 1050;
}

.whatsapp-flutuante:hover,
.whatsapp-flutuante:focus {
    background-color: #1ebe5d;
    color: #fff !important;
    transform: scale(1.08);
}

.whatsapp-flutuante i {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

@media (max-width: 576px) {
    .whatsapp-flutuante {
        width: 52px;
        height: 52px;
        font-size: 27px;
        bottom: 16px;
        right: 16px;
    }
}

/* ---------- MENU MOBILE ---------- */
.modal-backdrop.show {
    opacity: 0 !important;
}

.menu-modal {
    height: 100%;
    overflow-y: auto;
}

.menu-modal .modal-content {
    background-color: var(--primary-dark);
    border: none;
    border-radius: 0;
    min-height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-modal ul {
    list-style: none;
    padding: 0;
    margin: 50px 0;
    max-width: 540px;
    width: 100%;
    text-align: center;
}

.menu-modal ul li {
    margin: 16px 0;
}

.menu-modal ul li a {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    display: block;
}

.menu-modal .titulo-header-contrato {
    color: #cdd6b5;
}

.menu-modal .table-verde-corpal th {
    background: var(--table-head);
}

.menu-modal .btn-close {
    position: absolute;
    top: 20px;
    right: 25px;
    z-index: 10;
    filter: invert(1) brightness(200%);
    opacity: .9;
}

@media (min-width: 992px) {
    #menuModal { display: none !important; }
}

/* ---------- MODAL "PROCESSANDO" ---------- */
#divProcessarTela {
    display: none;
}

#divProcessarTela.show {
    display: block !important;
    background: rgba(0, 0, 0, .6);
}

#divProcessarTela .modal-dialog {
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#divProcessarTela .modal-content {
    background: none !important;
    border: none;
    box-shadow: none;
}

/* ---------- RODAPÉ ---------- */
.site-footer {
    background: #32331a;
    color: #cfcfcf;
    font-size: .9rem;
    margin-top: 40px;
}

.site-footer .footer-inner {
    max-width: var(--app-width);
    margin: 0 auto;
    padding: 42px 24px 18px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 30px;
}

.site-footer .footer-inner.footer-inner--single {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 40px;
    grid-template-columns: none;
    padding: 28px 24px;
}

.site-footer .footer-atendimento {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
}

.site-footer .footer-atendimento h6 {
    margin: 0;
    padding: 0 20px 0 0;
    border-right: 1px solid rgba(255, 255, 255, .18);
}

.site-footer .footer-atendimento h6::after {
    display: none;
}

.site-footer .footer-atendimento-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer .footer-atendimento-list li {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.site-footer .footer-atendimento-list li + li {
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, .18);
}

.site-footer .footer-atendimento-list a,
.site-footer .footer-atendimento-list span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #c2c2c2;
}

.site-footer .footer-atendimento-list a:hover {
    color: #fff;
}

.site-footer .footer-tel .footer-wa {
    color: #25d366;
    font-size: .92em;
    margin-left: 2px;
}

.site-footer h6 {
    color: #fff;
    font-weight: 700;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 10px;
}

.site-footer h6::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 34px;
    height: 2px;
    background: #8a9a4f;
}

.site-footer p {
    margin-bottom: 12px;
    line-height: 1.55;
    color: #c2c2c2;
}

.site-footer p span {
    color: #fff;
    font-weight: 600;
    display: block;
}

.site-footer a {
    color: #c2c2c2;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer ul li {
    margin-bottom: 9px;
}

.site-footer .social-icons {
    margin-top: 4px;
}

.site-footer .social-icons a {
    color: #cfcfcf;
    margin-right: 16px;
    font-size: 18px;
}

.site-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.site-footer .footer-bottom-inner {
    max-width: var(--app-width);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: .8rem;
    color: #9a9a9a;
}

@media (max-width: 900px) {
    .site-footer .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .site-footer .footer-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .site-footer .footer-inner.footer-inner--single {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-footer .footer-atendimento {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-footer .footer-atendimento h6 {
        padding: 0 0 6px;
        border-right: none;
    }

    .site-footer .footer-atendimento-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .site-footer .footer-atendimento-list li + li {
        padding-left: 0;
        border-left: none;
    }
}

/* ---------- LOGIN ---------- */
.login-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 82px;
}

.login-header .navbar {
    max-width: var(--app-width);
    width: 100%;
    padding: 0 24px !important;
    justify-content: center;
}

.login-header .nav-link {
    color: #777;
    font-size: 13px;
    padding: 0;
    border-bottom: 2px solid transparent;
}

.login-header .nav-link:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.login-header .social-icons a {
    color: #888;
    margin-left: 15px;
}

.login-header .social-icons a:hover {
    color: var(--primary);
}

.button_link {
    background-color: var(--primary);
    border: 1px solid var(--primary);
    color: #fff;
    font-size: 13px;
    padding: 9px 22px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
}

.button_link:hover {
    background-color: #fff;
    color: var(--primary);
}

.wp-block-button {
    min-width: 152px;
}

.login-main {
    min-height: calc(100vh - 82px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: #f5f5f5;
}

.login-card {
    background: #fff;
    border: none;
    border-radius: 20px;
    box-shadow: 0 12px 38px rgba(0, 0, 0, .08);
    padding: 16px;
    max-width: 440px;
    width: 100%;
}

.link-clean {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.link-clean:hover {
    color: var(--primary-dark);
}

/* Grupo de seleção de tipo (Pessoa) no modal "Esqueci a senha" */
.es-tipo-group {
    display: flex;
    gap: 8px;
}

.es-tipo-group .btn {
    flex: 1;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .login-header .social-icons,
    .login-header .navbar-nav {
        display: none;
    }
}

/* ============================================================
   Loading elegante (cp-loader)
   ============================================================ */
.cp-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    padding: 2.75rem 1rem;
    text-align: center;
}

.cp-loader__spinner {
    position: relative;
    width: 64px;
    height: 64px;
}

/* anel base suave */
.cp-loader__spinner::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid var(--primary-soft, #eef0e6);
}

/* anel girando com gradiente */
.cp-loader__spinner::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: var(--primary, #4b5320);
    border-right-color: var(--primary, #4b5320);
    animation: cp-spin 0.9s cubic-bezier(0.65, 0.15, 0.35, 0.85) infinite;
}

/* ponto central pulsando */
.cp-loader__dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--primary, #4b5320);
    animation: cp-pulse 0.9s ease-in-out infinite;
}

.cp-loader__text {
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--muted, #8a8a8a);
    animation: cp-fade 1.4s ease-in-out infinite;
}

@keyframes cp-spin {
    to { transform: rotate(360deg); }
}

@keyframes cp-pulse {
    0%, 100% { transform: scale(0.6); opacity: 0.55; }
    50%      { transform: scale(1);   opacity: 1; }
}

@keyframes cp-fade {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .cp-loader__spinner::after,
    .cp-loader__dot,
    .cp-loader__text {
        animation-duration: 2.2s;
    }
}

/* =====================================================================
   REFINAMENTOS MOBILE
   Melhoram a leitura/uso em telas pequenas SEM alterar o layout de
   computador — todas as regras vivem dentro de media queries max-width,
   portanto não afetam a configuração atual do desktop.
   ===================================================================== */

/* Linha que ocupa a largura toda dentro de um card .duas-colunas
   (usada como cabeçalho dos cards mobile de extrato/boletos). */
.card.duas-colunas .full-row {
    grid-column: 1 / -1;
}

.card.duas-colunas .full-row .badge {
    vertical-align: middle;
    margin-right: 6px;
}

/* ---------- TABLET (até 991.98px) ---------- */
@media (max-width: 991.98px) {
    .topbar-inner {
        min-height: 60px;
        padding: 8px 18px;
    }
}

/* ---------- CELULAR (até 767.98px) ---------- */
@media (max-width: 767.98px) {
    .app-content {
        padding: 18px 16px 36px;
    }

    .topbar-brand img {
        height: 34px;
    }

    .page-head {
        margin: 2px 0 16px;
        align-items: flex-start;
    }

    .page-title {
        font-size: 1.35rem;
    }

    .page-subtitle {
        font-size: .88rem;
        margin-left: 14px;
    }

    /* Ações do cabeçalho passam a ocupar a linha inteira e o botão estica. */
    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .secao-titulo h4,
    .bloco-titulo {
        font-size: 1rem;
    }

    .card-cadastro {
        padding: 16px;
    }

    /* Rolagem por toque mais suave nas tabelas que permanecem em modo scroll. */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

/* ---------- CELULAR PEQUENO (até 400px) ---------- */
@media (max-width: 400px) {
    .app-content {
        padding: 14px 12px 30px;
    }

    .topbar-inner {
        padding: 8px 12px;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .card.duas-colunas {
        font-size: .8rem;
    }
}

/* =====================================================================
   MENU MOBILE (pós-login) — conteúdo estruturado do #menuModal
   Apresentação dos dados do cliente/contrato + ações, sobre o fundo
   escuro (oliva) do menu fullscreen. Só aparece abaixo de 992px.
   ===================================================================== */
.menu-modal .mm-wrap {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 64px 22px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---- Usuário ---- */
.menu-modal .mm-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.menu-modal .mm-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    flex-shrink: 0;
}

.menu-modal .mm-user-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.menu-modal .mm-hello {
    font-size: .8rem;
    color: #cdd6b5;
    letter-spacing: .3px;
}

.menu-modal .mm-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    word-break: break-word;
}

/* ---- Card de informações do contrato atual ---- */
.menu-modal .mm-info {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-modal .mm-info-row {
    display: flex;
    gap: 12px;
}

.menu-modal .mm-info-row .mm-info-item {
    flex: 1 1 0;
    min-width: 0;
}

.menu-modal .mm-label {
    display: block;
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #aeb89a;
    font-weight: 700;
    margin-bottom: 2px;
}

.menu-modal .mm-value {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    color: #fff;
    word-break: break-word;
}

/* ---- Lista de ações ---- */
.menu-modal .mm-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-modal .mm-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 12px;
    padding: 13px 16px;
    color: #fff !important;
    font-size: .9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    text-decoration: none;
    cursor: pointer;
}

.menu-modal .mm-link:hover {
    background: rgba(255, 255, 255, .13);
}

.menu-modal .mm-link > i:first-child {
    font-size: 1.1rem;
    color: #cdd6b5;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.menu-modal .mm-link > span {
    flex: 1 1 auto;
    text-align: left;
}

.menu-modal .mm-chevron {
    font-size: .8rem;
    color: #cdd6b5;
    transition: transform .25s ease;
}

.menu-modal .mm-link[aria-expanded="true"] .mm-chevron {
    transform: rotate(180deg);
}

.menu-modal .mm-link-danger,
.menu-modal .mm-link-danger > i:first-child {
    color: #ffb4ac !important;
}

/* ---- Lista de outros contratos (collapse) ---- */
.menu-modal .mm-contratos {
    background: rgba(0, 0, 0, .20);
    border-radius: 12px;
    padding: 4px;
}

.menu-modal .mm-contratos-title {
    display: block;
    font-size: .64rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #aeb89a;
    font-weight: 700;
    padding: 9px 12px 5px;
}

.menu-modal .mm-contrato-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    cursor: pointer;
}

.menu-modal .mm-contrato-item:hover {
    background: rgba(255, 255, 255, .10);
}

.menu-modal .mm-contrato-item + .mm-contrato-item {
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.menu-modal .mm-contrato-emp {
    font-size: .92rem;
    font-weight: 600;
}

.menu-modal .mm-contrato-meta {
    font-size: .76rem;
    color: #c9d2b6;
}

.menu-modal .mm-empty {
    display: block;
    padding: 6px 12px 10px;
    font-size: .82rem;
    color: #c9d2b6;
}

/* ---- Redes sociais ---- */
.menu-modal .mm-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding-top: 6px;
}

.menu-modal .mm-social a {
    color: #fff;
    font-size: 26px;
    line-height: 1;
}

.menu-modal .mm-social a:hover {
    color: #cdd6b5;
}
