/* ==========================================================================
   PONTUS PRO - MASTER STYLE SHEET (FULL UNIFIED VERSION)
   Cobre: Admin, Dashboard, Portal do Atleta, Suporte e Landing Pages.
   ========================================================================== */

:root {
    /* Identidade Dinâmica (Injetada pelo PHP no Header) */
    --primary: #f4665c;
    --primary-hover: #d61a2a;
    --icon-bg: rgba(244, 102, 92, 0.1);
    
    /* Cores de Sistema */
    --bg-light: #f8fafc;
    --bg-auth: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --accent: #ead300;
    
    /* Ranking Colors */
    --gold: #fef3c7; --gold-text: #92400e;
    --silver: #f1f5f9; --silver-text: #475569;
    --bronze: #ffedd5; --bronze-text: #9a3412;
}

/* --- SOBRESCRITA DE AUXILIARES DO BOOTSTRAP PARA DINAMISMO --- */
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }

/* 1. RESET & BASE */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    margin: 0;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

.fw-800 { font-weight: 800; }
.fw-900 { font-weight: 900; }
.small-caps { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }

/* 2. LAYOUT - NAVEGAÇÃO & HEADER */
.navbar-pnt, .navbar-athlete {
    background: white !important;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1050;
    min-height: 65px;
}

.btn-lang-toggle {
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 50px;
    transition: 0.2s;
    text-transform: uppercase;
}

.btn-lang-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* 3. DASHBOARD COMPONENTS */
.welcome-section { padding: 1.5rem 1rem 1rem; }

.plan-badge { 
    display: inline-block; padding: 4px 12px; border-radius: 20px; 
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase; 
    margin-bottom: 1.5rem; background: var(--icon-bg); 
    color: var(--primary); border: 1px solid rgba(244, 102, 92, 0.2); 
}

/* Grids e Menu Cards */
.menu-grid { 
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; 
    padding: 0 15px; max-width: 600px; margin: 0 auto; 
}

.menu-card { 
    background: white; border-radius: 24px; padding: 20px 10px; 
    text-decoration: none; transition: 0.3s; border: 1px solid var(--border-color); 
    display: flex; flex-direction: column; align-items: center; text-align: center; 
    gap: 12px; color: inherit; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
    position: relative;
}

.menu-card:hover { 
    transform: translateY(-5px); 
    border-color: var(--primary); 
    box-shadow: 0 10px 15px -3px rgba(244, 102, 92, 0.1); 
}

.menu-card h3 { font-size: 0.85rem; margin: 0; font-weight: 800; color: var(--text-main); }
.menu-card p { font-size: 0.65rem; margin: 0; color: var(--text-muted); font-weight: 500; }

.icon-box, .menu-icon { 
    width: 50px; height: 50px; border-radius: 16px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 1.3rem; flex-shrink: 0; 
    background: var(--icon-bg); color: var(--primary); 
}

