/* ==================== IMPORTAÃƒâ€¡Ãƒâ€¢ES ==================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ==================== VARIÃƒÂVEIS GLOBAIS ==================== */
:root {
    /* Cores Principais */
    --primary-bg: #080e1c;
    --secondary-bg: #0d1526;
    --card-bg: rgba(15, 23, 42, 0.85);
    --glass-bg: rgba(255, 255, 255, 0.04);

    /* Cores de Destaque */
    --accent-green: #10d9a0;
    --accent-blue: #38bdf8;
    --accent-purple: #a78bfa;
    --accent-red: #f87171;
    --accent-orange: #fb923c;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #10d9a0 0%, #38bdf8 100%);
    --gradient-success: linear-gradient(135deg, #10d9a0 0%, #38bdf8 100%);
    --gradient-danger: linear-gradient(135deg, #f87171 0%, #fb923c 100%);
    --gradient-card: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    --gradient-sidebar-active: linear-gradient(90deg, rgba(16, 217, 160, 0.15) 0%, rgba(16, 217, 160, 0.04) 100%);

    /* Texto */
    --text-primary: #f0f6ff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 24px rgba(16, 217, 160, 0.2);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);

    /* Transições */
    --transition-fast: 0.18s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Privacy Mode */
    --privacy-blur: blur(8px);
}

/* ==================== MODO PRIVACIDADE ==================== */
.privacy-active .amount-value,
.privacy-active .card-value,
.privacy-active .total-balance,
.privacy-active .user-email {
    filter: var(--privacy-blur);
    user-select: none;
    pointer-events: none;
}

.btn-privacy {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.2rem;
    position: relative;
}

.btn-privacy:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-privacy.active {
    color: var(--accent-green);
    border-color: var(--accent-green);
    box-shadow: 0 0 10px rgba(18, 194, 149, 0.2);
}

/* ==================== RESET E BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Layout Global com Sidebar */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding-bottom: 2rem;
    transition: margin-left var(--transition-normal);
    min-width: 0; /* Evita quebra de layout por conteÃƒÂºdo largo */
}

/* Responsividade Mobile para o Layout */
@media (max-width: 992px) {
    .main-content {
        margin-left: 0;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
}

/* Fundo animado com gradiente */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 15% 40%, rgba(59, 130, 246, 0.13) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 70%, rgba(139, 92, 246, 0.13) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 100%, rgba(16, 217, 160, 0.06) 0%, transparent 50%);
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==================== BUDGET COLORS & PROGRESS ==================== */
.budget-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 0.5rem;
}

.budget-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.budget-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.budget-cat-name {
    font-weight: 600;
    color: var(--text-primary);
}

.budget-amounts {
    color: var(--text-secondary);
}

.budget-progress-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.budget-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.budget-over {
    color: var(--accent-red) !important;
    font-weight: 700;
}

.full-width-chart {
    grid-column: 1 / -1;
}

/* ==================== NAVEGAÇÃO LATERAL (SIDEBAR) ==================== */
.menu-toggle {
    display: none;
    background: var(--secondary-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    margin-right: 1rem;
    align-items: center;
    justify-content: center;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: none !important; /* Hidding top menu on mobile, now moved to bottom nav */
    }
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0d1526 0%, #080e1c 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    transition: transform var(--transition-normal);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
}

.sidebar-header {
    padding: 1.2rem 1.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0.5rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.sidebar-brand h2 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.app-logo-svg {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-green);
    background: rgba(16, 217, 160, 0.12);
    border-radius: 10px;
    padding: 7px;
    flex-shrink: 0;
}

.app-logo-svg svg {
    width: 100%;
    height: 100%;
}

.auth-header .app-logo-svg {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    padding: 18px;
    margin: 0 auto 1.5rem;
    background: rgba(16, 217, 160, 0.1);
    filter: drop-shadow(0 0 12px rgba(18, 194, 149, 0.3));
}

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

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.72rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.2rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background var(--transition-fast), color var(--transition-fast);
    position: relative;
}

.menu-item i, .menu-item .icon {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.menu-item:hover .icon {
    transform: translateX(2px);
}

.menu-item.active {
    background: linear-gradient(135deg, rgba(16, 217, 160, 0.10) 0%, rgba(16, 217, 160, 0.02) 100%);
    color: #6ee7c4; /* verde suave, menos neon */
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(16, 217, 160, 0.04);
}

.menu-item-admin {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.menu-item-admin .icon {
    color: var(--text-secondary);
}

.menu-item-admin:hover {
    background: rgba(255, 215, 0, 0.06);
    border-color: rgba(255, 215, 0, 0.25);
    color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.1);
}

.menu-item-admin.active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.03) 100%);
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 2px 10px rgba(255, 204, 0, 0.1);
}

