/* ==========================================
   VARIÁVEIS E RESET
   ========================================== */
:root {
    /* Cores principais */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    
    --success: #10b981;
    --success-dark: #059669;
    
    --danger: #ef4444;
    --danger-dark: #dc2626;
    
    --warning: #f59e0b;
    
    /* Cores de fundo */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    
    /* Cores de texto */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    /* Bordas */
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    /* Transições */
    --transition: all 0.2s ease;
}

/* Tema Dark */
[data-theme="dark"] {
    /* Cores principais */
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-light: #93c5fd;
    
    --success: #34d399;
    --success-dark: #10b981;
    
    --danger: #f87171;
    --danger-dark: #ef4444;
    
    --warning: #fbbf24;
    
    /* Cores de fundo */
    --bg-primary: #1e293b;
    --bg-secondary: #334155;
    --bg-tertiary: #475569;
    
    /* Cores de texto */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Bordas */
    --border-color: #475569;
}

/* Estilos para o botão de alternância de tema */
.theme-toggle {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px 12px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.theme-toggle:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.theme-toggle .theme-text {
    font-weight: 500;
}

/* Melhorar transições para elementos que mudam de cor */
.container, .card, .dashboard-card, .contas-table, .modal-content {
    transition: var(--transition);
}

/* Garantir que modais funcionem bem com tema escuro */
[data-theme="dark"] .modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .modal-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

/* Modal no tema escuro */
[data-theme="dark"] .modal-content {
    background: #1e293b !important;
    border: 1px solid #475569 !important;
}

[data-theme="dark"] .modal-header {
    background: #334155 !important;
    border-bottom: 1px solid #475569 !important;
}

[data-theme="dark"] .modal-header h2,
[data-theme="dark"] .modal-header h3 {
    color: #f8fafc !important;
    font-weight: 600 !important;
}

/* Campos do modal no tema escuro - estilo da imagem */
[data-theme="dark"] .titulo-field input,
[data-theme="dark"] .titulo-field textarea {
    background: #334155 !important;
    border: 1px solid #64748b !important;
    color: #f8fafc !important;
    border-radius: 6px !important;
}

[data-theme="dark"] .titulo-field input:focus,
[data-theme="dark"] .titulo-field textarea:focus {
    border-color: #94a3b8 !important;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.1) !important;
    background: #334155 !important;
}

[data-theme="dark"] .titulo-field label {
    color: #cbd5e1 !important;
    font-weight: 500 !important;
}

/* Campos específicos com cores no tema escuro */
[data-theme="dark"] .titulo-field input[style*="background: #e8f5e8"],
[data-theme="dark"] .titulo-field input[style*="background-color: #e8f5e8"] {
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #34d399 !important;
}

[data-theme="dark"] .titulo-field input[style*="background: #ffeaea"],
[data-theme="dark"] .titulo-field input[style*="background-color: #ffeaea"] {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #f87171 !important;
}

[data-theme="dark"] .titulo-field input[style*="background: #fff3cd"],
[data-theme="dark"] .titulo-field input[style*="background-color: #fff3cd"] {
    background: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    color: #fbbf24 !important;
}

/* Forçar todos os campos do modal para tema escuro */
[data-theme="dark"] .modal-body input,
[data-theme="dark"] .modal-body textarea {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Campos com cores específicas no tema escuro */
[data-theme="dark"] .modal-body input[style*="background"] {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Badges no tema escuro */
[data-theme="dark"] .modal-body .badge {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Forçar TODOS os inputs do modal para tema escuro */
[data-theme="dark"] .modal input,
[data-theme="dark"] .modal textarea,
[data-theme="dark"] .modal select {
    background: #334155 !important;
    border: 1px solid #64748b !important;
    color: #f8fafc !important;
    border-radius: 6px !important;
}

/* Sobrescrever qualquer estilo inline */
[data-theme="dark"] .modal input[style] {
    background: #334155 !important;
    border: 1px solid #64748b !important;
    color: #f8fafc !important;
}

/* Botões de copiar no tema escuro */
[data-theme="dark"] .btn-copiar {
    background: #053b1c !important;
    border: 1px solid #096306 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .btn-copiar:hover {
    background: #096306 !important;
    border-color: #0d7a0a !important;
}

/* Modal body no tema escuro */
[data-theme="dark"] .modal-body {
    background: #1e293b !important;
    color: #f8fafc !important;
}

/* Campos .value no tema escuro */
[data-theme="dark"] .titulo-field .value {
    background: #334155 !important;
    border: 1px solid #64748b !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .titulo-field .value.danger {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid #ef4444 !important;
    color: #f87171 !important;
}

[data-theme="dark"] .titulo-field .value.success {
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid #10b981 !important;
    color: #34d399 !important;
}

[data-theme="dark"] .titulo-field .value.warning {
    background: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid #f59e0b !important;
    color: #fbbf24 !important;
}

/* Garantir que todos os textos do modal apareçam no tema escuro */
[data-theme="dark"] .modal-body * {
    color: #61b986 !important;
}

[data-theme="dark"] .modal-body .titulo-field label {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .modal-body .titulo-field .value {
    color: #f8fafc !important;
}

[data-theme="dark"] .modal-body .titulo-field .value.danger {
    color: #f87171 !important;
}

[data-theme="dark"] .modal-body .titulo-field .value.success {
    color: #34d399 !important;
}

[data-theme="dark"] .modal-body .titulo-field .value.warning {
    color: #fbbf24 !important;
}

/* Badge de status no tema escuro - removido, usando wowdash-table.css */

/* Campo PIX com destaque especial no tema escuro */
[data-theme="dark"] .titulo-field .value.pix {
    background: #0a592b !important;
    border: 1px solid #60a5fa !important;
    color: #93c5fd !important;
    font-weight: 500 !important;
}

/* Tema claro para os cards (quando necessário) */
[data-theme="light"] .dashboard-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .dashboard-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .card-title {
    color: #64748b;
}

[data-theme="light"] .card-value {
    color: #1e293b;
}

[data-theme="light"] .card-subtitle {
    color: #64748b;
}

/* Ajustar badges para tema escuro - removido, usando wowdash-table.css */

/* Estilos para aviso de vencimento longo */
.titulo-field.warning-notice {
    grid-column: 1 / -1;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: var(--border-radius);
    padding: 16px;
    margin: 16px 0;
}

[data-theme="dark"] .titulo-field.warning-notice {
    background: #fef3c7;
    border-color: #f59e0b;
}

.titulo-field.warning-notice label {
    color: #856404;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    display: block;
}

[data-theme="dark"] .titulo-field.warning-notice label {
    color: #000000;
}

.titulo-field.warning-notice .value {
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
}

[data-theme="dark"] .titulo-field.warning-notice .value {
    color: #000000;
}

/* Cor específica para o texto do aviso no tema escuro */
[data-theme="dark"] .titulo-field.warning-notice .value strong {
    color: #334155 !important;
}

[data-theme="dark"] .titulo-field.warning-notice .value small {
    color: #334155 !important;
}

[data-theme="dark"] .titulo-field.warning-notice label {
    color: #334155 !important;
}

.titulo-field.warning-notice .value strong {
    display: block;
    margin-bottom: 4px;
}

.titulo-field.warning-notice .value small {
    opacity: 0.8;
    font-size: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

/* ==========================================
   LAYOUT CONTAINER
   ========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

@media (min-width: 768px) {
    .container {
        padding: 40px 24px;
    }
}

/* ==========================================
   HEADER
   ========================================== */
header {
    background: var(--bg-secondary);
    padding: 24px 0;
    margin-bottom: 32px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

header.between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
}

header.center {
    text-align: center;
    padding: 40px 32px;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    header h1 {
        font-size: 32px;
    }
}

header p.muted {
    font-size: 15px;
    color: var(--text-muted);
}

/* Header Profissional - Admin Theme */
.admin-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
}

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

.brand-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 8px;
}

.brand-text h1 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.2;
}

.brand-text p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.2;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #f3f4f6;
    color: #111827;
}

.nav-link i {
    font-size: 16px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.user-info {
    text-align: right;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.2;
}

.user-details {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.2;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.user-avatar:hover {
    background: #2563eb;
}

.avatar-text {
    font-size: 14px;
    font-weight: 600;
}

.user-avatar .dropdown-arrow {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #ffffff;
    color: #6b7280;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid #ffffff;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    min-width: 320px !important;
    width: 320px !important;
    z-index: 1000;
    display: none;
    margin-top: 8px;
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

.dropdown-item.logout {
    color: #dc2626;
}

.dropdown-item.logout:hover {
    background: #fef2f2;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

/* Tema Escuro */
[data-theme="dark"] .admin-header {
    background: #1f2937;
    border-bottom-color: #374151;
}

[data-theme="dark"] .brand-text h1 {
    color: #f9fafb;
}

[data-theme="dark"] .brand-text p {
    color: #9ca3af;
}

[data-theme="dark"] .brand-icon {
    background: #374151;
}

[data-theme="dark"] .nav-link {
    color: #d1d5db;
}

[data-theme="dark"] .nav-link:hover {
    background: #374151;
    color: #f9fafb;
}

[data-theme="dark"] .user-name {
    color: #f9fafb;
}

[data-theme="dark"] .user-details {
    color: #9ca3af;
}

[data-theme="dark"] .user-dropdown {
    background: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .dropdown-item {
    color: #d1d5db;
}

[data-theme="dark"] .dropdown-item:hover {
    background: #374151;
}

[data-theme="dark"] .dropdown-item.logout:hover {
    background: #7f1d1d;
}

[data-theme="dark"] .dropdown-divider {
    background: #374151;
}

/* Botão de Tema no Header */
.theme-toggle {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Tema escuro para o botão */
[data-theme="dark"] .theme-toggle {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

[data-theme="dark"] .theme-toggle:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* ==========================================
   PÁGINA DE BALANCETES - DESIGN PROFISSIONAL
   ========================================== */

/* Header do card com ações */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .card-header {
        padding: 16px 16px 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .card-header h3 {
        font-size: 16px;
    }
    
    .header-content .muted {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .card-header {
        padding: 14px 12px 10px 12px;
    }
    
    .card-header h3 {
        font-size: 14px;
    }
}

.header-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.header-content .muted {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

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

/* Estado vazio */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Tabela de balancetes */
.balancetes-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.balancetes-table thead {
    background: #4a5568;
    color: white;
}

.balancetes-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.balancetes-table th i {
    margin-right: 8px;
    opacity: 0.8;
}

.balancetes-table td {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.balancetes-table tbody tr:hover {
    background: var(--bg-tertiary);
}

/* Colunas específicas */
.col-periodo {
    width: 25%;
}

.col-data {
    width: 25%;
}

.col-size {
    width: 20%;
}

.col-actions {
    width: 30%;
    text-align: center;
}

/* Informações do período */
.period-info {
    display: flex;
    flex-direction: column;
}

.period-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.period-name i {
    color: #3498db;
    font-size: 14px;
}

/* Informações da data */
.date-info {
    display: flex;
    flex-direction: column;
}

.date-main {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

/* Informações do tamanho */
.size-info {
    display: flex;
    flex-direction: column;
}

.size-value {
    font-weight: 600;
    color: #27ae60;
    font-size: 14px;
}

/* Botões de ação */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.action-btn.view {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #bbdefb;
}

.action-btn.view:hover {
    background: #1976d2;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.action-btn.download {
    background: #e8f5e8;
    color: #27ae60;
    border-color: #c8e6c9;
}

.action-btn.download:hover {
    background: #27ae60;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

/* Tema escuro para balancetes */
[data-theme="dark"] .balancetes-table thead {
    background: #374151;
}

[data-theme="dark"] .balancetes-table tbody tr:hover {
    background: #374151;
}

[data-theme="dark"] .action-btn.view {
    background: rgba(25, 118, 210, 0.2);
    color: #64b5f6;
    border-color: rgba(25, 118, 210, 0.3);
}

[data-theme="dark"] .action-btn.view:hover {
    background: #1976d2;
    color: white;
}

[data-theme="dark"] .action-btn.download {
    background: rgba(39, 174, 96, 0.2);
    color: #66bb6a;
    border-color: rgba(39, 174, 96, 0.3);
}

[data-theme="dark"] .action-btn.download:hover {
    background: #27ae60;
    color: white;
}

/* Modal básico */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 2% auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 12px 12px 0 0;
    min-height: 50px;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 0;
    background: var(--bg-primary);
    flex: 1;
    overflow: hidden;
    display: flex;
}

/* Tema escuro para modal básico */
[data-theme="dark"] .modal-content {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .modal-header {
    background: var(--bg-secondary);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .modal-header h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .modal-body {
    background: var(--bg-primary);
}

/* Modal de Balancetes */
.modal-large {
    max-width: 80vw;
    width: 50vw;
    max-height: 85vh;
    height: 85vh;
    margin: 7.5vh auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pdf-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    margin: 4px;
    flex: 1;
    overflow: hidden;
    display: flex;
}

.pdf-container iframe {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
}

/* Botão de Plano de Conta */
.plano-conta-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-right: 6px;
    transition: transform 0.2s ease;
    border-radius: 4px;
}

.plano-conta-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    transform: scale(1.1);
}

.plano-conta-btn:active {
    transform: scale(0.95);
}

.plano-conta-btn i {
    font-size: 16px;
}

/* Modal de Plano de Conta */
.plano-conta-modal-content {
    padding: 16px 0;
}

.plano-conta-modal-item {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plano-conta-modal-item:last-child {
    margin-bottom: 0;
}

.plano-conta-modal-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plano-conta-modal-value {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.5;
    word-wrap: break-word;
}

.plano-conta-modal-obs {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.plano-conta-modal-obs .plano-conta-modal-label {
    margin-bottom: 8px;
}

.plano-conta-modal-obs .plano-conta-modal-value {
    font-style: italic;
    color: var(--text-muted);
}


/* Tentar ocultar a barra de ferramentas do PDF - regra vazia removida */

/* Garantir que o modal funcione corretamente */
.pdf-modal {
    z-index: 9999 !important;
}

.pdf-modal-content {
    z-index: 10000 !important;
}

/* Loading específico para modal de contas */
.pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-primary);
    text-align: center;
    z-index: 10;
}

.pdf-loading .spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    min-height: 50px;
}

.modal-footer .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.modal-footer .btn.secondary {
    background: #6c757d;
    color: white;
}

.modal-footer .btn.secondary:hover {
    background: #5a6268;
}

.modal-footer .btn.primary {
    background: #007bff;
    color: white;
}

.modal-footer .btn.primary:hover {
    background: #0056b3;
}

/* Tema escuro para modal de balancetes */
[data-theme="dark"] .pdf-container {
    background: #374151;
}

[data-theme="dark"] .modal-footer {
    background: #374151;
    border-top-color: #4b5563;
}

[data-theme="dark"] .modal-footer .btn.secondary {
    background: #6b7280;
    color: white;
}

[data-theme="dark"] .modal-footer .btn.secondary:hover {
    background: #4b5563;
}

[data-theme="dark"] .modal-footer .btn.primary {
    background: #3b82f6;
    color: white;
}

[data-theme="dark"] .modal-footer .btn.primary:hover {
    background: #2563eb;
}

/* ==========================================
   CARDS
   ========================================== */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .card-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
    }
}

.row-main {
    flex: 1;
}

.row-main .title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.row-main .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.row-main .meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.row-main .meta span::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
}

.row-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

@media (min-width: 768px) {
    .row-actions {
        flex-direction: row;
        align-items: center;
    }
}

/* ==========================================
   FORMS
   ========================================== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .form-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .form-grid {
        gap: 16px;
    }
    
    .form-field label {
        font-size: 13px;
    }
    
    input, select, textarea {
        padding: 10px 14px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .form-grid {
        gap: 12px;
    }
    
    .form-field label {
        font-size: 12px;
    }
    
    input, select, textarea {
        padding: 8px 12px;
        font-size: 13px;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

input,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

select {
    width: 100%;
    padding: 12px 32px 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%233b82f6' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

input::placeholder {
    color: var(--text-muted);
}

/* Dark mode para selects */
[data-theme="dark"] select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

[data-theme="dark"] select:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2360a5fa' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

small.muted {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: -4px;
}

/* ==========================================
   BOTÕES
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

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

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

.btn.primary {
    background: var(--primary);
    color: white;
}

.btn.primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn.success {
    background: var(--success);
    color: white;
}

.btn.success:hover {
    background: var(--success-dark);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn.danger {
    background: var(--danger);
    color: white;
}

.btn.danger:hover {
    background: var(--danger-dark);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn:not(.primary):not(.danger):not(.success) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn:not(.primary):not(.danger):not(.success):hover {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
}

.actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* Botões de filtro modernos */
.btn-clear {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important;
    color: white !important;
    border: none !important;
    padding: 12px 20px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3) !important;
}

.btn-clear:hover {
    background: linear-gradient(135deg, #4b5563, #374151) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(107, 114, 128, 0.4) !important;
}

.btn-clear i {
    font-size: 16px !important;
    color: #f3f4f6 !important;
}

.btn-apply {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: white !important;
    border: none !important;
    padding: 12px 20px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
    cursor: pointer !important;
}

.btn-apply:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4) !important;
}

.btn-apply i {
    font-size: 16px !important;
    color: #f3f4f6 !important;
}

/* Efeito de brilho removido - botões mais limpos */

/* Modo escuro para botões de filtro */
[data-theme="dark"] .btn-clear {
    background: linear-gradient(135deg, #4b5563, #374151) !important;
    color: #f3f4f6 !important;
    box-shadow: 0 4px 12px rgba(75, 85, 99, 0.4) !important;
}

[data-theme="dark"] .btn-clear:hover {
    background: linear-gradient(135deg, #374151, #1f2937) !important;
    box-shadow: 0 8px 20px rgba(75, 85, 99, 0.5) !important;
}

[data-theme="dark"] .btn-apply {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
}

[data-theme="dark"] .btn-apply:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5) !important;
}

/* ==========================================
   ALERTAS
   ========================================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border-left: 4px solid;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.alert.info {
    border-color: var(--primary);
    background: #eff6ff;
    color: #1e40af;
}

.alert.danger {
    border-color: var(--danger);
    background: #fef2f2;
    color: #991b1b;
}

.alert.success {
    border-color: var(--success);
    background: #f0fdf4;
    color: #166534;
}

/* ==========================================
   PAGINAÇÃO MODERNA
   ========================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 32px 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
}

.pagination .page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.pagination .page:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.pagination .page.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: white;
    font-weight: 700;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

/* Dark mode para paginação */
[data-theme="dark"] .pagination .page {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

[data-theme="dark"] .pagination .page:hover {
    background: #4b5563;
    border-color: #60a5fa;
    color: #60a5fa;
}

[data-theme="dark"] .pagination .page.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: white;
}

/* ==========================================
   UTILITÁRIOS
   ========================================== */
.muted {
    color: var(--text-muted);
    font-size: 14px;
}

.center {
    text-align: center;
}

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

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

/* Badge de Status */
/* Badge de Status - removido, usando wowdash-table.css */

/* Footer */
footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 40px;
}

/* ==========================================
   ANIMAÇÕES
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease;
}

/* ==========================================
   LOADING SPINNER
   ========================================== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* ==========================================
   RESPONSIVIDADE
   ========================================== */
@media (max-width: 768px) {
    header.between {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .actions {
        justify-content: stretch;
    }
    
    .actions .btn {
        flex: 1;
    }
    
    .btn-clear,
    .btn-apply {
        padding: 10px 16px !important;
        font-size: 13px !important;
    }
    
    .btn-clear i,
    .btn-apply i {
        font-size: 14px !important;
    }
    
    .row-actions {
        width: 100%;
    }
    
    .row-actions .btn {
        flex: 1;
    }
}

/* ==========================================
   MELHORIAS VISUAIS
   ========================================== */

/* Destaque em hover nos cards */
.card-row:hover .title {
    color: var(--primary);
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Input de arquivo estilizado */
input[type="file"]::file-selector-button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Divisor visual */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 24px 0;
}

/* Total de registros com destaque */
.info-box {
    background: #3b82f6;
    color: white;
    padding: 16px 24px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.info-box .muted {
    color: rgba(255, 255, 255, 0.9);
}

/* Dark mode para info-box */
[data-theme="dark"] .info-box {
    background: #1e40af;
}

/* ==========================================
   TABELA DE CONTAS
   ========================================== */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

.contas-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.contas-table thead {
    background: #4a5568;
    color: white;
}

.contas-table thead th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.contas-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.contas-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.contas-table tbody tr:last-child {
    border-bottom: none;
}

.contas-table tbody td {
    padding: 16px 12px;
    font-size: 14px;
    vertical-align: middle;
}

.contas-table .col-descricao {
    font-weight: 600;
    color: var(--text-primary);
    max-width: 300px;
}

.contas-table .col-data {
    white-space: nowrap;
    font-size: 13px;
}

.contas-table .col-valor {
    font-weight: normal;
    color: var(--success);
    white-space: nowrap;
}

.contas-table .col-fornecedor {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contas-table .col-status {
    text-align: center;
}

.contas-table .col-arquivos {
    text-align: center;
    white-space: nowrap;
}

/* Ícone PDF */
.pdf-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #e6eaee;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 18px;
    transition: var(--transition);
    margin: 0 4px;
}

.pdf-icon:hover {
    background:  rgba(245, 134, 134, 0.966);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.pdf-icon:active {
    transform: translateY(0);
}

@media (max-width: 1024px) {
    .contas-table thead th,
    .contas-table tbody td {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .pdf-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .table-responsive {
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-sm);
    }
    
    .contas-table {
        font-size: 12px;
    }
    
    .contas-table thead th,
    .contas-table tbody td {
        padding: 10px 6px;
    }
    
    .pdf-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* ==========================================
   MODAL DE VISUALIZAÇÃO DE PDF
   ========================================== */
.pdf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.pdf-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pdf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pdf-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.pdf-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.pdf-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.pdf-modal-body {
    flex: 1;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #525659;
}

.pdf-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.pdf-modal-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pdf-modal-loading .spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    width: 40px;
    height: 40px;
}

@media (max-width: 768px) {
    .pdf-modal-content {
        width: 95%;
        height: 95%;
    }
    
    .pdf-modal-header {
        padding: 16px 20px;
    }
    
    .pdf-modal-header h3 {
        font-size: 16px;
    }
}

/* Fonte Inter (mesma do WowDash) */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Dashboard Cards - Modern Design */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-card {
    background: #1e293b;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.dashboard-card.primary .card-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.dashboard-card.success .card-icon {
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.dashboard-card.warning .card-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.dashboard-card.danger .card-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.card-content {
    flex: 1;
    position: relative;
    min-width: 0;
    overflow: hidden;
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #f1f5f9;
    margin-bottom: 8px;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.1;
    letter-spacing: -0.5px;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.card-subtitle {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 400;
    margin-bottom: 8px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.card-change {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    margin-top: 8px;
}

.card-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.card-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.card-change i {
    font-size: 10px;
}

@media (max-width: 1200px) {
    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        width: 100%;
    }
    
    .dashboard-card {
        padding: 24px;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .card-content {
        min-width: 0;
        overflow: hidden;
    }
    
    .card-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
        flex-shrink: 0;
    }
    
    .card-value {
        font-size: 28px;
        font-weight: 700;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .card-title {
        font-size: 13px;
        font-weight: 500;
        word-break: break-word;
    }
}

@media (max-width: 768px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 24px;
        width: 100%;
    }
    
    .dashboard-card {
        padding: 16px;
        gap: 14px;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .card-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
        border-radius: 12px;
        flex-shrink: 0;
    }
    
    .card-content {
        min-width: 0;
        flex: 1;
        overflow: hidden;
    }
    
    .card-value {
        font-size: 22px;
        font-weight: 700;
        line-height: 1.2;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .card-title {
        font-size: 11px;
        font-weight: 500;
        margin-bottom: 6px;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .card-subtitle {
        font-size: 12px;
        font-weight: 400;
        margin-bottom: 6px;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .card-change {
        font-size: 10px;
        font-weight: 500;
        padding: 3px 6px;
        margin-top: 4px;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .card-change i {
        font-size: 9px;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .dashboard-cards {
        gap: 12px;
        margin-bottom: 20px;
        width: 100%;
        padding: 0;
    }
    
    .dashboard-card {
        padding: 14px;
        gap: 12px;
        flex-direction: row;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .card-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .card-content {
        min-width: 0;
        flex: 1;
        overflow: hidden;
    }
    
    .card-value {
        font-size: 20px;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.2;
    }
    
    .card-title {
        font-size: 10px;
        margin-bottom: 4px;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .card-subtitle {
        font-size: 11px;
        margin-bottom: 4px;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .card-change {
        font-size: 9px;
        padding: 2px 5px;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* Navegação de Mês */
.month-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Month navigation no tema escuro */
[data-theme="dark"] .month-navigation {
    background: #334155;
}

.nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-button:hover {
    background: #5a6268;
    transform: scale(1.1);
}

.nav-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.month-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.month-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.month-year {
    font-size: 14px;
    color: #7f8c8d;
}

/* Seletor de Mês */
.month-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.month-selector select {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.month-selector select:hover {
    border-color: #3498db;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.1);
}

.month-selector select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.month-selector select:first-child {
    min-width: 140px;
}

.month-selector select:last-child {
    min-width: 80px;
}

/* Seletor de mês no tema escuro */
[data-theme="dark"] .month-selector select {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .month-selector select:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .month-selector select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

@media (max-width: 768px) {
    .month-navigation {
        gap: 8px;
        padding: 12px 8px;
        flex-wrap: wrap;
    }
    
    .nav-button {
        width: 36px;
        height: 36px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .month-selector {
        flex: 1;
        min-width: 0;
        gap: 6px;
    }
    
    .month-selector select {
        flex: 1;
        min-width: 0;
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .month-selector select:first-child {
        min-width: 0;
        flex: 1.2;
    }
    
    .month-selector select:last-child {
        min-width: 0;
        flex: 0.8;
    }
    
    .month-name {
        font-size: 16px;
    }
    
    .month-year {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .month-navigation {
        gap: 6px;
        padding: 10px 6px;
    }
    
    .nav-button {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .month-selector {
        width: 100%;
        order: 2;
        margin-top: 8px;
    }
    
    .month-selector select {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .month-selector select:first-child {
        flex: 1.3;
    }
    
    .month-selector select:last-child {
        flex: 0.7;
    }
}

/* Estilos específicos para área do morador - badges removidos, usando wowdash-table.css */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
}

.pagination-info {
    color: #7f8c8d;
    font-weight: 500;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.col-descricao {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsividade para área do morador */
@media (max-width: 768px) {
    .pagination {
        flex-direction: row;
        gap: 6px;
        margin: 20px 0;
        padding: 15px;
        overflow-x: auto;
        justify-content: center;
        -webkit-overflow-scrolling: touch;
    }
    
    .pagination .page {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .col-descricao {
        max-width: 200px;
    }
}

/* Mobile muito pequeno */
@media (max-width: 480px) {
    .pagination {
        gap: 4px;
        margin: 15px 0;
        padding: 10px 5px;
    }
    
    .pagination .page {
        min-width: 32px;
        height: 32px;
        padding: 0 6px;
        font-size: 13px;
        border-radius: 8px;
    }
}

/* Grupo de botões para ações */
.btn-group {
    display: flex;
    gap: 4px;
    align-items: center;
}

.btn-group .btn {
    margin: 0;
    padding: 6px 8px;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-group .btn-sm {
    padding: 4px 6px;
    font-size: 11px;
    min-width: 28px;
    height: 28px;
}

.btn-group .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group .btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.btn-group .btn:not(:first-child):not(:last-child) {
    border-radius: 0;
}

/* Botão de boleto específico */
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: white;
}

.btn-success:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5);
}
