/* ==========================================================================
   FinanSmart - Estilos CSS3 Modernos para Hospedagem cPanel
   Layout em Grid de 3 Colunas + Paleta Financeira Elegante (Dark Navy & Emerald)
   ========================================================================== */

:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(15, 23, 42, 0.9);
    --bg-card-hover: rgba(30, 41, 59, 0.4);
    --border: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --color-income: #34d399;
    --color-expense: #fb7185;
    --color-warning: #fbbf24;
    --color-info: #38bdf8;
    --color-accent: #818cf8;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    padding-bottom: 50px;
}

code, pre {
    font-family: 'JetBrains Mono', monospace;
}

/* 1. CONTENÇÃO GLOBAL DE OVERFLOW & CONTAINER UNIFICADO (~1400px) */
.app-container,
.header-inner {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.dashboard-container,
.main-content,
.dashboard-grid,
.overview-section {
    max-width: 100%;
    box-sizing: border-box;
}

/* Navbar / Header Consolidado */
.navbar, .header {
    width: 100%;
    padding: 14px 0;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-sizing: border-box;
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
}

.brand-nav-group {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 50%, #4f46e5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    flex-shrink: 0;
}

.brand-logo-icon {
    width: 20px;
    height: 20px;
    color: #020617;
}

.brand-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.brand h1 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.badge-cpanel {
    font-size: 0.65rem;
    font-weight: 700;
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 2px 7px;
    border-radius: 9999px;
    letter-spacing: 0.02em;
    line-height: 1.2;
}



.brand p {
    font-size: 0.725rem;
    color: var(--text-secondary);
    margin: 2px 0 0 0;
}

/* Pílulas de Navegação no Topo */
.nav-pills {
    display: inline-flex;
    align-items: center;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 3px;
    gap: 3px;
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.nav-pill:hover {
    color: #f8fafc;
    background: #1e293b;
}

.nav-pill.active {
    background: #1e293b;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-pill-icon {
    font-size: 0.85rem;
    line-height: 1;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Perfil do Usuário e Botão de Logout no Header */
.user-badge-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #020617;
    border: 1px solid #1e293b;
    padding: 4px 10px 4px 6px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.user-avatar-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #2dd4bf);
    color: #020617;
    font-size: 0.7rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1;
}

.user-display-name {
    font-size: 0.725rem;
    font-weight: 700;
    color: #f8fafc;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-status-tag {
    font-size: 0.6rem;
    color: #34d399;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2px;
}

.btn-logout {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.725rem;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.btn-logout:hover {
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.15);
}

.btn-logout svg {
    width: 13px;
    height: 13px;
}

/* Seletor Dinâmico de Mês com Setas */
.month-stepper {
    display: inline-flex;
    align-items: center;
    background: #0b1120;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.btn-step {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.15rem;
    font-weight: 700;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-step:hover {
    background: #1e293b;
    color: #fff;
}

.month-display-wrap {
    position: relative;
    padding: 0 10px;
    cursor: pointer;
}

.month-display-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    text-transform: capitalize;
}

.month-display-wrap input[type="month"] {
    position: absolute;
    opacity: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

input[type="month"], select, input[type="text"], input[type="number"], input[type="date"] {
    background: #0b1120;
    border: 1px solid var(--border);
    color: #fff;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition);
}

/* Campos de data e mês com suporte explícito a tema escuro e ícone claro */
input[type="date"],
input[type="month"] {
    color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.85;
    transition: var(--transition);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="month"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

input:focus, select:focus {
    border-color: var(--color-income);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* ==========================================================================
   Modo de Privacidade e Estilos de Tabela
   ========================================================================== */
.btn-privacidade {
    gap: 7px;
    transition: var(--transition);
}
.btn-privacidade.active {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--color-income);
}
@media (max-width: 640px) {
    .btn-privacidade .btn-text-privacidade {
        display: none;
    }
}

/* ==========================================================================
   Modo de Privacidade - Regra Universal Única (.valor-monetario)
   ========================================================================== */
.modo-privacidade .valor-monetario {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
    display: inline-block;
    transition: filter 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Células de data e vencimento: garantia de white-space nowrap */
.table td.td-data,
.table th.th-data,
.td-venc,
.th-venc {
    white-space: nowrap !important;
}

/* Botões */
.btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #10b981;
    color: #042f2e;
}

.btn-primary:hover {
    background: #059669;
    color: #fff;
}

.btn-secondary {
    background: #1e293b;
    color: #cbd5e1;
}

.btn-secondary:hover {
    background: #334155;
}

.btn-ai {
    background: #6366f1;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.775rem;
    padding: 7px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-ai:hover {
    background: #4f46e5;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

.btn-ai:active {
    transform: translateY(0);
}

.btn-ai:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Visão Geral & Donut */
.overview-section, .dashboard-container {
    width: 100%;
    max-width: 100%;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 20px;
    box-sizing: border-box;
}

.kpis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: border-color 0.2s ease;
}

.kpi-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.kpi-card.income:hover {
    border-color: rgba(16, 185, 129, 0.3);
}

.kpi-card.expense-paid:hover {
    border-color: rgba(244, 63, 94, 0.3);
}

.kpi-card.expense-pending:hover {
    border-color: rgba(245, 158, 11, 0.3);
}

.kpi-card.balance.highlight {
    background: linear-gradient(135deg, #0f172a 0%, rgba(30, 27, 75, 0.7) 100%);
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 10px 25px -5px rgba(8, 47, 73, 0.3);
}

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kpi-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.kpi-card.balance .kpi-label {
    color: #7dd3fc;
}

.kpi-icon-wrap {
    padding: 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-icon-wrap.income {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
}

.kpi-icon-wrap.expense-paid {
    background: rgba(244, 63, 94, 0.1);
    color: #fb7185;
}

.kpi-icon-wrap.expense-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

.kpi-icon-wrap.balance {
    background: rgba(14, 165, 233, 0.2);
    color: #7dd3fc;
}

.kpi-value-block {
    margin-top: 16px;
}

.kpi-card h3 {
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.kpi-card.income h3 { color: #34d399; }
.kpi-card.expense-paid h3 { color: #fb7185; }
.kpi-card.expense-pending h3 { color: #fbbf24; }
.kpi-card.balance h3 { color: #7dd3fc; }

.kpi-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
}

.donut-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.donut-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.chart-header-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.chart-tag {
    font-size: 11px;
    color: #94a3b8;
}

/* Containers dos Gráficos de Barras Verticais (Chart.js: 260px desktop, 220px mobile) */
.chart-container-bars,
.chart-container-donut,
.chart-container-pie,
.chart-container-balanco,
.chart-container-categorias {
    width: 100%;
    max-width: 100%;
    height: 260px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    box-sizing: border-box;
}

.chart-container-bars canvas,
.chart-container-donut canvas,
.chart-container-pie canvas,
.chart-container-balanco canvas,
.chart-container-categorias canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
}

.chart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
    gap: 8px;
    padding: 16px;
    box-sizing: border-box;
}

.chart-empty-state p {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin: 0;
    font-weight: 500;
}

/* Grade Principal de 2 Colunas Centralizada no Container (~1400px) */
.dashboard-grid, .main-content {
    width: 100%;
    max-width: 100%;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    box-sizing: border-box;
}

.dashboard-grid > *,
.col,
.col-principal,
.col-lateral {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    word-break: break-word;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.card-header.border-b-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3, .card-title-sm {
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.card-subtitle-sm {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

.badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 10px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 9999px;
    color: #cbd5e1;
}



.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: #1e293b;
    border-radius: 99px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #6366f1, #0ea5e9);
}

/* Tabelas - Layout Fixo e Ajustes de Largura Sem Overflow no Desktop */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    scrollbar-width: thin;
    position: relative;
}

.table-responsive::-webkit-scrollbar {
    height: 5px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 99px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    table-layout: fixed;
    box-sizing: border-box;
}

.table th, .table td {
    padding: 8px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
    box-sizing: border-box;
}

.table th:first-child, .table td:first-child {
    padding-left: 8px;
    padding-right: 4px;
}

.table th:last-child, .table td:last-child {
    padding-left: 4px;
    padding-right: 8px;
}

.table th {
    font-size: 0.725rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Cabeçalhos das tabelas alinhados rigorosamente com o conteúdo */
.th-desc,
.desc-entrada,
.desc-fixo,
.desc-var,
.desc-parc {
    text-align: left !important;
}

.th-pago, .td-pago {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    text-align: center !important;
}

.th-data, .td-data,
.th-venc, .td-venc {
    width: 95px !important;
    min-width: 95px !important;
    max-width: 95px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.th-tipo, .td-tipo {
    width: 110px !important;
    min-width: 105px !important;
    max-width: 120px !important;
    font-size: 0.825rem;
    text-align: left !important;
    white-space: nowrap !important;
    hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

.th-prog, .td-prog {
    width: 95px !important;
    min-width: 95px !important;
    max-width: 100px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.th-valor, .td-valor {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 120px !important;
    text-align: right !important;
    white-space: nowrap !important;
}

.th-acoes, .td-acoes {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    text-align: right !important;
    white-space: nowrap !important;
    padding-left: 2px !important;
    padding-right: 6px !important;
}

/* Colunas de Descrição nas Tabelas: consomem o espaço restante sem min-width rígido */
.desc-entrada,
.desc-fixo,
.desc-var,
.desc-parc {
    width: auto;
    min-width: 0;
    overflow: hidden;
}

.desc-entrada strong,
.desc-fixo strong,
.desc-var strong,
.desc-parc strong,
.table td strong {
    display: block;
    word-break: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    font-size: 0.825rem;
    font-weight: 600;
    color: #f8fafc;
    line-height: 1.35;
    margin-bottom: 2px;
}

.desc-badge-row {
    display: block;
    margin: 3px 0;
    line-height: 1;
}

.desc-categoria {
    display: block;
    font-size: 0.725rem;
    color: #64748b;
    word-break: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.25;
    margin-top: 2px;
}

/* Checkbox Interativo de Gastos Fixos e Entradas */
.checkbox-pago {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #10b981;
    transition: transform 0.15s ease;
}

.checkbox-pago:active {
    transform: scale(0.9);
}

.table tr {
    transition: background-color 0.2s ease, opacity 0.25s ease;
}

.tr-pago td {
    opacity: 0.55;
    background: rgba(16, 185, 129, 0.03);
}

.tr-pago .desc-fixo strong {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Linha de Entrada Recebida na Conta */
.tr-recebido td {
    background: rgba(16, 185, 129, 0.04);
}

.badge-recebido,
.badge-pendente,
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.675rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 2px 7px;
    border-radius: 4px;
    line-height: 1.2;
    vertical-align: middle;
}

.badge-recebido {
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-pendente {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Coluna 3: Metas e Gráficos */
.meta-item {
    margin-bottom: 14px;
    min-width: 0;
}

.meta-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 0.825rem;
    margin-bottom: 4px;
    min-width: 0;
}

.meta-header > span:first-child {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.meta-status {
    font-weight: 700;
    font-size: 0.75rem;
    white-space: nowrap;
    margin-left: auto;
}

.meta-status.ok { color: var(--color-income); }
.meta-status.over { color: var(--color-expense); }

.chart-header-title-pie {
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

/* (regras consolidadas em .chart-container-bars) */

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-form-flex {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 85vh;
    overflow: hidden;
    min-height: 0;
}

/* 1. CABEÇALHO (.modal-header) */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 12px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    margin-bottom: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.modal-close:hover {
    color: #fff;
}

/* Abas Visuais no Topo do Modal: [ Despesa ] e [ Receita ] (flex-shrink: 0) */
.modal-flow-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: #090d16;
    padding: 4px;
    border-radius: var(--radius-sm);
    margin: 12px 20px 0 20px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

/* 2. CORPO DO FORMULÁRIO COM SCROLL (.modal-body) */
.modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 20px;
    min-height: 0;
}

/* Scrollbar estilizada e sutil para o modal-body */
.modal-body::-webkit-scrollbar {
    width: 6px;
}
.modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* 3. RODAPÉ DE AÇÕES DESACOPLADO (flex-shrink: 0, NÃO FLUTUANTE) */
.modal-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: static;
    margin: 0;
}

/* Espaçamentos compactos para evitar rolagem desnecessária no desktop */
.form-group {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.form-checkbox {
    margin-top: 4px;
    margin-bottom: 4px;
}

.form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.825rem;
    color: #e2e8f0;
}

.form-checkbox input[type="checkbox"] {
    accent-color: #10b981;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active-expense {
    background: rgba(244, 63, 94, 0.15);
    color: #fca5a5;
    border-color: rgba(244, 63, 94, 0.4);
}

.tab-btn.active-income {
    background: rgba(16, 185, 129, 0.15);
    color: #86efac;
    border-color: rgba(16, 185, 129, 0.4);
}

/* Seletor de Tipo de Despesa (Fixa, Variável, Parcelada) */
.expense-type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.btn-expense-type {
    background: #090d16;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 4px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-expense-type:hover {
    border-color: #475569;
    color: #fff;
}

.btn-expense-type.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: #6366f1;
    color: #c7d2fe;
}

/* Bloco de Cálculo de Parcelas */
.installment-calc-box {
    background: rgba(15, 23, 42, 0.7);
    border: 1px dashed rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 12px;
}

.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #c7d2fe;
}

.calc-mode-toggle {
    display: flex;
    background: #090d16;
    border-radius: 6px;
    padding: 2px;
    border: 1px solid var(--border);
}

.btn-mode {
    background: transparent;
    border: none;
    font-size: 0.75rem;
    padding: 4px 8px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
}

.btn-mode.active {
    background: #6366f1;
    color: #fff;
    font-weight: 600;
}

.calc-preview-badge {
    background: #090d16;
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #38bdf8;
    text-align: center;
    margin-top: 8px;
}

.btn-link {
    background: none;
    border: none;
    color: #38bdf8;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Ações na Tabela (Editar e Excluir) lado a lado sempre dentro do card */
.table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    width: 56px;
    min-width: 56px;
    flex-shrink: 0;
}

.btn-action-edit, .btn-action-delete {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    border-radius: 6px;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-action-edit:hover {
    color: #818cf8;
    background: rgba(99, 102, 241, 0.12);
}

.btn-action-delete:hover {
    color: #fb7185;
    background: rgba(244, 63, 94, 0.12);
}

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

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Modal de Confirmação de Exclusão */
.modal-confirm-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 440px;
    padding: 20px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8);
}

.confirm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.confirm-icon {
    font-size: 1.5rem;
    padding: 8px;
    border-radius: 10px;
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.confirm-details {
    background: #090d16;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 14px;
    font-size: 0.85rem;
}

.btn-danger {
    background: #e11d48;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #be123c;
}

/* Box de Escopo do Parcelamento no Modal */
.installment-scope-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 12px;
}

.scope-title {
    font-weight: 700;
    font-size: 0.8rem;
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.scope-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    cursor: pointer;
    color: #f1f5f9;
    font-size: 0.775rem;
}

.scope-option input[type="radio"] {
    accent-color: #6366f1;
    cursor: pointer;
}

/* Rodapé */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 36px;
}

/* Responsividade e Contenção de Viewport: Tablet (até 1100px) Coluna Única */
@media (max-width: 1100px) {
    .dashboard-grid, .main-content {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    .overview-section, .dashboard-container {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
}

/* Celular (até 768px): Card Empilhado por Linha, Cabeçalho Compacto, Sem Rolagem Horizontal */
@media (max-width: 768px) {
    /* Altura definida dos gráficos no mobile (220px) */
    .chart-container-bars,
    .chart-container-donut,
    .chart-container-pie,
    .chart-container-balanco,
    .chart-container-categorias {
        height: 220px !important;
    }

    /* 1. Contenção Global de Viewport */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .app-container,
    .header-inner {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* 2. Cabeçalho Compacto (Botões só com Ícone) */
    .navbar, .header {
        padding: 10px 0;
    }

    .header-inner {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .brand-nav-group {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .brand {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .brand h1 {
        font-size: 1.15rem;
    }

    .brand p {
        font-size: 0.72rem;
    }

    .nav-controls {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
    }

    .month-stepper {
        flex: 1 1 auto;
        min-width: 140px;
        height: 36px;
        padding: 2px 4px;
    }

    .month-display-text {
        font-size: 0.8rem;
    }

    /* Botões só com ícone no mobile */
    .nav-controls .btn {
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 36px;
        border-radius: 8px;
    }

    .nav-controls .btn span,
    .btn-logout span {
        display: none !important;
    }

    .user-badge-header {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .user-info-text {
        display: none;
    }

    .btn-logout {
        width: 36px;
        height: 36px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
    }

    /* 4. Cards de Resumo (KPIs) em 1 ou 2 Colunas Legíveis */
    .overview-section, .dashboard-container {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 14px;
        padding: 0;
    }

    .kpis-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .kpi-card {
        padding: 12px 10px;
    }

    .kpi-card h3 {
        font-size: 1.15rem;
        word-break: normal;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .kpi-card p {
        font-size: 0.72rem;
    }

    /* 5. Grade de Conteúdo em Coluna Única no Mobile */
    .dashboard-grid, .main-content {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 14px;
        padding: 0;
    }

    .card {
        padding: 14px 12px;
        margin-bottom: 14px;
    }

    /* 6. Transformação das Tabelas em Cards Empilhados */
    .table-responsive {
        overflow-x: visible !important;
        width: 100%;
        position: static !important;
    }

    .table {
        display: block;
        width: 100%;
    }

    /* Esconde os cabeçalhos de tabela no celular */
    .table thead {
        display: none !important;
    }

    .table tbody {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .table tbody tr {
        display: grid !important;
        grid-template-columns: 32px 1fr auto auto 64px !important;
        grid-template-rows: auto auto !important;
        column-gap: 8px !important;
        row-gap: 6px !important;
        align-items: center !important;
        background: rgba(30, 41, 59, 0.5) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 10px !important;
        padding: 10px 10px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        width: 100% !important;
        position: static !important;
    }

    .table tbody tr.tr-pago {
        background: rgba(16, 185, 129, 0.06) !important;
        border-color: rgba(16, 185, 129, 0.28) !important;
    }

    .table tbody tr.tr-recebido {
        background: rgba(16, 185, 129, 0.07) !important;
        border-color: rgba(16, 185, 129, 0.32) !important;
    }

    /* Mensagem vazia nas tabelas */
    .table tbody tr td[colspan] {
        display: block !important;
        grid-column: 1 / -1 !important;
        width: 100% !important;
        text-align: center !important;
        padding: 16px 8px !important;
        border: none !important;
    }

    /* Checkbox à esquerda, sempre visível */
    .table tbody td.td-pago {
        grid-column: 1 !important;
        grid-row: 1 / span 2 !important;
        width: 32px !important;
        min-width: 32px !important;
        max-width: 32px !important;
        padding: 0 !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .table tbody td.td-pago .checkbox-pago {
        width: 20px;
        height: 20px;
        margin: 0;
        cursor: pointer;
    }

    /* Topo: Descrição + Categoria */
    .table tbody td.desc-fixo,
    .table tbody td.desc-entrada,
    .table tbody td.desc-parc,
    .table tbody td.desc-var {
        grid-column: 2 / span 3 !important;
        grid-row: 1 !important;
        padding: 0 !important;
        border: none !important;
        min-width: 0 !important;
    }

    .table tbody td.desc-fixo strong,
    .table tbody td.desc-entrada strong,
    .table tbody td.desc-parc strong,
    .table tbody td.desc-var strong {
        font-size: 0.875rem !important;
        color: #f8fafc;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    .table tbody td .desc-categoria,
    .table tbody td .desc-badge-row {
        font-size: 0.74rem !important;
        color: #94a3b8;
        margin-top: 2px;
        line-height: 1.2;
    }

    /* Ações à direita: Editar e Excluir sempre visíveis */
    .table tbody td.td-acoes {
        grid-column: 5 !important;
        grid-row: 1 / span 2 !important;
        width: 64px !important;
        min-width: 64px !important;
        max-width: 64px !important;
        padding: 0 !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .table tbody td.td-acoes .table-actions {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .table tbody td.td-acoes .btn-action-edit,
    .table tbody td.td-acoes .btn-action-del {
        width: 28px !important;
        height: 28px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Linha inferior: Data, Pagamento/Progresso e Valor */
    .table tbody td.td-data,
    .table tbody td.td-venc {
        grid-column: 2 !important;
        grid-row: 2 !important;
        padding: 0 !important;
        border: none !important;
        font-size: 0.76rem !important;
        color: #94a3b8 !important;
        text-align: left !important;
        white-space: nowrap !important;
        width: auto !important;
        min-width: 0 !important;
    }

    .table tbody td.td-tipo {
        grid-column: 3 !important;
        grid-row: 2 !important;
        padding: 0 4px !important;
        border: none !important;
        font-size: 0.76rem !important;
        color: #cbd5e1 !important;
        text-align: center !important;
        text-transform: capitalize !important;
        white-space: nowrap !important;
        width: auto !important;
        min-width: 0 !important;
    }

    .table tbody td.td-prog {
        grid-column: 3 !important;
        grid-row: 2 !important;
        padding: 0 4px !important;
        border: none !important;
        font-size: 0.74rem !important;
        text-align: center !important;
        white-space: nowrap !important;
        width: auto !important;
        min-width: 0 !important;
    }

    .table tbody td.td-prog .progress-bar-bg {
        max-width: 50px !important;
        height: 4px !important;
    }

    .table tbody td.td-valor {
        grid-column: 4 !important;
        grid-row: 2 !important;
        padding: 0 !important;
        border: none !important;
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        color: #f8fafc !important;
        text-align: right !important;
        white-space: nowrap !important;
        width: auto !important;
        min-width: 0 !important;
    }
}

/* Telas muito pequenas (< 400px, como 360px e 390px) */
@media (max-width: 400px) {
    .kpi-card h3 {
        font-size: 1.05rem;
    }
    .table tbody tr {
        grid-template-columns: 28px 1fr auto auto 58px !important;
        column-gap: 6px !important;
        padding: 8px 8px !important;
    }
    .table tbody td.td-acoes {
        width: 58px !important;
        max-width: 58px !important;
    }
    .table tbody td.td-acoes .table-actions {
        gap: 4px !important;
    }
    .table tbody td.td-acoes .btn-action-edit,
    .table tbody td.td-acoes .btn-action-del {
        width: 26px !important;
        height: 26px !important;
    }
}

@media (max-width: 640px) {
    .modal-content {
        max-height: 90vh;
        width: 95%;
    }
    .modal-form-flex {
        max-height: 90vh;
    }
    .modal-header, .modal-footer, .modal-body {
        padding-left: 14px;
        padding-right: 14px;
    }
    .modal-flow-tabs {
        margin-left: 14px;
        margin-right: 14px;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}
/* ==========================================================================
   Módulo: Objetivos e Metas (Planejamento, Aportes e Progresso)
   ========================================================================== */
.btn-meta-novo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.35);
    color: #22d3ee;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.btn-meta-novo:hover {
    background: rgba(6, 182, 212, 0.22);
    border-color: rgba(6, 182, 212, 0.6);
    color: #67e8f9;
}

.objetivos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    scrollbar-width: thin;
}

.objetivo-card-item {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-md);
    padding: 13px 14px;
    transition: var(--transition);
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}
.objetivo-card-item:hover {
    border-color: rgba(6, 182, 212, 0.25);
    background: rgba(15, 23, 42, 0.85);
}
.objetivo-card-item.concluido {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.03);
}

.objetivo-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
}

.objetivo-nome-block {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.objetivo-nome {
    font-size: 0.875rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.badge-meta-andamento {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 99px;
    font-size: 0.675rem;
    font-weight: 700;
    background: rgba(6, 182, 212, 0.12);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.25);
    flex-shrink: 0;
    white-space: nowrap;
}

.badge-meta-concluida {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 99px;
    font-size: 0.675rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    flex-shrink: 0;
    white-space: nowrap;
}

.objetivo-actions-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.btn-meta-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: #94a3b8;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.btn-meta-action:hover {
    color: #f8fafc;
    background: rgba(51, 65, 85, 0.8);
}
.btn-meta-action.btn-deposito-add {
    width: auto;
    padding: 0 7px;
    height: 24px;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
}
.btn-meta-action.btn-deposito-add:hover {
    background: rgba(16, 185, 129, 0.22);
    color: #6ee7b7;
}
.btn-meta-action.btn-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.objetivo-valores-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    align-items: baseline;
    font-size: 0.775rem;
    color: #94a3b8;
    margin-bottom: 6px;
}

.objetivo-valor-destaque {
    font-weight: 700;
    color: #f8fafc;
}
.objetivo-valor-parcela {
    font-size: 0.725rem;
    color: #38bdf8;
}

.objetivo-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(30, 41, 59, 0.7);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
    margin-bottom: 8px;
}
.objetivo-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #06b6d4, #10b981);
    border-radius: 99px;
    transition: width 0.4s ease;
}
.objetivo-card-item.concluido .objetivo-progress-fill {
    background: linear-gradient(90deg, #10b981, #059669);
}

.objetivo-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.725rem;
    color: #64748b;
    gap: 6px;
}
.btn-toggle-depositos {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.725rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: var(--transition);
}
.btn-toggle-depositos:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
}

.depositos-accordion {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    display: none;
    flex-direction: column;
    gap: 6px;
}
.depositos-accordion.open {
    display: flex;
}

.deposito-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    padding: 5px 8px;
    background: rgba(30, 41, 59, 0.4);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.deposito-row-data {
    color: #94a3b8;
    white-space: nowrap;
}
.deposito-row-valor {
    color: #34d399;
    font-weight: 700;
    white-space: nowrap;
}


/* ==========================================================================
   Módulo: Copiar Gastos Fixos para o Próximo Mês (Classes Novas)
   ========================================================================== */
.card-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-copiar-fixos {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-copiar-fixos:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

.modal-copiar-content {
    max-width: 620px;
    width: 95%;
}

.modal-copiar-body {
    padding: 12px 18px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-copiar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.checkbox-select-all-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-primary);
    cursor: pointer;
}

.lista-copiar-scroll {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-copiar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    gap: 12px;
    transition: var(--transition);
}

.item-copiar-row.ja-existe {
    opacity: 0.6;
    background: rgba(15, 23, 42, 0.2);
}

.item-copiar-info {
    flex: 1;
    min-width: 0;
}

.item-copiar-desc {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-copiar-meta {
    font-size: 0.725rem;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 2px;
}

.item-copiar-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-copiar-valor {
    width: 105px;
    padding: 5px 8px;
    background: #090d16;
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 4px;
    font-size: 0.8rem;
    text-align: right;
    font-family: inherit;
}

.badge-ja-existe {
    font-size: 0.68rem;
    padding: 2px 6px;
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 4px;
    white-space: nowrap;
}

/* Modo de privacidade para inputs editáveis do modal de cópia de fixos */
.modo-privacidade .input-copiar-valor {
    filter: blur(6px);
    transition: filter 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.modo-privacidade .input-copiar-valor:focus {
    filter: none;
}

.notificacao-sucesso-copia {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #064e3b;
    border: 1px solid #059669;
    color: #ecfdf5;
    padding: 12px 18px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    font-size: 0.85rem;
}

.btn-atalho-mes {
    background: #10b981;
    color: #022c22;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.btn-atalho-mes:hover {
    background: #34d399;
}

/* Responsividade Mobile (até 480px) */
@media (max-width: 480px) {
    .btn-copiar-fixos span {
        display: none;
    }
    .btn-copiar-fixos {
        padding: 5px 7px;
    }
    .notificacao-sucesso-copia {
        left: 12px;
        right: 12px;
        bottom: 16px;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 8px;
    }
}
