/* INÍCIO - ESTILO MOBILE APP (DARK/NEON) */

/* 1. RESET E TRAVAS DE APP NATIVO */
*, *::before, *::after {
    box-sizing: border-box;
    /* Remove aquele piscar azul feio do Android ao tocar na tela */
    -webkit-tap-highlight-color: transparent; 
}

:root {
    --bg-dark: #0b0f19;
    --panel-bg: rgba(20, 27, 45, 0.7);
    --color-primary: #12CD87; 
    --color-secondary: #042F1F; 
    --text-light: #fff;
    --text-muted: #94a3b8;
    --border-glow: rgba(0, 240, 255, 0.3);
}

html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh; /* Trava a altura */
    overflow: hidden; /* MATA O SCROLL DO NAVEGADOR */
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Segoe UI', Roboto, sans-serif;
    overscroll-behavior-y: none; 
}

/* Área principal do App - Espaço para a nav no rodapé */
.app-section {
   position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    padding: 20px 20px 200px 20px; /* 110px é o respiro pro Bottom Nav não cobrir o conteúdo */
    overflow-y: auto; /* ATIVA O SCROLL NA SECTION */
    -webkit-overflow-scrolling: touch; /* Scroll suave e com inércia no iOS */
    z-index: 1;
  
}

/* 2. TIPOGRAFIA E CABEÇALHOS */
p, label { font-weight: 600; }

.header-futurista {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Suporte iOS */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header-futurista h1 {
    margin: 0;
    font-size: 1.5em; /* Reduzido para caber bem no mobile */
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--border-glow);
}

/* 3. ESTRUTURA DE LISTA (Sem Grid Complexo) */
/* No mobile, tudo é coluna por padrão */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Força os grids inline do HTML (1fr 1fr) a dividirem o espaço corretamente na mesma linha */
.dashboard-grid[style*="1fr 1fr"] {
    flex-direction: row;
}
.dashboard-grid[style*="1fr 1fr"] > .input-group {
    flex: 1;
    width: 50%;
}

/* 4. CARDS GLASSMORPHISM */
.card-futurista {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--color-primary);
    border-radius: 12px;
    padding: 20px; /* Reduzido para não espremer conteúdo em telas pequenas */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card-futurista h3 {
    margin: 0 0 10px 0;
    color: var(--text-muted);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-futurista .valor {
    margin: 0;
    font-size: 2.2em; /* Ajuste para não quebrar a linha */
    font-weight: bold;
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* 5. FORMULÁRIOS OTIMIZADOS PARA TOQUE */
.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    width: 100%;
}

.input-group label {
    margin-bottom: 6px;
    font-size: 0.8em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-theme {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 14px; /* Aumentado para facilitar o toque (min 48px Apple/Google) */
    color: var(--text-light);
    font-family: inherit;
    font-size: 1em; /* 16px evita zoom automático no iOS */
    outline: none;
    transition: border-color 0.2s;
    appearance: none; /* Remove seta padrão horrível de selects no iOS/Android */
}

.input-theme:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 8px var(--border-glow);
}

/* 6. BOTÕES NATIVOS */
.btn-theme.futurista {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    width: 100%;
    display: block;
    text-align: center;
    user-select: none; /* Impede selecionar o texto do botão ao segurar o dedo */
    transition: all 0.2s active;
}

/* Efeito de clique mobile (Substitui o :hover que não funciona bem no touch) */
.btn-theme.futurista:active {
    background: var(--color-primary);
    color: var(--bg-dark);
    transform: scale(0.98);
}

/* 7. SCROLL DA LISTA DE VENCIMENTOS (INVISÍVEL/ELEGANTE) */
#lista-vencimentos {
    max-height: 280px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Scroll suave nativo no iOS */
    padding-right: 5px;
}

#lista-vencimentos::-webkit-scrollbar { width: 4px; }
#lista-vencimentos::-webkit-scrollbar-track { background: transparent; }
#lista-vencimentos::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 10px;
}

