/* ==========================================================================
   Sistema Domus — Central do Parceiro
   Identidade visual alinhada ao Domus (Sidebar Esmeralda + Canvas Editorial Claro)
   ========================================================================== */

:root {
    --domus-slate: #1e293b;
    --domus-slate-dark: #0f172a;
    --domus-emerald: #134b42;
    --domus-emerald-deep: #0a2621;
    --domus-gold: #EEA83B;
    --domus-gold-hover: #d89632;
    --domus-bg: #f8fafc;
    --domus-surface: #ffffff;
    --domus-border: #e2e8f0;
    --domus-border-subtle: rgba(15, 23, 42, 0.075);
    --domus-text: #0f172a;
    --domus-text-body: #334155;
    --domus-text-muted: #64748b;
    --domus-page-waves:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 900' preserveAspectRatio='none'%3E%3Cpath fill='%23134b42' fill-opacity='0.025' d='M0,0 L1440,0 L1440,125 C1200,185 920,85 620,145 C360,195 150,115 0,155 Z'/%3E%3Cpath fill='%23134b42' fill-opacity='0.034' d='M0,620 C260,550 520,710 820,635 C1080,570 1280,655 1440,590 L1440,900 L0,900 Z'/%3E%3Cpath fill='%231e293b' fill-opacity='0.044' d='M0,710 C220,765 460,645 760,720 C1040,790 1260,680 1440,725 L1440,900 L0,900 Z'/%3E%3Cpath fill='%2364748b' fill-opacity='0.032' d='M0,805 C320,765 620,845 960,790 C1180,755 1340,810 1440,785 L1440,900 L0,900 Z'/%3E%3C/svg%3E"),
        linear-gradient(180deg, #ffffff 0%, #f9fbfc 52%, #f1f5f9 100%);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    color: var(--domus-text-body);
    -webkit-font-smoothing: antialiased;
}

body.app-shell {
    background: linear-gradient(180deg, var(--domus-slate) 0%, var(--domus-emerald-deep) 100%);
    min-height: 100vh;
    padding-top: 3.5rem;
}

body.sidebar-open {
    overflow: hidden;
}

a {
    color: var(--domus-emerald);
    text-decoration: none;
    transition: color 0.18s ease;
}
a:hover {
    color: var(--domus-emerald-deep);
}

/* ==========================================================================
   Topbar Mobile (idêntica ao comportamento do Domus: visível < 992px)
   ========================================================================== */
.topbar-domus {
    background: linear-gradient(90deg, rgba(20, 28, 42, 0.96) 0%, rgba(10, 38, 33, 0.96) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.4);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3.5rem;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

.topbar-domus .logotipo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}
.topbar-domus .logotipo img {
    height: 2.15rem;
    width: auto;
    max-width: 165px;
    object-fit: contain;
}

.topbar-icon-btn {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.topbar-icon-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: var(--domus-gold);
}
.topbar-icon-btn.logout:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

/* ==========================================================================
   Sidebar Fixa Domus
   ========================================================================== */
.sidebar-overlay {
    position: fixed;
    top: 3.5rem;
    left: 0;
    width: 100vw;
    height: calc(100vh - 3.5rem);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    z-index: 1055;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    width: 15.5rem;
    max-width: 82vw;
    height: calc(100vh - 3.5rem);
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' preserveAspectRatio='none'%3E%3Cpath fill='%23051411' fill-opacity='0.4' d='M0,200 C50,150 50,50 200,0 L200,200 Z' /%3E%3Cpath fill='%23051411' fill-opacity='0.25' d='M0,200 C80,180 120,80 200,0 L200,200 Z' /%3E%3C/svg%3E") center / 100% 100% no-repeat,
        linear-gradient(180deg, var(--domus-slate) 0%, var(--domus-emerald-deep) 100%);
    color: #ffffff;
    position: fixed;
    top: 3.5rem;
    left: 0;
    padding: 0.85rem 0.65rem 1rem;
    z-index: 1060;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.sidebar.active {
    transform: translateX(0);
}

.sidebar-logo {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.5rem 0.95rem;
    margin-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-logo img {
    height: 2.35rem;
    width: auto;
    max-width: 10.75rem;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.22s ease;
}
.sidebar-logo a:hover img {
    transform: scale(1.03);
}

.menu-section-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(255, 255, 255, 0.38);
    font-weight: 700;
    margin: 0.5rem 0 0.35rem 0.65rem;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.menu-list li {
    margin-bottom: 0.18rem;
}
.menu-list li a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.86rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.22s ease;
}
.menu-list li a i {
    font-size: 0.98rem;
    width: 1.25rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.22s ease, transform 0.22s ease;
}
.menu-list li a:hover {
    background: rgba(5, 18, 16, 0.3);
    color: #ffffff;
    transform: translateX(3px);
}
.menu-list li a:hover i {
    color: var(--domus-gold);
}
.menu-list li a.active {
    background: rgba(5, 18, 16, 0.5);
    color: #ffffff;
    font-weight: 700;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.24);
}
.menu-list li a.active i {
    color: var(--domus-gold);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.55rem;
    margin-bottom: 0.35rem;
}
.sidebar-user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--domus-gold);
    font-size: 0.74rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sidebar-user-info {
    min-width: 0;
    flex: 1;
}
.sidebar-user-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    display: block;
    font-size: 0.69rem;
    color: rgba(255, 255, 255, 0.48);
}

