:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --dark: #f8fafc;
    --light: #0f172a;
    --gray: #94a3b8;
    --border: #334155;
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

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

/* ==============================================
   GPU ACCELERATION - Scroll suave 144hz+
   ============================================== */

/* Ativa GPU para elementos principais durante scroll */
.card,
.dashboard-card,
.summary-card,
.cofrinho-card,
.table-responsive,
.sidebar,
.navbar,
.chart-container {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Otimiza repaint em elementos que mudam frequentemente */
.dashboard-content,
.container,
main {
    will-change: scroll-position;
}

/* Desativa animacoes durante scroll para performance */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: auto; /* Scroll nativo e mais rapido */
    }
}

/* ==============================================
   CLASSES UTILITÁRIAS
   ============================================== */

/* Margins */
.mb-0 { margin-bottom: 0 !important; }
.mb-half { margin-bottom: 0.5rem !important; }
.mb-1 { margin-bottom: 1rem !important; }
.mb-2 { margin-bottom: 2rem !important; }
.mt-0 { margin-top: 0 !important; }
.mt-half { margin-top: 0.5rem !important; }
.mt-1 { margin-top: 1rem !important; }
.mt-2 { margin-top: 2rem !important; }

/* Paddings */
.pt-0 { padding-top: 0 !important; }
.pt-half { padding-top: 0.5rem !important; }
.pt-1 { padding-top: 1rem !important; }
.pb-0 { padding-bottom: 0 !important; }
.pb-half { padding-bottom: 0.5rem !important; }
.pb-1 { padding-bottom: 1rem !important; }

/* Text colors */
.text-success { color: #10b981 !important; }
.text-danger { color: #ef4444 !important; }
.text-warning { color: #f59e0b !important; }
.text-info { color: #3b82f6 !important; }
.text-muted { color: rgba(255, 255, 255, 0.6) !important; }

/* Text alignment */
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }

/* Display */
.d-flex { display: flex !important; }
.flex-1 { flex: 1 !important; }
.justify-between { justify-content: space-between !important; }
.items-center { align-items: center !important; }
.gap-half { gap: 0.5rem !important; }
.gap-1 { gap: 1rem !important; }
.gap-2 { gap: 2rem !important; }

/* Grids */
.grid-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
    .grid-2-cols {
        grid-template-columns: 1fr;
    }
}

/* Chart containers */
.chart-height-sm { height: 200px; }
.chart-height-md { height: 300px; }
.chart-height-lg { height: 350px; }

/* Font weight */
.font-bold { font-weight: 600; }

/* Tabela categoria (estilo para tabelas de categorias) */
.table-categoria {
    font-size: 0.875rem;
}

.table-categoria th,
.table-categoria td {
    padding: 0.75rem;
}

.table-categoria tfoot {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 700;
}

/* Actions cell */
.actions-cell {
    white-space: nowrap;
}

/* Button extra small */
.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

/* Margin bottom zero for tables */
.mb-0 { margin-bottom: 0 !important; }

html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    background-attachment: fixed;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
}

[data-theme="dark"] body {
    background: #0f172a;
    background-attachment: fixed;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 0 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* Ícone do calendário branco para inputs do tipo month e date */
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.8;
    cursor: pointer;
}

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

@media (min-width: 1920px) {
    .container {
        padding: 0 3rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
        max-width: 100vw;
        overflow-x: hidden;
    }
}

/* Estilos antigos de header - desabilitados */
header.old-header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 1);
    text-decoration: none;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Desabilitar estilos genéricos de nav */
nav.old-nav ul {
    display: block;
    list-style: none;
    gap: 0;
}

nav.old-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav.old-nav a:hover, nav.old-nav a.active {
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ==================== SISTEMA DE BOTÕES PADRONIZADO - GLASS NEON ==================== */

/* Base do botão - estilo glass neon */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

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

.btn i {
    font-size: 0.9em;
}

/* ===== BOTÃO PRIMÁRIO - Dourado/Âmbar Glass Neon ===== */
.btn-primary {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.2) 100%);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.btn-primary:active {
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.15);
}

/* ===== BOTÃO SUCESSO - Verde Glass Neon ===== */
.btn-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.btn-success:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.2) 100%);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    color: #34d399;
}

/* ===== BOTÃO PERIGO - Vermelho Glass Neon ===== */
.btn-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

.btn-danger:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.2) 100%);
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* ===== BOTÃO SECUNDÁRIO - Cinza Glass Neon ===== */
.btn-secondary {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.1) 0%, rgba(100, 116, 139, 0.08) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.05);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.18) 0%, rgba(100, 116, 139, 0.15) 100%);
    border-color: rgba(148, 163, 184, 0.35);
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
}

/* ===== BOTÃO INFO - Azul Glass Neon ===== */
.btn-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.btn-info:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(37, 99, 235, 0.2) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* ===== BOTÃO WARNING - Laranja Glass Neon ===== */
.btn-warning {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(234, 88, 12, 0.1) 100%);
    border: 1px solid rgba(249, 115, 22, 0.3);
    color: #f97316;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.1);
}

.btn-warning:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.25) 0%, rgba(234, 88, 12, 0.2) 100%);
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

/* ===== VARIANTES OUTLINE ===== */
.btn-outline-primary {
    background: transparent;
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}

.btn-outline-primary:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.6);
    color: #fbbf24;
}

.btn-outline-success {
    background: transparent;
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
}

.btn-outline-success:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.6);
    color: #34d399;
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.btn-outline-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.6);
    color: #f87171;
}

.btn-outline-secondary {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #94a3b8;
}

.btn-outline-secondary:hover {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.5);
    color: #cbd5e1;
}

.btn-outline-info {
    background: transparent;
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #3b82f6;
}

.btn-outline-info:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.6);
    color: #60a5fa;
}

/* ===== TAMANHOS ===== */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    min-height: 30px;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    min-height: 24px;
}

/* ===== BOTÃO ÍCONE (quadrado) ===== */
.btn-icon {
    padding: 0.5rem;
    min-width: 36px;
    min-height: 36px;
    aspect-ratio: 1;
}

.btn-icon.btn-sm {
    padding: 0.35rem;
    min-width: 30px;
    min-height: 30px;
}

.btn-icon.btn-xs {
    padding: 0.25rem;
    min-width: 24px;
    min-height: 24px;
}

/* ===== UTILITÁRIOS ===== */
.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-group-vertical {
    flex-direction: column;
}

/* Estado desabilitado */
.btn:disabled,
.btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ===== LINKS COMO BOTÕES (sem classe .btn) - forçar estilo em <a> ===== */
a.btn {
    text-decoration: none;
}

a.btn:hover {
    text-decoration: none;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
    .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }

    .btn-sm {
        padding: 0.35rem 0.625rem;
        font-size: 0.7rem;
    }

    .btn-xs {
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
    }
}

/* Grid adaptativo para cards - usa auto-fit para adaptar ao conteúdo */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* Grid fixo de 4 colunas - para quando sabemos que são 12 cards */
.dashboard-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (max-width: 1400px) {
    .dashboard-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1000px) {
    .dashboard-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dashboard-grid,
    .dashboard-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Grid de 2 colunas para seções lado a lado */
.grid-2-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1000px) {
    .grid-2-col {
        grid-template-columns: 1fr;
    }
}

/* Grid de 3 colunas */
.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 900px) {
    .grid-3-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-3-col {
        grid-template-columns: 1fr;
    }
}