/* 8. BOTTOM NAVIGATION ESTILO APP */
.bottom-nav {
   position: fixed;
    bottom: 25px; /* Afasta do fundo (seguro para a barra do iPhone) */
    left: 20px;
    right: 20px;
    height: 75px;
    background: rgba(15, 20, 35, 0.85); /* Fundo um pouco mais sólido para contraste */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08); /* Borda muito sutil, Apple Style */
    border-radius: 40px; /* Pílula totalmente redonda */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
    padding: 0 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6), 0 0 15px rgba(0, 240, 255, 0.05);
    user-select: none;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    flex: 1;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s;
}

.nav-item.active svg {
    transform: translateY(-2px) scale(1.1); /* Ícone pula levemente quando ativo */
    filter: drop-shadow(0 0 8px var(--color-primary));
}

.nav-item span {
    font-size: 0.65em;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* BOTÃO FLUTUANTE CENTRAL (+) */
.fab-container {
    position: relative;
    top: -25px;
    z-index: 1000;
}

.fab-main {
    width: 60px;
    height: 62px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center; 
    font-weight: bold;
    color: var(--text-light);
    box-shadow: 0 5px 20px var(--color-primary);
    transition: transform 0.2s;
    user-select: none;
}
.fab-main svg {
    width: 33px;
    height: 33px;
}
.fab-main:active { transform: scale(0.9); }

/* MENU FLUTUANTE (SUBMENU) */
.fab-menu {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    transform-origin: bottom center;
    background: rgba(15, 20, 35, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 170px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.7);
}

.fab-menu.active { transform: translateX(-50%) scale(1); }

.fab-menu div {
  padding: 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fab-menu div:active { background: rgba(0, 240, 255, 0.2); }
.fab-menu div:last-child { border-bottom: none; }

/* FIM - ESTILO MOBILE APP (DARK/NEON) */
/* INÍCIO - SCROLL LISTA DE VENCIMENTOS */
#lista-vencimentos {
    max-height: 380px; /* Limita a altura máxima (ajuste se quiser maior ou menor) */
    overflow-y: auto;  /* Ativa o scroll vertical apenas quando necessário */
    padding-right: 10px; /* Dá um respiro para o scroll não colar no texto */
}

/* Customização do Scrollbar para o Tema Futurista (Dark/Neon) */
#lista-vencimentos::-webkit-scrollbar {
    width: 2px;
}

#lista-vencimentos::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

#lista-vencimentos::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 10px;
    box-shadow: 0 0 8px var(--color-primary);
}

#lista-vencimentos::-webkit-scrollbar-thumb:hover {
    background: #fff; /* Fica branco ao passar o dedo/mouse */
}
/* FIM - SCROLL LISTA DE VENCIMENTOS */


/* INÍCIO - ESTILO PREMIUM PARA AÇÕES DE PARCELA */
.acoes-parcela {
    display: flex;
    gap: 8px; /* Espaço entre os botões */
    align-items: center;
}

/* Botões Quadrados de Ícone (Baixar e Excluir Individual) */
.btn-action {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
}

.btn-action:active {
    transform: scale(0.85); /* Efeito de apertar o botão */
}

/* Variante Sucesso (Baixar - Verde) */
.btn-action.success {
    color: #00ff88;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.05);
}
.btn-action.success:active {
    background: rgba(0, 255, 136, 0.1);
    border-color: #00ff88;
}

/* Variante Perigo (Excluir - Vermelho) */
.btn-action.danger {
    color: #ff4444;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.05);
}
.btn-action.danger:active {
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff4444;
}

/* Botão de Excluir Massa (Excluir a Cobrança Inteira) */
.btn-mass-danger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 68, 68, 0.05);
    border: 1px solid rgba(255, 68, 68, 0.15);
    color: #ff4444;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.btn-mass-danger:active {
    background: rgba(255, 68, 68, 0.15);
    transform: scale(0.98);
}
/* FIM - ESTILO PREMIUM PARA AÇÕES DE PARCELA */