/* =====================================================
   PURE GARDEN - CSS COMPLETO E DEFINITIVO
   Desktop novo + Despesas do CSS antigo (funcionando)
   ===================================================== */

:root {
    --verde-musgo: #3d5a3d;
    --verde-folha: #5a7d5a;
    --verde-claro: #8fb88f;
    --bege: #f4ede4;
    --terracota: #d4826f;
    --branco: #ffffff;
    --cinza: #e8e8e8;
    --cinza-escuro: #666;
    --erro: #dc3545;
    --sucesso: #28a745;
    --gradient-verde: linear-gradient(135deg, #5a7d5a 0%, #3d5a3d 100%);
    --gradient-terracota: linear-gradient(135deg, #d4826f 0%, #c17767 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--bege) 0%, #e8dfd0 100%);
    color: var(--verde-musgo);
    overflow-x: hidden;
    max-width: 100vw;
}

/* ===== LOGIN ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    max-width: 450px;
    width: 100%;
}

.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: var(--verde-musgo);
    margin-bottom: 5px;
    font-weight: 700;
}

.logo p {
    color: var(--verde-folha);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--verde-folha);
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--cinza);
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Lato', sans-serif;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--verde-folha);
    box-shadow: 0 0 0 4px rgba(90, 125, 90, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* ===== BUTTONS ===== */
.btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--gradient-verde);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(61, 90, 61, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-verde);
}

.btn-secondary {
    background: var(--gradient-terracota);
    margin-top: 10px;
}

.btn-logout {
    padding: 10px 24px;
    background: var(--terracota);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.btn-action {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: white;
    display: inline-block;
    margin: 2px;
}

.btn-edit {
    background: var(--verde-folha);
}

.btn-delete {
    background: var(--erro);
}

.btn-remove {
    padding: 10px 16px;
    background: var(--terracota);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

/* ===== NAVBAR ===== */
.navbar {
    background: var(--gradient-verde);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar h2 {
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
}

.navbar-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.user-info {
    color: white;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
}

/* ===== DASHBOARD ===== */
.dashboard {
    animation: fadeIn 0.5s;
}

.main-content {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--gradient-verde);
    padding: 30px;
    border-radius: 16px;
    color: white;
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.stat-card p,
.stat-value {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

/* ===== TABS ===== */
.tabs,
.tabs-container,
.expense-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--cinza);
    overflow-x: auto;
}

.tab-btn,
.employee-tab-btn,
.expense-tab-btn {
    padding: 14px 30px;
    background: none;
    border: none;
    color: var(--verde-folha);
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    white-space: nowrap;
}

.tab-btn.active,
.employee-tab-btn.active,
.expense-tab-btn.active {
    color: var(--verde-musgo);
    border-bottom-color: var(--verde-musgo);
}

/* ===== CARDS ===== */
.card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: var(--verde-musgo);
    margin-bottom: 20px;
    font-weight: 700;
}

/* ===== PRODUCTS GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
    max-height: 600px;
    overflow-y: auto;
    padding: 10px;
}

.product-card {
    background: white;
    border: 2px solid var(--cinza);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.product-card:hover {
    border-color: var(--verde-folha);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.product-card.selected {
    border-color: var(--verde-musgo);
    background: var(--bege);
}

.product-name {
    font-weight: 700;
    color: var(--verde-musgo);
    margin-bottom: 6px;
    font-size: 16px;
}

.product-category {
    font-size: 11px;
    color: var(--verde-folha);
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
}

.product-price {
    color: var(--terracota);
    font-size: 18px;
    font-weight: 700;
}

.product-stock {
    font-size: 13px;
    color: var(--verde-folha);
    margin-top: 6px;
    font-weight: 600;
}

/* ===== CART ===== */
.sales-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.search-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--cinza);
    border-radius: 12px;
    font-size: 15px;
    margin-bottom: 20px;
}

.search-input:focus {
    outline: none;
    border-color: var(--verde-folha);
    box-shadow: 0 0 0 4px rgba(90, 125, 90, 0.1);
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bege);
    border-radius: 12px;
    margin-bottom: 12px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--verde-musgo);
    margin-bottom: 4px;
}

