/* SCMG Modern MVP Styling - Premium SaaS Aesthetics */

:root {
    /* Colors (Visual Identity SCMG - Supremo Conselho de Minas Gerais) */
    --color-primary: #1a3a2a;       /* Deep Forest — elegante, sóbrio, masônico */
    --color-primary-light: #27503d;
    --color-primary-ultra-light: #edf4f0;
    
    --color-secondary: #7a8f5e;     /* Sage profundo — discreto e refinado */
    --color-secondary-light: #96a876;
    --color-secondary-bg: #eef3e3;   /* Fundo suave */
    
    --color-accent: #D4AF37;        /* Ouro maçônico */
    --color-accent-light: #e8c84a;
    
    --color-success: #16a34a;       /* Verde esmeralda — positivo */
    --color-success-bg: #f0fdf4;
    
    --color-danger: #ef4444;        /* Modern red */
    --color-danger-bg: #fef2f2;
    
    --color-warning: #f59e0b;       /* Orange */
    --color-warning-bg: #fffbeb;
    
    --color-neutral-dark: #0f172a;  /* Dark slate */
    --color-neutral-muted: #64748b; /* Slate grey */
    --color-neutral-light: #f8fafc; /* Cool white */
    --color-border: #e2e8f0;        /* Light grey border */
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    
    --shadow-soft: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-medium: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

body {
    background-color: var(--color-neutral-light);
    color: var(--color-neutral-dark);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

/* App Layout Grid */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    position: relative;
}

/* Sidebar Styling */
.app-sidebar {
    width: 260px;
    background-color: var(--color-primary);
    color: white;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    transition: var(--transition-smooth);
    z-index: 100;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 10px;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Logo completa — exibida quando sidebar está expandida */
.logo-img-full {
    width: 180px;
    height: auto;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease;
    border-radius: 6px;
}

/* Logo ícone — exibida apenas quando sidebar está colapsada */
.logo-img-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    object-position: left center;
    display: none;
    border-radius: 4px;
}

.sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.sidebar-menu {
    flex: 1;
    padding: 24px 12px;
}

.sidebar-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    transition: var(--transition-smooth);
}

.menu-item a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.menu-item:hover a, .menu-item.active a {
    color: white;
    background-color: rgba(255, 255, 255, 0.08);
}

.menu-item.active a {
    background-color: var(--color-secondary);
    box-shadow: 0 4px 15px rgba(151, 167, 111, 0.25);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.avatar {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: white;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.btn-logout {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 16px;
    padding: 6px;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.btn-logout:hover {
    color: var(--color-danger);
    background-color: rgba(239, 68, 68, 0.08);
}

/* Sidebar collapsed state */
.app-sidebar.collapsed {
    width: 80px;
}

.app-sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 20px 10px;
    flex-direction: column;
    gap: 10px;
}

.app-sidebar.collapsed .brand-logo {
    justify-content: center;
}

.app-sidebar.collapsed .logo-img-full {
    display: none;
}

.app-sidebar.collapsed .logo-img-icon {
    display: block;
}

.app-sidebar.collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

.app-sidebar.collapsed .sidebar-menu span,
.app-sidebar.collapsed .user-info {
    display: none;
}

.app-sidebar.collapsed .sidebar-toggle-btn {
    margin-left: 0;
}

/* Main Content area */
.app-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--color-neutral-light);
    overflow-y: auto;
}

/* App Header Topbar */
.app-header {
    background-color: white;
    border-bottom: 1px solid var(--color-border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    height: 70px;
}

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--color-neutral-dark);
}

.page-title {
    font-size: 24px;
    color: var(--color-neutral-dark);
    font-weight: 700;
}

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

/* Forms & Selects UI */
.select-modern {
    background-color: white;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-neutral-dark);
    cursor: pointer;
    outline: none;
    transition: var(--transition-smooth);
}

.select-modern:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(6, 83, 68, 0.08);
}

/* Buttons UI */
.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 10px 20px;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(6, 83, 68, 0.15);
}

.btn-primary:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(6, 83, 68, 0.2);
}

.btn-secondary {
    background-color: var(--color-neutral-dark);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 10px 20px;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-neutral-muted);
    border-radius: var(--border-radius-sm);
    padding: 10px 20px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-outline:hover {
    background-color: var(--color-neutral-light);
    color: var(--color-neutral-dark);
    border-color: var(--color-neutral-muted);
}

/* Notification Badge Icon */
.notification-badge {
    position: relative;
    font-size: 20px;
    color: var(--color-neutral-muted);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition-smooth);
}

.notification-badge:hover {
    color: var(--color-neutral-dark);
}

.badge-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background-color: var(--color-danger);
    border-radius: 50%;
    border: 2px solid white;
}

/* Main Area Containers */
.app-main-content {
    padding: 32px;
    flex: 1;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== KPI Grid & Cards ==================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.kpi-card {
    background-color: white;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-soft);
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(6, 83, 68, 0.15);
}

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

.kpi-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-neutral-muted);
}

.kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* KPI Custom Icons styling */
.icon-balance { background-color: var(--color-primary-ultra-light); color: var(--color-primary); }
.icon-income { background-color: #ecfdf5; color: var(--color-success); }
.icon-expense { background-color: #fef2f2; color: var(--color-danger); }
.icon-pending { background-color: #fffbeb; color: var(--color-warning); }

.kpi-value {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-neutral-dark);
}

.kpi-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.trend {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 4px;
}

.trend-up { background-color: #e6fbf4; color: var(--color-success); }
.trend-down { background-color: #feeef2; color: var(--color-danger); }
.trend-neutral { background-color: #fff8ec; color: var(--color-warning); }

.footer-text {
    color: var(--color-neutral-muted);
}

/* ==================== Modern Cards ==================== */
.card-modern {
    background-color: white;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.card-header-modern {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title-modern {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-neutral-dark);
}

.view-all-link {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Dashboard Grid Layout (Charts + Right column) */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.chart-wrapper {
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.chart-content {
    flex: 1;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chart-legend {
    display: flex;
    gap: 16px;
    font-size: 11px;
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-neutral-muted);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.income { background-color: var(--color-success); }
.dot.expense { background-color: var(--color-danger); }

/* SVG Charts */
.svg-chart-container {
    width: 100%;
    height: 100%;
    min-height: 250px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    position: relative;
}

.chart-axis-line {
    stroke: var(--color-border);
    stroke-width: 1px;
}

.chart-bar-rect {
    transition: var(--transition-smooth);
    cursor: pointer;
}

.chart-bar-rect:hover {
    opacity: 0.85;
    filter: brightness(1.05);
}

.chart-tooltip {
    position: absolute;
    background-color: var(--color-neutral-dark);
    color: white;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    pointer-events: none;
    box-shadow: var(--shadow-medium);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

/* ==================== Task / Quick Overdue lists ==================== */
.task-wrapper {
    display: flex;
    flex-direction: column;
}

.task-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    max-height: 380px;
    overflow-y: auto;
}

.task-item {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition-smooth);
}

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

.task-item:hover {
    background-color: var(--color-primary-ultra-light);
}

.task-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-name {
    font-weight: 600;
    color: var(--color-neutral-dark);
}

.task-meta {
    font-size: 11px;
    color: var(--color-neutral-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.task-amount {
    font-weight: 700;
    font-size: 15px;
    font-family: var(--font-heading);
}

.task-amount.receita { color: var(--color-success); }
.task-amount.despesa { color: var(--color-danger); }

/* Quick Action buttons inside lists */
.btn-quick-action {
    background-color: var(--color-primary-ultra-light);
    color: var(--color-primary);
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 4px;
}

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

/* ==================== Data Table UI ==================== */
.table-toolbar {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border);
    background-color: white;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    max-width: 320px;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-neutral-muted);
}

.search-input-wrapper input {
    width: 100%;
    padding: 8px 16px 8px 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    outline: none;
    transition: var(--transition-smooth);
}

.search-input-wrapper input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(6, 83, 68, 0.08);
}

/* Button groups for quick filter toggling */
.filter-btn-group {
    display: flex;
    background-color: var(--color-neutral-light);
    padding: 4px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border);
}

.btn-filter {
    background: transparent;
    border: none;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-neutral-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-filter.active {
    background-color: white;
    color: var(--color-neutral-dark);
    box-shadow: var(--shadow-soft);
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

.table-modern {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table-modern th {
    padding: 16px 24px;
    background-color: var(--color-neutral-light);
    color: var(--color-neutral-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--color-border);
}

.table-modern td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
    color: var(--color-neutral-dark);
    vertical-align: middle;
}

.table-modern tbody tr {
    transition: var(--transition-smooth);
}

.table-modern tbody tr:hover {
    background-color: rgba(6, 83, 68, 0.02);
}

.cell-doc-id {
    font-weight: 600;
    color: var(--color-primary);
}

.cell-title {
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.cell-sub {
    font-size: 11px;
    color: var(--color-neutral-muted);
}

.cell-amount {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
}

.cell-amount.receita { color: var(--color-success); }
.cell-amount.despesa { color: var(--color-danger); }

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.badge-aberto { background-color: var(--color-warning-bg); color: var(--color-warning); }
.badge-liquidado { background-color: var(--color-success-bg); color: var(--color-success); }
.badge-cancelado { background-color: var(--color-neutral-light); color: var(--color-neutral-muted); }

/* Table inline action buttons */
.btn-icon-group {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.btn-icon-action {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border);
    background-color: white;
    color: var(--color-neutral-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-icon-action:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background-color: var(--color-primary-ultra-light);
}

.btn-icon-action.btn-pay-action:hover {
    border-color: var(--color-success);
    color: white;
    background-color: var(--color-success);
}

/* Pagination UI Footer */
.table-footer {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--color-border);
    background-color: white;
}

.pagination-info {
    font-size: 12px;
    color: var(--color-neutral-muted);
}

.pagination-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    background-color: white;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-neutral-muted);
    transition: var(--transition-smooth);
}

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

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

.btn-page {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    background-color: white;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-smooth);
}

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

/* ==================== Fluxo de Caixa Tab Styles ==================== */
.cashflow-filters {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 20px 24px;
}

.form-group-modern {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.form-group-modern label {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-neutral-muted);
}

.cashflow-summary-details {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.flow-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flow-label {
    font-weight: 600;
    color: var(--color-neutral-muted);
}

.flow-val {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
}

.border-top {
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
}

/* ==================== Relatorios Card Layout ==================== */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.report-card {
    background-color: white;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-soft);
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(6, 83, 68, 0.15);
}

.report-icon {
    width: 60px;
    height: 60px;
    background-color: var(--color-primary-ultra-light);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.report-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-neutral-dark);
    margin-bottom: 10px;
}

.report-desc {
    font-size: 12px;
    color: var(--color-neutral-muted);
    margin-bottom: 24px;
    line-height: 1.5;
    flex: 1;
}

.btn-report-run {
    background-color: var(--color-neutral-light);
    color: var(--color-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 10px 20px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-report-run:hover {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* ==================== DRAWER SYSTEM (SLIDE OVER) ==================== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.app-drawer {
    position: fixed;
    top: 0;
    right: -460px;
    width: 460px;
    height: 100vh;
    background-color: white;
    z-index: 210;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.app-drawer.active {
    right: 0;
}

.drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-neutral-dark);
}

.drawer-close-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--color-neutral-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.drawer-close-btn:hover {
    color: var(--color-neutral-dark);
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: var(--color-neutral-light);
}

/* Modern Form elements */
.form-row-modern {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.col-half {
    flex: 1;
}

.form-group-modern {
    margin-bottom: 20px;
}

.form-group-modern input[type="text"],
.form-group-modern input[type="number"],
.form-group-modern input[type="date"],
.form-group-modern textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    outline: none;
    font-size: 13px;
    transition: var(--transition-smooth);
    background-color: white;
}

.form-group-modern input:focus,
.form-group-modern textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(6, 83, 68, 0.08);
}

/* Toggle Group for Radio Buttons (Receita vs Despesa selection) */
.toggle-group-modern {
    display: flex;
    background-color: var(--color-neutral-light);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 4px;
    width: 100%;
}

.toggle-group-modern input[type="radio"] {
    display: none;
}

.toggle-label {
    flex: 1;
    padding: 8px 12px;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition-smooth);
    color: var(--color-neutral-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

#obrig-receber:checked + .toggle-label.toggle-success {
    background-color: var(--color-success-bg);
    color: var(--color-success);
}

#obrig-pagar:checked + .toggle-label.toggle-danger {
    background-color: var(--color-danger-bg);
    color: var(--color-danger);
}

/* ==================== MODALS SYSTEM (LIQUIDACAO / REPORT) ==================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.app-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%) scale(0.95);
    width: 90%;
    max-width: 480px;
    background-color: white;
    z-index: 310;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-hover);
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.app-modal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.app-modal.modal-large {
    max-width: 800px;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--color-neutral-muted);
    cursor: pointer;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 70vh;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: var(--color-neutral-light);
}

/* Liquidation Details visual Box */
.liquidation-summary-box {
    background-color: var(--color-primary-ultra-light);
    border: 1px solid rgba(6, 83, 68, 0.08);
    border-radius: var(--border-radius-md);
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.liq-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.liq-label {
    color: var(--color-neutral-muted);
}

.liq-val {
    color: var(--color-neutral-dark);
}

.btn-success-action {
    background-color: var(--color-success);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-success-action:hover {
    background-color: #059669;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
}

/* Report Viewer UI */
.report-viewer-content {
    background-color: var(--color-neutral-light);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 24px;
    min-height: 200px;
    font-family: monospace;
    font-size: 12px;
    white-space: pre-wrap;
    color: var(--color-neutral-dark);
    max-height: 50vh;
    overflow-y: auto;
}

/* ==================== TOAST & NOTIFICATIONS ==================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-toast {
    background-color: var(--color-neutral-dark);
    color: white;
    padding: 14px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-medium);
    animation: slideInToast 0.3s ease forwards;
    min-width: 280px;
}

@keyframes slideInToast {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.toast-success { border-left: 4px solid var(--color-success); }
.toast-error { border-left: 4px solid var(--color-danger); }
.toast-info { border-left: 4px solid var(--color-primary); }

.toast-success i { color: var(--color-success); }
.toast-error i { color: var(--color-danger); }
.toast-info i { color: var(--color-accent); }

/* ==================== RESPONSIVE LAYOUT MEDIA QUERIES ==================== */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        padding: 16px 24px;
    }
    
    .app-main-content {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .app-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        height: 100vh;
        z-index: 400;
    }
    
    .app-sidebar.active {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .toolbar-left {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input-wrapper {
        max-width: 100%;
    }
    
    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .app-drawer {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        flex-direction: column;
        height: auto;
        padding: 12px;
        gap: 12px;
        align-items: stretch;
    }
    
    .header-right {
        justify-content: space-between;
    }
    
    .module-selector select {
        width: 100%;
    }
}
