/* CoreScore styles - Layout shell (header, nav, sidebar, cards).
   Extraido de css/styles.css em 22/05/2026 (FASE E).
   Carregar APOS styles.css (vars) pra que cascade funcione. */


/* ─── Header ─────────────────────────────────────────────────────────────── */
.header {
  background: var(--header); border-bottom: 1.5px solid var(--border);
  padding: 12px 20px; display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; box-shadow: 0 1px 6px rgba(0,0,0,.07);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  min-width: 0; flex-shrink: 0;
}
.brand-mark {
  width: 46px; height: 46px; object-fit: contain; flex-shrink: 0;
  border-radius: 12px;
}
.brand-copy {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.brand-copy h1 {
  font-size: 21px; font-weight: 800; color: var(--text); line-height: 1.05;
  letter-spacing: -.4px;
}
.brand-copy span {
  font-size: 11px; font-weight: 600; color: var(--text2); line-height: 1.15;
  white-space: nowrap;
}
.header-page {
  padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--bg3); color: var(--accent); font-size: 11px; font-weight: 800;
  letter-spacing: .02em;
}
.hdate        { font-size: 12px; color: var(--text2); }
.header-links {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto; margin-right: 8px; flex-wrap: wrap;
}
.header-link {
  padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--border);
  background: transparent; color: var(--text2); font-size: 12px; font-weight: 700;
  text-decoration: none; transition: all .18s;
}
.header-link:hover { border-color: var(--accent); color: var(--accent); }
.header-link.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.auth-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 22px;
}
.hbtn {
  padding: 5px 13px; border-radius: 20px; border: 1.5px solid var(--border);
  background: transparent; color: var(--text2); font-size: 12px;
  cursor: pointer; transition: all .2s;
}
.hbtn:hover   { border-color: var(--accent); color: var(--accent); }

/* Toggle de tema */
.tog {
  width: 42px; height: 24px; border-radius: 12px; border: none;
  cursor: pointer; background: var(--accent); position: relative; flex-shrink: 0;
}
.tog::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: left .25s;
}
[data-theme="dark"] .tog::after { left: 21px; }

#refreshBadge,
#rtRefreshBadge {
  font-size: 10px; padding: 3px 10px; border-radius: 10px;
  font-weight: 700; cursor: pointer; user-select: none; transition: all .2s;
}
#countdownText,
#rtCountdownText { font-size: 10px; color: var(--text3); font-weight: 600; min-width: 28px; text-align: right; }

@media (max-width: 980px) {
  .brand-copy span { white-space: normal; max-width: 260px; }
  .header-links { margin-left: 0; }
}

@media (max-width: 720px) {
  .brand-mark { width: 40px; height: 40px; }
  .brand-copy h1 { font-size: 18px; }
  .brand-copy span { font-size: 10px; max-width: 220px; }
  .header-page { order: 3; }
}

