/* ==========================================================================
   GLOBAL GLASSMORPHISM ENGINE (MODO BLACK GLASS / VIDRO FUMÊ PRETO)
   ========================================================================== */

:root {
    --bg-color: #050505 !important;
    --bg-dark: #050505 !important;
    --bg-primary: #050505 !important;
    --bg-secondary: rgba(14, 14, 16, 0.55) !important;
    --sidebar-bg: rgba(10, 10, 12, 0.68) !important;
    --card-bg: rgba(14, 14, 16, 0.52) !important;
    --bg-card: rgba(14, 14, 16, 0.52) !important;
    --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(12, 12, 14, 0.62) 100%);
    --glass-bg-hover: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(18, 18, 22, 0.72) 100%);
    --glass-input-bg: rgba(8, 8, 10, 0.65);
    --glass-border: rgba(255, 255, 255, 0.13);
    --glass-border-highlight: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 14px 38px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    --glass-blur: blur(22px) saturate(150%);
}

/* 1. FUNDO PRETO PROFUNDO (ONYX) COM LUZES PRATEADAS SUTIS PARA REFRAÇÃO DO VIDRO */
body {
    background-color: #050505 !important;
    background-image:
        radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.06) 0%, transparent 38%),
        radial-gradient(circle at 85% 15%, rgba(180, 180, 195, 0.05) 0%, transparent 36%),
        radial-gradient(circle at 78% 84%, rgba(255, 255, 255, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 22% 82%, rgba(140, 140, 155, 0.05) 0%, transparent 38%),
        linear-gradient(135deg, #020202 0%, #0a0a0c 50%, #040405 100%) !important;
    background-attachment: fixed !important;
    color: #f8fafc !important;
    position: relative;
}

/* Esferas luminosas monocromáticas sutis para dar profundidade ao vidro fumê */
body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

body::before {
    width: 460px;
    height: 460px;
    top: -120px;
    left: -100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, rgba(120, 120, 130, 0.03) 70%, transparent 100%);
}

body::after {
    width: 420px;
    height: 420px;
    bottom: -110px;
    right: -90px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, rgba(100, 100, 110, 0.02) 70%, transparent 100%);
}

.dashboard-wrapper {
    position: relative;
    z-index: auto !important;
}

.main-content,
.login-container {
    position: relative;
    z-index: 1;
}

/* 2. SIDEBAR EM VIDRO FUMÊ PRETO (BLACK GLASS NAVIGATION) */
.navigation,
#minha-sidebar {
    background: linear-gradient(180deg, rgba(18, 18, 20, 0.92) 0%, rgba(6, 6, 8, 0.96) 100%) !important;
    backdrop-filter: blur(28px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(160%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 10px 0 36px rgba(0, 0, 0, 0.75), inset -1px 0 0 rgba(255, 255, 255, 0.07) !important;
    z-index: 10002 !important;
    pointer-events: auto !important;
}

#sidebar-overlay {
    z-index: 10000 !important;
}

@media (max-width: 992px) {
    .navigation,
    #minha-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -310px !important;
        width: 280px !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 10002 !important;
        transition: left 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .navigation.aberta,
    #minha-sidebar.aberta {
        left: 0 !important;
    }

    .navigation ul li.list a,
    #minha-sidebar ul li.list a {
        pointer-events: auto !important;
        touch-action: manipulation !important;
        cursor: pointer !important;
        user-select: none !important;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.15);
    }

    .navigation ul li.list a .title,
    #minha-sidebar ul li.list a .title {
        opacity: 1 !important;
        max-width: 220px !important;
        display: block !important;
    }
}

.navigation ul li.list a {
    border-radius: 16px 0 0 16px;
    transition: all 0.28s ease !important;
}

.navigation ul li.list:hover a {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff !important;
}