/* ==========================================================================
   Área Principal (.main-content) — Canvas Claro com Ondas Domus
   ========================================================================== */
.main-content {
    width: 100%;
    min-height: calc(100vh - 3.5rem);
    background-color: var(--domus-bg);
    background-image: var(--domus-page-waves);
    background-repeat: no-repeat;
    background-size: 100vw 100vh;
    background-attachment: fixed;
    padding: 1rem 0.9rem 2.5rem;
}

.domus-shell {
    max-width: 1260px;
    margin: 0 auto;
}

@media (min-width: 62rem) {
    body.app-shell {
        padding-top: 0;
    }
    .topbar-domus {
        display: none;
    }
    .sidebar {
        width: 14.375rem;
        max-width: 14.375rem;
        height: 100vh;
        top: 0;
        transform: translateX(0);
        padding: 0.75rem 0.45rem 0.9rem;
    }
    .sidebar-logo {
        display: flex;
    }
    .main-content {
        margin-left: 14.375rem;
        width: calc(100% - 14.375rem);
        min-height: 100vh;
        padding: 1.25rem 1.75rem 2.75rem;
        border-top-left-radius: 1.5rem;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
        background-position: 14.375rem 0;
        background-size: calc(100vw - 14.375rem) 100vh;
    }
}

/* ==========================================================================
   Hero Domus (Ondas Oceânicas Esmeralda)
   ========================================================================== */
