/* style.css - Gerenciador de Gastos (mobile-first, tema escuro + roxo) */

html {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #020617; /* slate-950 */
    color: #f1f5f9;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* esconde barra de rolagem horizontal dos chips */
.chips-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.chips-scroll::-webkit-scrollbar { display: none; }

/* botão flutuante "+" */
.fab {
    position: fixed;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    width: 58px;
    height: 58px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    font-size: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.45);
    z-index: 40;
    transition: transform .15s ease;
}
.fab:active { transform: scale(0.92); }

/* tira as setinhas de input number */
.no-spinner::-webkit-outer-spin-button,
.no-spinner::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.no-spinner { -moz-appearance: textfield; appearance: textfield; }

/* selects e date no tema escuro */
select, input[type="date"], input[type="time"] { color-scheme: dark; }

/* animação de entrada dos cards */
@keyframes subir {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.animar { animation: subir .25s ease both; }

/* modal */
.modal-fundo {
    position: fixed; inset: 0;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(3px);
    display: flex; align-items: flex-end; justify-content: center;
    z-index: 90;
    animation: aparecer .15s ease;
}
@keyframes aparecer { from { opacity: 0 } to { opacity: 1 } }
.modal-fundo.centro { align-items: center; padding: 24px; }

.modal-card {
    width: 100%;
    max-width: 430px;
    background: #0f172a; /* slate-900 */
    border: 1px solid #1e293b;
    border-radius: 24px 24px 20px 20px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    animation: subir .2s ease both;
}

/* caixa de rolagem de categorias (grade de botões) */
.grade-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    cursor: pointer;
    transition: all .15s ease;
    user-select: none;
}
.chip:active { transform: scale(0.96); }
.chip.ativo {
    background: rgba(139, 92, 246, 0.18);
    border-color: #8b5cf6;
    color: #c4b5fd;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.chip .bolinha {
    width: 9px; height: 9px; border-radius: 9999px; flex-shrink: 0;
}

/* barra proporcional das categorias */
.barra-fundo { background: #1e293b; border-radius: 9999px; height: 7px; overflow: hidden; }
.barra-valor { height: 100%; border-radius: 9999px; transition: width .5s ease; }

/* botão ícone lixeira discreto */
.btn-lixeira {
    color: #475569;
    padding: 8px;
    border-radius: 10px;
    transition: color .15s, background .15s;
}
.btn-lixeira:active { background: rgba(244, 63, 94, .12); color: #fb7185; }

/* lista de gastos */
.item-gasto {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 12px 14px;
}

.pb-safe { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

::selection { background: rgba(139,92,246,.4); }