/* ─── Navegação de datas ─────────────────────────────────────────────────── */
.date-nav {
  background: var(--header); border-bottom: 1.5px solid var(--border);
  padding: 8px 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.date-btn {
  padding: 5px 14px; border-radius: 20px; border: 1.5px solid var(--border);
  background: transparent; color: var(--text2); font-size: 12px;
  cursor: pointer; font-weight: 500; white-space: nowrap; transition: all .18s;
}
.date-btn:hover          { border-color: var(--accent); color: var(--accent); }
.date-btn.active         { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── Barra de status ────────────────────────────────────────────────────── */
.status-nav {
  background: var(--header); border-bottom: 1.5px solid var(--border);
  padding: 7px 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.sf-btn {
  padding: 4px 14px; border-radius: 20px; border: 1.5px solid var(--border);
  background: transparent; color: var(--text2); font-size: 12px;
  cursor: pointer; font-weight: 600; transition: all .18s;
}
.sf-btn.active-all      { background: #1a1d2e; color: #fff; border-color: #1a1d2e; }
[data-theme="dark"] .sf-btn.active-all { background: #e8eaf0; color: #1a1d2e; border-color: #e8eaf0; }
.sf-btn.active-live     { background: #ef4444; color: #fff; border-color: #ef4444; }
.sf-btn.active-done     { background: #6b7280; color: #fff; border-color: #6b7280; }
.sf-btn.active-upcoming { background: #2563eb; color: #fff; border-color: #2563eb; }

.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #ef4444; margin-right: 4px; animation: pulse 1.4s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* ─── Barra de ligas ─────────────────────────────────────────────────────── */
.league-nav {
  background: var(--header); border-bottom: 1.5px solid var(--border);
  padding: 7px 16px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.ln-btn {
  padding: 3px 11px; border-radius: 20px; border: 1.5px solid var(--border);
  background: transparent; color: var(--text2); font-size: 11px;
  cursor: pointer; font-weight: 500; transition: all .18s;
  display: inline-flex; align-items: center; gap: 4px;
}
.ln-btn:hover, .ln-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── Layout principal ───────────────────────────────────────────────────── */
.layout {
  display: flex; height: calc(100vh - 155px); overflow: hidden;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
  width: 360px; min-width: 360px; border-right: 1.5px solid var(--border);
  background: var(--sidebar); position: relative; flex-shrink: 0;
  transition: width .25s; overflow: hidden;
}
.sidebar.collapsed        { width: 36px !important; min-width: 36px !important; }
.sidebar.collapsed #sidebarContent { display: none; }
.resize-handle {
  width: 5px; position: absolute; top: 0; right: 0;
  height: 100%; cursor: col-resize; z-index: 10;
}
#toggleBtn {
  position: absolute; top: 8px; right: 6px; z-index: 20;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--bg3); color: var(--text2);
  font-size: 14px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; line-height: 1; padding: 0;
}
.sidebar.collapsed #toggleBtn { transform: scaleX(-1); }
#sidebarContent {
  height: 100%; overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #6b7280 transparent;
}
#sidebarContent::-webkit-scrollbar {
  width: 8px;
}
#sidebarContent::-webkit-scrollbar-track {
  background: transparent;
}
#sidebarContent::-webkit-scrollbar-thumb {
  background: #6b7280;
  border-radius: 8px;
}
#sidebarContent::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ─── Área principal ─────────────────────────────────────────────────────── */
.main { flex: 1; overflow-y: auto; padding: 20px 22px; background: var(--bg); min-width: 0; }

/* ─── Busca na sidebar ───────────────────────────────────────────────────── */
.sw {
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--sidebar); z-index: 9;
}
.sw input {
  width: 100%; padding: 6px 11px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--bg3);
  color: var(--text); font-size: 13px; outline: none;
}
.sw input:focus { border-color: var(--accent); }

/* ─── Liga header na sidebar ─────────────────────────────────────────────── */
.lhdr {
  padding: 7px 14px 4px; font-size: 10px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .6px;
  border-bottom: 1px solid var(--border); background: var(--bg3);
  display: flex; align-items: center; gap: 5px;
}

/* ─── Card de jogo na sidebar ────────────────────────────────────────────── */
/* 10/06/2026: card de jogo moderno (contido, arredondado, com elevação no
   hover) + cor de fundo por ESTADO (ao vivo=azul · finalizado=laranja ·
   vai acontecer=verde). Ver mc-state-* mais abaixo. */
.mc {
  display: flex; align-items: stretch; gap: 10px;
  padding: 11px 12px;
  margin: 8px 10px;
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .15s, border-color .16s;
  min-height: 60px;
}
/* Highlight quando o card e' atualizado (placar/status mudou) */
.mc.mc-updated::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: rgba(59, 130, 246, 0.10);
  animation: mcFlash .8s ease-out forwards;
}
.mc { position: relative; overflow: hidden; }
@keyframes mcFlash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Skeleton para grade enquanto carrega */
.mc-skeleton {
  display: flex; align-items: stretch; gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  min-height: 60px;
}
.mc-skeleton .sk-bar {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--border) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
}
.mc-skeleton-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.mc-skeleton-row  { display: flex; align-items: center; gap: 8px; }
.mc-skeleton .sk-logo { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; }
.mc-skeleton .sk-name { flex: 1; height: 12px; }
.mc-skeleton .sk-mid  { width: 48px; height: 28px; border-radius: 6px; flex-shrink: 0; }
.mc-skeleton .sk-league { width: 40%; height: 9px; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.mc:hover              { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(16,24,40,.12); }
[data-theme="dark"] .mc:hover { box-shadow: 0 10px 26px rgba(0,0,0,.5); }
/* selecionado: destaque AZUL */
.mc.active             { box-shadow: 0 0 0 2px #2563eb inset; }
[data-theme="dark"] .mc.active { box-shadow: 0 0 0 2px #4f8ef7 inset; }
.mc.active:hover       { box-shadow: 0 0 0 2px #2563eb inset, 0 8px 22px rgba(16,24,40,.12); }
[data-theme="dark"] .mc.active:hover { box-shadow: 0 0 0 2px #4f8ef7 inset, 0 10px 26px rgba(0,0,0,.5); }

/* ── Estado do jogo: SÓ a borda lateral colorida (fundo é card normal) ────── */
/*    ao vivo = verde · vai acontecer = azul · finalizado = vermelho */
.mc { border-left-width: 4px; }
.mc.mc-state-live { border-left-color: #22c55e; }  /* ao vivo = verde */
.mc.mc-state-soon { border-left-color: #f97316; }  /* vai acontecer = laranja */
.mc.mc-state-ft   { border-left-color: #ef4444; }  /* finalizado = vermelho */
.mc-body {
  flex: 1; min-width: 0;
}
.fav-btn {
  align-self: center;
  width: 26px; min-width: 26px; border: none; background: transparent;
  color: #b6bfce; font-size: 22px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 0 0 8px; transition: color .18s, transform .18s;
}
.fav-btn:hover {
  color: #f59e0b;
  transform: scale(1.05);
}
.fav-btn.active { color: #f59e0b; }
[data-theme="dark"] .fav-btn { color: #8a93a5; }
[data-theme="dark"] .fav-btn.active,
[data-theme="dark"] .fav-btn:hover { color: #fbbf24; }
.mc-lg  { font-size: 10px; color: var(--text3); margin-bottom: 3px; font-weight: 600; }
.mc-row { display: flex; align-items: center; gap: 5px; }
.mc-t   { font-size: 12px; font-weight: 600; color: var(--text); flex: 1; line-height: 1.3; }
.mc-t.r { text-align: right; }
.mc-time { font-size: 11px; color: var(--accent); font-weight: 700; min-width: 42px; text-align: center; }
.live-b  { background: #ef4444; color: #fff; font-size: 9px; padding: 1px 6px; border-radius: 8px; font-weight: 700; animation: pulse 1.4s infinite; }
/* Badge azul de tempo de acrescimo do arbitro (+N), separado do MM:SS pra
   distinguir visualmente o minuto regular do tempo extra. */
.lb-add { display: inline-block; background: #2563eb; color: #fff; font-size: 9px; padding: 0 4px; border-radius: 6px; font-weight: 700; margin-left: 3px; animation: none; }
.live-chip .lb-add { font-size: 11px; padding: 1px 5px; }
.ft-b    { font-size: 9px; color: var(--text3); }
.red-card-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; color: #991b1b; border: none;
  border-radius: 0; padding: 0; font-size: 10px; font-weight: 800;
}
.red-card-badge--lg { padding: 0; font-size: 11px; }
.red-card-icon {
  display: inline-block; width: 9px; height: 12px;
  background: #dc2626; border-radius: 1px;
}
[data-theme="dark"] .red-card-badge { background: transparent; color: #fecaca; }