.sidebar-footer {
    padding: 1rem 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.user-profile-summary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #6ee7c4; /* inicial em verde suave, sem gradiente neon */
    flex-shrink: 0;
}

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

.user-name {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1px;
}

.user-email {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.5;
}

.logout-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.82rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
    width: 100%;
}

.logout-item:hover {
    background: rgba(255, 71, 87, 0.08);
    border-color: rgba(255, 71, 87, 0.25);
    color: #f87171;
}

.logout-item .icon {
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* ==================== CONTAINER ==================== */
.report-container {
    max-width: 1400px;
}

/* Reports — 5 cards grid */
.report-cards-grid {
    grid-template-columns: repeat(5, 1fr);
}

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

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

/* Top categories bars */
.top-cats-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.5rem 0;
}

.top-cat-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.top-cat-info {
    display: flex;
    align-items: center;
    gap: 7px;
}

.top-cat-name {
    flex: 1;
    font-size: 0.88rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-cat-pct {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    min-width: 38px;
    text-align: right;
}

.top-cat-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    overflow: hidden;
}

.top-cat-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
    opacity: 0.85;
}

.top-cat-value {
    font-size: 0.82rem;
    font-weight: 600;
    text-align: right;
}

.report-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 0;
    font-size: 0.9rem;
}

