/* ============================================================
   Redesign Premium Infotech - UI Igualzinha à Imagem
   ============================================================ */

:root {
    --color-primary: #00D84A; /* Verde */
    --color-secondary: #0057FF; /* Azul */
    --color-highlight: #FFD400; /* Amarelo */
    
    --bg-main: #F5F7FA;
    --bg-card: #FFFFFF;
    
    --text-main: #0F172A;
    --text-sub: #64748B;
    
    --border-color: #E2E8F0;
    --radius-premium: 24px;
}

body {
    background-color: var(--bg-main) !important;
    font-family: 'Inter', sans-serif !important;
    color: var(--text-main) !important;
}

/* ============================================================
   1. Tabs
   ============================================================ */
.tabs {
    background: var(--bg-card) !important;
    border-radius: 16px !important;
    padding: 6px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid var(--border-color) !important;
    display: flex !important;
    gap: 4px !important;
    margin: 16px 12px !important;
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.tab {
    color: var(--text-sub) !important;
    font-weight: 600 !important;
    padding: 12px 8px !important;
    border-radius: 12px !important;
    border: none !important;
    background: transparent !important;
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    font-size: 13px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.tab:hover {
    color: var(--color-primary) !important;
    background: rgba(0, 216, 74, 0.06) !important;
}

@media (max-width: 480px) {
    .tabs {
        margin: 12px 8px !important;
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
        padding: 5px !important;
        border-radius: 14px !important;
    }
    .tab {
        padding: 10px 4px !important;
        font-size: 11.5px !important;
        gap: 3px !important;
        border-radius: 10px !important;
    }
}

.tab:last-child {
    border-right: none !important;
}

.tab.tab--active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #00c853, #00D84A) !important;
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.3) !important;
    transform: none !important;
    font-weight: 700 !important;
}

.tab.tab--active::after {
    display: none;
}

/* ============================================================
   2. Page Header / Section Title
   ============================================================ */
.page-header__title {
    font-weight: 800 !important;
    color: var(--text-main) !important;
    font-size: 1.3rem !important;
    background: var(--bg-card) !important;
    padding: 20px 24px !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important;
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    margin: 8px 0 0 0 !important;
}

/* Oculta emoji original do HTML se existir, vamos focar no container icon */
.page-header__title::before {
    content: '📅';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    background: var(--color-secondary);
    border-radius: 12px;
    color: white;
    font-size: 1.4rem;
    margin-right: 16px;
    box-shadow: 0 4px 10px rgba(0, 87, 255, 0.2);
}

.page-header__title::after {
    content: '';
    position: absolute;
    bottom: 14px; left: 88px;
    width: 60px; height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--color-primary) 33%, var(--color-highlight) 33%, var(--color-highlight) 66%, var(--color-secondary) 66%);
}

/* ============================================================
   3. Group Filters
   ============================================================ */
.group-filter {
    padding: 12px 4px !important;
    gap: 12px !important;
}

.group-filter__btn, .bracket-filter__btn {
    border-radius: 50px !important;
    padding: 10px 24px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-sub) !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02) !important;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap !important;
    scroll-snap-align: start !important;
    flex-shrink: 0 !important;
}

.group-filter__btn--active {
    background: var(--color-primary) !important;
    color: #FFFFFF !important;
    border-color: transparent !important;
    box-shadow: 0 4px 15px rgba(0, 216, 74, 0.3) !important;
}

.group-filter__btn--active::before {
    content: url('data:image/svg+xml;utf8,<svg fill="none" stroke="white" stroke-width="2" viewBox="0 0 24 24" width="16" height="16"><path d="M22 3H2l8 9.46V19l4 2v-8.54L22 3z"/></svg>');
    display: inline-block;
    width: 16px; height: 16px;
}

.group-filter-nav {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03) !important;
    border-radius: 50% !important;
    width: 40px !important; height: 40px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    color: var(--text-main) !important;
}

/* ============================================================
   4. Group Header Card
   ============================================================ */
.grupo-section {
    background: var(--bg-card) !important;
    border-radius: var(--radius-premium) !important;
    border: 1px solid rgba(0,0,0,0.02) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04) !important;
    padding: 0 !important;
    margin-bottom: 24px !important;
    position: relative;
    overflow: hidden;
}

.grupo-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 16px; height: 100%;
    background: var(--color-secondary);
    border-radius: var(--radius-premium) 0 0 var(--radius-premium);
    z-index: 1;
}