/* 4. TRIAL & ONBOARDING ALERT */
.trial-card { 
    background: white; border-radius: 24px; padding: 20px; border: 1px solid var(--border-color); 
    margin: 0 15px 25px; max-width: 570px; margin-left: auto; margin-right: auto; 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.trial-label { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; color: #94a3b8; }
.trial-days { font-weight: 800; color: var(--text-main); font-size: 0.85rem; }

.progress-trial { height: 8px; background-color: #f1f5f9; border-radius: 10px; overflow: hidden; margin: 10px 0; }
.progress-trial-bar { height: 100%; background: linear-gradient(90deg, var(--primary) 0%, #fca5a5 100%); border-radius: 10px; }

.onboarding-alert { 
    background: #fffbeb; border: 1px solid #fef3c7; border-radius: 20px; 
    padding: 15px; margin-bottom: 20px; display: flex; align-items: center; 
    gap: 15px; max-width: 600px; margin-left: auto; margin-right: auto; 
}

.pulse-membros { 
    animation: pulse-border 2s infinite; 
    border-color: var(--primary) !important; 
    border-width: 2px !important; 
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(244, 102, 92, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(244, 102, 92, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 102, 92, 0); }
}

/* 5. GESTÃO DE TORNEIOS & JOGOS */
.tournament-card, .tournament-item {
    background: white; border-radius: 28px; padding: 22px;
    border: 1px solid var(--border-color); margin-bottom: 20px;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; overflow: hidden;
}

.tournament-card:hover { transform: translateY(-8px); border-color: var(--primary); }

.status-pill {
    font-size: 0.6rem; font-weight: 800; text-transform: uppercase;
    padding: 5px 12px; border-radius: 50px; letter-spacing: 0.5px;
}

.badge-pnt-aberto { background-color: #ecfdf5 !important; color: #10b981 !important; border: 1px solid #d1fae5; }
.badge-pnt-andamento { background-color: var(--primary) !important; color: white !important; }
.badge-pnt-encerrado { background-color: #1e293b !important; color: white !important; }
.badge-pnt-finalizado { background-color: #f1f5f9 !important; color: #94a3b8 !important; }

/* 6. RANKINGS (PÓDIO E EXTRATOS) */
.rank-pos {
    width: 35px; height: 35px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85rem;
}

.pos-1 { background: var(--gold); color: var(--gold-text); border: 1px solid #fef08a; }
.pos-2 { background: var(--silver); color: var(--silver-text); border: 1px solid var(--border-color); }
.pos-3 { background: var(--bronze); color: var(--bronze-text); border: 1px solid #ffedd5; }

.extrato-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 15px; background: #f8fafc; border-radius: 12px; margin-bottom: 8px;
}
.extrato-pts-val { font-weight: 800; color: var(--success); }
.badge-fase { font-size: 0.65rem; background: #e2e8f0; padding: 2px 8px; border-radius: 4px; font-weight: 700; }

/* 7. FORMULÁRIOS & BOTÕES */
.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
    border-radius: 15px; font-weight: 700;
    padding: 12px 24px; transition: 0.3s;
}

.btn-primary:hover { background-color: #212529 !important; transform: translateY(-2px); }

.form-control, .form-select {
    border-radius: 12px; padding: 12px 15px; border: 1px solid var(--border-color);
    font-size: 0.9rem; transition: 0.2s;
}

.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--icon-bg); }

/* Planos */
.plan-item { 
    border: 2px solid var(--border-color); border-radius: 16px; 
    padding: 15px; margin-bottom: 12px; display: flex; 
    align-items: center; justify-content: space-between; 
    cursor: pointer; transition: 0.2s; 
}
.plan-item.active { border-color: var(--primary); background: rgba(244, 102, 92, 0.05); }

/* 8. SUPORTE & CHAT */
.chat-container {
    height: 450px; overflow-y: auto; padding: 20px;
    background: #f1f5f9; border-radius: 20px;
}

.msg-bubble {
    max-width: 85%; padding: 12px 18px; border-radius: 20px;
    margin-bottom: 15px; font-size: 0.9rem; position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.msg-user { background: var(--primary); color: white; margin-left: auto; border-bottom-right-radius: 4px; }
.msg-admin { background: white; color: var(--text-main); margin-right: auto; border-bottom-left-radius: 4px; border: 1px solid var(--border-color); }

/* 9. TOASTS & NOTIFICAÇÕES */
.pnt-toast { 
    background: white; border-radius: 20px; padding: 15px 20px; 
    box-shadow: 0 15px 30px rgba(0,0,0,0.1); border: 1px solid var(--border-color); 
    display: flex; align-items: center; gap: 12px;
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    z-index: 2000; display: none;
}

/* 10. ESTADOS ESPECÍFICOS */
.card-locked, .in-progress-disabled { 
    opacity: 0.5; cursor: not-allowed !important; filter: grayscale(0.8); pointer-events: none; 
}

/* 11. RESPONSIVIDADE (MEDIA QUERIES ORIGINAIS) */
@media (max-width: 767px) {
    .menu-grid { grid-template-columns: repeat(2, 1fr); }
    .navbar-pnt { padding: 10px 15px; }
    .welcome-section h2 { font-size: 1.25rem; }
}

@media (min-width: 768px) { 
    .menu-grid { gap: 20px; max-width: 800px; grid-template-columns: repeat(2, 1fr); } 
    .menu-card { flex-direction: row; text-align: left; padding: 1.25rem; gap: 1.25rem; } 
    .menu-card h3 { font-size: 1rem; } 
    .menu-card p { font-size: 0.8rem; } 
    .icon-box { width: 54px; height: 54px; } 
}

/* 12. ANIMAÇÕES EXTRAS */
.animate-in { animation: fadeInUp 0.5s ease forwards; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 13. COMPONENTES ESPECÍFICOS DO PORTAL PÚBLICO (GRUPOS) */
.header-live {
    background: white; padding: 30px 20px; text-align: center;
    border-radius: 0 0 32px 32px; border-bottom: 1px solid var(--border-color);
}

.match-row {
    border-top: 1px solid #f1f5f9; padding: 15px 18px;
    display: flex; align-items: center; justify-content: space-between;
}

.logo-img-live { max-height: 160px; object-fit: contain; }

/* 14. COMPONENTES DO APP SELECTOR (app.php) */
.app-card { 
    background: white; border-radius: 35px; padding: 40px 30px; 
    border: 1px solid rgba(226, 232, 240, 0.8); 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    height: 100%; display: flex; flex-direction: column; 
    align-items: center; text-align: center; text-decoration: none; color: inherit;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.02);
}
.app-card:hover { 
    border-color: var(--primary); transform: translateY(-12px); 
    box-shadow: 0 20px 40px -10px rgba(244, 102, 92, 0.15); 
}
.app-icon-box { 
    width: 280px; height: 280px; display: flex; align-items: center; 
    justify-content: center; margin-bottom: 25px; transition: 0.3s;
    overflow: hidden; padding: 12px;
}
.app-icon-box img { width: 100%; height: 100%; object-fit: contain; }
.app-card:hover .app-icon-box { transform: scale(1.1) rotate(5deg); }