/* Espaçamento Global */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header de Páginas (Dashboard e Relatórios) */
.report-header,
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.header-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Report header desktop layout */
.report-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.report-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.report-filter-period {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.report-export-btns {
    display: flex;
    gap: 0.5rem;
}

.report-export-btns .btn-secondary,
.report-export-btns .btn-primary {
    height: 42px;
    padding: 0 14px;
    white-space: nowrap;
}

/* ==================== TRANSACTIONS PAGE ==================== */

.trans-summary-grid {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 1.25rem;
}

.trans-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.trans-filters .filter-group {
    flex: 1 1 140px;
    min-width: 120px;
}

.trans-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 217, 160, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(16, 217, 160, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 10px;
    margin-left: 8px;
    vertical-align: middle;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.type-receita {
    background: rgba(16, 217, 160, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 217, 160, 0.25);
}

.type-despesa {
    background: rgba(255, 71, 87, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(255, 71, 87, 0.25);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
}

.status-paid {
    background: rgba(16, 217, 160, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 217, 160, 0.25);
}

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

.cat-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.trans-bank-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.trans-meta {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-left: 4px;
}

.btn-icon {
    min-width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border-radius: 8px;
}

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

    .trans-filters .filter-group {
        flex: 1 1 calc(50% - 0.6rem);
    }
}

.row-filter {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
}

.row-filter label {
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.row-filter .input-field {
    max-width: 220px;
}

/* Modo Privacidade */
.btn-privacy {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.btn-privacy:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Utilitários de Páginas */
.page-header {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3.25rem;
}

.page-header h1 {
    font-size: 1.9rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* ==================== GRÁFICOS ==================== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.chart-container {
    position: relative;
    height: 300px;
}

/* ==================== TABELAS ==================== */
.transactions-section {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 1.75rem 2rem;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 2rem;
}

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

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

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

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

thead {
    background: transparent;
}

thead tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 1px;
}

td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 0.9rem;
}

tbody tr {
    transition: background var(--transition-fast);
}

tbody tr:last-child td {
    border-bottom: none;
}

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

.receita {
    color: var(--accent-green) !important;
    font-weight: 600;
}

.despesa {
    color: var(--accent-red) !important;
    font-weight: 600;
}

/* ==================== BOTÃƒâ€¢ES ==================== */
.btn-primary,
.btn-secondary,
.cta-button {
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary,
.cta-button {
    background: linear-gradient(135deg, #0fb486 0%, #38bdf8 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(15, 180, 134, 0.3);
    letter-spacing: 0.2px;
}

.btn-primary:hover,
.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.55);
    filter: brightness(1.08);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.2);
    border-color: rgba(248, 113, 113, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.15);
}

/* Ajuste fino para botÃƒÂµes no cabeÃƒÂ§alho (RelatÃƒÂ³rios) para alinhar com o input */
.page-header .btn-primary,
.page-header .btn-secondary,
.page-header .input-field {
    height: 42px;
    padding: 0 0.8rem;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
}

/* ==================== LANDING PAGE ==================== */
.landing-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.hero-section {
    text-align: center;
    padding: 4rem 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
    animation: fadeInUp 1.2s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.cta-button {
    margin-top: 2rem;
    font-size: 1.2rem;
    padding: 1rem 2.5rem;
    animation: fadeInUp 1.4s ease;
}

.arrow {
    transition: transform var(--transition-fast);
}

.cta-button:hover .arrow {
    transform: translateX(5px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== FILTROS ==================== */
.filters-section {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
    display: flex;
    gap: 1.25rem;
    align-items: end;
    flex-wrap: wrap;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: var(--shadow-card);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-field {
    width: 100% !important;
    max-width: 100% !important;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    height: 40px;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
}

.input-field:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

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

/* Estilos especÃƒÂ­ficos para select */
select.input-field {
    cursor: pointer;
    background: rgba(21, 25, 50, 0.9);
    color: var(--text-primary);
}

select.input-field option {
    background: #151932;
    color: var(--text-primary);
    padding: 0.5rem;
}

select.input-field option:hover,
select.input-field option:checked {
    background: rgba(102, 126, 234, 0.3);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: linear-gradient(160deg, #0f1d35 0%, #0a1220 100%);
    border-radius: 20px;
    padding: 1.5rem;
    max-width: 550px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: thin;
    scrollbar-color: var(--accent-blue) rgba(255, 255, 255, 0.05);
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.close {
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.close:hover {
    color: var(--accent-red);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==================== METAS ==================== */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.goal-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.goal-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 20px 20px 0 0;
    background: var(--top-bar, linear-gradient(90deg, #10d9a0, #38bdf8));
}

.goal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.goal-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 1rem;
    margin-right: 28px;
}

.goal-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.goal-header-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.goal-name {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.goal-status {
    padding: 0.22rem 0.65rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(16,217,160,0.15);
    color: #10d9a0;
    flex-shrink: 0;
    align-self: flex-start;
    text-transform: capitalize;
}

.goal-days-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    background: rgba(226,232,240,0.1);
    color: #e2e8f0;
}

.goal-urgent-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    background: rgba(255,71,87,0.15);
    color: #ff6b7a;
}

.goal-warning-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    background: rgba(255,200,0,0.15);
    color: #ffcc00;
}

.goal-complete-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    background: rgba(0,255,136,0.15);
    color: #00ff88;
}

.goal-amounts {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.2rem;
    gap: 0.5rem;
}

.goal-amount-item {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.goal-amount-right { text-align: right; }

.goal-amount-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #cbd5e0;
    font-weight: 600;
    margin-bottom: 2px;
}

.goal-amount-current {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--accent-green);
}

.goal-amount-target {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
}

.goal-amount-arrow {
    color: rgba(255,255,255,0.15);
    font-size: 1.2rem;
    flex-shrink: 0;
    line-height: 1;
}

.goal-progress { margin: 0; }

.progress-bar {
    width: 100%;
    height: 14px;
    background: rgba(255,255,255,0.07);
    border-radius: 99px;
    overflow: visible;
    margin-bottom: 0.4rem;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.goal-pct-text {
    text-align: right;
    font-size: 0.72rem;
    color: #cbd5e0;
    font-weight: 600;
}

/* ==================== LOADING ==================== */
.loading-row td,
.loading-message {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-style: italic;
}

/* ==================== RESPONSIVO ==================== */
@media (max-width: 768px) {

    /* Base Container */
    .container {
        padding: 1rem;
    }

    /* Navbar */
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }

    .nav-links {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

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

    .page-header h1 {
        font-size: 1.8rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    /* Filters */
    .filters-section {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
    }

    /* Tables */
    .transactions-section {
        padding: 1rem;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    th,
    td {
        padding: 0.8rem;
        font-size: 0.85rem;
        white-space: nowrap;
        /* Impede quebra de linha em tabelas pequenas */
    }

    /* Modals */
    .modal-content {
        padding: 1.5rem;
        width: 95%;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    /* BotÃƒÂµes */
    .btn-primary,
    .btn-secondary,
    .cta-button {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1rem;
    }

    /* PÃƒÂ¡ginas Mobile (Dashboard e RelatÃƒÂ³rios) */
    .report-header,
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .header-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .row-filter {
        justify-content: space-between;
    }

    .row-filter .input-field {
        max-width: 100%;
        flex: 1;
    }

    .timeline-container {
        height: 300px;
    }

    /* Admin Panels */
    .admin-container {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem;
    }

    .admin-content {
        padding: 1rem;
    }

    .users-table-container {
        padding: 1rem;
    }

    /* Ocultar itens redundantes na sidebar quando bottom nav estiver visível */
    .sidebar-mobile-hide {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .nav-brand h2 {
        font-size: 1.3rem;
    }

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

    .auth-card {
        padding: 2rem;
    }
}


/* ==================== AUTENTICAÃƒâ€¡ÃƒÆ’O ==================== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    background:
        linear-gradient(to bottom, rgba(3,8,16,0.7) 0%, transparent 25%, transparent 75%, rgba(3,8,16,0.8) 100%),
        radial-gradient(ellipse 80% 60% at 15% 40%, rgba(16,217,160,0.13) 0%, transparent 55%),
        radial-gradient(ellipse 70% 55% at 85% 60%, rgba(99,102,241,0.12) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 50% 10%, rgba(6,145,178,0.08) 0%, transparent 50%),
        linear-gradient(145deg, #060d1c 0%, #0b1628 40%, #080e20 70%, #060d1c 100%);
}

.auth-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(255,255,255,0.008) 3px,
            rgba(255,255,255,0.008) 4px
        );
    pointer-events: none;
    z-index: 0;
}

.auth-container {
    position: relative;
    z-index: 10;
}

.auth-card {
    background: linear-gradient(160deg, rgba(13, 21, 38, 0.97) 0%, rgba(8, 14, 28, 0.97) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px;
    padding: 2rem 2.25rem;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-success);
    border-radius: 24px 24px 0 0;
}

.auth-card form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.auth-card .form-group {
    width: 100%;
    margin-bottom: 1.2rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 1rem;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.auth-brand .app-logo-svg {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    padding: 9px;
    margin: 0;
}

.auth-brand-name {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-pro {
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
}

.auth-header img {
    max-height: 60px;
    margin-bottom: 0.5rem;
}

.auth-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.auth-header h1 {
    font-size: 1.35rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.label-icon {
    margin-right: 0.5rem;
}

.auth-input-wrapper,
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100% !important;
}

.auth-input-wrapper .input-field,
.password-input-wrapper .input-field {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto;
}

.password-input-wrapper .input-field {
    padding-right: 3.5rem !important;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform var(--transition-fast);
}

.toggle-password:hover {
    transform: scale(1.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.error-message {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.success-message {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.loader {
    animation: spin 1s linear infinite;
}

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

    to {
        transform: rotate(360deg);
    }
}

.auth-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer p {
    color: var(--text-secondary);
}

.auth-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.auth-link:hover {
    color: var(--accent-green);
}

/* Password requirement chips */
.password-requirements {
    margin-bottom: 1rem;
}

.req-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.req-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
}

.req-chip.req-ok {
    background: rgba(16, 217, 160, 0.12);
    border-color: rgba(16, 217, 160, 0.4);
    color: var(--accent-green);
}

/* LGPD consent box */
.lgpd-consent-box {
    background: rgba(16, 217, 160, 0.05);
    border: 1px solid rgba(16, 217, 160, 0.2);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.1rem;
}

.lgpd-consent-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.6rem;
}

.lgpd-shield {
    font-size: 0.9rem;
}

.lgpd-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.55;
}

.lgpd-consent-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    min-width: 17px;
    accent-color: var(--accent-green);
    cursor: pointer;
    margin-top: 2px;
}

.lgpd-consent-label a {
    color: var(--accent-green);
}

.auth-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.decoration-circle { display: none; }
.auth-decoration   { display: none; }

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 2px;
}

.strength-text {
    font-size: 0.85rem;
    font-weight: 600;
}


/* ==================== ADMIN PANEL ==================== */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 1rem;
}

.admin-sidebar h2 {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-menu {
    list-style: none;
}

.admin-menu li {
    margin-bottom: 0.5rem;
}

.admin-menu a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.admin-menu a:hover,
.admin-menu a.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.admin-content {
    flex: 1;
    padding: 2rem;
}

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

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

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.users-table-container {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-edit {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.35);
    border: 1px solid var(--accent-blue);
}

.btn-edit:hover {
    background: rgba(99, 102, 241, 0.28);
}

.btn-danger {
    background: rgba(255, 71, 87, 0.1);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
}

.btn-danger:hover {
    background: rgba(255, 71, 87, 0.2);
}

.btn-success {
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.btn-success:hover {
    background: rgba(0, 255, 136, 0.2);
}

/* Botões de comprovante (anexar / ver / remover PDF) */
.btn-receipt {
    background: rgba(160, 174, 192, 0.12);
    color: #a0aec0;
    border: 1px solid rgba(160, 174, 192, 0.35);
}

.btn-receipt:hover {
    background: rgba(160, 174, 192, 0.22);
}

/* Quando já existe comprovante anexado, destaca em verde-tema */
.btn-receipt.has-receipt {
    background: rgba(16, 217, 160, 0.12);
    color: var(--accent-green);
    border-color: rgba(16, 217, 160, 0.4);
}

.btn-receipt.has-receipt:hover {
    background: rgba(16, 217, 160, 0.22);
}

/* Botão de desfazer pagamento (voltar para pendente) */
.btn-revert {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.btn-revert:hover {
    background: rgba(245, 158, 11, 0.22);
}

/* Abas da página de Relatórios (Mensal x Visão Geral) */
.report-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.report-tab {
    background: rgba(255, 255, 255, 0.04);
    color: #a0aec0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.report-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.report-tab.active {
    background: rgba(16, 217, 160, 0.15);
    color: #10d9a0;
    border-color: rgba(16, 217, 160, 0.45);
}

/* Cards de dica na Visão Geral */
.general-tips {
    display: grid;
    gap: 0.75rem;
}

.tip-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid rgba(16, 217, 160, 0.5);
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
}

.tip-icon {
    font-size: 1.3rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.tip-text {
    color: #cbd5e0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.tip-text b {
    color: #fff;
}

.badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.badge-admin {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.badge-user {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-active {
    background: rgba(16, 217, 160, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(16, 217, 160, 0.2);
}

.badge-inactive {
    background: rgba(248, 113, 113, 0.12);
    color: var(--accent-red);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

/* AnimaÃƒÂ§ÃƒÂ£o para novos campos */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== MOBILE EXCELLENCE (NEW) ==================== */

/* Mobile Top Header (Mobile Only) */
.mobile-header {
    display: none;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.mobile-brand .app-logo-svg {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    padding: 8px;
}

.mobile-brand-name {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-brand-name .brand-pro {
    -webkit-text-fill-color: #fff;
}

.mobile-menu-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    font-size: 1.25rem;
    line-height: 1;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

/* Bottom Navigation Bar (Mobile Only) */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 5px;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    transition: var(--transition-fast);
}

.mobile-nav-item.active {
    color: var(--accent-green);
}

.mobile-nav-item .icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

/* Floating Action Button (FAB) */
.fab {
    display: none;
    position: fixed;
    bottom: 85px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--gradient-success);
    border-radius: 50%;
    box-shadow: 0 8px 16px rgba(18, 194, 149, 0.4);
    z-index: 1001;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}

.fab:active {
    transform: scale(0.9);
}

/* Responsive Table into Cards */
@media (max-width: 768px) {
    .mobile-nav, .fab {
        display: flex;
    }

    .sidebar-footer {
        padding-bottom: 80px;
    }

    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        padding: 0 1rem;
        background: rgba(8, 14, 28, 0.96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        z-index: 999;
    }

    .sidebar-header {
        display: none;
    }

    .main-content {
        padding-top: calc(56px + 1rem);
        padding-bottom: 90px;
    }

    /* Transform Table to Cards */
    .table-container {
        border: none;
        background: transparent;
    }

    #transactions-table thead, #detailed-transactions-table thead, #top-categories-table thead,
    #subscriptions-table thead {
        display: none;
    }

    #transactions-table, #transactions-table tbody, #transactions-table tr, #transactions-table td,
    #detailed-transactions-table, #detailed-transactions-table tbody, #detailed-transactions-table tr, #detailed-transactions-table td,
    #top-categories-table, #top-categories-table tbody, #top-categories-table tr, #top-categories-table td,
    #subscriptions-table, #subscriptions-table tbody, #subscriptions-table tr, #subscriptions-table td {
        display: block;
        width: 100%;
    }

    table tr {
        background: var(--card-bg);
        margin-bottom: 1rem;
        border-radius: 12px;
        padding: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.05);
        position: relative;
    }

    table td {
        text-align: right;
        padding: 0.5rem 0;
        border: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    table td:before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--text-secondary);
        font-size: 0.85rem;
    }

    table td:first-child {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        margin-bottom: 0.5rem;
        padding-bottom: 0.8rem;
        font-weight: 800;
        text-align: center;
        justify-content: center;
    }
    
    table td:first-child:before {
        display: none;
    }

    .receita { font-weight: 700; color: var(--accent-green) !important; }
    .despesa { font-weight: 700; color: var(--accent-red) !important; }
}

/* ==================== NOTIFICATIONS (TOASTS) ==================== */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.notification.active {
    transform: translateY(0);
    opacity: 1;
}

.notification-success {
    border-left: 4px solid var(--accent-green);
}

.notification-error {
    border-left: 4px solid var(--accent-red);
}

.notification-icon {
    font-size: 1.2rem;
}

.notification-message {
    font-weight: 500;
    font-size: 0.95rem;
}

/* ==================== NOTIFICATION DROPDOWN ==================== */
.notification-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    width: 320px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

.notification-dropdown.active {
    display: block;
}

.dropdown-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-clear-all {
    font-size: 0.75rem;
    color: var(--accent-blue);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    opacity: 0.8;
}

.btn-clear-all:hover {
    opacity: 1;
}

.notification-list {
    max-height: 350px;
    overflow-y: auto;
}

.notification-list-item {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    gap: 12px;
    transition: background 0.2s;
    position: relative;
    cursor: default;
}

.notification-list-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.item-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.indicator-danger { background: var(--accent-red); box-shadow: 0 0 8px var(--accent-red); }
.indicator-warning { background: var(--accent-orange); box-shadow: 0 0 8px var(--accent-orange); }
.indicator-info { background: var(--accent-blue); box-shadow: 0 0 8px var(--accent-blue); }

.item-content {
    flex: 1;
}

.item-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.item-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.btn-dismiss-item {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.notification-list-item:hover .btn-dismiss-item {
    opacity: 0.6;
}

.btn-dismiss-item:hover {
    opacity: 1 !important;
    color: var(--accent-red);
}

.empty-notifications {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .notification-dropdown {
        position: fixed;
        top: 70px;
        left: 10px;
        right: 10px;
        width: calc(100% - 20px);
        max-height: 70vh;
    }
}

/* ==================== CARDS GRID (Reports & Dashboard) ==================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
    align-items: stretch;
}

.summary-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    padding: 20px 20px 18px;
    min-height: 110px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 18px 18px 0 0;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.12);
}

.summary-card.receitas {
    background: linear-gradient(135deg, rgba(16, 217, 160, 0.08) 0%, rgba(15, 23, 42, 0.85) 60%);
    border-color: rgba(16, 217, 160, 0.18);
}
.summary-card.receitas::before { background: linear-gradient(90deg, #10d9a0, #38bdf8); }
.summary-card.receitas:hover { box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 20px rgba(16, 217, 160, 0.1); }

.summary-card.despesas {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.08) 0%, rgba(15, 23, 42, 0.85) 60%);
    border-color: rgba(248, 113, 113, 0.18);
}
.summary-card.despesas::before { background: linear-gradient(90deg, #f87171, #fb923c); }
.summary-card.despesas:hover { box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 20px rgba(248, 113, 113, 0.1); }

.summary-card.saldo {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.08) 0%, rgba(15, 23, 42, 0.85) 60%);
    border-color: rgba(167, 139, 250, 0.18);
}
.summary-card.saldo::before { background: linear-gradient(90deg, #a78bfa, #60a5fa); }
.summary-card.saldo:hover { box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 20px rgba(167, 139, 250, 0.1); }

.summary-card.pendentes {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.08) 0%, rgba(15, 23, 42, 0.85) 60%);
    border-color: rgba(251, 146, 60, 0.18);
}
.summary-card.pendentes::before { background: linear-gradient(90deg, #fb923c, #facc15); }
.summary-card.pendentes:hover { box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 20px rgba(251, 146, 60, 0.1); }

.summary-card .card-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    line-height: 1;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 2px;
}

.summary-card .card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.summary-card .card-content h3 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.summary-card .card-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 2px 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.summary-card .card-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.value-warning {
    color: #ff9f43 !important;
}

/* ==================== ACCOUNT CARDS REDESIGN ==================== */
.account-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.account-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.account-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.1);
}

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

.account-bank-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.account-bank-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.95;
}

.account-balance-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
    font-weight: 500;
}

.account-balance-value {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 24px;
    font-family: 'Inter', sans-serif;
    text-shadow: 0 0 20px rgba(16, 217, 160, 0.2);
}

.account-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: auto;
}

.btn-account-action {
    padding: 12px;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.btn-account-action:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-account-delete {
    color: #ff7675;
    border-color: rgba(255, 118, 117, 0.2);
    background: rgba(255, 118, 117, 0.05);
}

.btn-account-delete:hover {
    background: rgba(255, 118, 117, 0.15);
    border-color: rgba(255, 118, 117, 0.4);
    color: #ff7675;
}

/* ==================== CHARTS GRID ==================== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.full-width-chart {
    grid-template-columns: 1fr !important;
}

.chart-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition-normal);
}

.chart-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.chart-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: var(--gradient-success);
    border-radius: 2px;
    flex-shrink: 0;
}

.chart-container {
    position: relative;
    width: 100%;
    min-height: 300px;
    flex: 1;
}

/* ==================== BUDGET PROGRESS BARS ==================== */
.budget-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.budget-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-radius: 12px;
}

.budget-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.budget-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.budget-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

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

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .summary-card {
        padding: 20px;
        min-height: auto;
    }

    .summary-card .card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.8rem;
    }

    .summary-card .card-value {
        font-size: 1.3rem;
    }

    /* Organized Header for Mobile */
    .dashboard-header, .report-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1.5rem !important;
    }

    .header-filters {
        display: flex !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
        width: 100% !important;
        gap: 10px !important;
        justify-content: space-between !important;
    }

    .header-filters .btn-privacy,
    .header-filters .btn-privacy,
    .header-filters .notification-container {
        flex: 0 0 calc(50% - 5px) !important;
        order: 1 !important;
        height: 48px !important;
        position: relative !important;
    }

    .header-filters .btn-privacy {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 12px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .header-filters .notification-icon-wrapper {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        background: rgba(255, 255, 255, 0.05) !important;
        width: 100% !important;
        height: 100% !important;
        border-radius: 12px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .header-filters .row-filter {
        flex: 0 0 100% !important;
        order: 2 !important;
        margin: 0 !important;
    }

    .header-filters .input-field {
        width: 100% !important;
        max-width: none !important;
        height: 48px !important;
        border-radius: 12px !important;
    }
}

/* ==================== SIDEBAR OVERLAY (MOBILE) ==================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ==================== MOBILE NAV (REDESIGN) ==================== */
.mobile-nav {
    background: rgba(8, 14, 28, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    height: 64px;
    padding: 0 8px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.mobile-nav-item {
    flex: 1;
    padding: 6px 4px 8px;
    border-radius: 14px;
    gap: 3px;
    min-width: 0;
    transition: all 0.2s ease;
    position: relative;
}

.mobile-nav-item .icon {
    font-size: 1.35rem;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
}

.mobile-nav-item span:not(.icon) {
    font-size: 0.68rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.mobile-nav-item:active .icon {
    transform: scale(0.88);
}

.mobile-nav-item.active {
    color: var(--accent-green);
    background: rgba(16, 217, 160, 0.1);
}

.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 2px;
    background: var(--accent-green);
    border-radius: 0 0 3px 3px;
    box-shadow: 0 0 8px rgba(16, 217, 160, 0.6);
}

/* ==================== FAB (REDESIGN) ==================== */
.fab {
    width: 54px;
    height: 54px;
    bottom: 78px;
    right: 16px;
    background: var(--gradient-success);
    box-shadow: 0 6px 20px rgba(16, 217, 160, 0.5), 0 0 0 0 rgba(16, 217, 160, 0.4);
    font-size: 1.8rem;
    font-weight: 300;
    animation: fabPulse 2.5s ease-in-out infinite;
    border: none;
    outline: none;
}

.fab:active {
    transform: scale(0.9);
    animation: none;
    box-shadow: 0 4px 12px rgba(16, 217, 160, 0.4);
}

@keyframes fabPulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(16, 217, 160, 0.5), 0 0 0 0 rgba(16, 217, 160, 0.3); }
    60%       { box-shadow: 0 6px 20px rgba(16, 217, 160, 0.5), 0 0 0 10px rgba(16, 217, 160, 0); }
}

/* ==================== MOBILE-SPECIFIC IMPROVEMENTS ==================== */
@media (max-width: 768px) {

    /* Container */
    .container {
        padding: 1rem 0.875rem;
    }

    .main-content {
        padding-bottom: 76px;
    }

    /* Page header */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .page-header > div:last-child {
        display: flex;
        gap: 8px;
        align-items: center;
        flex-wrap: wrap;
    }

    .page-header h1 {
        font-size: 1.45rem;
    }

    /* Hide secondary action buttons on mobile — FAB covers add transaction */
    .page-header .btn-secondary:not(.btn-privacy) {
        font-size: 0.78rem;
        padding: 0.5rem 0.75rem;
        height: 38px;
    }

    .page-header .btn-primary {
        display: none; /* FAB handles add actions on regular pages */
    }

    /* Admin page: sem FAB, botão precisa aparecer */
    .page-admin .page-header .btn-primary {
        display: inline-flex !important;
        width: auto !important;
        min-height: 44px;
    }

    /* Admin table: Responsive Card Layout */
    #usersTable thead {
        display: none !important;
    }

    #usersTable, 
    #usersTable tbody {
        display: block !important;
        width: 100% !important;
    }

    #usersTable tr {
        display: block !important;
        background: rgba(15, 23, 42, 0.95) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 16px !important;
        padding: 20px !important;
        margin-bottom: 20px !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
        position: relative !important;
        width: 100% !important;
    }

    #usersTable td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 12px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        text-align: right !important;
        min-height: 44px !important;
        font-size: 0.95rem !important;
        width: 100% !important;
    }

    #usersTable td:last-child {
        border-bottom: none !important;
        margin-top: 10px !important;
        padding-top: 15px !important;
    }

    #usersTable td::before {
        content: attr(data-label) !important;
        display: block !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        font-size: 0.75rem !important;
        color: var(--text-muted) !important;
        text-align: left !important;
        padding-right: 15px !important;
    }

    #usersTable td[data-label="Email"] {
        word-break: break-all !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
    }

    #usersTable td[data-label="Email"]::before {
        margin-bottom: 4px !important;
    }

    #usersTable td[data-label="Ações"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    #usersTable td[data-label="Ações"]::before {
        text-align: left !important;
        margin-bottom: 8px !important;
    }

    #usersTable .table-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        width: 100% !important;
    }

    #usersTable .table-actions .btn-sm {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px 8px !important;
        font-size: 0.85rem !important;
        border-radius: 10px !important;
        min-height: 44px !important;
    }

    /* Touch targets — minimum 44px */
    .btn-primary,
    .btn-secondary,
    .input-field,
    select.input-field {
        min-height: 44px;
    }

    .btn-sm {
        min-height: 36px;
    }

    /* Filters: horizontal scrollable chips */
    .filters-section {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.75rem;
        padding: 0.9rem 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filters-section::-webkit-scrollbar {
        display: none;
    }

    .filter-group {
        flex-shrink: 0;
        min-width: 140px;
    }

    .filter-group label {
        font-size: 0.72rem;
        margin-bottom: 4px;
    }

    .filter-group .input-field {
        height: 40px;
        font-size: 0.82rem;
    }

    /* Summary cards — full-width horizontal */
    .summary-card {
        padding: 16px;
        gap: 14px;
    }

    .summary-card .card-icon {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
        border-radius: 10px;
    }

    .summary-card .card-value {
        font-size: 1.3rem;
    }

    .summary-card .card-content h3 {
        font-size: 0.68rem;
    }

    /* Chart cards */
    .chart-card {
        padding: 16px;
    }

    .chart-container {
        min-height: 220px;
    }

    /* Transactions section */
    .transactions-section {
        padding: 1rem;
        border-radius: 14px;
    }

    .section-header h2 {
        font-size: 1rem;
    }

    /* Standard Tables: Keep horizontal scroll for tables without data-labels */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.02);
    }

    /* Goals grid */
    .goals-grid {
        grid-template-columns: 1fr;
    }

    /* Modal — near full-screen on small phones */
    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 20px 20px 0 0;
        padding: 1.25rem;
        max-height: 92vh;
        position: fixed;
        bottom: 0;
        left: 0;
        animation: slideUpSheet 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
    }

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

    /* Form columns: always full width on mobile */
    .form-row {
        flex-direction: column !important;
        gap: 0 !important;
    }

    .col-6,
    .col-4,
    .col-8 {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }

    .modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .modal-footer .btn-primary,
    .modal-footer .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    /* Admin table */
    .users-table-container {
        padding: 1rem;
    }

    .table-actions {
        flex-wrap: wrap;
    }

    /* Notification dropdown */
    .notification-dropdown {
        width: calc(100vw - 20px);
        left: auto;
        right: -10px;
    }

    /* Reports filters — stacked card layout */
    .report-header {
        gap: 1rem;
    }

    .report-title-row {
        justify-content: space-between;
    }

    .report-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 14px;
        padding: 1rem;
    }

    .report-filter-period {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }

    .report-filter-period .input-field {
        width: 100%;
    }

    .report-export-btns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .report-export-btns .btn-secondary,
    .report-export-btns .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 380px) {
    .summary-card .card-value {
        font-size: 1.15rem;
    }

    .mobile-nav-item span:not(.icon) {
        display: none;
    }

    .mobile-nav-item {
        padding: 10px 4px;
    }

    .mobile-nav-item .icon {
        font-size: 1.5rem;
        margin-bottom: 0;
    }
}
