/* ===================================================
   ScoutIA — Light Theme Overrides
   Aplicado quando <html data-theme="light">

   IMPORTANTE: usa `html[data-theme="light"]` (especificidade 0,1,1)
   para superar `:root` (0,1,0) definido nos <style> inline dos templates.
=================================================== */

/* ---- CSS Variables ---- */
html[data-theme="light"] {
    --bg-primary: #f0f2f8;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f7ff;
    --text-primary: #1a1a2e;
    --text-secondary: #5a5a7a;
    --text-muted: #9090b0;
    --border-color: #e0e2f0;
}

html[data-theme="light"] body {
    background-color: #f0f2f8;
    color: #1a1a2e;
}

/* Scrollbar */
html[data-theme="light"] ::-webkit-scrollbar-track { background: #f0f2f8; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c8cae0; }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #b0b2d0; }

/* ---- Sidebar ---- */
html[data-theme="light"] .sidebar {
    background: #ffffff;
    border-right-color: #e0e2f0;
}
html[data-theme="light"] .sidebar-logo { border-bottom-color: #e0e2f0; }
html[data-theme="light"] .sidebar-logo h1 { color: #1a1a2e; }
html[data-theme="light"] .sidebar-logo span { color: #9090b0; }
html[data-theme="light"] .nav-section-title { color: #9090b0; }
html[data-theme="light"] .nav-item,
html[data-theme="light"] .nav-link { color: #5a5a7a; }
html[data-theme="light"] .nav-item:hover,
html[data-theme="light"] .nav-link:hover { background: #f0f2f8; color: #1a1a2e; }
html[data-theme="light"] .nav-item.active,
html[data-theme="light"] .nav-link.active {
    background: rgba(0,212,106,.12);
    color: #00b359;
    border-right-color: #00d46a;
}

/* ---- Header ---- */
html[data-theme="light"] .header {
    background: #ffffff;
    border-bottom-color: #e0e2f0;
}
html[data-theme="light"] .header-title { color: #1a1a2e; }
html[data-theme="light"] .header-badge {
    background: #f0f2f8;
    border-color: #e0e2f0;
    color: #5a5a7a;
}

/* ---- Cards genéricos ---- */
html[data-theme="light"] .stat-card,
html[data-theme="light"] .league-card,
html[data-theme="light"] .match-card,
html[data-theme="light"] .fixture-card,
html[data-theme="light"] .card,
html[data-theme="light"] .market-card,
html[data-theme="light"] .insight-card,
html[data-theme="light"] .info-card,
html[data-theme="light"] .team-card,
html[data-theme="light"] .player-card,
html[data-theme="light"] .h2h-card,
html[data-theme="light"] .analysis-card,
html[data-theme="light"] .section-card {
    background: #ffffff;
    border-color: #e0e2f0;
    color: #1a1a2e;
}
html[data-theme="light"] .stat-card:hover,
html[data-theme="light"] .league-card:hover,
html[data-theme="light"] .team-card:hover { background: #f5f7ff; }
html[data-theme="light"] .stat-card-label { color: #5a5a7a; }
html[data-theme="light"] .stat-card-value { color: #1a1a2e; }

/* ---- Qualquer div com background de card ---- */
html[data-theme="light"] [class*="card"] {
    background: #ffffff;
    border-color: #e0e2f0;
}
html[data-theme="light"] [class*="-box"],
html[data-theme="light"] [class*="-panel"],
html[data-theme="light"] [class*="-block"] {
    background: #ffffff;
    border-color: #e0e2f0;
}

/* ---- Main content area ---- */
html[data-theme="light"] .main-content { background: #f0f2f8; }
html[data-theme="light"] .content-wrapper { background: #f0f2f8; }

/* ---- Tabelas ---- */
html[data-theme="light"] table { background: #ffffff; }
html[data-theme="light"] thead,
html[data-theme="light"] .standings-table thead,
html[data-theme="light"] table th {
    background: #f5f7ff;
    color: #9090b0;
    border-bottom-color: #e0e2f0;
}
html[data-theme="light"] table td {
    color: #1a1a2e;
    border-bottom-color: #f0f2f8;
}
html[data-theme="light"] table tr:hover td { background: #f5f7ff; }
html[data-theme="light"] .standings-row { border-bottom-color: #f0f2f8; }
html[data-theme="light"] .standings-row:hover { background: #f5f7ff; }

/* ---- Inputs / Selects / Textareas ---- */
html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="email"],
html[data-theme="light"] input[type="password"],
html[data-theme="light"] input[type="search"],
html[data-theme="light"] input[type="number"],
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    background: #f5f7ff !important;
    border-color: #e0e2f0 !important;
    color: #1a1a2e !important;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #9090b0 !important; }
html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] select:focus { border-color: #00d46a !important; }

/* ---- Seções e textos ---- */
html[data-theme="light"] .section-title,
html[data-theme="light"] .section-header,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3 { color: #1a1a2e; }
html[data-theme="light"] p,
html[data-theme="light"] span:not([class*="accent"]):not([style*="color:#00"]) { color: inherit; }
html[data-theme="light"] .text-muted,
html[data-theme="light"] .muted,
html[data-theme="light"] label { color: #9090b0; }

/* ---- Badges e tags ---- */
html[data-theme="light"] .badge,
html[data-theme="light"] .tag,
html[data-theme="light"] .chip {
    background: #f0f2f8;
    border-color: #e0e2f0;
    color: #5a5a7a;
}

/* ---- Dropdown de idioma ---- */
html[data-theme="light"] .lang-current {
    background: #f0f2f8;
    border-color: #e0e2f0;
    color: #1a1a2e;
}
html[data-theme="light"] .lang-options {
    background: #ffffff;
    border-color: #e0e2f0;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
html[data-theme="light"] .lang-option { color: #1a1a2e; }
html[data-theme="light"] .lang-option:hover { background: #f0f2f8; }

/* ---- Footer ---- */
html[data-theme="light"] .site-footer {
    background: #ffffff;
    border-top-color: #e0e2f0;
}
html[data-theme="light"] .footer-logo-text { color: #1a1a2e; }
html[data-theme="light"] .footer-col a { color: #9090b0; }

/* ---- Toggle tema ---- */
html[data-theme="light"] #themeToggle {
    border-color: #e0e2f0 !important;
    color: #5a5a7a !important;
}
html[data-theme="light"] #themeToggle:hover {
    border-color: #00d46a !important;
    color: #1a1a2e !important;
}

/* ---- Auth header ---- */
html[data-theme="light"] #authHeaderButtons span { color: #5a5a7a !important; }
html[data-theme="light"] #authHeaderButtons button {
    border-color: #e0e2f0 !important;
    color: #5a5a7a !important;
}

/* ---- Separadores / bordas ---- */
html[data-theme="light"] hr { border-color: #e0e2f0; }
html[data-theme="light"] [class*="divider"] {
    background: #e0e2f0;
    border-color: #e0e2f0;
}

/* ---- Chat Sidebar ---- */
html[data-theme="light"] .ai-chat {
    background: #ffffff;
    border-left-color: #e0e2f0;
    box-shadow: -4px 0 20px rgba(0,0,0,.08);
}
html[data-theme="light"] .ai-chat-header {
    background: #f5f7ff;
    border-bottom-color: #e0e2f0;
    color: #1a1a2e;      /* corrige o color:#fff hardcoded */
}
html[data-theme="light"] .ai-chat-body { background: #ffffff; }
html[data-theme="light"] .chat-messages::-webkit-scrollbar-thumb { background: #c8cae0; }

/* Tab de abertura */
html[data-theme="light"] .chat-open-tab {
    background: #ffffff;
    border-color: #e0e2f0;
}
html[data-theme="light"] .chat-open-tab span { color: #9090b0; }

/* Botões do header do chat */
html[data-theme="light"] .chat-close-btn { color: #9090b0; }
html[data-theme="light"] .chat-close-btn:hover { color: #1a1a2e; background: #f0f2f8; }
html[data-theme="light"] .chat-clear-btn { color: #9090b0; }

/* Bolhas de mensagem */
html[data-theme="light"] .chat-message.assistant .chat-bubble {
    background: #f5f7ff;
    border-color: #e0e2f0;
    color: #1a1a2e;
}
html[data-theme="light"] .chat-message.user .chat-bubble {
    color: #000;   /* mantém legível no fundo verde */
}
html[data-theme="light"] .chat-message.assistant .chat-avatar {
    background: #f0f2f8;
    border-color: #e0e2f0;
}

/* Code no chat */
html[data-theme="light"] .chat-bubble code {
    background: rgba(0,0,0,.06);
    color: #1a1a2e;
}

/* Sugestões */
html[data-theme="light"] .chat-suggestion {
    background: #f5f7ff;
    border-color: #e0e2f0;
    color: #1a1a2e;
}

/* Input area */
html[data-theme="light"] .chat-input-area {
    background: #f5f7ff;
    border-top-color: #e0e2f0;
}
html[data-theme="light"] .chat-input-wrapper {
    background: #ffffff;
    border-color: #e0e2f0;
}
html[data-theme="light"] #chatInput { color: #1a1a2e; }
html[data-theme="light"] #chatInput::placeholder { color: #9090b0; }
html[data-theme="light"] .chat-send-btn:disabled {
    background: #e0e2f0;
    color: #9090b0;
}

/* Welcome screen */
html[data-theme="light"] .chat-welcome h3 { color: #1a1a2e; }
html[data-theme="light"] .chat-welcome p  { color: #5a5a7a; }