.navigation ul li.active a {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    border-right: none !important;
    border-top-left-radius: 26px !important;
    border-bottom-left-radius: 26px !important;
    color: #ffffff !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}

/* 3. TOP-BAR & SELETOR DE PERÍODO EM VIDRO PRETO */
.top-bar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(12, 12, 14, 0.58) 100%) !important;
    backdrop-filter: blur(20px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
    border: 1px solid rgba(255, 255, 255, 0.11) !important;
    border-top-color: rgba(255, 255, 255, 0.22) !important;
    border-radius: 18px !important;
    padding: 1.1rem 1.5rem !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.13) !important;
}

.periodo-navegacao-premium,
.btn-menu,
.btn-top-action {
    background: rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

/* 4. TODOS OS CARDS, PAINÉIS, TABELAS, FORMULÁRIOS E MODAIS EM MODO BLACK GLASS */
.stat-card:not(.card-gold),
.card,
.card-premium,
.chart-card,
.chart-container,
.chart-container-donut,
.summary-card,
.stat-box,
.dashboard-filters,
.form-section,
.type-toggle,
.ajuda-section,
.novidade-card,
.filter-section,
.sub-card,
.pending-list-section,
.pending-item,
.login-box,
.admin-section,
.feedback-item,
.monitor-card,
.file-item,
.breadcrumb,
.diag-result-box,
.table-container,
.form-container,
.form-card,
.form-inline,
.goal-card,
.meta-card,
.fatura-card,
.parcela-card,
.calendar-wrapper,
.client-welcome,
.login-container,
.login-card,
.auth-card,
.modal-content,
.month-picker-content,
.filter-bar,
.resumo-box,
.help-card,
.faq-item,
.section-box,
.panel-box,
.backup-card,
.health-card,
.diag-card,
.feedback-card,
.indicacao-card,
.lixeira-card,
.perfil-card,
.assinatura-card,
.plano-card,
.pix-box,
.cards-summary-widget,
.pie-chart-box,
.folder-card,
.file-card,
.lancamento-card,
.lancamento-item,
.ia-window,
#ia-chat-window,
#ia-chat-modal {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--glass-border) !important;
    border-top: 1px solid var(--glass-border-highlight) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: var(--glass-shadow) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
}

.ia-header,
.ia-input-area {
    background: rgba(10, 10, 12, 0.65) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
}

.stat-card:not(.card-gold):hover,
.goal-card:hover,
.meta-card:hover,
.fatura-card:hover,
.parcela-card:hover,
.help-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.28) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

/* Destaque especial para o card-gold em cristal prateado/platina translúcido */
.stat-card.card-gold {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(212, 212, 216, 0.75) 100%) !important;
    backdrop-filter: blur(22px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.12), inset 0 1px 0 #ffffff !important;
}

/* Células do Calendário em Vidro Fumê Preto */
.day-cell {
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

.day-cell:hover {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: rgba(255, 255, 255, 0.24) !important;
}

/* 5. INPUTS, SELECTS E TEXTAREAS EM MODO BLACK GLASS */
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
select,
textarea,
.filter-control {
    background: var(--glass-input-bg) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    transition: all 0.22s ease !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus,
select:focus,
textarea:focus,
.filter-control:focus {
    background: rgba(16, 16, 18, 0.82) !important;
    border-color: rgba(255, 255, 255, 0.42) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), inset 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    outline: none !important;
}

select option {
    background-color: #09090b !important;
    color: #f8fafc !important;
}

/* 6. TABELAS EM CRISTAL PRETO TRANSLÚCIDO */
table th,
.premium-table th {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #d4d4d8 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

table td,
.premium-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

table tbody tr,
.premium-table tbody tr {
    transition: background 0.2s ease;
}

table tbody tr:hover,
.premium-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.055) !important;
}

/* 7. OVERLAYS DE MODAL COM BLUR PROFUNDO */
.modal-overlay,
.modal,
#modal-editar,
#modal-novo,
#modal-detalhes,
#month-picker-modal {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* 8. SCROLLBARS ELEGANTES TRANSLÚCIDAS */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: rgba(5, 5, 5, 0.6);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.32);
}