.cart-item-info p {
    font-size: 14px;
    color: var(--cinza-escuro);
}

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

.qty-input {
    width: 65px;
    text-align: center;
    padding: 10px;
    border: 2px solid var(--cinza);
    border-radius: 8px;
    font-weight: 600;
}

.total-section {
    background: var(--gradient-verde);
    color: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.cart-total {
    font-size: 28px;
    font-family: 'Playfair Display', serif;
    margin-bottom: 20px;
    font-weight: 700;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.payment-btn {
    padding: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
}

.payment-btn.selected {
    background: var(--terracota);
    border-color: var(--terracota);
}

#discountInfo {
    margin-bottom: 10px;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--cinza);
    font-size: 15px;
}

th {
    background: var(--bege);
    color: var(--verde-musgo);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}

tr:hover {
    background: var(--bege);
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-pix {
    background: #32BCAD;
    color: white;
}

.badge-cartao {
    background: #4169E1;
    color: white;
}

.badge-dinheiro {
    background: #FFD700;
    color: #333;
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-family: 'Playfair Display', serif;
    color: var(--verde-musgo);
    font-size: 26px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--verde-folha);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* ===== FILTERS ===== */
.filter-section {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.filter-section input,
.filter-section select {
    padding: 12px 16px;
    border: 2px solid var(--cinza);
    border-radius: 10px;
    font-size: 14px;
    flex: 1;
}

/* ===== LOADING ===== */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid var(--cinza);
    border-top: 4px solid var(--verde-folha);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--verde-folha);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.8;
}