/* Card base - estilo neutro e estático */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* Card principal - Glass Neon com efeitos */
.card-main {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Efeito de luz deslizante - apenas nos cards principais */
.card-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.card-main:hover::before {
    left: 100%;
}

.card-main:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2), 0 0 20px rgba(139, 92, 246, 0.1);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
}

.card-clickable {
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 1);
}

.card-value.positive {
    color: var(--success);
}

.card-value.negative {
    color: var(--danger);
}

.card-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

/* ==============================================
   CARDS ESPECIAIS - DASHBOARD
   ============================================== */

/* Card de Orçamentos Ativos */
.card-orcamentos {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(74, 144, 226, 0.05) 100%);
    border: 1px solid rgba(74, 144, 226, 0.3);
}

.card-orcamentos .card-stats {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-bottom: 0.5rem;
}

.card-orcamentos .card-stat {
    text-align: center;
    flex: 1;
    padding: 0 0.5rem;
}

.card-orcamentos .card-stat:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.card-orcamentos .card-stat-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.15rem;
}

.card-orcamentos .card-stat-value {
    font-size: 1.1rem;
    font-weight: bold;
}

.card-orcamentos .card-stat-value.pendente { color: #FFA500; }
.card-orcamentos .card-stat-value.negociacao { color: #4A90E2; }
.card-orcamentos .card-stat-value.aprovado { color: #28a745; }

.card-orcamentos .card-stat-subvalue {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.1rem;
}

.card-orcamentos .card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 0.35rem;
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-orcamentos .card-footer-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.card-orcamentos .card-footer-value {
    font-size: 0.85rem;
    font-weight: bold;
    color: #FFA500;
}

/* Card de Saldo */
.card-saldo {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.card-saldo .saldo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.card-saldo .saldo-item:last-child {
    margin-bottom: 0;
}

.card-saldo .saldo-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.card-saldo .saldo-value.positive { color: #10b981; }
.card-saldo .saldo-value.negative { color: #ef4444; }
.card-saldo .saldo-value.neutral { color: rgba(255, 255, 255, 0.95); }

/* Card de Estatística (métricas) */
.card-stat-box {
    text-align: center;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    border-left: 3px solid transparent;
}

.card-stat-box.success { border-left-color: #10b981; background: rgba(16, 185, 129, 0.08); }
.card-stat-box.danger { border-left-color: #ef4444; background: rgba(239, 68, 68, 0.08); }
.card-stat-box.warning { border-left-color: #f59e0b; background: rgba(245, 158, 11, 0.08); }
.card-stat-box.info { border-left-color: #3b82f6; background: rgba(59, 130, 246, 0.08); }

.card-stat-box .stat-title {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.card-stat-box .stat-number {
    font-size: 1.75rem;
    font-weight: 700;
}

.card-stat-box.success .stat-number { color: #10b981; }
.card-stat-box.danger .stat-number { color: #ef4444; }
.card-stat-box.warning .stat-number { color: #f59e0b; }
.card-stat-box.info .stat-number { color: #3b82f6; }

.card-stat-box .stat-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.25rem;
}

/* Seção de card com título */
.card-section {
    margin-bottom: 2rem;
}

.card-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
}

/* Header flexível para cards */
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-title-main {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.card-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Grupo de botões */
.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Botão extra pequeno */
.btn-xs {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
}

/* ==============================================
   METRIC CARDS - Cards coloridos de métricas
   ============================================== */

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid;
}

.metric-card.info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.metric-card.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.metric-card.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.metric-card.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.metric-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.metric-card.info .metric-card-label { color: #3b82f6; }
.metric-card.success .metric-card-label { color: #10b981; }
.metric-card.danger .metric-card-label { color: #ef4444; }
.metric-card.warning .metric-card-label { color: #f59e0b; }

.metric-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.metric-card-value.success { color: #10b981; }
.metric-card-value.danger { color: #ef4444; }
.metric-card-value.warning { color: #f59e0b; }
.metric-card-value.info { color: #3b82f6; }

.metric-card-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.25rem;
}

/* Progress Bar Large */
.progress-bar-lg {
    height: 2rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.progress-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.progress-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

/* ==============================================
   TABS - Sistema de abas
   ============================================== */

.card-tabs {
    padding: 0;
    overflow: hidden;
}

.card-tabs-header {
    padding: 1rem 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.tabs-container {
    display: flex;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    overflow-x: auto;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn i {
    opacity: 0.7;
}

.tab-btn:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.tab-btn.active i {
    opacity: 1;
}

.tab-count {
    opacity: 0.6;
}

.tab-content {
    padding: 1.5rem;
}

.tab-content.hidden {
    display: none;
}

/* Sub-tabs (tabs internas dentro de um card) */
.sub-tabs-container {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    overflow-x: auto;
}

.sub-tab-btn {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.8rem;
    white-space: nowrap;
}

.sub-tab-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.sub-tab-btn.active {
    color: rgba(255, 255, 255, 0.95);
    border-bottom-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.sub-tab-content {
    display: none;
}

.sub-tab-content.active {
    display: block;
}

/* Tab empresa button (tabs por empresa) */
.tab-empresa-button {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 0.875rem;
}

.tab-empresa-button:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.tab-empresa-button.active {
    color: rgba(255, 255, 255, 0.95);
    border-bottom-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.tab-empresa-content {
    display: none;
}

.tab-empresa-content.active {
    display: block;
}

/* Tab totals (rodapé de totais) */
.tab-total {
    padding: 1rem 1.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tab-total-success {
    background: rgba(16, 185, 129, 0.08);
}

.tab-total-warning {
    background: rgba(245, 158, 11, 0.08);
}

.tab-total-danger {
    background: rgba(239, 68, 68, 0.08);
}

.tab-total-info {
    background: rgba(59, 130, 246, 0.08);
}

.tab-total-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.tab-total-value {
    font-size: 1.1rem;
}

/* Empty state pequeno para dentro de tabs */
.empty-state-small {
    padding: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* Tabela compacta para tabs */
.table-compact th,
.table-compact td {
    font-size: 0.75rem;
    padding: 0.5rem;
}

.table-compact .btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

/* Badge tamanhos menores */
.badge-xs {
    font-size: 0.6rem;
    padding: 0.15rem 0.35rem;
}

.badge-sm {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
}

/* Icon para cofrinho */
.icon-cofrinho {
    font-size: 0.65rem;
    opacity: 0.7;
    margin-left: 0.25rem;
    color: #10b981;
}

/* Tab content wrapper */
.tab-content-wrapper {
    padding: 0;
}

/* ==============================================
   COFRINHO DOS CARTÕES - CLASSES REUTILIZÁVEIS
   ============================================== */

.cofrinho-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .cofrinho-grid {
        grid-template-columns: 1fr;
    }
}

.cofrinho-card {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cofrinho-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cofrinho-card-title-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cofrinho-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

/* Badge de fechamento clicavel */
.cofrinho-fechamento-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cofrinho-fechamento-badge:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.cofrinho-fechamento-badge.variavel {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.cofrinho-fechamento-badge.variavel:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: rgba(245, 158, 11, 0.5);
}

/* Seção dentro do cofrinho */
.cofrinho-section {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border-left: 3px solid;
}

.cofrinho-section.dia-a-dia {
    background: rgba(59, 130, 246, 0.08);
    border-left-color: #3b82f6;
}

.cofrinho-section.extras {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: #ef4444;
}

.cofrinho-section.reserva {
    background: rgba(16, 185, 129, 0.08);
    border-left-color: #10b981;
}

.cofrinho-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cofrinho-section.dia-a-dia .cofrinho-section-title { color: #3b82f6; }
.cofrinho-section.extras .cofrinho-section-title { color: #ef4444; }
.cofrinho-section.reserva .cofrinho-section-title { color: #10b981; }

.cofrinho-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cofrinho-row:last-child {
    margin-bottom: 0;
}

.cofrinho-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.cofrinho-value {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.cofrinho-percent {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 0.25rem;
}

/* Barra de progresso */
.progress-bar-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    height: 1.25rem;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 0.5rem;
}

.progress-bar.success { background: linear-gradient(90deg, #10b981, #059669); }
.progress-bar.warning { background: linear-gradient(90deg, #f59e0b, #d97706); }
.progress-bar.danger { background: linear-gradient(90deg, #ef4444, #dc2626); }
.progress-bar.info { background: linear-gradient(90deg, #3b82f6, #2563eb); }

.progress-bar-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

/* Cofrinho - Classes complementares */
.cofrinho-value-large {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.cofrinho-warning {
    font-size: 0.7rem;
    color: #f59e0b;
    text-align: center;
    margin-top: 0.5rem;
}

.cofrinho-success {
    font-size: 0.7rem;
    color: #10b981;
    text-align: center;
    margin-top: 0.5rem;
}

.cofrinho-total-card {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 0.75rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.cofrinho-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cofrinho-total-label {
    color: rgba(255, 255, 255, 0.95);
}

.cofrinho-total-values {
    text-align: right;
}

.cofrinho-total-main {
    font-size: 1.5rem;
    font-weight: 700;
}

.cofrinho-total-sub {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
}

/* Card de Caixa Consolidado (Sobra/Excedente) */
.cofrinho-caixa-card {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid;
}

.cofrinho-caixa-card.sobra {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.4);
}

.cofrinho-caixa-card.excedente {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-color: rgba(239, 68, 68, 0.4);
}

.cofrinho-caixa-card.zerado {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15) 0%, rgba(107, 114, 128, 0.05) 100%);
    border-color: rgba(107, 114, 128, 0.4);
}

.cofrinho-caixa-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.95);
}

.cofrinho-caixa-card.sobra .cofrinho-caixa-header i {
    color: #10b981;
}

.cofrinho-caixa-card.excedente .cofrinho-caixa-header i {
    color: #ef4444;
}

.cofrinho-caixa-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cofrinho-caixa-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.cofrinho-caixa-row .label {
    color: rgba(255, 255, 255, 0.7);
}

.cofrinho-caixa-row .value {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.cofrinho-caixa-row.total {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.5rem;
    margin-top: 0.25rem;
}

.cofrinho-caixa-row.total .label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.cofrinho-caixa-row.total .value {
    font-size: 1.1rem;
    font-weight: 700;
}

.cofrinho-caixa-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Total geral com destaque */
.total-geral-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 0.75rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-geral-box .total-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.total-geral-box .total-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.total-geral-box .total-value.success { color: #10b981; }
.total-geral-box .total-value.info { color: #3b82f6; }

.total-geral-box .total-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
}

/* ==============================================
   STATS ROW - LINHA DE ESTATÍSTICAS
   ============================================== */

.stats-row-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-row-item:last-child {
    border-bottom: none;
}

.stats-row-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stats-row-title a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: color 0.2s;
}

.stats-row-title a:hover {
    color: #3b82f6;
}

.stats-row-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.stats-total-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(255, 255, 255, 0.15);
}

.stats-total-label {
    font-weight: 700;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.95);
}

.stats-total-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.stats-chart-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-chart-title {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.chart-small {
    max-height: 250px;
}

/* ==============================================
   MELHOR/PIOR MÊS - COMPARATIVO
   ============================================== */

.comparativo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .comparativo-grid {
        grid-template-columns: 1fr;
    }
}

.comparativo-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.comparativo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.comparativo-card.melhor {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.comparativo-card.melhor::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.comparativo-card.pior {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.comparativo-card.pior::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.comparativo-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.comparativo-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.comparativo-mes {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.comparativo-card.melhor .comparativo-mes { color: #10b981; }
.comparativo-card.pior .comparativo-mes { color: #ef4444; }

.comparativo-valor {
    font-size: 1.75rem;
    font-weight: 800;
}

.comparativo-card.melhor .comparativo-valor {
    color: #10b981;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.comparativo-card.pior .comparativo-valor {
    color: #ef4444;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

/* Cards clicáveis no comparativo */
.comparativo-card.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.comparativo-card.clickable:hover {
    transform: translateY(-4px);
}

.comparativo-card.melhor.clickable:hover {
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3), 0 0 20px rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
}

.comparativo-card.pior.clickable:hover {
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3), 0 0 20px rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.comparativo-hint {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.comparativo-card.clickable:hover .comparativo-hint {
    opacity: 1;
}

/* Dica nos gráficos */
.chart-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-hint i {
    color: rgba(59, 130, 246, 0.7);
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.stats-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

.stat-value {
    font-weight: 700;
    color: rgba(255, 255, 255, 1);
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s;
}

th {
    padding: 0.5rem;
    text-align: left;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 0.5rem;
    border-top: 1px solid var(--border);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8125rem;
}

tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ==========================================
   GLASS NEON BADGES - Status & Type
   ========================================== */

/* Base Glass Neon Badge */
.badge-glass {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.badge-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.4s ease;
    pointer-events: none;
}

.badge-glass:hover::before {
    left: 100%;
}

.badge-glass i {
    font-size: 0.65rem;
}

/* Status: Concluído / Pago / Ativo */
.badge-glass-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(34, 197, 94, 0.15) 100%);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.badge-glass-success:hover {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Status: Pendente / Aguardando */
.badge-glass-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(251, 191, 36, 0.15) 100%);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.badge-glass-warning:hover {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Status: Inativo / Cancelado / Erro */
.badge-glass-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(248, 113, 113, 0.15) 100%);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.badge-glass-danger:hover {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Tipo: Entrada */
.badge-glass-entrada {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(52, 211, 153, 0.15) 100%);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.badge-glass-entrada:hover {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Tipo: Saída */
.badge-glass-saida {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(248, 113, 113, 0.15) 100%);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.badge-glass-saida:hover {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Info: Parcelas, valores, porcentagens */
.badge-glass-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(96, 165, 250, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.badge-glass-info:hover {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Purple: Especial / Destaque */
.badge-glass-purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(167, 139, 250, 0.15) 100%);
    border-color: rgba(139, 92, 246, 0.4);
    color: #a78bfa;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.badge-glass-purple:hover {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Neutral: Ambos / Genérico */
.badge-glass-neutral {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.2) 0%, rgba(209, 213, 219, 0.15) 100%);
    border-color: rgba(156, 163, 175, 0.4);
    color: #d1d5db;
    text-shadow: 0 0 10px rgba(156, 163, 175, 0.3);
    box-shadow: 0 2px 12px rgba(156, 163, 175, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.badge-glass-neutral:hover {
    border-color: rgba(156, 163, 175, 0.6);
    box-shadow: 0 4px 20px rgba(156, 163, 175, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Tamanhos alternativos */
.badge-glass-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.6rem;
}

.badge-glass-lg {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.95);
    transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

select option {
    background: rgba(20, 20, 20, 0.95);
    color: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.checkbox-group:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    min-width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success-subtle {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

/* ========================================
   FORMULÁRIOS MODERNOS
   ======================================== */

.form-modern {
    width: 100%;
}

/* Layout de 2 colunas para formulários */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.form-grid-full {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Seções do Formulário */
.form-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0;
}

.form-section .form-group {
    margin-bottom: 0.75rem;
}

.form-section .form-group:last-child {
    margin-bottom: 0;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-section-title i {
    color: var(--primary);
    font-size: 0.85rem;
}

.form-section-highlight {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.2);
}

.form-section-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.form-section-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

.form-section-collapsible {
    cursor: pointer;
}

.form-section-collapsible .form-section-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section-collapsible.expanded .form-section-title {
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Grid de Opções (checkboxes em cards) */
.form-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.form-option-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.375rem;
    padding: 0.75rem;
    transition: all 0.2s;
}

.form-option-card + .form-option-card {
    margin-top: 0.5rem;
}

.form-option-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.form-option-card.active {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.3);
}

.form-option-card .checkbox-group {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 0;
}

.form-option-card .checkbox-group:hover {
    background: transparent;
}

.form-option-details {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Texto de ajuda */
.form-help {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.25rem;
}

.form-help i {
    margin-right: 0.25rem;
}

/* Área de ações do formulário */
.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-actions-center {
    justify-content: center;
}

.form-actions-right {
    justify-content: flex-end;
}

.form-actions-between {
    justify-content: space-between;
}

/* Botão grande */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Classes utilitárias */
.hidden {
    display: none !important;
}

.input-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Responsivo para formulários */
@media (max-width: 768px) {
    .form-section {
        padding: 1rem;
    }

    .form-options-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

.month-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    transition: background-color 0.3s;
}

.month-selector input {
    max-width: 200px;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 1rem;
}

.chart-container.chart-400 {
    height: 400px;
}

.empresa-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.icon-btn:hover {
    color: var(--primary);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.7);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.empty-state p {
    color: rgba(255, 255, 255, 0.7);
}

footer {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    transition: background-color 0.3s, color 0.3s;
}

[data-theme="dark"] footer {
    background: rgba(30, 41, 59, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 1024px) {
    nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .container {
        padding: 0 20px;
    }

    .card h3 {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(20, 20, 20, 0.98);
        backdrop-filter: blur(10px);
        padding: 80px 0 20px 0;
        transition: left 0.3s ease;
        z-index: 100;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }

    nav.active {
        left: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    nav ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav ul li a {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        transition: background 0.3s;
    }

    nav ul li a:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

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

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card {
        padding: 1rem;
    }

    .card-value {
        font-size: 1.5rem;
    }

    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }

    .month-selector {
        flex-direction: column;
        align-items: flex-start;
    }

    .month-selector input {
        max-width: 100%;
    }

    .chart-container {
        height: 250px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 15px;
    }

    .stats-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .actions {
        width: 100%;
        justify-content: flex-start;
    }

    .btn {
        font-size: 0.875rem;
        padding: 0.625rem 1.25rem;
    }

    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state h3 {
        font-size: 1.25rem;
    }

    footer {
        padding: 1.5rem 0;
        font-size: 0.875rem;
    }
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 101;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 3px;
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu-backdrop.active {
    display: block;
    opacity: 1;
}

/* ==============================================
   MENU LATERAL E LAYOUT
   ============================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s;
    z-index: 10;
}

.sidebar-close:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.sidebar-nav li {
    margin: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
}

.sidebar-nav a {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 0.875rem 1.5rem !important;
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
    transition: all 0.2s;
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

.sidebar-nav a i {
    width: 20px !important;
    text-align: center !important;
    font-size: 1.125rem !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.sidebar-nav a span {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Submenu styles */
.menu-section .menu-toggle {
    position: relative !important;
    cursor: pointer !important;
}

.menu-section .toggle-icon {
    position: absolute !important;
    right: 1.5rem !important;
    transition: transform 0.3s ease !important;
    font-size: 0.75rem !important;
    width: auto !important;
}

.menu-section.active .toggle-icon {
    transform: rotate(180deg) !important;
}

.submenu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.4s ease, padding 0.4s ease !important;
    background: rgba(0, 0, 0, 0.2) !important;
}

.menu-section.active .submenu {
    max-height: 500px !important;
    padding: 0.25rem 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.submenu li {
    margin: 0 !important;
}

.submenu a {
    padding-left: 3.5rem !important;
    font-size: 0.9rem !important;
}

.submenu a i {
    font-size: 0.9rem !important;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: calc(100vw - 260px);
    overflow-x: hidden;
}

.main-content main {
    flex: 1;
    padding: 1.5rem 0;
}

.footer {
    display: none;
}

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
}

.mobile-page-title {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    flex: 1;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        height: 100vh;
        z-index: 1001;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .month-picker-modern {
        padding-top: 3rem;
    }

    .main-content {
        margin-left: 0;
        padding-top: 60px;
        max-width: 100vw;
        width: 100vw;
        overflow-x: hidden;
    }

    .container {
        padding: 0 1rem;
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
        padding-top: 20px;
    }

    /* Elementos de layout */
    .page-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .page-title {
        font-size: 1.25rem;
        word-break: break-word;
    }

    .month-selector {
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
    }

    table {
        font-size: 0.75rem;
    }

    .card {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        overflow-x: auto;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .card-value {
        font-size: 1.5rem !important;
        word-break: break-word;
    }

    /* Forçar visibilidade dos itens do menu no mobile */
    .sidebar.active .sidebar-nav,
    .sidebar.active .sidebar-nav ul,
    .sidebar.active .sidebar-nav li,
    .sidebar.active .sidebar-nav a {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        width: 100%;
        background: transparent;
    }

    .sidebar.active .sidebar-nav a {
        display: flex !important;
    }
}

/* Remover estilos antigos de header */
header {
    display: none;
}

/* Garantir que elementos sempre fiquem contidos no mobile */
@media (max-width: 768px) {
    * {
        max-width: 100vw;
    }

    .page-header,
    .month-selector,
    .stats-grid,
    .chart-container,
    .form-row,
    .table-responsive,
    .dashboard-grid > * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Garantir que tabelas não estourem */
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: auto !important;
    }

    /* Cards e grids responsivos */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .chart-container {
        width: 100% !important;
        overflow: hidden !important;
    }

    /* Inputs e forms */
    input, select, textarea, button {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Garantir que imagens não estourem */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* ==============================================
   SIDEBAR MELHORADA - FASE 5.1
   ============================================== */

/* Gradiente de fundo mais elegante */
.sidebar {
    background: linear-gradient(180deg,
        rgba(15, 23, 42, 0.98) 0%,
        rgba(10, 15, 30, 0.99) 100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
}

/* Logo com gradiente */
.sidebar-logo {
    font-size: 1.25rem !important;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* Quick Actions no topo */
.sidebar-quick-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

/* Botão "Novo" - Dourado/Âmbar */
.quick-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 0.5rem;
    color: #f59e0b;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

.quick-action-btn:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.2) 100%);
    border-color: rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

/* Botão "Cofrinho" - Verde */
.quick-action-btn.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.quick-action-btn.success:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.2) 100%);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    color: #34d399;
}

/* Links do menu com indicador lateral */
.sidebar-nav > ul > li > a,
.sidebar-nav > ul > li.menu-section > a.menu-toggle {
    position: relative;
    border-left: 3px solid transparent;
    margin-left: 0;
    padding-left: calc(1.5rem - 3px) !important;
    transition: all 0.25s ease;
}

.sidebar-nav > ul > li > a:hover,
.sidebar-nav > ul > li.menu-section > a.menu-toggle:hover {
    border-left-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.08) !important;
    color: rgba(255, 255, 255, 1) !important;
}

/* Item ativo com highlight */
.sidebar-nav > ul > li > a.active,
.sidebar-nav > ul > li.menu-section.current > a.menu-toggle {
    border-left-color: #3b82f6 !important;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%) !important;
    color: #fff !important;
}

.sidebar-nav > ul > li > a.active i,
.sidebar-nav > ul > li.menu-section.current > a.menu-toggle i:first-child {
    color: #3b82f6 !important;
}

/* Ícones coloridos por categoria */
.sidebar-nav a i.fa-chart-line { color: #10b981; }
.sidebar-nav a i.fa-money-bill-wave { color: #22c55e; }
.sidebar-nav a i.fa-exchange-alt { color: #3b82f6; }
.sidebar-nav a i.fa-file-invoice-dollar { color: #f59e0b; }
.sidebar-nav a i.fa-redo { color: #8b5cf6; }
.sidebar-nav a i.fa-credit-card { color: #ec4899; }
.sidebar-nav a i.fa-piggy-bank { color: #f97316; }
.sidebar-nav a i.fa-chart-pie { color: #06b6d4; }
.sidebar-nav a i.fa-coins { color: #eab308; }
.sidebar-nav a i.fa-cog { color: #64748b; }
.sidebar-nav a i.fa-tags { color: #a855f7; }
.sidebar-nav a i.fa-building { color: #6366f1; }
.sidebar-nav a i.fa-lock { color: #ef4444; }
.sidebar-nav a i.fa-database { color: #14b8a6; }
.sidebar-nav a i.fa-user { color: #f472b6; }

/* Hover nos ícones */
.sidebar-nav a:hover i {
    transform: scale(1.15);
    transition: transform 0.2s ease;
}

/* Submenu melhorado */
.submenu {
    background: rgba(0, 0, 0, 0.25) !important;
    border-left: 2px solid rgba(59, 130, 246, 0.2);
    margin-left: 1.25rem !important;
}

.submenu a {
    padding-left: 2rem !important;
    font-size: 0.875rem !important;
    color: rgba(255, 255, 255, 0.65) !important;
    border-radius: 0 0.375rem 0.375rem 0;
    margin-right: 0.5rem;
}

.submenu a:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    color: rgba(255, 255, 255, 0.95) !important;
    padding-left: 2.25rem !important;
}

.submenu a.active {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #fff !important;
    font-weight: 600 !important;
}

/* Badge de notificação */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    margin-left: auto;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: pulse-badge 2s infinite;
}

.nav-badge.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.nav-badge.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    animation: none;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ==================== MONTH PICKER MODERNO ==================== */
.month-picker-modern {
    padding: 1.25rem 1rem 1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.month-picker-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.month-picker-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.month-picker-display:hover::before {
    left: 100%;
}

.month-picker-display:hover {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2), inset 0 0 20px rgba(59, 130, 246, 0.05);
    transform: translateY(-1px);
}

.month-nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.month-nav-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    color: white;
    transform: scale(1.1);
}

.month-nav-btn:active {
    transform: scale(0.95);
}

.month-picker-current {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.month-picker-current .month-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
}

.month-picker-current .month-year {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.month-indicator-past {
    position: absolute;
    top: -8px;
    right: -20px;
    font-size: 0.6rem;
    color: #f59e0b;
    animation: pulse-indicator 2s infinite;
}

@keyframes pulse-indicator {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.month-today-btn {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 0.75rem;
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.month-today-btn:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(16, 185, 129, 0.2) 100%);
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
    transform: translateY(-1px);
}

/* Dropdown do Calendario */
.month-picker-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 1rem;
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(59, 130, 246, 0.1);
    animation: dropdown-appear 0.2s ease;
}

.month-picker-dropdown.active {
    display: block;
}

@keyframes dropdown-appear {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.month-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.year-display {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
}

.year-nav-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.year-nav-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: white;
}

.month-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.month-grid-item {
    padding: 0.6rem 0.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.month-grid-item:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: white;
    transform: scale(1.05);
}

.month-grid-item.selected {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4) 0%, rgba(139, 92, 246, 0.4) 100%);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.month-grid-item.current {
    position: relative;
}

.month-grid-item.current::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #10b981;
    border-radius: 50%;
}

.month-grid-item.selected.current::after {
    background: white;
}

/* Esconder o input month antigo caso exista */
.sidebar-month-selector {
    display: none;
}

/* Toggle de seções mais suave */
.menu-section .toggle-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 0.5;
}

.menu-section:hover .toggle-icon {
    opacity: 1;
}

.menu-section.active .toggle-icon {
    opacity: 1;
    color: #3b82f6;
}

/* Scrollbar customizada na sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Footer da sidebar */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-footer-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.sidebar-footer-info i {
    color: #10b981;
}

/* ==============================================
   DASHBOARD MELHORADO - FASE 5.2
   ============================================== */

/* Grid do Dashboard otimizado - 4 COLUNAS (simetria para 12 cards) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (max-width: 1400px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1000px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Cards do Dashboard com gradientes sutis */
.dashboard-grid .card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-grid .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-grid .card:hover::before {
    opacity: 1;
}

.dashboard-grid .card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Card com valor positivo */
.dashboard-grid .card.card-positive,
.dashboard-grid .card:has(.card-value.positive) {
    border-left: 3px solid #10b981;
}

.dashboard-grid .card.card-positive::before,
.dashboard-grid .card:has(.card-value.positive)::before {
    background: linear-gradient(90deg, #10b981, transparent);
}

/* Card com valor negativo */
.dashboard-grid .card.card-negative,
.dashboard-grid .card:has(.card-value.negative) {
    border-left: 3px solid #ef4444;
}

.dashboard-grid .card.card-negative::before,
.dashboard-grid .card:has(.card-value.negative)::before {
    background: linear-gradient(90deg, #ef4444, transparent);
}

/* Título do card melhorado */
.card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.75px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Ícone no título */
.card-title i,
.card-title .emoji {
    font-size: 1rem;
    opacity: 0.8;
}

/* Valor do card com animação */
.card-value {
    font-size: 2rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -1px;
    transition: transform 0.2s ease;
}

.card:hover .card-value {
    transform: scale(1.02);
}

.card-value.positive {
    color: #10b981;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.card-value.negative {
    color: #ef4444;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

/* Subtítulo do card */
.card-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mini sparkline placeholder */
.card-sparkline {
    height: 30px;
    margin-top: 0.75rem;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.1) 50%,
        transparent 100%
    );
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.card-sparkline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
    background-size: 200% 100%;
    animation: sparkline-flow 3s linear infinite;
}

@keyframes sparkline-flow {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Tooltip customizado */
.card-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.card-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.95);
}

.card:hover .card-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* Badges nos cards */
.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #3b82f6;
}

.card-badge.success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.card-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.card-badge.danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Card de Saldo especial */
.card-saldo {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.1) 0%,
        rgba(139, 92, 246, 0.1) 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

.card-saldo:hover {
    border-color: rgba(59, 130, 246, 0.4) !important;
}

/* Barra de referência do mês */
.month-reference-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.month-reference-bar .month-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.month-reference-bar .month-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 0.5rem;
    font-size: 1.25rem;
}

.month-reference-bar .month-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.month-reference-bar .month-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.month-reference-bar .month-actions {
    display: flex;
    gap: 0.5rem;
}

/* Seção de resumo por empresa */
.summary-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-section h3 i {
    color: #3b82f6;
}

/* Progress bars melhoradas */
.progress-bar-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    height: 1.5rem;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 0.5rem;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar-fill.success {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.progress-bar-fill.warning {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.progress-bar-fill.danger {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.progress-bar-fill.info {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.progress-bar-label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Animação de entrada para cards */
@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-grid .card {
    animation: card-enter 0.4s ease forwards;
}

.dashboard-grid .card:nth-child(1) { animation-delay: 0.05s; }
.dashboard-grid .card:nth-child(2) { animation-delay: 0.1s; }
.dashboard-grid .card:nth-child(3) { animation-delay: 0.15s; }
.dashboard-grid .card:nth-child(4) { animation-delay: 0.2s; }
.dashboard-grid .card:nth-child(5) { animation-delay: 0.25s; }
.dashboard-grid .card:nth-child(6) { animation-delay: 0.3s; }
.dashboard-grid .card:nth-child(7) { animation-delay: 0.35s; }
.dashboard-grid .card:nth-child(8) { animation-delay: 0.4s; }
.dashboard-grid .card:nth-child(9) { animation-delay: 0.45s; }
.dashboard-grid .card:nth-child(10) { animation-delay: 0.5s; }
.dashboard-grid .card:nth-child(11) { animation-delay: 0.55s; }
.dashboard-grid .card:nth-child(12) { animation-delay: 0.6s; }

/* ==============================================
   SISTEMA DE FILTROS MELHORADO - FASE 5.3
   ============================================== */

/* Container principal de filtros */
.filters-container {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Barra de filtros com layout flexível */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

/* Grupo de filtro individual */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 180px;
    flex: 1;
}

.filter-group.search {
    flex: 2;
    min-width: 280px;
}

.filter-group.actions {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: flex-end;
    gap: 0.5rem;
}

/* Label do filtro */
.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-label i {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Input e Select estilizados */
.filter-input,
.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    width: 100%;
}

.filter-input:hover,
.filter-select:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(0, 0, 0, 0.3);
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: rgba(0, 0, 0, 0.3);
}

.filter-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Select com ícone */
.filter-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,0.5)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Input de pesquisa com ícone */
.filter-search-wrapper {
    position: relative;
}

.filter-search-wrapper .filter-input {
    padding-left: 2.75rem;
}

.filter-search-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* Chips de filtros ativos */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 2rem;
    font-size: 0.8rem;
    color: #3b82f6;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: rgba(59, 130, 246, 0.25);
}

.filter-chip .chip-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    text-transform: uppercase;
}

.filter-chip .chip-value {
    color: #3b82f6;
}

.filter-chip .chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.7rem;
}

.filter-chip .chip-remove:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Contador de resultados */
.results-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 2rem;
    font-size: 0.8rem;
    color: #10b981;
    font-weight: 600;
}

.results-count.empty {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

/* Botões de ação nos filtros - Glass Neon */
.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    /* Glass Neon padrão - Cinza */
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.1) 0%, rgba(100, 116, 139, 0.08) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

.filter-btn:hover {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.18) 0%, rgba(100, 116, 139, 0.15) 100%);
    border-color: rgba(148, 163, 184, 0.35);
    color: #cbd5e1;
    transform: translateY(-1px);
}

/* Primary - Dourado Glass Neon */
.filter-btn.primary {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.filter-btn.primary:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.2) 100%);
    border-color: rgba(245, 158, 11, 0.5);
    color: #fbbf24;
}

/* Danger - Vermelho Glass Neon */
.filter-btn.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(220, 38, 38, 0.08) 100%);
    border-color: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.filter-btn.danger:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.15) 100%);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

/* Busca global expandível */
.global-search {
    position: relative;
}

.global-search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.global-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    outline: none;
}

.global-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.125rem;
    transition: color 0.2s ease;
}

.global-search-input:focus + i,
.global-search:hover i {
    color: #3b82f6;
}

/* Dropdown de sugestões */
.search-suggestions {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    max-height: 300px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.search-suggestions.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

.suggestion-item i {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.suggestion-item .text {
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.suggestion-item .meta {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* Tabs de filtro rápido */
.quick-filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
}

.quick-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-filter-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.quick-filter-tab.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #3b82f6;
}

.quick-filter-tab .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.quick-filter-tab.active .count {
    background: rgba(59, 130, 246, 0.3);
}

/* ==============================================
   TABELAS E LISTAGENS MELHORADAS - FASE 5.4
   ============================================== */

/* Container de tabela */
.table-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    overflow: hidden;
}

/* Tabela base melhorada */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* Cabeçalho da tabela */
thead {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
}

thead th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    white-space: nowrap;
}

/* Coluna ordenável */
thead th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

thead th.sortable:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

thead th.sortable::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.5rem;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid rgba(255, 255, 255, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
}

thead th.sortable:hover::after {
    opacity: 1;
}

thead th.sortable.asc::after {
    opacity: 1;
    border-top-color: #3b82f6;
}

thead th.sortable.desc::after {
    opacity: 1;
    border-top: none;
    border-bottom: 4px solid #3b82f6;
}

/* Células da tabela */
tbody td {
    padding: 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    vertical-align: middle;
}

/* Zebra striping sutil */
tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Hover nas linhas */
tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: rgba(59, 130, 246, 0.08) !important;
}

tbody tr:hover td {
    color: rgba(255, 255, 255, 1);
}

/* Linha selecionada */
tbody tr.selected {
    background: rgba(59, 130, 246, 0.15) !important;
    border-left: 3px solid #3b82f6;
}

/* Ações inline */
.table-actions {
    display: flex;
    gap: 0.375rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

tbody tr:hover .table-actions {
    opacity: 1;
}

/* Botões de ação em tabelas - Glass Neon */
.table-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    text-decoration: none;
    /* Estilo glass neon base - dourado como padrão */
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.08) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #f59e0b;
}

.table-action-btn:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.15) 100%);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

/* Editar - Azul Glass Neon */
.table-action-btn.edit {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.25);
    color: #3b82f6;
}

.table-action-btn.edit:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* Excluir - Vermelho Glass Neon */
.table-action-btn.delete {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.08) 100%);
    border-color: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.table-action-btn.delete:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.15) 100%);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

/* Visualizar - Verde Glass Neon */
.table-action-btn.view {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.08) 100%);
    border-color: rgba(16, 185, 129, 0.25);
    color: #10b981;
}

.table-action-btn.view:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.15) 100%);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

/* Sucesso/Aprovar - Verde Glass Neon (mais enfatizado) */
.table-action-btn.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.table-action-btn.success:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.2) 100%);
    border-color: rgba(16, 185, 129, 0.5);
    color: #34d399;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

/* Info/Download - Azul Glass Neon */
.table-action-btn.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.25);
    color: #3b82f6;
}

.table-action-btn.info:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* Warning - Laranja Glass Neon */
.table-action-btn.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.08) 100%);
    border-color: rgba(245, 158, 11, 0.25);
    color: #f59e0b;
}

.table-action-btn.warning:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.15) 100%);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

/* Checkbox de seleção */
.table-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
}

.table-checkbox:checked {
    background: #3b82f6;
    border-color: #3b82f6;
}

.table-checkbox:checked::after {
    content: '✓';
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Empty state para tabelas */
.table-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: rgba(255, 255, 255, 0.5);
}

.table-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.table-empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.table-empty-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
}

/* Badges para status em tabelas */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.25px;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.paid,
.status-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.overdue,
.status-badge.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Valor monetário em tabelas */
.table-value {
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.5px;
}

.table-value.positive {
    color: #10b981;
}

.table-value.negative {
    color: #ef4444;
}

/* Descrição com truncamento */
.table-description {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tabs de tabela (como na página de transações) */
.table-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

.table-tab {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.03);
}

.table-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.table-tab i {
    opacity: 0.7;
}

.table-tab.active i {
    opacity: 1;
}

.table-tab .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.table-tab.active .tab-count {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

/* Paginação */
.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pagination-info {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.pagination-buttons {
    display: flex;
    gap: 0.375rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.pagination-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

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

/* ==============================================
   FORMULÁRIOS MELHORADOS - FASE 5.5
   ============================================== */

/* Container de formulário */
.form-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 2rem;
}

/* Grupo de campos com floating label */
.form-floating {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-floating input,
.form-floating select,
.form-floating textarea {
    width: 100%;
    padding: 1.25rem 1rem 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1rem;
    transition: all 0.25s ease;
}

.form-floating label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.25s ease;
    background: transparent;
    padding: 0 0.25rem;
}

.form-floating textarea ~ label {
    top: 1.5rem;
}

.form-floating input:focus,
.form-floating select:focus,
.form-floating textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    outline: none;
}

.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label,
.form-floating select:focus ~ label,
.form-floating select:valid ~ label,
.form-floating textarea:focus ~ label,
.form-floating textarea:not(:placeholder-shown) ~ label {
    top: 0.5rem;
    transform: translateY(0);
    font-size: 0.75rem;
    color: #3b82f6;
    background: linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, 1) 50%);
}

/* Validação visual */
.form-floating.is-valid input {
    border-color: #10b981;
}

.form-floating.is-valid label {
    color: #10b981;
}

.form-floating.is-invalid input {
    border-color: #ef4444;
}

.form-floating.is-invalid label {
    color: #ef4444;
}

/* Mensagem de erro */
.form-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #ef4444;
}

.form-error i {
    font-size: 0.875rem;
}

/* Mensagem de sucesso */
.form-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #10b981;
}

/* Grupo de campos em linha */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Seção de formulário */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.form-section-title i {
    color: #3b82f6;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    width: 48px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    transition: all 0.3s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: #3b82f6;
}

.toggle-switch input:checked + .toggle-slider::after {
    transform: translateX(22px);
}

.toggle-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Botões de ação do formulário */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 1.5rem;
}

/* ==============================================
   FEEDBACK VISUAL MELHORADO - FASE 5.6
   ============================================== */

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.5rem;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 70%; }
.skeleton-text.long { width: 100%; }

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
}

/* Toast Notifications melhoradas */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    min-width: 320px;
    max-width: 450px;
    animation: toast-enter 0.3s ease;
    backdrop-filter: blur(10px);
}

@keyframes toast-enter {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.toast-exit {
    animation: toast-exit 0.3s ease forwards;
}

@keyframes toast-exit {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1rem;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.toast.error .toast-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.toast.warning .toast-icon {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.toast.info .toast-icon {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.toast-message {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: white;
}

/* Animação de checkmark */
.checkmark-circle {
    width: 56px;
    height: 56px;
    position: relative;
    display: inline-block;
    vertical-align: top;
}

.checkmark-circle .background {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #10b981;
    position: absolute;
}

.checkmark-circle .checkmark {
    border-radius: 5px;
}

.checkmark-circle .checkmark.draw:after {
    animation-delay: 100ms;
    animation-duration: 0.5s;
    animation-timing-function: ease;
    animation-name: checkmark;
    transform: scaleX(-1) rotate(135deg);
    animation-fill-mode: forwards;
}

.checkmark-circle .checkmark:after {
    opacity: 1;
    height: 25px;
    width: 12px;
    transform-origin: left top;
    border-right: 4px solid white;
    border-top: 4px solid white;
    border-radius: 2.5px !important;
    content: '';
    left: 18px;
    top: 28px;
    position: absolute;
}

@keyframes checkmark {
    0% { height: 0; width: 0; opacity: 1; }
    20% { height: 0; width: 12px; opacity: 1; }
    40% { height: 25px; width: 12px; opacity: 1; }
    100% { height: 25px; width: 12px; opacity: 1; }
}

/* Transições de página */
.page-transition-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-transition-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

/* ==============================================
   RESPONSIVIDADE DESKTOP - FASE 5.7
   ============================================== */

/* Layout otimizado para telas grandes */
@media (min-width: 1920px) {
    .container {
        max-width: 1800px;
        margin: 0 auto;
        padding: 0 3rem;
    }

    .dashboard-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .card-value {
        font-size: 2.25rem;
    }

    .sidebar {
        width: 280px;
    }

    .main-content {
        margin-left: 280px;
        max-width: calc(100vw - 280px);
    }
}

/* Ultra wide screens */
@media (min-width: 2560px) {
    .container {
        max-width: 2200px;
    }

    .dashboard-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Painéis laterais para desktop */
.side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.side-panel.open {
    transform: translateX(0);
}

.side-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.side-panel-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.side-panel-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.side-panel-close:hover {
    color: white;
}

.side-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.side-panel-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.side-panel-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Atalhos de teclado - indicador visual */
.kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

/* ==============================================
   DARK MODE REFINADO - FASE 5.8
   ============================================== */

/* Cores refinadas para melhor contraste */
:root {
    --bg-gradient: linear-gradient(180deg, #0f172a 0%, #0a0f1d 100%);
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
    --accent-purple: #8b5cf6;
}

/* Background com gradiente sutil */
body {
    background: var(--bg-gradient);
}

/* Cards com bordas mais visíveis */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Textos com melhor legibilidade */
.card-title,
.page-title,
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

p, span, label {
    color: var(--text-secondary);
}

/* Cores de destaque mais vibrantes */
.positive, .text-success {
    color: #34d399 !important; /* Verde mais vibrante */
}

.negative, .text-danger {
    color: #f87171 !important; /* Vermelho mais vibrante */
}

/* Sombras mais sutis */
.card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Inputs com melhor contraste */
input, select, textarea {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* ===================================
   LOADING STATES
   =================================== */

/* Spinner animado */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

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

/* Botão em estado de loading */
.btn.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
}

/* Overlay de loading na página */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

#loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-overlay-content {
    text-align: center;
    color: white;
}

.loading-overlay-content .loading-spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
    margin-bottom: 1rem;
}

.loading-message {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.5rem;
}

/* ===================================
   MODAL DE CONFIRMACAO
   =================================== */

.confirm-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    padding: 1rem;
}

.confirm-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.confirm-modal {
    background: #1e293b;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.2s;
}

.confirm-modal-backdrop.active .confirm-modal {
    transform: scale(1);
}

.confirm-modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.confirm-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 0.5rem;
}

.confirm-modal-message {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.confirm-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.confirm-modal-actions .btn {
    flex: 1;
    max-width: 140px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* Responsivo para modais */
@media (max-width: 480px) {
    .confirm-modal {
        padding: 1.5rem;
    }

    .confirm-modal-actions {
        flex-direction: column;
    }

    .confirm-modal-actions .btn {
        max-width: none;
    }
}

/* ===================================
   MELHORIAS RESPONSIVAS MOBILE
   =================================== */

/* Formulários mobile */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .form-row > * {
        width: 100%;
        flex: none;
    }

    /* Botões de ação no mobile */
    .form-actions,
    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-actions .btn,
    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }

    /* Labels e inputs */
    label {
        font-size: 0.85rem;
    }

    input, select, textarea {
        font-size: 16px !important; /* Evita zoom no iOS */
        padding: 0.75rem;
    }

    /* Checkboxes e radios */
    .checkbox-group,
    .radio-group {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Tabelas responsivas melhoradas */
@media (max-width: 768px) {
    .table-responsive {
        margin: 0 -1rem;
        padding: 0 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    th, td {
        padding: 0.5rem 0.35rem;
        white-space: nowrap;
    }

    /* Esconder colunas menos importantes no mobile */
    .hide-mobile {
        display: none !important;
    }

    /* Ações em tabela */
    .table-actions {
        display: flex;
        gap: 0.25rem;
    }

    .table-actions .btn {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
    }

    /* Indicador de scroll horizontal */
    .table-responsive::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to right, transparent, rgba(15, 23, 42, 0.8));
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s;
    }

    .table-responsive.has-scroll::after {
        opacity: 1;
    }
}

/* Cards e listas no mobile */
@media (max-width: 768px) {
    .card {
        border-radius: 0.5rem;
        padding: 1rem;
    }

    .card-header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .card-title {
        font-size: 1rem;
        width: 100%;
    }

    .card-body {
        padding: 1rem;
    }

    /* Lista de itens empilhada */
    .item-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .item-list .item {
        display: flex;
        flex-direction: column;
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 0.5rem;
    }

    .item-list .item-actions {
        margin-top: 0.5rem;
        display: flex;
        gap: 0.5rem;
    }
}

/* Dashboard cards mobile */
@media (max-width: 768px) {
    .stats-card {
        padding: 1rem;
    }

    .stats-card .value {
        font-size: 1.5rem;
    }

    .stats-card .label {
        font-size: 0.8rem;
    }

    /* Gráficos responsivos */
    .chart-container {
        height: 200px !important;
        min-height: 200px;
    }
}

/* Navegação por mês mobile */
@media (max-width: 768px) {
    .month-navigation {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .month-navigation .btn {
        flex: 1;
        min-width: 40px;
        padding: 0.5rem;
    }

    .month-navigation input[type="month"] {
        flex: 2;
        min-width: 150px;
    }
}

/* Floating Action Button para mobile */
.fab-mobile {
    display: none;
}

@media (max-width: 768px) {
    .fab-mobile {
        display: flex;
        position: fixed;
        bottom: 1.5rem;
        right: 1.5rem;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: white;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
        z-index: 100;
        cursor: pointer;
        border: none;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .fab-mobile:hover,
    .fab-mobile:active {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
    }

    /* Se tiver FAB, adicionar padding no final da página */
    .main-content.has-fab {
        padding-bottom: 80px;
    }
}

/* Touch targets - garantir tamanho mínimo de 44px */
@media (max-width: 768px) {
    .btn,
    button,
    a.btn,
    .nav-link,
    .clickable {
        min-height: 44px;
        min-width: 44px;
    }

    /* Links em listas */
    .list-item a,
    .menu-item a {
        padding: 0.75rem;
    }
}

/* ==============================================
   CORREÇÕES DE RESPONSIVIDADE MOBILE - FASE 5 AJUSTES
   ============================================== */

@media (max-width: 768px) {
    /* BARRA DE REFERÊNCIA DO MÊS - Corrigir overflow */
    .month-reference-bar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .month-reference-bar .month-info {
        width: 100%;
        justify-content: center;
    }

    .month-reference-bar .month-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .month-reference-bar .month-actions .btn {
        flex: 1;
        min-width: auto;
        max-width: 150px;
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* COFRINHOS DOS CARTÕES - Usando classes CSS */
    .cofrinho-grid {
        grid-template-columns: 1fr !important;
    }

    .cofrinho-card {
        max-width: 100% !important;
        overflow-x: hidden !important;
        padding: 1rem !important;
        box-sizing: border-box !important;
    }

    .cofrinho-card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .cofrinho-total-card {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .cofrinho-total-row {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .cofrinho-total-values {
        text-align: center;
    }

    .cofrinho-row {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    /* QUICK FILTER TABS - Scroll horizontal */
    .quick-filter-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 0.5rem;
    }

    .quick-filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .quick-filter-tab {
        flex-shrink: 0;
    }

    /* FILTROS - Layout em coluna */
    .filters-bar {
        flex-direction: column;
    }

    .filter-group {
        min-width: 100%;
        width: 100%;
    }

    .filter-group.search {
        min-width: 100%;
    }

    .filter-group.actions {
        width: 100%;
        justify-content: stretch;
    }

    .filter-group.actions .filter-btn {
        flex: 1;
    }

    /* SIDEBAR HEADER - Remover padding extra quando não há título */
    .sidebar-header {
        padding: 0.5rem 1rem;
    }

    .sidebar-header div[style*="justify-content: flex-end"] {
        min-height: 40px;
    }

    /* COMPARATIVO MENSAL - Melhor/Pior mês em coluna */
    div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 1.5rem"][style*="margin-top: 2rem"] {
        grid-template-columns: 1fr !important;
    }

    /* Métricas de orçamentos - em coluna no mobile */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }

    /* Cards clicáveis - garantir max-width */
    .card-clickable,
    .card {
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* TABS DE EMPRESAS - Scroll horizontal */
    div[style*="display: flex"][style*="border-bottom: 2px solid"][style*="overflow-x: auto"] {
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
    }

    .tab-button {
        flex-shrink: 0;
        padding: 0.75rem 1rem !important;
        font-size: 0.8rem !important;
    }

    /* LAYOUT DE 2 COLUNAS DAS TRANSAÇÕES - Vira 1 coluna */
    div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 0"] {
        grid-template-columns: 1fr !important;
    }

    /* Remover borda vertical quando em coluna */
    div[style*="border-right: 3px solid"],
    div[style*="border-left: 3px solid"] {
        border-right: none !important;
        border-left: none !important;
        border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
    }

    /* Totais das transações em coluna */
    div[style*="grid-template-columns: 1fr 1fr"][style*="border-top: 2px solid"] {
        grid-template-columns: 1fr !important;
    }
}

/* ==============================================
   SCROLLBAR CUSTOMIZADA PARA DESKTOP - FASE 5 AJUSTES
   ============================================== */

/* Scrollbar do menu lateral - melhorada */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.3) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.4) 0%, rgba(139, 92, 246, 0.4) 100%);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.6) 0%, rgba(139, 92, 246, 0.6) 100%);
    background-clip: content-box;
}

/* Scrollbar geral do body e containers */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

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

/* Scrollbar nas tabelas */
.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
}