.domus-hero {
    position: relative;
    overflow: hidden;
    border-radius: 1.15rem;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.15rem;
    color: #ffffff;
    background-color: #0f172a;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' preserveAspectRatio='none'%3E%3Cpath fill='%23134b42' fill-opacity='0.48' d='M0,128L48,138.7C96,149,192,171,288,160C384,149,480,107,576,106.7C672,107,768,149,864,170.7C960,192,1056,192,1152,176C1248,160,1344,128,1392,112L1440,96L1440,320L0,320Z'/%3E%3Cpath fill='%231e293b' fill-opacity='0.78' d='M0,192C240,240 480,145 760,205C1040,260 1260,170 1440,198L1440,320L0,320Z'/%3E%3Cpath fill='%2394a3b8' fill-opacity='0.08' d='M0,248C280,210 560,285 880,235C1140,195 1300,250 1440,228L1440,320L0,320Z'/%3E%3C/svg%3E"),
        linear-gradient(135deg, #0f172a 0%, #162e36 52%, #103932 100%);
    background-position: bottom center, center;
    background-size: cover, 100% 100%;
    background-repeat: no-repeat;
    box-shadow: 0 14px 32px -12px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.domus-hero h1 {
    margin: 0 0 0.3rem;
    font-size: 1.48rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #ffffff;
    line-height: 1.2;
}
.domus-hero p {
    margin: 0;
    font-size: 0.87rem;
    color: #cbd5e1;
    line-height: 1.45;
}
.domus-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}
.btn-hero-glass {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.52rem 0.95rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.btn-hero-glass:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

/* ==========================================================================
   Barra de Abas / Seletor Indexado (.domus-tabs-bar fiel ao Domus)
   ========================================================================== */
.domus-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.15rem;
}

.nav-pills-domus {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.825rem;
    padding: 0.28rem;
    gap: 0.25rem;
    box-shadow: 0 4px 14px -4px rgba(15, 23, 42, 0.05);
}

.index-tab {
    border-radius: 0.58rem;
    padding: 0.46rem 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    font-size: 0.81rem;
    font-family: inherit;
    color: #475569;
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
}
.index-tab i {
    font-size: 0.84rem;
    color: #64748b;
}
.index-tab:hover {
    background: rgba(19, 75, 66, 0.07);
    color: #0f172a;
}
.index-tab.active {
    background-color: #0f172a;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 60' preserveAspectRatio='none'%3E%3Cpath fill='%23134b42' fill-opacity='0.65' d='M0,34 C55,14 115,50 175,28 C205,18 225,35 240,24 L240,60 L0,60 Z'/%3E%3Cpath fill='%231e293b' fill-opacity='0.45' d='M0,45 C70,58 140,26 205,44 C222,49 232,42 240,45 L240,60 L0,60 Z'/%3E%3C/svg%3E"),
        linear-gradient(135deg, #134b42 0%, #0a2621 100%);
    background-position: bottom center, center;
    background-size: 100% 85%, 100% 100%;
    background-repeat: no-repeat;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 6px 14px -4px rgba(19, 75, 66, 0.35);
}
.index-tab.active i {
    color: var(--domus-gold);
}

/* Indicadores de ponto minimalistas (sem pílulas grandes) */
.dot-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.dot-online { background-color: #10b981; }
.dot-manutencao { background-color: #f59e0b; }
.dot-offline { background-color: #ef4444; }

/* ==========================================================================
   KPIs Editoriais (.kpi-grid) — Cartão Branco Minimalista Domus
   ========================================================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 1180px) {
    .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.kpi-card {
    background: var(--domus-surface);
    border: 1px solid var(--domus-border-subtle);
    border-radius: 0.95rem;
    padding: 1rem 1.05rem;
    box-shadow: 0 4px 16px -6px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.45rem;
    position: relative;
    overflow: hidden;
}
.kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--domus-text-muted);
}
.kpi-icon {
    width: 1.95rem;
    height: 1.95rem;
    border-radius: 0.5rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.86rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.kpi-icon.kpi-icon-red {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}
.kpi-card.kpi-card-red {
    border-color: #fecaca;
}
.kpi-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--domus-text);
    letter-spacing: -0.025em;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}
.kpi-sub {
    font-size: 0.73rem;
    color: var(--domus-text-muted);
    line-height: 1.3;
}

/* ==========================================================================
   Painel Spotlight do Condomínio Selecionado (Editorial Branco)
   ========================================================================== */
.condo-spotlight {
    background: var(--domus-surface);
    border: 1px solid rgba(19, 75, 66, 0.24);
    border-left: 4px solid var(--domus-emerald);
    border-radius: 1rem;
    padding: 1.25rem 1.4rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 24px -10px rgba(19, 75, 66, 0.12);
}
.spotlight-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}
.spotlight-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--domus-text);
    letter-spacing: -0.015em;
}
.spotlight-meta {
    margin-top: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    font-size: 0.8rem;
    color: var(--domus-text-muted);
}
.spotlight-details-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}
@media (max-width: 900px) {
    .spotlight-details-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .spotlight-details-grid { grid-template-columns: 1fr; }
}
.spotlight-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem 0.9rem;
}
.spotlight-box span {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--domus-text-muted);
    margin-bottom: 0.2rem;
}
.spotlight-box strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--domus-text);
}

/* ==========================================================================
   Barra de Busca e Grade de Condomínios (.condo-card estilo Domus Bento)
   ========================================================================== */
