/* style.css - MotoCash PRO (Versão Completa Amarelo/Preto) */

:root {
    /* Paleta de Cores */
    --bg-color: #121214;       /* Fundo quase preto */
    --card-color: #1e1e1e;     /* Cartões cinza escuro */
    
    --primary: #ffc107;        /* AMARELO (Cor principal) */
    --primary-hover: #ffca2c;  /* Amarelo um pouco mais claro */
    
    --green: #00e054;          /* Verde (Dinheiro entrando) */
    --red: #ff4444;            /* Vermelho (Dinheiro saindo) */
    
    --text: #ffffff;           /* Texto Branco */
    --text-muted: #b0b0b0;     /* Texto Cinza (detalhes) */
    --border: #333333;         /* Bordas sutis */
}

/* --- RESET GERAL --- */
* { box-sizing: border-box; outline: none; }

body { 
    font-family: 'Roboto', sans-serif; 
    background: var(--bg-color); 
    color: var(--text); 
    margin: 0; 
    padding: 20px; 
    /* Centraliza se for tela de login, mas permite scroll no painel */
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    min-height: 100vh; 
}

/* Se for painel, alinha ao topo, se for login, centraliza */
body:has(.card-login) { justify-content: center; } 

.container { width: 100%; max-width: 500px; margin: 0 auto; }

/* --- TIPOGRAFIA --- */
h1 { font-size: 2rem; margin-bottom: 30px; text-align: center; }
h1 span { color: var(--primary); }

h2 { font-size: 1.4rem; color: var(--text); }
h3 { font-size: 1.1rem; color: var(--text); }

/* --- FORMULÁRIOS E LOGIN --- */
.card { 
    background: var(--card-color); 
    padding: 30px; 
    border-radius: 16px; 
    border: 1px solid var(--border); 
    box-shadow: 0 4px 20px rgba(0,0,0,0.4); 
}

.input-group { margin-bottom: 15px; text-align: left; }

label { display: block; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }

input, select { 
    width: 100%; 
    background: #121214; 
    border: 1px solid var(--border); 
    color: white; 
    padding: 15px; 
    border-radius: 8px; 
    font-size: 1rem; 
    transition: 0.3s; 
}

input:focus, select:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

/* --- BOTÕES GERAIS --- */
.btn { 
    width: 100%; 
    background: var(--primary); 
    color: #000000; /* Texto preto no amarelo para leitura */
    font-weight: 800; 
    padding: 16px; 
    border: none; 
    border-radius: 8px; 
    font-size: 1rem; 
    cursor: pointer; 
    text-transform: uppercase; 
    margin-top: 10px; 
    transition: 0.2s; 
}

.btn:hover { background: var(--primary-hover); transform: translateY(-2px); }

.link-text { 
    display: block; 
    margin-top: 25px; 
    color: var(--text-muted); 
    text-decoration: none; 
    font-size: 0.9rem; 
    text-align: center; 
}
.link-text span { color: var(--primary); font-weight: bold; }


/* --- PAINEL (DASHBOARD) --- */

/* Cabeçalho do App */
.header-app { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 25px; 
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.user-info h2 { font-size: 1.3rem; margin: 0; }
.user-info small { color: var(--text-muted); font-size: 0.9rem; }

.logout-btn { 
    color: #ff5555; 
    text-decoration: none; 
    font-size: 1.4rem; 
    padding: 10px;
    transition: 0.2s;
}
.logout-btn:hover { color: #ff0000; transform: scale(1.1); }

/* Carrossel de Cards (Saldo) */
/* --- CORREÇÃO DOS CARDS (Responsivo) --- */
.resumo-container { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 25px;
    /* No celular, permite que os cards desçam pra linha de baixo */
    flex-wrap: wrap; 
}

.resumo-card { 
    min-width: 140px; 
    /* Faz o card ocupar o espaço disponível */
    flex: 1 1 30%; 
    background: var(--card-color); 
    padding: 20px; 
    border-radius: 14px; 
    border: 1px solid var(--border); 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
}

/* Ajuste específico para celular muito pequeno */
@media (max-width: 480px) {
    .resumo-card {
        flex: 1 1 100%; /* Ocupa a largura total no celular */
    }
}

.resumo-card { 
    min-width: 150px; 
    flex: 1; 
    background: var(--card-color); 
    padding: 20px; 
    border-radius: 14px; 
    border: 1px solid var(--border); 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
}

.resumo-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.resumo-valor { font-size: 1.5rem; font-weight: bold; color: var(--text); }

/* Card de Saldo Principal (Destaque Amarelo) */
.card-saldo { 
    border-color: var(--primary); 
    background: linear-gradient(145deg, #1e1e1e, #252520);
}
.card-saldo .resumo-valor { color: var(--primary); }

/* Lista de Lançamentos */
.section-title { 
    font-size: 0.9rem; 
    color: var(--text-muted); 
    margin-bottom: 15px; 
    text-transform: uppercase; 
    font-weight: bold;
    letter-spacing: 1px; 
}

.lista-lancamentos { 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    padding-bottom: 100px; /* Espaço para não ficar atrás do botão flutuante */
}

.item-lancamento { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: var(--card-color); 
    padding: 18px; 
    border-radius: 12px; 
    border-bottom: 1px solid var(--border); 
    transition: 0.2s;
}
.item-lancamento:active { background: #2a2a2a; }

.item-info { display: flex; flex-direction: column; gap: 4px; }
.item-cat { font-weight: bold; font-size: 1rem; color: var(--text); }
.item-desc { font-size: 0.85rem; color: var(--text-muted); }

.item-valor { font-weight: 800; font-size: 1rem; }
.valor-receita { color: var(--green); }
.valor-despesa { color: var(--red); }

/* --- BOTÃO FLUTUANTE (FAB) --- */
.fab-container { 
    position: fixed; 
    bottom: 25px; 
    right: 25px; 
    display: flex; 
    gap: 15px; 
    z-index: 100;
}

.fab-btn { 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    border: none; 
    font-size: 24px; 
    color: #000; 
    font-weight: bold; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-decoration: none; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); 
    cursor: pointer; 
    transition: transform 0.2s; 
}

.fab-receita { background: var(--green); color: #000; } 
.fab-despesa { background: var(--red); color: #fff; }

.fab-btn:hover { transform: scale(1.1); }
.fab-btn:active { transform: scale(0.95); }

/* Botão de Excluir (Lixeira) */
.btn-trash {
    color: #555; /* Cinza discreto */
    font-size: 1rem;
    padding: 8px;
    border-radius: 50%;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-trash:hover {
    color: #ff4444; /* Fica vermelho ao passar o mouse */
    background: rgba(255, 68, 68, 0.1); /* Fundo avermelhado leve */
}