/* Variáveis e Paleta de Cores */
:root {
    --primary: #4CAF50;
    --primary-light: #E8F5E9;
    --primary-dark: #388E3C;
    --primary-gradient: linear-gradient(135deg, #4CAF50, #2E7D32);

    --bg: #F8FAF9;
    --surface: #FFFFFF;

    --text-main: #1A1A1A;
    --text-muted: #757575;

    --red: #F44336;
    --red-light: #FFEBEE;
    --yellow: #FFC107;
    --yellow-light: #FFF8E1;

    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;

    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Reset e Setup Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #E5E7EB;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Gerenciamento de Telas */
.screen {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: var(--bg);
    z-index: 1;
}

.screen.active {
    display: flex;
    z-index: 2;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Botões */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid #ddd;
    border-radius: var(--border-radius-md);
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Header com Gradiente (Dashboard) */
.header-gradient {
    background: var(--primary-gradient);
    padding: 32px 24px 64px 24px;
    border-bottom-left-radius: 32px;
    border-bottom-right-radius: 32px;
    color: white;
}

.user-info {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 24px;
    opacity: 0.9;
}

/* Card Glassmorphism */
.balance-card.glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    color: var(--text-main);
    box-shadow: var(--shadow-soft);
    margin-bottom: -40px;
    /* Sobreposição com o fundo cinza */
    position: relative;
}

.balance-title {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.balance-value {
    font-size: 32px;
    font-weight: 700;
    margin: 8px 0;
    color: var(--text-main);
}

.balance-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.balance-subtitle span {
    font-weight: 600;
    color: var(--text-main);
}

/* Badges de Status (Cores Inteligentes) */
.status-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.green {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.status-badge.yellow {
    background: var(--yellow-light);
    color: #B08D00;
}

.status-badge.red {
    background: var(--red-light);
    color: var(--red);
}

/* Ações Rápidas */
.quick-actions {
    display: flex;
    gap: 16px;
    padding: 0 24px;
    margin-top: 64px;
}

.action-btn {
    flex: 1;
    padding: 16px;
    border-radius: var(--border-radius-md);
    border: none;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    background: var(--surface);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s;
}

.action-btn:active {
    transform: scale(0.96);
}

.action-btn.positive {
    color: var(--primary-dark);
}

.action-btn.negative {
    color: var(--red);
}

/* Seções de Conteúdo */
.content-section {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 100px;
    /* Espaço para o Bottom Nav */
}

.content-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-main);
}

/* Navegação Inferior */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgb(0 0 0 / 12%); backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-between;
    padding: 12px 24px 24px 24px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 10;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #373333;
    font-size: 11px;
    gap: 4px;
    transition: color 0.2s;
}

.nav-item i {
    font-size: 20px;
}

.nav-item.active {
    color: var(--primary);
}

/* Cartão de Evento */
.event-card {
    background: var(--surface);
    border-radius: var(--border-radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    box-shadow: var(--shadow-card);
}

.event-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 16px;
}

.bg-green-light {
    background: var(--primary-light);
}

.bg-red-light {
    background: var(--red-light);
}

.event-details {
    flex: 1;
}

.event-desc {
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 4px;
}

.event-date {
    font-size: 13px;
    color: var(--text-muted);
}

.event-value {
    font-weight: 600;
    font-size: 15px;
}

.btn-del {
    background: none;
    border: none;
    color: #ccc;
    margin-left: 12px;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
}

.btn-del:active {
    color: var(--red);
}

.event-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

.btn-mini {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: none;
    border-radius: 12px;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.badge.sim {
    background: var(--text-main);
    color: white;
}

.badge.rec {
    background: #E0E0E0;
    color: #333;
}

/* Linha do Tempo da Previsão */
.forecast-timeline {
    padding: 24px;
    padding-bottom: 100px;
    overflow-y: auto;
    flex: 1;
}

.timeline-day {
    background: var(--surface);
    border-radius: var(--border-radius-md);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.timeline-date {
    font-weight: 600;
    color: var(--text-main);
}

.timeline-balance {
    font-weight: 700;
}

.timeline-event {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
}

.timeline-event:last-child {
    margin-bottom: 0;
}

/* Utilitários de Cor de Borda para o Status Diário */
/* Status Verde */
.border-green {
    border-left: 5px solid var(--primary);
    background-color: rgb(106 255 169 / 59%); /* Verde bem claro */
}

/* Status Amarelo */
.border-yellow {
    border-left: 5px solid var(--yellow);
    background-color: rgb(255 206 59 / 67%); /* Amarelo bem claro */
}

/* Status Vermelho */
.border-red {
    border-left: 5px solid var(--red);
    background-color: rgb(255 38 15 / 48%); /* Vermelho bem claro */
}

.text-green {
    color: var(--primary) !important;
}

.text-yellow {
    color: #B08D00 !important;
}

.text-red {
    color: var(--red) !important;
}

/* Modal de Criação */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: none;
    align-items: flex-end;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--surface);
    width: 100%;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 24px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

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

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

.btn-close {
    background: #f0f0f0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius-md);
    font-size: 16px;
    background: #fafafa;
    outline: none;
    transition: border 0.2s;
}

.input-group input:focus {
    border-color: var(--primary);
    background: white;
}

.input-group select {
    width: 100%;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius-md);
    font-size: 16px;
    background: #fafafa;
    outline: none;
}

/* Cabeçalhos Comuns */
.header-standard {
    padding: 24px;
    background: var(--surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    z-index: 2;
}

.header-standard h2 {
    font-size: 20px;
    font-weight: 600;
}

.btn-icon {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.btn-icon.outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

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

/* Telas de Acesso (Boas Vindas e Login) */
.center-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

.logo {
    width: 200px;
    height: 200px;
    margin-bottom: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    width: 110%;
    height: 110%;
    object-fit: contain;
}
.center-content h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.center-content p {
    color: var(--text-muted);
    font-size: 16px;
}

.header-simple {
    padding: 24px;
}

.btn-back {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-main);
    cursor: pointer;
}

.form-container {
    padding: 0 24px 32px 24px;
    flex: 1;
}

.form-container h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-container p {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 32px;
    background: var(--primary-light);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
}

/* Tela de Perfil */
.profile-content {
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-content .avatar {
    font-size: 80px;
    color: var(--primary);
    margin-bottom: 16px;
}

.profile-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.status-active {
    color: var(--primary);
    font-weight: 500;
    background: var(--primary-light);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
}

.empty-msg {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    padding: 24px 0;
}

.user-info {
    text-align: center;
    padding: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.user-info .author-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

.user-info .author-link:hover {
    text-decoration: underline;
}

.notification-button { position:absolute; top:18px; right:20px; border:0; background:rgba(255,255,255,.18); color:#fff; border-radius:50%; width:38px; height:38px; cursor:pointer; font-size:16px; }
.notification-count { position:absolute; top:-4px; right:-3px; min-width:17px; padding:2px; border-radius:10px; background:var(--red); color:#fff; font-size:10px; }
.search-section { padding:12px 24px 0; flex:initial; overflow:visible; }
.search-input { width:100%; padding:12px 16px; border:1px solid #e0e0e0; border-radius:var(--border-radius-md); background:#fafafa; outline:0; }
.modal-buttons { display:flex; gap:12px; }.modal-buttons .btn-primary,.modal-buttons .btn-outline { flex:1; }
.panel-tabs { display:flex; gap:8px; padding:12px 24px; background:var(--surface); }.active-panel-tab { background:var(--primary); color:#fff; }
.profile-suggestions-card,.my-suggestions { width:100%; background:var(--surface); box-shadow:var(--shadow-card); border-radius:var(--border-radius-md); padding:20px; margin-top:24px; text-align:left; }.profile-suggestions-card p { color:var(--text-muted); font-size:13px; margin:8px 0; }.profile-suggestions-card .btn-primary { margin-top:12px; padding:12px; }
.my-suggestions h3 { font-size:16px; }.suggestion-card { background:#fafafa; border-left:4px solid var(--primary); border-radius:var(--border-radius-sm); padding:12px; margin-top:12px; font-size:13px; }.suggestion-card p { margin-top:6px; }.suggestion-response { margin-top:9px; padding-top:9px; border-top:1px solid #ddd; color:var(--primary-dark); }
.alerts-popover { position:absolute; top:58px; right:16px; z-index:120; width:calc(100% - 32px); max-height:60%; overflow:auto; background:var(--surface); border-radius:var(--border-radius-md); padding:20px; box-shadow:var(--shadow-soft); }.alert-item { border-left:4px solid var(--yellow); padding:10px; background:var(--yellow-light); margin:8px 0; border-radius:var(--border-radius-sm); font-size:13px; }.alert-item.critical { border-color:var(--red); background:var(--red-light); }
.report-actions { display:flex; gap:8px; margin-bottom:20px; }.report-actions .btn-mini { flex:1; }.report-card { background:var(--surface); box-shadow:var(--shadow-card); border-radius:var(--border-radius-md); padding:16px; margin-bottom:16px; }.report-card h3 { margin-bottom:14px; }.report-summary { display:grid; grid-template-columns:1fr 1fr; gap:10px; }.metric { background:#fafafa; border-radius:var(--border-radius-sm); padding:12px; font-size:12px; }.metric strong { display:block; font-size:16px; margin-top:4px; }.chart-pie { width:150px; height:150px; border-radius:50%; margin:10px auto; }.chart-legend { font-size:12px; line-height:1.8; }.bar-row { display:grid; grid-template-columns:88px 1fr 65px; gap:8px; align-items:center; margin:8px 0; font-size:12px; }.bar { height:10px; border-radius:8px; background:var(--primary); }.bar.expense { background:var(--red); }.analysis-item { padding:12px 0; border-bottom:1px solid #eee; font-size:13px; }.admin-suggestion-actions { margin-top:12px; }.admin-suggestion-actions select,.admin-suggestion-actions textarea { width:100%; margin-bottom:8px; padding:10px; border:1px solid #ddd; border-radius:8px; }.admin-suggestion-actions textarea,.input-group textarea { min-height:80px; width:100%; padding:12px; border:1px solid #e0e0e0; border-radius:var(--border-radius-md); font:inherit; }
@media print { body { display:block; background:white; } .bottom-nav,.header-standard button,.report-actions,.notification-button { display:none !important; } .screen { position:relative; display:none; } #screen-reports { display:block !important; } .content-section { overflow:visible; padding:16px; } }