.hub-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.search-box {
    position: relative;
    flex: 1 1 260px;
    max-width: 380px;
}
.search-box i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--domus-text-muted);
    font-size: 0.88rem;
    pointer-events: none;
}
.search-box input {
    width: 100%;
    padding: 0.58rem 0.85rem 0.58rem 2.35rem;
    border-radius: 0.65rem;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: var(--domus-text);
    font-size: 0.86rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-box input:focus {
    border-color: var(--domus-emerald);
    box-shadow: 0 0 0 3px rgba(19, 75, 66, 0.11);
}

.filter-group {
    display: inline-flex;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 0.2rem;
    gap: 0.15rem;
}
.pill-btn {
    padding: 0.38rem 0.75rem;
    border-radius: 0.48rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.79rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.16s ease;
}
.pill-btn:hover {
    color: var(--domus-text);
}
.pill-btn.active {
    background: #f1f5f9;
    color: var(--domus-text);
    font-weight: 700;
}

.condo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}
@media (max-width: 540px) {
    .condo-grid { grid-template-columns: 1fr; }
}

.condo-card {
    background: var(--domus-surface);
    border: 1px solid var(--domus-border-subtle);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 4px 16px -6px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.condo-card::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.5px;
    background: linear-gradient(90deg, var(--domus-emerald), var(--domus-gold));
    opacity: 0;
    transition: opacity 0.22s ease;
}
.condo-card:hover {
    border-color: rgba(19, 75, 66, 0.28);
    box-shadow: 0 12px 26px -10px rgba(19, 75, 66, 0.14);
}
.condo-card:hover::after,
.condo-card.is-selected::after {
    opacity: 1;
}
.condo-card.is-selected {
    border-color: var(--domus-emerald);
    box-shadow: 0 12px 28px -10px rgba(19, 75, 66, 0.18), 0 0 0 1px var(--domus-emerald);
}

.condo-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.condo-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--domus-text);
    letter-spacing: -0.015em;
}
.condo-meta {
    margin-top: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--domus-text-muted);
}