.chart-container {
    height: 350px;
    margin-top: 20px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* =====================================================
   RESPONSIVE - MOBILE
   ===================================================== */
@media (max-width: 768px) {
    
    html { font-size: 14px; }
    body { overflow-x: hidden; }
    .main-content { padding: 16px; }
    
    /* NAVBAR */
    .navbar {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }
    
    .navbar h2 {
        font-size: 20px;
        text-align: center;
    }
    
    .navbar-right {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .user-info {
        width: 100%;
        text-align: center;
    }
    
    .btn-logout {
        width: 100%;
    }
    
    /* STATS GRID */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card h3 {
        font-size: 10px;
    }
    
    .stat-card p {
        font-size: 22px;
    }
    
    /* TABS */
    .tabs,
    .tabs-container,
    .expense-tabs {
        gap: 4px;
    }
    
    .tab-btn,
    .employee-tab-btn,
    .expense-tab-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    /* CARDS */
    .card {
        padding: 16px;
    }
    
    .card-title {
        font-size: 18px;
    }
    
    /* PRODUCTS GRID */
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        max-height: 500px;
    }
    
    .product-card {
        padding: 12px;
    }
    
    /* SALES LAYOUT */
    .sales-layout {
        grid-template-columns: 1fr;
    }
    
    /* CART */
    .cart-item {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn-remove {
        flex: 1;
    }
    
    /* PAYMENT METHODS */
    .payment-methods {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    /* FILTERS */
    .filter-section {
        flex-direction: column;
    }
    
    .filter-section input,
    .filter-section select {
        width: 100%;
    }
    
    /* ==========================================
       DESPESAS - CÓDIGO DO CSS ANTIGO (FUNCIONANDO)
       ========================================== */
    .month-year-selector,
    div[style*="display: flex"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        margin-bottom: 16px !important;
    }

    #monthSelector,
    #yearSelector,
    select[id*="month"],
    select[id*="year"],
    select[name*="mes"],
    select[name*="ano"] {
        width: 100% !important;
        padding: 12px 16px !important;
        font-size: 15px !important;
        border: 2px solid #e5e7eb !important;
        border-radius: 8px !important;
        background: white !important;
        box-sizing: border-box !important;
    }

    button[onclick*="updateExpense"],
    button[onclick*="loadExpense"],
    button[onclick*="addExpense"] {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
        margin-top: 12px !important;
        box-sizing: border-box !important;
    }

    input[type="date"],
    select[name*="categoria"] {
        width: 100% !important;
        padding: 12px 16px !important;
        font-size: 15px !important;
        border: 2px solid #e5e7eb !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }

    button[onclick*="filter"],
    button[onclick*="search"] {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
        margin-top: 4px !important;
        box-sizing: border-box !important;
    }

    .summary-cards {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .summary-card {
        padding: 16px !important;
        border-radius: 12px !important;
    }

    .summary-card h3 {
        font-size: 12px !important;
    }

    .summary-card p {
        font-size: 24px !important;
    }

    #employeeDashboard .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    #myFilterDate,
    #myFilterPayment {
        width: 100% !important;
        padding: 12px !important;
        margin-bottom: 10px !important;
    }
    
    /* TABELA DE VENDAS - CARDS */
    table {
        display: block;
    }
    
    thead {
        display: none;
    }
    
    tbody {
        display: block;
    }
    
    tbody tr {
        display: block;
        background: white;
        border: 2px solid var(--cinza);
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 16px;
        box-shadow: var(--shadow-sm);
    }
    
    tbody tr td {
        display: block;
        padding: 8px 0;
        border: none;
        text-align: left;
        font-size: 14px;
    }
    
    tbody tr td:nth-child(1)::before { 
        content: "ID: "; 
        font-weight: 700; 
        color: var(--cinza-escuro);
    }
    
    tbody tr td:nth-child(2)::before { 
        content: "Data: "; 
        font-weight: 700; 
        color: var(--cinza-escuro);
    }
    
    tbody tr td:nth-child(3)::before { 
        content: "Pagamento: "; 
        font-weight: 700; 
        color: var(--cinza-escuro);
    }
    
    tbody tr td:nth-child(4)::before { 
        content: "Total: "; 
        font-weight: 700; 
        color: var(--cinza-escuro);
    }
    
    tbody tr td:last-child {
        display: flex;
        gap: 8px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 2px solid var(--cinza);
    }
    
    tbody tr td:last-child::before {
        content: none;
    }
    
    tbody tr td:last-child .btn-action {
        flex: 1;
        margin: 0;
        padding: 10px;
        font-size: 12px;
    }
    
    /* MODAIS */
    .modal-content {
        padding: 24px;
        width: 95%;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    /* FORMS */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
        font-size: 14px;
    }
    
    /* BUTTONS */
    .btn {
        padding: 14px;
        font-size: 14px;
    }
    
    .btn-action {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .chart-container {
        height: 250px;
    }
}

/* MOBILE PEQUENO */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* DESKTOP */
@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* FIM */

/* =====================================================
   CORREÇÃO: MÊS E ANO NO RESUMO - BOTÃO FINO E ABAIXO
   Cole NO FINAL do styles.css
   ===================================================== */

/* ========================================
   APENAS ABA RESUMO & GRÁFICOS
   ======================================== */

/* Container principal - lado a lado */
#resumoTab div[style*="display: flex"][style*="gap"],
#graficosTab div[style*="display: flex"][style*="gap"] {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    align-items: flex-start !important;
    justify-content: center !important;
    margin: 20px auto !important;
    width: 100% !important;
}

/* Form groups - lado a lado */
#resumoTab .form-group[style*="flex"],
#graficosTab .form-group[style*="flex"] {
    flex: 0 0 auto !important;
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    margin: 0 !important;
}

/* Labels */
#resumoTab label,
#graficosTab label {
    display: block !important;
    text-align: left !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 6px !important;
}

/* Selects */
#resumoTab select,
#graficosTab select {
    width: 100% !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    background: white !important;
    color: #1f2937 !important;
    box-sizing: border-box !important;
}

/* Botão BUSCAR - fino e abaixo */
#resumoTab button[onclick*="loadExpense"],
#resumoTab button[onclick*="generateReport"],
#graficosTab button[onclick*="loadExpense"],
#graficosTab button[onclick*="generateReport"] {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 300px !important;
    margin: 8px auto 0 auto !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    background: #5a8f7b !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
}

#resumoTab button:hover,
#graficosTab button:hover {
    background: #4a7a6a !important;
    transform: translateY(-2px) !important;
}

/* Cards de resumo */
#resumoTab .summary-cards,
#graficosTab .summary-cards {
    margin-top: 24px !important;
}