.grupo-section-title {
    background: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 24px 24px 24px 44px !important; /* Espaço para borda lateral */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

.grupo-section-title h3 {
    margin: 0;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
    padding-left: 68px; /* Espaço para o escudo */
}

/* Outer Shield (Green) */
.grupo-section-title h3::before {
    content: '';
    position: absolute;
    left: 0; top: 50%; transform: translateY(-50%);
    width: 52px; height: 60px;
    background: var(--color-primary);
    clip-path: polygon(0 0, 100% 0, 100% 75%, 50% 100%, 0 75%);
    z-index: 1;
}

/* Inner Shield (Blue) with letter */
.grupo-section-title h3::after {
    position: absolute;
    left: 4px; top: 50%; margin-top: -26px;
    width: 44px; height: 52px;
    background: var(--color-secondary);
    clip-path: polygon(0 0, 100% 0, 100% 75%, 50% 100%, 0 75%);
    color: white; font-size: 1.6rem; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    padding-bottom: 4px;
    z-index: 2;
}

/* Letras por grupo via CSS baseada na hierarquia.
   Assumindo os Data-atributos do grupo no HTML. */
.grupo-section[data-grupo="A"] .grupo-section-title h3::after { content: 'A'; }
.grupo-section[data-grupo="B"] .grupo-section-title h3::after { content: 'B'; }
.grupo-section[data-grupo="C"] .grupo-section-title h3::after { content: 'C'; }
.grupo-section[data-grupo="D"] .grupo-section-title h3::after { content: 'D'; }
.grupo-section[data-grupo="E"] .grupo-section-title h3::after { content: 'E'; }
.grupo-section[data-grupo="F"] .grupo-section-title h3::after { content: 'F'; }
.grupo-section[data-grupo="G"] .grupo-section-title h3::after { content: 'G'; }
.grupo-section[data-grupo="H"] .grupo-section-title h3::after { content: 'H'; }
.grupo-section[data-grupo="I"] .grupo-section-title h3::after { content: 'I'; }
.grupo-section[data-grupo="J"] .grupo-section-title h3::after { content: 'J'; }
.grupo-section[data-grupo="K"] .grupo-section-title h3::after { content: 'K'; }
.grupo-section[data-grupo="L"] .grupo-section-title h3::after { content: 'L'; }

.grupo-section-title span {
    font-size: 0.9rem !important;
    color: var(--text-sub) !important;
    background: transparent !important;
    padding: 0 !important; 
    margin-left: 68px !important;
    margin-top: 4px !important;
    display: flex; align-items: center; gap: 6px;
}

.grupo-section-title span::before {
    content: '⚽';
    font-size: 0.8rem;
    filter: grayscale(100%) opacity(0.6);
}

/* Trophy Watermark */
.grupo-section-title::before {
    content: '';
    position: absolute;
    right: 32px; top: 50%; transform: translateY(-50%);
    width: 64px; height: 64px;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23E2E8F0" viewBox="0 0 24 24"><path d="M19 5h-2V3H7v2H5c-1.1 0-2 .9-2 2v1c0 2.55 1.92 4.63 4.39 4.94A5.01 5.01 0 0011 15.9V19H7v2h10v-2h-4v-3.1a5.01 5.01 0 003.61-2.96C19.08 12.63 21 10.55 21 8V7c0-1.1-.9-2-2-2zM5 8V7h2v3.82C5.84 10.4 5 9.3 5 8zm14 0c0 1.3-.84 2.4-2 2.82V7h2v1z"/></svg>');
    background-size: contain; background-repeat: no-repeat;
    opacity: 0.6; pointer-events: none; z-index: 0;
}

/* ============================================================
   5. Rodadas Stepper (Timeline)
   ============================================================ */
.rodada-stepper {
    position: relative; 
    margin: 32px 24px !important; 
    display: flex; 
    justify-content: space-between;
}

.rodada-stepper::before {
    content: ''; 
    position: absolute;
    top: 32px; left: 15%; right: 15%;
    height: 2px;
    border-top: 2px dashed #CBD5E1;
    background: transparent;
    z-index: 0;
}

.rodada-stepper__step {
    flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; z-index: 1;
}

.rodada-stepper__step-indicator {
    width: 64px !important; height: 64px !important;
    border-radius: 50% !important;
    background: #E8EDF2 !important;
    color: var(--text-main) !important;
    font-size: 1.6rem !important; font-weight: 800 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    border: none !important;
    box-shadow: inset 0 0 0 4px #FFFFFF !important;
    position: relative;
    margin-bottom: 12px;
}

.rodada-stepper__step--active .rodada-stepper__step-indicator {
    background: var(--color-primary) !important;
    color: white !important;
    box-shadow: inset 0 0 0 4px #FFFFFF, 0 0 0 2px var(--color-primary) !important;
}

.rodada-stepper__step--active .rodada-stepper__step-indicator::after {
    content: '⚽';
    position: absolute;
    top: -4px; right: -4px;
    width: 24px; height: 24px;
    background: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.rodada-stepper__step-content {
    display: flex;
    flex-direction: column;
}

.rodada-stepper__step-content .rodada-stepper__step-label {
    font-weight: 800 !important; 
    font-size: 0.95rem !important; 
    color: var(--color-secondary) !important; 
    text-transform: uppercase;
}

.rodada-stepper__step--active .rodada-stepper__step-content .rodada-stepper__step-label {
    color: var(--color-primary) !important;
}

.rodada-stepper__step-content .rodada-stepper__step-date {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    font-size: 0.8rem !important; color: var(--text-sub) !important; margin-top: 4px;
}

.rodada-stepper__step-content .rodada-stepper__step-date::before {
    content: '📅'; font-size: 0.8rem; opacity: 0.6;
}

/* ============================================================
   6. Match Round Title ("1ª RODADA")
   ============================================================ */
.rodada-title {
    background: #E8F8EE !important;
    color: var(--color-primary) !important;
    font-weight: 800 !important; text-transform: uppercase !important; font-size: 1.1rem !important;
    padding: 16px 24px !important;
    border-radius: 16px !important;
    display: flex; align-items: center; gap: 12px;
    margin: 24px 24px 16px 24px !important;
    position: relative;
    box-shadow: inset 0 -3px 0 rgba(0, 216, 74, 0.2);
}

.rodada-title::before {
    content: '⚽';
    background: #FFFFFF; width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: #000; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.rodada-title::after {
    content: '';
    position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
    width: 28px; height: 28px;
    background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%2300D84A" stroke-width="2.5" viewBox="0 0 24 24"><path d="M6 9l6 6 6-6"/></svg>');
    background-color: white; border-radius: 50%;
    background-size: 18px; background-position: center; background-repeat: no-repeat;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* ============================================================
   Match Cards base adjust to match new background
   ============================================================ */
.match-card--modern {
    margin: 0 24px 16px 24px !important;
    background: var(--bg-card) !important;
    border-radius: 20px !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
    padding: 0 !important;
}

@media (max-width: 768px) {
    .match-card--modern, .rodada-title {
        margin-left: 12px !important;
        margin-right: 12px !important;
    }
}

/* ============================================================
   Brasil Widget (Home)
   ============================================================ */
.brasil-widget-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 16px;
    padding: 14px 16px;
    color: #fff;
    margin: 0 12px 16px 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15), inset 0 1px 1px rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.brasil-widget-card::before {
    content: '';
    position: absolute;
    top: -40px; left: -40px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.bw-badge {
    position: absolute;
    top: 12px; right: 12px;
    font-size: 10px; font-weight: 800; text-transform: uppercase;
    padding: 3px 8px; border-radius: 20px;
    display: flex; align-items: center; gap: 4px;
    letter-spacing: 0.5px;
}

.bw-badge-live { background: rgba(239,68,68,0.2); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.bw-badge-scheduled { background: rgba(59,130,246,0.2); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.bw-badge-finished { background: rgba(148,163,184,0.2); color: #94a3b8; border: 1px solid rgba(148,163,184,0.3); }

.bw-pulse {
    width: 8px; height: 8px; background: #ef4444; border-radius: 50%;
    animation: pulse-red 1.5s infinite;
}
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
    70% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

.bw-header { margin-bottom: 14px; }
.bw-header h3 { font-size: 13px; font-weight: 700; color: #cbd5e1; margin: 0; display: flex; align-items: center; gap: 6px; }

.bw-match-area {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}

.bw-team { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bw-flag-wrap {
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(255,255,255,0.05); padding: 3px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1);
}
.bw-flag-wrap img { width: 100%; height: 100%; object-fit: contain; }
.bw-team-name { font-size: 11px; font-weight: 700; text-align: center; color: #f8fafc; }

.bw-center { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 80px; }
.bw-score-container { display: flex; align-items: center; gap: 8px; }
.bw-score { font-size: 24px; font-weight: 800; font-family: monospace; color: #fff; }
.bw-vs { font-size: 12px; color: #64748b; font-weight: 700; }

.bw-countdown-container { display: flex; gap: 4px; }
.bw-cd-item { display: flex; flex-direction: column; align-items: center; background: rgba(0,0,0,0.3); padding: 4px 6px; border-radius: 6px; min-width: 36px; border: 1px solid rgba(255,255,255,0.05); }
.bw-cd-val { font-size: 14px; font-weight: 800; font-family: monospace; color: #10b981; }
.bw-cd-lbl { font-size: 8px; color: #94a3b8; text-transform: uppercase; font-weight: 700; margin-top: 2px; }

.bw-details { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; align-items: center; }
.bw-detail-item { font-size: 11px; color: #94a3b8; display: flex; align-items: center; gap: 4px; }

.bw-whatsapp-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; padding: 10px;
    background: #25D366; color: #fff; text-decoration: none;
    border-radius: 10px; font-weight: 700; font-size: 13px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(37,211,102,0.25);
}
.bw-whatsapp-btn:hover { background: #128C7E; transform: translateY(-2px); }