/* Status discreto e limpo (ponto colorido + texto sóbrio, sem pílula neon) */
.status-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}
.status-inline.status-online { color: #065f46; }
.status-inline.status-manutencao { color: #92400e; }
.status-inline.status-offline { color: #991b1b; }

.condo-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem 0.5rem;
}
.metric-cell {
    text-align: center;
    border-right: 1px solid #e2e8f0;
}
.metric-cell:last-child {
    border-right: none;
}
.metric-cell strong {
    display: block;
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--domus-text);
    font-variant-numeric: tabular-nums;
}
.metric-cell span {
    display: block;
    font-size: 0.7rem;
    color: var(--domus-text-muted);
    margin-top: 1px;
}

.condo-note {
    font-size: 0.78rem;
    color: var(--domus-text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 1.2rem;
}
.condo-note i {
    color: #94a3b8;
}

.condo-footer {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.condo-latency {
    font-size: 0.74rem;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Painéis Internos, Formulários, Botões e Tabelas (Padrão Domus)
   ========================================================================== */
.domus-panel {
    background: var(--domus-surface);
    border: 1px solid var(--domus-border-subtle);
    border-radius: 1rem;
    padding: 1.35rem 1.5rem;
    box-shadow: 0 4px 16px -6px rgba(15, 23, 42, 0.04);
    margin-bottom: 1.25rem;
}

.domus-sec-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.domus-sec-icon {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.48rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.domus-sec-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--domus-text);
    letter-spacing: -0.015em;
}
.domus-sec-sub {
    margin: 0.1rem 0 0;
    font-size: 0.79rem;
    color: var(--domus-text-muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.9rem;
}
.field label {
    display: block;
    font-size: 0.79rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
}
.field input,
.field select {
    width: 100%;
    padding: 0.62rem 0.85rem;
    border-radius: 0.65rem;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input:focus,
.field select:focus {
    border-color: var(--domus-emerald);
    box-shadow: 0 0 0 3px rgba(19, 75, 66, 0.12);
}
.field input[disabled],
.field input[readonly] {
    background: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

/* Botões padrão Domus */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.58rem 1.05rem;
    border-radius: 0.65rem;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: inherit;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.btn-domus,
.btn-gold {
    background: var(--domus-emerald);
    border-color: var(--domus-emerald);
    color: #ffffff;
    box-shadow: 0 4px 12px -2px rgba(19, 75, 66, 0.25);
}
.btn-domus:hover,
.btn-gold:hover {
    background: var(--domus-emerald-deep);
    border-color: var(--domus-emerald-deep);
    color: #ffffff;
}
.btn-ghost {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}
.btn-ghost:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}
.btn-danger-soft {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}
.btn-danger-soft:hover {
    background: #ffe4e6;
    border-color: #fda4af;
}
.btn-sm {
    padding: 0.38rem 0.72rem;
    font-size: 0.78rem;
    border-radius: 0.5rem;
}

/* Tabelas padrão Domus */
.table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
}
.hub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    background: #ffffff;
}
.hub-table thead th {
    text-align: left;
    padding: 0.78rem 1rem;
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--domus-gold);
    background: var(--domus-slate);
    border: none;
}
.hub-table tbody td {
    padding: 0.82rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #334155;
}
.hub-table tbody tr:nth-child(even) {
    background: rgba(19, 75, 66, 0.02);
}
.hub-table tbody tr:last-child td {
    border-bottom: none;
}

/* Tags tipográficas neutras (sem aspecto artificial) */
.tag-neutral {
    display: inline-block;
    padding: 0.16rem 0.5rem;
    border-radius: 0.38rem;
    font-size: 0.73rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.tag-gestor {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

/* Alertas */
.alert {
    padding: 0.85rem 1.1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.86rem;
    font-weight: 500;
}
.alert-sucesso {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}
.alert-erro {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.alert-aviso {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

/* Conta.php - Layout 2 Colunas Editorial */
.account-bento {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 1.25rem;
    align-items: start;
    margin-bottom: 1.25rem;
}
.account-profile-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.1rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid #e2e8f0;
}
.account-avatar-lg {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, var(--domus-emerald), var(--domus-emerald-deep));
    color: var(--domus-gold);
    font-size: 1.15rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.account-meta-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1.15rem;
    padding-top: 1.15rem;
    border-top: 1px solid #e2e8f0;
}
.account-meta-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 0.65rem 0.8rem;
}
.account-meta-item span {
    display: block;
    font-size: 0.7rem;
    color: var(--domus-text-muted);
    margin-bottom: 2px;
}
.account-meta-item strong {
    font-size: 0.83rem;
    color: var(--domus-text);
    font-weight: 700;
}

/* Senha + Medidor */
.pw-wrap {
    position: relative;
}
.pw-wrap input {
    padding-right: 2.6rem;
}
.pw-toggle {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.35rem;
    font-size: 0.95rem;
}
.pw-toggle:hover {
    color: #0f172a;
}

.pw-meter {
    margin: 0.75rem 0 1rem;
    padding: 0.75rem 0.9rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
}
.pw-meter-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.76rem;
    margin-bottom: 0.4rem;
}
.pw-meter-track {
    height: 5px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    margin-bottom: 0.6rem;
}
.pw-meter-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width 0.25s ease, background-color 0.25s ease;
}
.pw-rules {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem 0.75rem;
    font-size: 0.74rem;
    color: #64748b;
}
.pw-rules li {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.pw-rules li.ok {
    color: #059669;
    font-weight: 600;
}

/* Modal Nativo de Edição de Usuário (Equipe) */
.domus-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.domus-modal-backdrop.open {
    display: flex;
}
.domus-modal {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}
.domus-modal-head {
    padding: 1.1rem 1.35rem;
    background: linear-gradient(135deg, #0f172a 0%, #134b42 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.domus-modal-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}
.domus-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.15rem;
    cursor: pointer;
}
.domus-modal-body {
    padding: 1.35rem;
}
.domus-modal-foot {
    padding: 0.9rem 1.35rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

/* Auditoria Somente Leitura (cliques inibidos) */
.audit-lock,
.audit-lock * {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    cursor: default !important;
}

/* Alerta flutuante de inatividade */
.idle-warning-bar {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1120;
    width: calc(100% - 2.5rem);
    max-width: 540px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-left: 4px solid var(--domus-gold);
    border-radius: 0.85rem;
    padding: 0.95rem 1.15rem;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}
.idle-warning-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.84rem;
    color: var(--domus-text);
}

/* ==========================================================================
   Tela de Login (fiel ao login.php do Sistema Domus)
   ========================================================================== */
body.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background:
        radial-gradient(circle at center, rgba(0, 0, 0, 0.05) 50%, rgba(0, 0, 0, 0.72) 100%),
        linear-gradient(to bottom, rgba(10, 38, 33, 0.25) 0%, rgba(9, 18, 28, 0.88) 100%),
        url('../img/background.jpg') no-repeat center center / cover;
}
.login-card-domus {
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.25rem;
    padding: 2.25rem 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
    color: #ffffff;
}
.login-card-domus .login-logo {
    text-align: center;
    margin-bottom: 1.25rem;
}
.login-card-domus .login-logo img {
    width: 215px;
    height: auto;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
}
.login-card-domus h1 {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
    color: #ffffff;
}
.login-card-domus .subtitle {
    margin: 0 0 1.5rem;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
}
.login-card-domus .field label {
    color: rgba(255, 255, 255, 0.88);
}
.login-card-domus .field input {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}
.login-card-domus .field input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}
.login-card-domus .field input:focus {
    background: rgba(255, 255, 255, 0.22);
    border-color: var(--domus-gold);
    box-shadow: 0 0 0 3px rgba(238, 168, 59, 0.2);
}
.login-card-domus .pw-toggle {
    color: rgba(255, 255, 255, 0.7);
}
.login-card-domus .pw-toggle:hover {
    color: #ffffff;
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1.25rem;
    color: var(--domus-text-muted);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
.is-spinning i {
    animation: spin 0.85s linear infinite;
}

@media (max-width: 920px) {
    .account-bento {
        grid-template-columns: 1fr;
    }
    .pw-rules, .account-meta-list {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Extensões específicas do Domus Painel (Backoffice & Control Center)
   ========================================================================== */

.dash-two-col {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 1.25rem;
    align-items: start;
    margin-bottom: 1.25rem;
}
@media (max-width: 980px) {
    .dash-two-col {
        grid-template-columns: 1fr;
    }
}

.bento-modules-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
@media (max-width: 560px) {
    .bento-modules-grid {
        grid-template-columns: 1fr;
    }
}

.bento-mod-link {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.8rem;
    color: var(--domus-text);
    transition: all 0.2s ease;
}
.bento-mod-link:hover {
    background: #ffffff;
    border-color: rgba(19, 75, 66, 0.32);
    box-shadow: 0 8px 20px -8px rgba(19, 75, 66, 0.14);
    transform: translateY(-2px);
    color: var(--domus-text);
}
.bento-mod-ico {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.52rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.bento-mod-link:hover .bento-mod-ico {
    background: var(--domus-emerald);
    border-color: var(--domus-emerald);
    color: var(--domus-gold);
}
.bento-mod-title {
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--domus-text);
    margin-bottom: 2px;
}
.bento-mod-desc {
    display: block;
    font-size: 0.74rem;
    color: var(--domus-text-muted);
    line-height: 1.35;
}

.domus-modal.modal-lg {
    max-width: 720px;
}
.domus-modal-body {
    max-height: calc(100vh - 170px);
    overflow-y: auto;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}
@media (max-width: 680px) {
    .form-grid-2, .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

.field textarea {
    width: 100%;
    padding: 0.62rem 0.85rem;
    border-radius: 0.65rem;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    resize: vertical;
    min-height: 76px;
}
.field textarea:focus {
    border-color: var(--domus-emerald);
    box-shadow: 0 0 0 3px rgba(19, 75, 66, 0.12);
}

.money-pos { color: #065f46; font-weight: 700; font-variant-numeric: tabular-nums; }
.money-neg { color: #991b1b; font-weight: 700; font-variant-numeric: tabular-nums; }
.money-warn { color: #92400e; font-weight: 700; font-variant-numeric: tabular-nums; }
.tabular { font-variant-numeric: tabular-nums; }

.secret-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.secret-mask {
    font-family: Consolas, 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.42rem;
    padding: 0.2rem 0.55rem;
    color: #475569;
    min-width: 110px;
    display: inline-block;
}

.instance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1rem;
}
.instance-card {
    background: #ffffff;
    border: 1px solid var(--domus-border-subtle);
    border-radius: 1rem;
    padding: 1.2rem 1.3rem;
    box-shadow: 0 4px 16px -6px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

/* ==========================================================================
   Padrão Compacto de Páginas Internas (Idêntico ao Domus_Brisas / domus_vmirante)
   Sem bloco hero grande nas internas: usa .domus-tabs-bar + .domus-page-title-inline
   ========================================================================== */
@keyframes domusParabolaReveal {
    0% {
        clip-path: ellipse(0% 100% at 100% 50%);
        opacity: 0.4;
    }
    100% {
        clip-path: ellipse(145% 150% at 100% 50%);
        opacity: 1;
    }
}

.domus-tabs-bar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    border: none;
    padding: 0.2rem 0 0.25rem 0;
    margin-bottom: 1rem;
}

.domus-page-title-inline {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
    font-size: 0.83rem;
    font-weight: 700;
    color: #ffffff;
    background-color: #0f172a;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 80' preserveAspectRatio='none'%3E%3Cpath fill='%23134b42' fill-opacity='0.65' d='M0,45 C70,18 140,65 220,38 C265,24 295,48 320,32 L320,80 L0,80 Z'/%3E%3Cpath fill='%231e293b' fill-opacity='0.65' d='M0,58 C90,74 170,38 250,58 C285,66 305,52 320,56 L320,80 L0,80 Z'/%3E%3C/svg%3E"),
        linear-gradient(135deg, #0f172a 0%, #162e36 52%, #134b42 100%);
    background-position: bottom center, center;
    background-size: 100% 85%, 100% 100%;
    background-repeat: no-repeat;
    border: 1px solid rgba(19, 75, 66, 0.35);
    border-radius: 1.5rem 0.55rem 0.55rem 0.35rem;
    padding: 0.44rem 0.95rem 0.44rem 1.15rem;
    margin-bottom: 0;
    white-space: nowrap;
    letter-spacing: 0.01em;
    box-shadow: 0 0.15rem 0.5rem rgba(10, 38, 33, 0.18);
    overflow: hidden;
    animation: domusParabolaReveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.domus-page-title-inline i {
    color: #ffffff;
    font-size: 0.82rem;
    opacity: 0.92;
}

.domus-bar-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

/* Cabeçalho de tabela limpo padrão Brisas/Mirante */
.hub-table thead th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.72rem 0.95rem;
}
.hub-table tbody tr:nth-child(even) {
    background: #ffffff;
}
.hub-table tbody tr:hover td {
    background-color: #f8fafc;
}

/* ==========================================================================
   Sidebar Acordeão Exclusivo & Ocultação Total de Scrollbar Nativa
   ========================================================================== */
.sidebar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.menu-list li {
    margin-bottom: 0.1rem;
}
.menu-list li a {
    padding: 0.46rem 0.72rem;
    font-size: 0.83rem;
}

.sidebar-group {
    margin-bottom: 0.35rem;
}

.sidebar-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.48rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.68rem;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.sidebar-group-toggle:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}
.sidebar-group.is-open .sidebar-group-toggle {
    background: rgba(5, 18, 16, 0.42);
    border-color: rgba(238, 168, 59, 0.25);
    color: var(--domus-gold);
}

.sidebar-group-chevron {
    font-size: 0.72rem;
    transition: transform 0.22s ease;
}
.sidebar-group.is-open .sidebar-group-chevron {
    transform: rotate(180deg);
}

.sidebar-group-body {
    overflow: hidden;
    display: none;
    padding-top: 0.28rem;
}
.sidebar-group.is-open .sidebar-group-body {
    display: block;
}
