:root {
    --bg: #0d1117; --card: #161b22; --border: #30363d; --text: #e6edf3; --text-muted: #8b949e;
    --accent: #66fcf1; --gold: #f1c40f; --green: #238636; --red: #f85149; --pos: #a855f7;
    --home: #58a6ff; --away: #f0883e; --yellow-highlight: #f1c40f;
}

* { box-sizing: border-box; }
body { margin: 0; padding: 0; font-family: 'Inter', 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden; }
#toast { display: none; position: fixed; top: 20px; right: 20px; padding: 16px 24px; border-radius: 8px; z-index: 999; font-weight: bold; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }

/* ── HEADER ───────────────────────────────────────────── */
header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 24px; height: 62px;
    background: linear-gradient(180deg, #1c2128 0%, #161b22 100%);
    border-bottom: 1px solid #21262d;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 4px 24px rgba(0,0,0,0.55);
}
.logo-container { display: flex; align-items: center; gap: 14px; }
.logo-text { line-height: 1.15; }
.logo-main { display: block; font-size: 1.4rem; font-weight: 900; color: var(--gold); letter-spacing: 3px; }
.logo-sub  { display: block; font-size: 0.56rem; color: var(--accent); letter-spacing: 4px; text-transform: uppercase; font-weight: 600; margin-top: 2px; opacity: 0.75; }
.header-right { display: flex; gap: 10px; align-items: center; }
#heartbeat { font-size: 0.62rem; padding: 5px 12px; border-radius: 999px; font-weight: 700; letter-spacing: 0.4px; }
.hb-online { background: rgba(35,134,54,0.15); border: 1px solid rgba(35,134,54,0.5); color: var(--green); }
.hb-offline { background: rgba(248,81,73,0.15); border: 1px solid rgba(248,81,73,0.5); color: var(--red); }
.btn-bunker { background: var(--gold); color: #000; text-decoration: none; padding: 5px 12px; border-radius: 4px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.3px; }
.btn-logout { background: rgba(248,81,73,0.15); border: 1px solid rgba(248,81,73,0.4); color: var(--red); text-decoration: none; padding: 7px 18px; border-radius: 4px; font-size: 0.76rem; font-weight: 700; transition: background 0.2s; }
.btn-logout:hover { background: var(--red); color: #fff; }

/* ── TABS ─────────────────────────────────────────────── */
.tabs {
    display: flex; justify-content: space-between; align-items: stretch;
    padding: 0 20px; background: #0b0d12;
    border-bottom: 1px solid #1c2128;
    min-height: 44px;
    position: sticky; top: 62px; z-index: 99;
}
.tabs-left, .tabs-right { display: flex; align-items: stretch; }
.tabs-sep { width: 1px; background: #21262d; margin: 10px 6px; }
.tab-btn {
    background: none; border: none;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    color: #6e7681; padding: 0 18px;
    cursor: pointer; font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.8px; white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    height: 44px;
}
.tab-btn:hover { color: #c9d1d9; border-bottom-color: #3d4451; }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn-op.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ── SEARCH BAR ─────────────────────────────────────────── */
.search-container {
    position: relative;
    flex: 1;
    max-width: 380px;
    margin: 0 20px;
}
.search-bar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 7px 12px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.search-bar-inner:focus-within {
    background: #161b22;
    border-color: rgba(102,252,241,0.5);
    box-shadow: 0 0 0 3px rgba(102,252,241,0.06);
}
.search-bar-icon { font-size: 0.85rem; opacity: 0.45; flex-shrink: 0; line-height: 1; }
#search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #e6edf3;
    font-size: 0.85rem;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    min-width: 0;
}
#search-input::placeholder { color: #6e7681; }
#search-clear {
    background: none;
    border: none;
    color: #6e7681;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0 2px;
    display: none;
    line-height: 1;
    flex-shrink: 0;
}
#search-clear:hover { color: #e6edf3; }
#search-dropdown {
    position: absolute;
    left: 0; right: 0;
    top: calc(100% + 8px);
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
    max-height: 370px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 12px 40px rgba(0,0,0,0.65);
    z-index: 300;
}
#search-dropdown::-webkit-scrollbar { width: 4px; }
#search-dropdown::-webkit-scrollbar-track { background: transparent; }
#search-dropdown::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }
.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #21262d;
    cursor: default;
    transition: background 0.12s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(102,252,241,0.04); }