/* Mobile */
@media (max-width: 768px) {
    #resumoTab .form-group[style*="flex"],
    #graficosTab .form-group[style*="flex"] {
        width: 130px !important;
        min-width: 130px !important;
        max-width: 130px !important;
    }
    
    #resumoTab select,
    #graficosTab select {
        padding: 10px !important;
        font-size: 13px !important;
    }
    
    #resumoTab button,
    #graficosTab button {
        max-width: 280px !important;
        padding: 12px 16px !important;
        font-size: 13px !important;
    }
}

/* FIM */

/* =====================================================
   CORREÇÃO: TABS DE DESPESAS - INDICADOR ATIVO
   Cole NO FINAL do styles.css
   ===================================================== */

/* ========================================
   TABS DE DESPESAS - ACTIVE STATE CORRETO
   ======================================== */

/* Remove a linha verde de todas as tabs primeiro */
.expense-tab-btn {
    border-bottom: 3px solid transparent !important;
    color: #5a7d5a !important;
    transition: all 0.3s ease !important;
}

/* Adiciona linha verde APENAS na tab ativa */
.expense-tab-btn.active {
    border-bottom-color: #3d5a3d !important;
    color: #3d5a3d !important;
}

/* Hover nas tabs */
.expense-tab-btn:hover {
    color: #3d5a3d !important;
    background: rgba(90, 125, 90, 0.05) !important;
}

/* Para tabs específicas se tiver IDs ou classes diferentes */
button[data-tab="fixas"],
button[data-tab="variaveis"],
button[data-tab="resumo"] {
    border-bottom: 3px solid transparent !important;
}

button[data-tab="fixas"].active,
button[data-tab="variaveis"].active,
button[data-tab="resumo"].active {
    border-bottom-color: #3d5a3d !important;
    color: #3d5a3d !important;
}

/* Se as tabs usarem texto específico */
.expense-tab-btn:contains("Despesas Fixas"),
.expense-tab-btn:contains("Despesas Variáveis"),
.expense-tab-btn:contains("Resumo & Gráficos") {
    border-bottom: 3px solid transparent !important;
}

/* Garantir que apenas a ativa tenha a linha */
.expense-tabs .expense-tab-btn:not(.active) {
    border-bottom-color: transparent !important;
}

/* Container das tabs */
.expense-tabs {
    position: relative !important;
}

/* FIM */


/* =====================================================
   CORREÇÃO ULTRA FORTE: MODAL CENTRALIZADO
   Cole NO FINAL do styles.css
   ===================================================== */

/* ========================================
   MODAL - FORÇA ABSOLUTA DE CENTRALIZAÇÃO
   ======================================== */

/* Modal container - deve cobrir toda a viewport */
.modal.active,
.modal-overlay.active,
div[id="saleDetailsModal"].active,
div[id="productModal"].active,
div[class*="modal"].active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    background: rgba(0, 0, 0, 0.75) !important;
    overflow-y: auto !important;
}

/* Modal content - dentro do container centralizado */
.modal.active > .modal-content,
.modal-overlay.active > .modal-content,
#saleDetailsModal.active > .modal-content,
#productModal.active > .modal-content {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 20px auto !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    z-index: 1000000 !important;
}

/* Força o body a não rolar quando modal está aberto */
body:has(.modal.active),
body.modal-open {
    overflow: hidden !important;
    height: 100vh !important;
    position: fixed !important;
    width: 100% !important;
    top: 0 !important;
    left: 0 !important;
}

/* Modal escondido */
.modal:not(.active),
.modal-overlay:not(.active) {
    display: none !important;
    visibility: hidden !important;
}

/* Mobile - ajustes */
@media (max-width: 768px) {
    .modal.active,
    .modal-overlay.active {
        padding: 10px !important;
    }
    
    .modal.active > .modal-content,
    .modal-overlay.active > .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 10px auto !important;
    }
}

/* ========================================
   GARANTIA EXTRA - SE O MODAL AINDA FICAR EMBAIXO
   ======================================== */

/* Força todos os elementos com id contendo "Modal" */
[id*="Modal"].active,
[id*="modal"].active {
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
}

/* Força o conteúdo do modal */
[id*="Modal"].active > div,
[id*="modal"].active > div {
    position: relative !important;
    margin: auto !important;
}

/* FIM */