/* assets/css/style.css - TEMA TRENDZ FINAL (CORREÇÃO DE BURACOS E NAV) */

:root {
    /* --- CORES BASE DO TEMA TRENDZ (DARK/LIME GREEN) --- */
    --bg-app: #0f0f0f;         /* Fundo da tela inteira (Preto) */
    --bg-card: #1c1c1c;        /* Fundo dos modais e cards (Cinza Escuro) */
    --bg-input: #262626;       /* Fundo de inputs e rows internas */
    --primary: #bcfd49;        /* Verde Lima Neon (Trendz) */
    --primary-dark: #9acc3b;   /* Verde Lima Escuro para hover */
    --success: #10B981;        /* Verde (SIM) */
    --danger: #EF4444;         /* Vermelho (NÃO) */
    --warning: #F59E0B;        /* Amarelo/Laranja Alertas */
    
    --text-main: #FFFFFF;      /* Texto Branco Principal */
    --text-sub: #A3A3A3;       /* Texto Cinza Secundário */
    
    --shadow: 0 4px 15px rgba(0,0,0,0.5); /* Sombra densa */
    --border-color: #2a2a2a;   /* Borda sutil */
    --radius-lg: 16px; 
    
    --gold: #F59E0B;
    --silver: #CBD5E1;
    --bronze: #D97706;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; -webkit-tap-highlight-color: transparent; }

body { 
    background-color: var(--bg-app) !important; 
    color: var(--text-main) !important; 
    overflow-x: hidden; 
    /* Remove padding-bottom exagerado que vinha de antes */
}

.hidden { display: none !important; }

/* =========================================================
   HEADER E CORREÇÃO DE MARGENS (ZERO BURACOS)
   ========================================================= */
.app-header {
    position: fixed; 
    top: 0; left: 0; right: 0; 
    height: 60px !important; /* Altura exata travada */
    background: var(--bg-app) !important; 
    border-bottom: 1px solid var(--border-color); 
    z-index: 3000 !important; 
    padding: 0 15px; 
    display: flex; align-items: center; justify-content: space-between;
}

/* Bolha de Saldo */
.balance-pill { 
    background: var(--bg-card); padding: 8px 16px; border-radius: 100px; 
    font-weight: 800; font-size: 0.9rem; color: var(--text-main); border: 1px solid var(--border-color); cursor: pointer;
    display: flex; align-items: center; gap: 5px;
}
.balance-pill span { color: var(--primary); }

/* =========================================================
   AUTH SCREEN (LOGIN E CADASTRO)
   ========================================================= */
#auth-screen { 
    position: fixed; top:0; left:0; width:100%; height:100%; 
    background: linear-gradient(135deg, #0f0f0f 0%, #1c1c1c 100%); 
    z-index:9999; display:flex; flex-direction:column; justify-content:center; align-items: center;
    padding: 20px; overflow-y:auto; transition: 0.3s; 
}

.auth-card-container {
    width: 100%; max-width: 400px;
    background: var(--bg-card);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    text-align: center;
    animation: slideUpFade 0.5s ease-out;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-logo { 
    max-width: 250px; width: 100%; height: auto; display: block; 
    margin: 0 auto 20px auto; background-color: transparent; padding: 0; 
}

.std-input { 
    width: 100%; padding: 0 20px; height: 55px; margin-bottom: 15px; 
    background: var(--bg-input); border: 1px solid var(--border-color); 
    border-radius: 12px; font-size: 1rem; color: var(--text-main);
    outline: none; transition: 0.3s; font-weight: 500;
}
.std-input:focus {
    background: var(--bg-card); border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(188, 253, 73, 0.2);
}

.auth-title { color: var(--text-main); font-weight: 800; font-size: 1.5rem; margin-bottom: 5px; }
.auth-subtitle { color: var(--text-sub); margin-bottom: 30px; font-size: 0.95rem; }
.auth-toggle { text-align: center; margin-top: 25px; color: var(--text-sub); font-size: 0.9rem; cursor: pointer; }
.auth-toggle strong { color: var(--primary); font-weight: 700; }

/* =========================================================
   MENU LATERAL E OVERLAY
   ========================================================= */
.sidebar-overlay { 
    position: fixed; inset: 0; 
    background: rgba(0,0,0,0.7); 
    z-index: 4500 !important; 
    opacity: 0; pointer-events: none; transition: 0.3s; backdrop-filter: blur(4px); 
}
.sidebar-overlay.open, .sidebar-overlay.show { opacity: 1; pointer-events: all; }

.sidebar { 
    position: fixed; top: 0; left: -280px; width: 280px; height: 100%; 
    background: var(--bg-card); border-right: 1px solid var(--border-color); 
    z-index: 5000 !important; 
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; 
    box-shadow: 20px 0 50px rgba(0,0,0,0.5); 
}
.sidebar.open, .sidebar.show { left: 0; }

.sidebar-header { padding: 30px 25px; border-bottom: 1px solid var(--border-color); background: var(--bg-app); }
.user-avatar { width: 60px; height: 60px; background: var(--bg-input); border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 15px; color: var(--primary); }
.sidebar-menu { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.sidebar-link { display: flex; align-items: center; gap: 15px; padding: 14px; border-radius: 12px; color: var(--text-main); font-weight: 600; font-size: 1rem; cursor: pointer; transition: 0.2s; }
.sidebar-link:active { background: var(--bg-input); }
.sidebar-footer { padding: 20px; border-top: 1px solid var(--border-color); }

/* =========================================================
   MENU INFERIOR (BOTTOM NAV)
   ========================================================= */
.bottom-nav { 
    position: fixed; bottom: 0; left: 0; width: 100%; height: 70px; 
    background: var(--bg-app); border-top: 1px solid var(--border-color); 
    display: flex; justify-content: space-around; align-items: center; 
    z-index: 2500 !important; border-radius: 0; 
}
.nav-item { 
    font-size: 1.4rem; color: var(--text-sub); cursor: pointer; 
    display: flex; flex-direction: column; align-items: center; justify-content: center; width: 20%; transition: 0.3s;
}
.nav-item span { font-size: 0.65rem; font-weight: 600; margin-top: 5px; }
.nav-item.active { color: var(--text-main); }
.nav-notification { position: relative; }
.nav-notification::after { content: ''; position: absolute; top: 12px; right: 22px; width: 8px; height: 8px; background: var(--primary); border-radius: 50%; border: 2px solid var(--bg-app); }

/* =========================================================
   RANKING, MISSÕES, PERFIL E COMPROVANTE (ESTILOS EXISTENTES)
   ========================================================= */
.rank-item { display: flex; align-items: center; justify-content: space-between; background: var(--bg-card); padding: 15px; margin-bottom: 10px; border-radius: 16px; border: 1px solid var(--border-color); }
.rank-pos { font-size: 1.2rem; font-weight: 800; width: 35px; text-align: center; color: var(--text-sub); }
.rank-1 { color: var(--gold); font-size: 1.6rem; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.rank-2 { color: var(--silver); font-size: 1.4rem; }
.rank-3 { color: var(--bronze); font-size: 1.3rem; }
.rank-info { flex: 1; margin-left: 10px; }
.rank-name { font-weight: 700; color: var(--text-main); }
.rank-lbl { font-size: 0.75rem; color: var(--text-sub); }

.goal-card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 15px; border: 1px solid var(--border-color); }
.progress-bg { height: 8px; background: var(--bg-app); border-radius: 10px; margin: 15px 0 10px 0; overflow: hidden; position: relative; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 10px; transition: width 1s ease; }
.btn-claim { background: var(--primary); color: #000; border: none; padding: 8px 18px; border-radius: 100px; font-weight: 800; font-size: 0.8rem; cursor: pointer; transition: 0.2s; }
.btn-claim:disabled { background: var(--bg-input); color: var(--text-sub); }

.profile-header { background: var(--bg-card); border-radius: 20px; padding: 30px 20px; text-align: center; margin-bottom: 20px; border: 1px solid var(--border-color); }
.profile-avatar { width: 90px; height: 90px; background: var(--bg-input); border: 1px solid var(--primary); color: var(--primary); border-radius: 50%; margin: 0 auto 15px; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.profile-stats-row { display: flex; justify-content: space-around; margin-top: 25px; border-top: 1px dashed var(--border-color); padding-top: 20px; }
.p-stat { text-align: center; }
.p-stat-val { font-weight: 800; font-size: 1.1rem; color: var(--text-main); }
.p-stat-lbl { font-size: 0.75rem; color: var(--text-sub); text-transform: uppercase; font-weight: 600; }

.wallet-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 20px; padding: 25px; margin-bottom: 20px; }
.wallet-balance { font-size: 2.5rem; font-weight: 700; margin: 5px 0 20px 0; color: var(--success); }
.wallet-actions { display: flex; gap: 12px; margin-bottom: 25px; }
.action-btn { flex: 1; padding: 15px; border-radius: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.95rem; }
.btn-deposit { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.btn-withdraw { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }

/* TOAST E BILHETE */
#toast { position: fixed; top: 80px; left: 50%; transform: translate(-50%, -20px); background: var(--bg-card); color: var(--text-main); padding: 12px 24px; border-radius: 50px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-color); transition: 0.3s; z-index: 9999; opacity: 0; pointer-events: none; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }

.modern-ticket { width: 380px; background: var(--bg-app); border-radius: 24px; overflow: hidden; position: relative; color: var(--text-main); border: none; }
.ticket-header { background: var(--bg-card); padding: 25px; text-align: center; border-bottom: 1px dashed var(--border-color); }
.ticket-logo-text { font-size: 1.6rem; font-weight: 800; margin: 0; }
.ticket-sub { font-size: 0.85rem; color: var(--text-sub); }
.ticket-body { padding: 25px; background: var(--bg-app); }
.tk-label { color: var(--text-sub); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.tk-event { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; color: var(--text-main); }
.tk-choice-box { display: flex; justify-content: space-between; align-items: center; background: var(--bg-card); padding: 15px; border-radius: 12px; margin-bottom: 20px; }
.tk-val-big { font-size: 1.2rem; font-weight: 700; color: var(--text-main); }
.tk-green { color: var(--success); }

/* ==========================================
   ADAPTAÇÃO PARA DESKTOP (PC) - IDENTICO À IMAGEM
   ========================================== */
@media (min-width: 768px) {
    /* A bottom nav fica flutuante no estilo Trendz no Desktop */
    .bottom-nav {
        max-width: 500px !important; 
        left: 50% !important; right: auto !important; transform: translateX(-50%) !important;
        border-radius: 25px !important; 
        bottom: 20px !important; 
        height: 70px !important; 
        padding: 0 15px !important; 
        border: 1px solid var(--border-color) !important;
        background: rgba(15, 15, 15, 0.9) !important;
        backdrop-filter: blur(10px);
    }
    
    /* Garante que o header fique bonito no Desktop */
    .app-header { padding: 0 60px !important; height: 60px !important; }
    
    /* Modais ficam flutuantes e não grudados no rodapé */
    .sheet-container { border-radius: 24px !important; min-height: auto !important; max-height: 85vh; border: 1px solid var(--border-color) !important; }
}