.search-result-info { flex: 1; min-width: 0; }
.search-result-tag {
    font-size: 0.66rem;
    font-weight: 700;
    color: #8b949e;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-result-tag .fire-icon { font-style: normal; }
.search-result-match {
    font-size: 0.88rem;
    font-weight: 700;
    color: #e6edf3;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-result-status {
    font-size: 0.7rem;
    color: #8b949e;
    display: block;
    margin-top: 1px;
}
.search-no-results {
    padding: 20px;
    text-align: center;
    color: #6e7681;
    font-size: 0.82rem;
}
.search-loading {
    padding: 16px;
    text-align: center;
    color: #8b949e;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
}
@media (max-width: 600px) {
    .search-container { max-width: 160px; margin: 0 10px; }
    #search-input { font-size: 0.78rem; }
}
@media (max-width: 480px) {
    .search-container { display: none; }
    .search-result-match { font-size: 0.83rem; }
    .search-result-item { padding: 9px 12px; gap: 8px; }
}

.view { padding: 15px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.match-card { background: var(--card); border: 2px solid #4a5568; padding: 14px; border-radius: 10px; position: relative; box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.match-card.pos-card { box-shadow: 0 0 14px rgba(239,68,68,0.35); }
.match-card.status-ft { opacity: 0.6; }
.match-card.pre-game::before {
    content: ''; position: absolute; inset: 0; border-radius: 8px;
    background: rgba(13,17,23,0.62); pointer-events: none;
    z-index: 1; transition: opacity 0.3s;
}
.match-card.pre-game.analysis-open::before { opacity: 0; }
.match-card.pre-game .analysis-btn { position: relative; z-index: 2; }
.status-line { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

.time-badge { background: #21262d; padding: 4px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: bold; color: var(--text); }

.score-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

/* Times: contexto secundário */
.team-name { font-size: 1rem; font-weight: 700; flex: 1; opacity: 0.9; display: flex; align-items: center; gap: 5px; }
.team-label { font-size: 0.82rem; line-height: 1.2; }
.team-logo  { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }

/* Placar: reduzido para não roubar foco */
.score-box { background: #000; color: var(--gold); font-weight: 900; font-size: 1.3rem; padding: 4px 10px; border-radius: 5px; margin: 0 8px; }

.ig-row { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 4px; font-weight: 600; }
.ig-row b { font-size: 1.1rem; }

.bar-bg { background: #21262d; height: 8px; border-radius: 999px; margin-bottom: 8px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width 0.5s; }

.ig-header-row { display: flex; justify-content: space-between; font-size: 0.78rem; font-weight: 700; margin-bottom: 4px; letter-spacing: 0.3px; }
.ig-header-row b { font-size: 1.05rem; margin-left: 4px; }
.sparkline-wrap { background: rgba(255,255,255,0.03); border-radius: 5px; padding: 4px 2px; margin-bottom: 8px; overflow: hidden; }
.sparkline-header { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.timeline-toggle-btn { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: 4px; color: #8b949e; font-size: 0.68rem; padding: 2px 8px; cursor: pointer; transition: background 0.15s; }
.timeline-toggle-btn:hover { background: rgba(255,255,255,0.13); color: #e6edf3; }
.timeline-wrap { background: rgba(255,255,255,0.03); border-radius: 5px; padding: 4px 2px; margin-bottom: 8px; max-height: 165px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.timeline-wrap::-webkit-scrollbar { width: 4px; }
.timeline-wrap::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
.tl-min { color: #555; font-size: 0.67rem; min-width: 26px; flex-shrink: 0; }
.tl-ev-row { display: flex; align-items: center; gap: 5px; padding: 4px 6px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.72rem; }
.tl-ev-row:last-child { border-bottom: none; }
.tl-ev-highlight { background: rgba(255,255,255,0.06); }
.tl-arrow { font-size: 0.85rem; flex-shrink: 0; width: 14px; text-align: center; font-weight: bold; }
.tl-desc { flex: 1; line-height: 1.3; }
.timeline-loading { display: block; text-align: center; color: #555; font-size: 0.72rem; padding: 14px 0; }

/* VERA: elemento principal do card */
.vera-box { padding: 14px 12px; border-radius: 8px; font-size: 1.05rem; font-weight: bold; margin: 8px 0 12px; text-align: center; line-height: 1.45; border: 1px solid; display: flex; flex-direction: column; gap: 5px; min-height: 115px; max-height: 180px; overflow: hidden; justify-content: center; }
.insight-headline { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.5px; line-height: 1.3; }
.insight-detail   { font-size: 0.75rem; font-weight: 400; opacity: 0.82; line-height: 1.4; }
.insight-stale    { display: block; font-size: 0.65rem; font-weight: 600; opacity: 0.5; letter-spacing: 0.5px; margin-bottom: 4px; }
.vera-box:has(.insight-stale) .insight-headline,
.vera-box:has(.insight-stale) .insight-detail { opacity: 0.45; }

/* ── IA NARRATIVE BOX (ia-v2) ───────────────────────────── */
.ia-vera-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: unset;
    max-height: 130px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
    justify-content: flex-start;
}
.ia-vera-headline {
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.4;
    letter-spacing: 0.3px;
}
.ia-vera-detail {
    font-size: 0.73rem;
    line-height: 1.45;
    opacity: 0.85;
    white-space: normal;
    word-break: normal;
}
.ia-loading {
    font-size: 0.75rem;
    font-style: italic;
    opacity: 0.5;
    animation: ia-pulse 1.4s ease-in-out infinite;
}
@keyframes ia-pulse {
    0%, 100% { opacity: 0.3; }
    50%       { opacity: 0.7; }
}

/* ── SEM DADOS (JOGO_RUIM ao vivo) ───────────────────── */
.ia-no-stats-box {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border-color: #4a5568 !important;
    background: transparent !important;
    color: #8b949e;
}
.ia-no-stats-icon  { font-size: 0.9rem; flex-shrink: 0; margin-top: 2px; }
.ia-no-stats-title { display: block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.4px; color: #8b949e; }
.ia-no-stats-sub   { display: block; font-size: 0.75rem; opacity: 0.7; line-height: 1.4; margin-top: 2px; }

footer { text-align: center; padding: 20px; color: var(--text-muted); font-size: 0.7rem; margin-top: 40px; }

/* ── GOAL TOAST ───────────────────────────────────────── */
#goal-toast {
    position: fixed;
    top: -70px;
    right: 20px;
    z-index: 9998;
    background: linear-gradient(135deg, #1c2128, #21262d);
    border: 1px solid var(--gold);
    border-left: 4px solid var(--gold);
    color: var(--text);
    padding: 11px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 24px rgba(0,0,0,0.55);
    transition: top 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    white-space: nowrap;
}
#goal-toast.show { top: 110px; }

/* ── GOAL BADGE NO CARD ───────────────────────────────── */
.goal-badge {
    position: absolute;
    top: -10px;
    right: 12px;
    background: var(--gold);
    color: #000;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.2px;
    pointer-events: none;
    z-index: 10;
    animation: goalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
               goalFade 0.4s ease 3s forwards;
}
@keyframes goalPop  { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes goalFade { from { opacity: 1; } to { opacity: 0; } }

/* ── PIN BUTTON (Picture-in-Picture) ───────────────────── */
.pin-btn {
    background: none; border: 1px solid transparent;
    border-radius: 4px; padding: 2px 5px;
    cursor: pointer; font-size: 0.85rem; line-height: 1;
    opacity: 0.45; transition: opacity 0.15s, border-color 0.15s, background 0.15s;
}
.pin-btn:hover { opacity: 0.85; border-color: #444; }
.pin-btn.active { opacity: 1; border-color: var(--gold); background: rgba(241,196,15,0.12); }

@media (max-width: 480px) {
    #goal-toast { right: 10px; left: 10px; white-space: normal; font-size: 0.8rem; }
    #goal-toast.show { top: 108px; }
}

.info-container { max-width: 1000px; margin: 0 auto; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 25px; line-height: 1.6; }
.info-header { display: flex; align-items: center; gap: 10px; color: var(--accent); margin-bottom: 20px; font-size: 1.3rem; font-weight: bold; }
.info-section { margin-bottom: 25px; }
.info-section h3 { font-size: 1.1rem; color: #fff; margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.info-section p { font-size: 1rem; }
.badge-market { background: #21262d; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); font-size: 0.75rem; font-weight: bold; margin-right: 5px; color: #fff; }
ul.info-list { list-style: none; padding: 0; }
ul.info-list li { margin-bottom: 14px; font-size: 1rem; line-height: 1.7; }
ul.info-list li b { white-space: nowrap; }

/* 📋 TABELA DE ESTADOS */
.estados-table-wrap { overflow-x: auto; }
.estados-table { width: 100%; border-collapse: collapse; }
.estados-table th { background: #21262d; color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.8px; padding: 10px 14px; text-align: left; border-bottom: 2px solid var(--border); }
.estados-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 0.97rem; line-height: 1.5; vertical-align: middle; }
.estados-table tr:last-child td { border-bottom: none; }
.estados-table tbody tr:not(.cat-row):hover td { background: rgba(255,255,255,0.03); }
.cat-row td { background: #1c2128; color: var(--text-muted); font-size: 0.72rem; font-weight: bold; letter-spacing: 1.2px; text-transform: uppercase; padding: 6px 14px; }
.ebadge { display: inline-block; padding: 4px 10px; border-radius: 6px; border: 1px solid; font-size: 0.82rem; font-weight: bold; white-space: nowrap; background: rgba(255,255,255,0.04); }

.list-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 10px; }
.list-item { background: var(--card); padding: 12px; border-radius: 8px; border: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.list-item.is-watched { border-color: var(--green); }
.pagination { display: none; justify-content: center; align-items: center; gap: 20px; margin: 20px 0; padding: 10px; background: var(--card); border-radius: 8px; }
.nav-btn { background: #21262d; border: 1px solid var(--border); color: #fff; padding: 8px 16px; cursor: pointer; border-radius: 5px; font-weight: bold; }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.fire-icon { font-size: 1.15rem; vertical-align: middle; margin-right: 3px; }
.btn-action { border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 0.7rem; width: 100px; }
.btn-monitor { background: var(--green); color: #fff; }
.btn-watching { background: #484f58; color: #fff; }
.btn-watching:hover { background: var(--red); }
.btn-watching:hover span { display: none; }
.btn-watching:hover::after { content: "REMOVER"; }
/* ── X REMOVER (canto superior direito, estilo Windows) ─── */
.card-x-btn {
    background: none; border: none; color: #555; font-size: 1.1rem; font-weight: 900;
    cursor: pointer; padding: 0 2px; line-height: 1; border-radius: 3px;
    transition: color 0.15s, background 0.15s;
}
.card-x-btn:hover { color: #fff; background: #c0392b; }

/* ── FOOTER DE AÇÕES DO CARD ───────────────────────────── */
.card-footer-actions {
    display: flex; justify-content: center; align-items: center;
    gap: 6px; margin-top: 14px; padding-top: 10px;
    border-top: 1px solid #21262d;
}
.card-action-btn {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: #161b22; border: 1px solid #30363d; border-radius: 8px;
    color: #8b949e; cursor: pointer; padding: 7px 14px;
    font-size: 1.3rem; transition: all 0.2s; flex: 1; max-width: 90px;
}
.card-action-btn span { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; }
.card-action-btn:hover { background: #21262d; border-color: #555; color: #ccc; }
.card-action-btn.active { border-color: var(--gold); color: var(--gold); background: rgba(241,196,15,0.08); }
.card-action-btn.has-note { border-color: #3b82f6; color: #3b82f6; background: rgba(59,130,246,0.08); }

/* ── BOTÃO ANÁLISE PRÉ-JOGO ────────────────────────────── */
.analysis-btn {
    display: block; width: 100%; margin: 10px 0 4px;
    background: linear-gradient(135deg, #0d1117, #161b22);
    border: 1px solid #30363d; border-radius: 8px;
    color: #9b59b6; font-size: 0.88rem; font-weight: 700;
    padding: 10px; cursor: pointer; letter-spacing: 0.3px;
    transition: all 0.2s;
}
.analysis-btn:hover { border-color: #9b59b6; background: rgba(155,89,182,0.12); color: #b67fd8; }
.analysis-btn.loaded { border-color: #2ecc71; color: #2ecc71; background: rgba(46,204,113,0.08); }
.analysis-btn.live-mode {
    opacity: 0.35; font-size: 0.72rem; padding: 5px;
    color: #555; border-color: #222; background: transparent;
    margin: 4px 0 0;
}
.analysis-btn.live-mode:hover { opacity: 0.7; border-color: #444; color: #888; }

/* 📊 TABELA DE STATS DO iG */
.stats-table { margin: 10px 0 6px; border-top: 1px solid var(--border); padding-top: 8px; }
.stats-header { font-size: 0.68rem; color: var(--text-muted); text-align: center; margin-bottom: 6px; font-weight: bold; letter-spacing: 0.8px; text-transform: uppercase; }
.stats-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; }

.stat-val { font-size: 0.95rem; font-weight: bold; min-width: 22px; text-align: center; }
.stat-val.dom { font-size: 1.05rem; text-shadow: 0 0 6px currentColor; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-align: center; flex: 1; padding: 0 6px; }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 768px) {
    /* Ajustes gerais de espaçamento para telas menores */
    .view { padding: 12px; }
    header { padding: 0 16px; }
    .tabs { padding: 0 8px; overflow-x: hidden; }

    /* Esconde o texto do logo, mantendo apenas o ícone */
    .logo-text { display: none; }

    /* Otimização dos botões do cabeçalho */
    .header-right { gap: 8px; }
    .btn-logout { padding: 7px 10px; font-size: 0.7rem; }
    #heartbeat { padding: 5px 8px; }

    /* Ajuste de tamanho dos botões das abas */
    .tab-btn { padding: 0 10px; font-size: 0.68rem; letter-spacing: 0.4px; }

    /* Ajustes no Hero da Home */
    .home-hero { padding: 24px 20px 20px; }
    .home-hero-title { font-size: 1.6rem; }
    .home-hero-sub { font-size: 0.95rem; }

    /* Reduz o tamanho da fonte na tabela de 'Como Usar' */
    .estados-table td { font-size: 0.9rem; padding: 10px 8px; }
    .ebadge { font-size: 0.78rem; padding: 3px 8px; }

    /* ── TRANSFORMAÇÃO DA TABELA DE ESTADOS EM CARDS ── */
    .estados-table thead {
        display: none; /* Esconde o cabeçalho original em telas pequenas */
    }
    .estados-table, .estados-table tbody, .estados-table tr, .estados-table td {
        display: block;
        width: 100%;
    }
    .estados-table tr:not(.cat-row) {
        margin-bottom: 12px;
        border: 1px solid var(--border);
        border-radius: 8px;
        overflow: hidden;
    }
    .estados-table td {
        padding-left: 12px;
        padding-right: 12px;
        border-bottom: 1px dotted var(--border);
        text-align: right; /* Alinha o conteúdo à direita */
        position: relative;
    }
    .estados-table tr:not(.cat-row) td:last-child {
        border-bottom: none;
    }
    .estados-table td::before {
        content: attr(data-label); /* Usa o data-label que vamos adicionar no HTML */
        font-weight: bold;
        color: var(--text-muted);
        text-align: left;
        position: absolute;
        left: 12px;
    }
    /* A primeira célula (Estado) não precisa do label antes, pois o badge já é claro */
    .estados-table td:first-child::before {
        content: '';
    }
    .estados-table td:first-child {
        text-align: left; /* O badge fica à esquerda */
    }
}

@media (max-width: 480px) {
    /* Em telas muito pequenas, o separador das abas some */
    .tabs-sep { display: none; }

    /* Tabs cabem sem scroll */
    .tabs { padding: 0 4px; }
    .tab-btn { padding: 0 7px; font-size: 0.6rem; letter-spacing: 0; }

    /* Garante que o grid de vigília não fique muito espremido */
    .grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

    /* View: menos margem lateral no celular */
    .view { padding: 8px; }

    /* Grid: coluna única no celular */
    .grid { grid-template-columns: 1fr; gap: 8px; }

    /* Cards compactos para coluna única */
    .match-card { padding: 10px; }
    .score-box { font-size: 1.1rem; }
    .team-name { font-size: 0.88rem; }
    .team-logo  { width: 22px; height: 22px; }
    .team-label { font-size: 0.78rem; }
    .score-row { margin-bottom: 6px; }
    .vera-box { font-size: 0.9rem; padding: 9px 8px; margin: 6px 0 8px; min-height: 100px; max-height: 165px; }
    .ia-vera-box { max-height: 120px; }
    .ig-header-row { margin-bottom: 2px; }
    .bar-bg { height: 7px; }
    .sparkline-wrap { padding: 4px 2px; }
    .stats-table { margin: 7px 0 4px; padding-top: 6px; }
    .stats-header { margin-bottom: 3px; font-size: 0.62rem; }
    .stats-row { padding: 2px 0; }
    .stat-val { font-size: 0.88rem; }
    .stat-label { font-size: 0.68rem; padding: 0 4px; }
    .btn-action { width: 88px; font-size: 0.68rem; }

    /* Reduz o tamanho dos textos na Home para caber melhor */
    .home-hero-greeting { font-size: 0.8rem; }
    .home-hero-title { font-size: 1.4rem; }
    .home-hero-sub { font-size: 0.9rem; }
    .home-step-body h4 { font-size: 0.85rem; }
    .home-step-body p { font-size: 0.8rem; }
    .home-signal-name { font-size: 0.75rem; }
    .home-signal-desc { font-size: 0.75rem; }
    .home-rule-text { font-size: 0.88rem; }

    /* Vigília mobile */
    .vig-context-bar { margin: -12px -12px 10px; font-size: 0.67rem; gap: 6px; padding: 5px 10px; }
    .vig-empty-state { padding: 36px 16px; }
    .vig-empty-title { font-size: 0.95rem; }
    .vig-empty-cta { padding: 9px 18px; font-size: 0.78rem; }
    #b-vig { font-size: 0.69rem; padding: 0 11px; margin: 4px 2px 0; }
    .vig-badge { font-size: 0.55rem; min-width: 14px; height: 14px; }
    .vig-alert-dot { width: 6px; height: 6px; }
}

/* ═══════════════════════════════════════════════════════
   VIGÍLIA — DESTAQUE VISUAL
   ═══════════════════════════════════════════════════════ */

/* Aba VIGÍLIA: sempre tem borda e fundo sutil, mesmo inativa */
#b-vig {
    border: 1px solid rgba(241,196,15,0.22);
    border-bottom: 2px solid transparent;
    border-radius: 4px 4px 0 0;
    margin: 5px 4px 0;
    padding: 0 16px;
    background: rgba(241,196,15,0.05);
    font-size: 0.74rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
}
#b-vig:hover { color: var(--gold); border-color: rgba(241,196,15,0.4); border-bottom-color: rgba(241,196,15,0.3); }
#b-vig.active {
    color: var(--gold);
    border-color: rgba(241,196,15,0.5);
    border-bottom-color: var(--gold);
    background: rgba(241,196,15,0.1);
    box-shadow: 0 0 16px rgba(241,196,15,0.07);
}

/* Badge de contagem de jogos monitorados */
.vig-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gold);
    color: #000;
    font-size: 0.6rem;
    font-weight: 900;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    padding: 0 4px;
    line-height: 1;
}

/* Ponto de alerta pulsante (aparece quando há sinal ativo) */
.vig-alert-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f97316;
    display: inline-block;
    flex-shrink: 0;
    animation: vig-dot-pulse 1.3s ease-in-out infinite;
}
@keyframes vig-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(249,115,22,0.6); }
    50%       { opacity: 0.75; transform: scale(1.2); box-shadow: 0 0 0 5px rgba(249,115,22,0); }
}

/* ── CONTEXT BAR ── */
.vig-context-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 15px;
    background: #0f1117;
    border-bottom: 1px solid #1c2128;
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    margin: -15px -15px 14px;
}
.vig-ctx-item { display: flex; align-items: center; gap: 4px; }
.vig-ctx-sep { color: #2d333b; }
.vig-ctx-alert { color: var(--gold); font-weight: 700; }

/* ── EMPTY STATE ── */
.vig-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 20px;
    text-align: center;
    gap: 12px;
}
.vig-empty-icon { font-size: 3.2rem; opacity: 0.35; }
.vig-empty-title { font-size: 1.1rem; font-weight: 700; color: var(--text); opacity: 0.65; }
.vig-empty-desc { font-size: 0.88rem; color: var(--text-muted); max-width: 300px; line-height: 1.65; }
.vig-empty-desc b { color: var(--gold); font-weight: 700; }
.vig-empty-cta {
    margin-top: 6px;
    background: rgba(241,196,15,0.1);
    border: 1px solid rgba(241,196,15,0.38);
    color: var(--gold);
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    transition: background 0.18s;
}
.vig-empty-cta:hover { background: rgba(241,196,15,0.2); }


/* VERA box: mais presença visual — mantém altura fixa */
.vera-box { padding: 16px 14px; font-size: 1.12rem; min-height: 115px; max-height: 180px; }

/* iG bar: altura aumentada */
.bar-bg { height: 10px; }

/* Sparkline: bloco mais definido */
.sparkline-wrap {
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 6px;
    padding: 6px 4px;
}

@media (max-width: 768px) {
    .vig-context-bar { margin: -12px -12px 12px; padding: 6px 12px; }
    #b-vig { padding: 0 13px; }
}

/* ── ABA JOGOS (AGORA + EM BREVE) ───────────────────────── */
.jogos-section-label {
    font-size: 0.75rem; font-weight: 700; letter-spacing: 1.8px;
    text-transform: uppercase; color: #484f58;
    padding: 18px 2px 10px;
    display: flex; align-items: center; gap: 10px;
}
.jogos-section-label::after {
    content: ''; flex: 1; height: 1px; background: #21262d;
}
.jogos-live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 8px;
}
.jogos-time-label {
    font-size: 0.85rem; font-weight: 700; letter-spacing: 1px;
    color: #66fcf1; opacity: 0.7;
    padding: 14px 2px 6px;
    text-transform: uppercase;
}
.jogos-list-block { margin-bottom: 4px; }
.jogos-row {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-bottom: 1px solid #21262d;
    max-width: 720px;
    transition: background 0.12s;
}
.jogos-row:hover { background: rgba(255,255,255,0.02); }
.jogos-row.is-watched { border-left: 2px solid var(--gold); }
.jogos-row-info { flex: 1; min-width: 0; }
.jogos-row-name {
    font-size: 0.85rem; font-weight: 600; color: #e6edf3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jogos-row-meta {
    font-size: 0.7rem; color: #484f58; margin-top: 2px;
}
.jogos-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.btn-pregame-sm {
    background: none; border: 1px solid #30363d; color: #f97316;
    font-size: 0.72rem; padding: 5px 10px; border-radius: 5px;
    cursor: pointer; font-family: inherit; white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
    display: inline-flex; align-items: center; gap: 5px;
}
.btn-pregame-sm:hover { border-color: #f97316; color: #fb923c; }
.jogos-pregame-box {
    display: none;
    padding: 8px 10px 10px 12px;
    border-left: 2px solid rgba(249,115,22,0.4);
    margin: 0 0 4px 0;
    font-size: 0.85rem; color: #c9d1d9; line-height: 1.6;
    background: rgba(249,115,22,0.04);
}
.jogos-pregame-box.open { display: block; }
@media (max-width: 600px) {
    .jogos-live-grid { grid-template-columns: 1fr; }
    .jogos-row-name { font-size: 0.8rem; }
}