﻿:root {
  --bg: #f2f3f5;
  --card: rgba(255,255,255,0.92);
  --card-strong: #ffffff;
  --text: #0f2112;
  --muted: #4a6358;
  --border: rgba(15,33,18,0.12);
  --line: rgba(15,33,18,0.08);
  --accent: #16a34a;
  --accent-rgb: 22, 163, 74;
  --accent-2: #0ea5e9;
  --success: #15803d;
  --danger: #dc2626;
  --header-bg-start: #14532d;
  --header-bg-end: #16a34a;
  --header-text: #ffffff;
  --brand-logo-size: 48px;
  --header-title-size: 22px;
  --btn-primary-bg-start: #16a34a;
  --btn-primary-bg-end: #22c55e;
  --btn-primary-text: #ffffff;
  --btn-secondary-bg-start: #14532d;
  --btn-secondary-bg-end: #16a34a;
  --btn-secondary-text: #ffffff;
  --shadow: 0 4px 24px rgba(15,33,18,0.10);
  --shadow-card: 0 2px 12px rgba(15,33,18,0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --bottom-nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: #f2f3f5;
  padding-bottom: var(--bottom-nav-h);
}

.hidden { display: none !important; }

body.modal-open { overflow: hidden !important; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: 300;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" -25, "opsz" 24;
}

/* ── Header ─────────────────────────────────────── */
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 14px;
  background: linear-gradient(135deg, var(--header-bg-start) 0%, var(--header-bg-end) 100%);
  color: var(--header-text);
  box-shadow: 0 2px 20px rgba(20,83,45,0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: var(--brand-logo-size);
  height: var(--brand-logo-size);
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.24);
  flex: 0 0 auto;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.brand-mark .material-symbols-outlined { font-size: 24px; }
a.brand-mark { text-decoration: none; cursor: pointer; color: var(--header-text); }
a.brand-mark:hover { background: rgba(255,255,255,0.26); }

/* futsalhoy.com: brand-copy always visible, flex for perfect centering */
.brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}
/* On mobile: hide kicker and desc unless enabled */
#appKicker { display: none; }
.brand-desc { display: none; }
.brand-mobile-kicker #appKicker { display: block; }
.brand-mobile-desc .brand-desc { display: block; }

.brand-kicker, .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 800;
}

.brand-copy strong {
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
  font-size: var(--header-title-size);
  line-height: 1.1;
  white-space: nowrap;
}

.brand-copy strong, .brand-copy span, .brand-copy p { margin: 0; }

.topbar-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.76);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: none;
}

.topbar-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.16);
}

/* Mobile: profile chip icon only */
.profile-copy { display: none; }
.profile-chip { padding: 7px; border-radius: 12px; }

.topbar-source-link .btn-label-full,
#backPortalBtn .btn-label-full,
.toolbar-actions .btn-label-full,
#teamViewBack .btn-label-full { display: none; }

/* Mobile: compact icon-only buttons */
.topbar-actions .btn {
  padding: 8px;
  min-height: 38px;
  min-width: 38px;
  border-radius: 12px;
}

.topbar-actions .btn .material-symbols-outlined { font-size: 20px; }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  min-height: 44px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.65; cursor: progress; transform: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
  color: var(--btn-primary-text);
  background: linear-gradient(135deg, var(--btn-primary-bg-start), var(--btn-primary-bg-end));
  box-shadow: 0 8px 20px rgba(var(--accent-rgb),0.28);
}

.btn-secondary {
  color: var(--btn-secondary-text);
  background: linear-gradient(135deg, var(--btn-secondary-bg-start), var(--btn-secondary-bg-end));
  box-shadow: 0 8px 20px rgba(20,83,45,0.22);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--border);
}

.btn-ghost.disabled { pointer-events: none; opacity: 0.5; }
.btn-danger { color: #fff; background: linear-gradient(135deg, #dc2626, #ef4444); }

.is-busy .material-symbols-outlined {
  animation: spin 0.9s linear infinite;
}
.bg-syncing { opacity: 0.65; }
.bg-syncing .material-symbols-outlined { animation: spin 1.4s linear infinite; }

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Custom picker dropdown ──────────────────────── */
.picker-sheet {
  position: fixed;
  inset: 0;
  z-index: 800;
}
.picker-sheet.hidden { display: none !important; }
.picker-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}
.picker-panel {
  position: fixed; /* positioned by JS below the trigger */
  background: var(--card-strong, #fff);
  border-radius: 14px;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.16), 0 2px 8px rgba(0,0,0,0.10);
  border: 1px solid var(--border);
  animation: picker-dropdown 0.16s cubic-bezier(0.32,0.72,0,1);
}
@keyframes picker-dropdown {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.picker-handle { display: none; }
.picker-title { display: none; }
.picker-liga-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.picker-liga-filter-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  flex-shrink: 0;
}
.picker-liga-filter-logo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.picker-liga-filter-logo img {
  width: 100%; height: 100%;
  object-fit: contain; padding: 2px;
}
.picker-liga-filter-name {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picker-liga-filter-clear {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--muted);
  display: flex;
  align-items: center;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.picker-liga-filter-clear:hover { background: rgba(var(--accent-rgb),.08); color: var(--accent); }
.picker-section-title {
  padding: 8px 14px 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}
.picker-section-title:first-child { border-top: none; margin-top: 0; padding-top: 10px; }
.picker-options {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 4px 0;
}
.picker-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s;
  line-height: 1.3;
}
.picker-option:hover, .picker-option:active { background: rgba(0,0,0,0.05); }
.picker-option.selected { color: var(--accent); font-weight: 700; }
.picker-option.selected .picker-opt-check { opacity: 1; }
.picker-opt-check {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.1s;
}
.picker-opt-icon { flex-shrink: 0; font-size: 14px; color: var(--accent); }
.picker-opt-text { flex: 1; min-width: 0; }
.picker-separator { display: none; }

/* ── Source toolbar ─────────────────────────────── */
.source-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 14px;
  max-width: 1480px;
  margin: 0 auto;
  position: relative;
}

.source-picker {
  flex: 0 0 auto;
  width: min(360px, 80vw);
  min-width: 0;
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  overflow: hidden;
}

.source-picker::after {
  display: none; /* chevron is now in HTML */
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--accent);
  pointer-events: none;
}

.source-select {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding: 6px 10px 6px 12px;
  border: none;
  border-radius: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  appearance: none;
  outline: none;
  text-align: left;
  touch-action: manipulation;
  transition: background 0.15s;
}
.source-select:hover { background: rgba(var(--accent-rgb), 0.08); }
.source-picker-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-picker-chevron { font-size: 18px; flex-shrink: 0; }

.source-select:focus,
button.source-select:focus-visible {
  box-shadow: none;
  outline: none;
}

/* Category picker button */
.category-select {
  display: flex; align-items: center; gap: 4px;
}
.category-picker-btn {
  padding: 6px 8px 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card,#fff);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  max-width: 160px;
}
.cat-picker-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toolbar-actions { display: flex; gap: 8px; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
.toolbar-btn { padding: 10px; border-radius: 999px; min-height: 42px; min-width: 42px; }

/* ── Alert ─────────────────────────────────────── */
.alert {
  margin: 0 14px 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: 1px solid transparent;
}

.alert-success {
  color: var(--success);
  background: rgba(240,253,244,0.96);
  border-color: rgba(var(--accent-rgb),0.24);
}

.alert-error {
  color: var(--danger);
  background: rgba(254,242,242,0.96);
  border-color: rgba(220,38,38,0.24);
}

/* ── Panel ─────────────────────────────────────── */
.panel, .info-panel {
  margin: 0 14px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.info-panel { padding: 20px; text-align: center; color: var(--muted); }
.error-panel { color: var(--danger); border-color: rgba(220,38,38,0.3); background: rgba(254,242,242,0.95); }

/* ── Login ─────────────────────────────────────── */
.login-shell {
  display: grid;
  place-items: center;
  padding: 32px 14px 80px;
  min-height: 80vh;
}

.login-card {
  width: min(440px, 100%);
  padding: 24px;
  display: grid;
  gap: 16px;
}

.login-heading { display: grid; gap: 8px; }
.login-heading h1, .section-head h2 {
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
  margin: 0;
}

.login-heading h1 { font-size: clamp(26px, 6vw, 38px); line-height: 1; }
.login-heading p, .section-copy { color: var(--muted); margin: 0; font-size: 14px; }

/* ── App content ────────────────────────────────── */
.app-content {
  max-width: 1480px;
  margin: 0 auto;
  padding-bottom: 20px;
}

/* ── Hero stats ─────────────────────────────────── */
.hero {
  padding: 14px;
  background: rgba(255,255,255,0.98);
}

/* Always a single scrollable row on every device */
.hero-stats {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 8px;
}

.hero-stats::-webkit-scrollbar { display: none; }

.stat-card {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 4px 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.94);
  display: grid;
  gap: 4px;
  align-content: center;
  justify-items: center;
  text-align: center;
  overflow: hidden;
}

.stat-card-sync,
.countdown-stat-card { display: grid; }

.stat-label {
  display: block;
  font-size: clamp(7px, 0.85vw, 10px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-value {
  display: block;
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(13px, 1.55vw, 22px);
  line-height: 1.05;
  white-space: nowrap;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-value-small { font-size: inherit; }

.countdown-stat-card { gap: 4px; }
#countdownValue {
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(13px, 1.55vw, 22px);
  line-height: 1.05;
  white-space: nowrap;
}

/* ── View tabs (bottom nav mobile) ────────────── */
.view-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  background: rgba(255,255,255,0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  height: var(--bottom-nav-h);
}

.view-tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease;
  min-height: 0;
}

.view-tab-btn .material-symbols-outlined { font-size: 24px; }

.view-tab-btn.active {
  color: var(--accent);
  background: rgba(var(--accent-rgb),0.06);
}

.view-tab-btn span:not(.material-symbols-outlined) {
  display: block;
  line-height: 1;
}

/* ── Eyebrow ──────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(var(--accent-rgb),0.1);
  font-size: 10px;
  margin-bottom: 3px;
}

/* ── Section head ─────────────────────────────── */
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.section-head-wide { align-items: center; }
.section-head h2 { font-size: clamp(18px, 4vw, 26px); }
.section-actions { display: flex; gap: 8px; align-items: center; }

/* ── Standings ─────────────────────────────────── */
.standings-panel, .matches-panel { padding: 12px 14px; }
.standings-panel, .matches-panel {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius);
  margin: 0 10px 10px;
  overflow: hidden;
}
.standings-panel + .matches-panel { margin-top: 0; }

.category-select {
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%230f2112' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat calc(100% - 8px) 50% / 14px,
    rgba(255,255,255,0.96);
  appearance: none;
  cursor: pointer;
  outline: none;
  min-width: 0;
}

.category-select:focus {
  border-color: rgba(var(--accent-rgb),0.4);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.1);
}

.standings-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Compact standings table — all columns always visible ─── */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.standings-table th,
.standings-table td {
  padding: 7px 2px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
}

.standings-table th {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  padding: 6px 2px;
}

.standings-table tbody tr:hover { background: rgba(var(--accent-rgb),0.04); }
.standings-table tbody tr:active { background: rgba(var(--accent-rgb),0.08); }

/* Column widths — fixed so everything fits on a 375px screen */
.standings-table .col-pos  { width: 28px; font-weight: 800; font-size: 12px; }
.standings-table .col-team { text-align: left; padding-left: 4px; }
.standings-table .col-num  { width: 24px; }
.standings-table .col-pts  { width: 28px; font-weight: 800; font-size: 12.5px; }
.standings-table .col-neg  { color: var(--danger); font-weight: 700; }
.standings-table .col-dg-pos { color: var(--success); font-weight: 600; }

/* Compact team cell */
.team-cell-compact {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.team-logo-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(15,33,18,0.1);
  flex-shrink: 0;
}

.team-logo-sm-fallback {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.team-name-compact {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  min-width: 0;
  max-width: 100%;
  display: block;
}

.team-name-compact:hover { color: var(--accent); text-decoration: underline; }

.standings-footer {
  margin-top: 10px;
  font-size: 10px;
  color: var(--muted);
  text-align: right;
  font-style: italic;
}

@media (min-width: 640px) {
  .standings-table th,
  .standings-table td { font-size: 13px; padding: 10px 6px; }
  .standings-table th { font-size: 10px; }
  .standings-table .col-pos  { width: 32px; font-size: 14px; }
  .standings-table .col-num  { width: 32px; }
  .standings-table .col-pts  { width: 36px; font-size: 14px; }
  .team-logo-sm, .team-logo-sm-fallback { width: 32px; height: 32px; }
  .team-name-compact { font-size: 13px; }
}

.team-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.team-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--team-color);
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--team-color) 18%, transparent);
}

.team-logo {
  width: 36px;
  height: 36px;
  padding: 3px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.team-logo-fallback {
  display: grid;
  place-items: center;
  font-family: "Sora", sans-serif;
  font-size: 13px;
  color: var(--accent-2);
  font-weight: 700;
}

.team-copy { display: grid; gap: 2px; min-width: 0; }
.team-copy strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.team-copy span { font-size: 11px; color: var(--muted); }

/* ── Matches ────────────────────────────────────── */
.matches-content { display: grid; gap: 12px; }

.date-accordion {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.88);
  overflow: hidden;
}

.date-accordion-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.date-accordion-head::-webkit-details-marker { display: none; }

.date-accordion-icon { transition: transform 200ms ease; color: var(--accent); }
details[open] .date-accordion-icon { transform: rotate(0deg); }
details:not([open]) .date-accordion-icon { transform: rotate(-90deg); }

.date-match-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(15,33,18,0.06);
  padding: 3px 8px;
  border-radius: 999px;
}

.date-accordion-body { display: grid; gap: 8px; padding: 0 10px 10px; }

/* ── Standings Fixture section ──────────────────────────────────────────────── */
.fixture-date-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 8px 8px;
  justify-content: center;
}

.fixture-chip {
  flex: 0 0 auto;
  width: 24px;
  height: 28px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--card-strong);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms, color 150ms, border-color 150ms;
  font-family: inherit;
  line-height: 1;
  min-width: 0;
}

.fixture-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.fixture-chip:hover:not(.active) {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: var(--accent);
}

.fixture-chip-highlight {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--accent);
}

.fixture-nav {
  display: flex;
  gap: 8px;
  padding: 0 14px 14px;
  justify-content: center;
}

.fixture-nav-btn {
  padding: 8px 22px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--card-strong);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms, color 150ms, border-color 150ms;
  font-family: inherit;
}

.fixture-nav-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.fixture-nav-btn:not([disabled]):not(.active):hover {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: var(--accent);
}

.fixture-nav-btn[disabled] {
  opacity: 0.38;
  cursor: default;
}

.fixture-title {
  text-align: center;
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(13px, 3.2vw, 17px);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.06em;
  padding: 0 14px 14px;
}

.fixture-matches-content { padding: 0 4px 8px; }

.date-match-count-done {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.date-match-count-partial {
  background: rgba(234, 179, 8, 0.18);
  color: #78350f;
}

/* ── Match card ─────────────────────────────────── */
.match-card { padding: 8px 0; }

/* Result color on the analyzed team's button — fixed, do not use theme variables */
.match-team-btn.result-win  { background: rgba(22,163,74,0.11);  border-color: rgba(22,163,74,0.32); }
.match-team-btn.result-loss { background: rgba(220,38,38,0.09);  border-color: rgba(220,38,38,0.30); }
.match-team-btn.result-draw { background: rgba(202,138,4,0.10);  border-color: rgba(202,138,4,0.35); }

/* All-categories result row coloring — fixed */
.cat-row-win  { background: rgba(22,163,74,0.10)  !important; border-radius: 10px; }
.cat-row-loss { background: rgba(220,38,38,0.08)  !important; border-radius: 10px; }
.cat-row-draw { background: rgba(202,138,4,0.09)  !important; border-radius: 10px; }

.match-row-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
  width: 100%;
  text-align: center;
}

.match-team-home { align-items: center; }
.match-team-away { align-items: center; }

.match-team-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.25;
  text-align: center;
  max-width: 100%;
}

.match-team-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(15,33,18,0.08);
  padding: 10px 6px;
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  text-align: center;
  -webkit-appearance: none;
  transition: background 130ms ease, border-color 130ms ease, transform 130ms ease;
}

.match-team-btn-home { justify-content: center; }
.match-team-btn-away { justify-content: center; }

.match-team-btn:hover {
  background: #f2f3f5;
  border-color: rgba(15,33,18,0.14);
  transform: translateY(-1px);
}

.match-team-highlight {
  background: #f2f3f5;
  border-color: rgba(15,33,18,0.16);
}

.match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 90px;
  padding: 4px 6px;
  text-align: center;
}

.match-score {
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.match-score-btn {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text);
  -webkit-appearance: none;
  padding: 0;
  font: inherit;
  transition: transform 130ms ease, opacity 130ms ease;
}

.match-score-btn:hover { opacity: 0.75; transform: translateY(-1px); }
.match-score-sep { margin: 0 2px; color: var(--muted); }
.match-score-pending { font-size: 14px; color: var(--muted); }

.match-status {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  border-radius: 999px;
}

.match-status-done { background: rgba(15,33,18,0.06); color: var(--muted); }
.match-status-live { background: rgba(220,38,38,0.1); color: var(--danger); }
.match-status-pending { background: rgba(15,33,18,0.06); color: var(--muted); }

.match-kickoff, .match-round { font-size: 11px; color: var(--muted); line-height: 1.3; }

/* ── Team view ──────────────────────────────────── */
.team-view { display: grid; gap: 0; }
.team-view-header { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.team-view-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.team-view-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; justify-content: space-between; }
/* Categoria en section-head de Resultados */
.team-view-cat-badge { font-family: "Sora", "Plus Jakarta Sans", sans-serif; font-size: clamp(20px, 4vw, 28px); font-weight: 900; color: var(--text); white-space: nowrap; flex-shrink: 0; line-height: 1; align-self: flex-end; }
/* Results section-head: badge centered, HISTORIAL right */
.team-results-head { position: relative; align-items: center; }
.team-results-head .team-view-cat-badge { position: absolute; left: 50%; transform: translateX(-50%); align-self: auto; }
.team-results-head .eyebrow { margin-bottom: 0; }
/* Nombre completo del club en el header: hasta 2 líneas, sin cortar */
.team-view-name { font-size: 14px; font-weight: 800; white-space: normal; line-height: 1.25; word-break: break-word; overflow: visible; text-overflow: unset; max-width: none; }
/* .team-copy strong tiene especificidad 0,1,1 y gana sobre .team-view-name (0,1,0) — esta regla tiene 0,2,0 */
.team-copy .team-view-name { white-space: normal; overflow: visible; text-overflow: unset; max-width: none; }
.team-view-body { display: grid; gap: 0; }

/* ── Team stats accordion ───────────────────────── */
.team-stats-accordion { margin: 0; border-radius: 0; border-top: 1px solid var(--border); }
.team-stats-accordion[open] .tsa-chevron { transform: rotate(180deg); }
.team-stats-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
}
.team-stats-summary::-webkit-details-marker { display: none; }
.tsa-icon { font-size: 18px; color: var(--accent); }
.tsa-title { flex: 1; }
.tsa-chevron { font-size: 20px; transition: transform 0.2s ease; }
.tsa-body { padding: 0 16px 16px; }
.team-stats-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.team-stats-table th,
.team-stats-table td { text-align: center; padding: 7px 5px; border-bottom: 1px solid var(--border); }
.team-stats-table th { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; padding-bottom: 6px; }
.team-stats-table tbody tr:last-child td { border-bottom: none; }
.tsa-label { text-align: left !important; font-weight: 700; color: var(--text); padding-left: 2px; }
.tsa-pts { font-weight: 800; color: var(--accent); }
.tsa-pos { color: #16a34a; font-weight: 700; }
.tsa-neg { color: #dc2626; font-weight: 700; }
.tsa-warn { font-size: 18px !important; color: #ca8a04; }
.tsa-alert { font-size: 12px; color: #92400e; background: #fef3c7; border: 1px solid #fde68a; border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
/* Fila "Todos" — mismo fondo que el selector de torneo */
.tsa-row-all td { background: rgba(var(--accent-rgb),0.08); color: var(--text); font-weight: 700; border-bottom: none; }
.tsa-row-all .tsa-label { color: var(--accent); font-weight: 800; }
.tsa-row-all td:last-child { color: var(--accent); font-weight: 800; }
/* Posición: lado derecho, flex-shrink */
.team-view-rank { flex-shrink: 0; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); background: rgba(var(--accent-rgb),0.10); border-radius: 999px; padding: 5px 10px; white-space: nowrap; }

/* ── Sync errors tab ───────────────────────────── */
.sync-errors-summary { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0 4px; }
.sync-err-badge { font-size: 11px; font-weight: 700; border-radius: 99px; padding: 3px 10px; }
.sync-err-badge.error   { background: rgba(220,38,38,0.1); color: #dc2626; }
.sync-err-badge.warning { background: rgba(202,138,4,0.12); color: #92400e; }
.sync-err-badge.info    { background: rgba(107,114,128,0.1); color: #374151; }
.sync-errors-list { display: grid; gap: 8px; padding: 8px 0 4px; }
.sync-error-item { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.sync-error-item.sync-error-error  { border-color: rgba(220,38,38,0.25); background: rgba(220,38,38,0.04); }
.sync-error-item.sync-error-warning{ border-color: rgba(202,138,4,0.25);  background: rgba(202,138,4,0.04);  }
.se-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.se-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.se-msg  { font-size: 13px; font-weight: 700; color: var(--text); }
.se-detail { font-size: 11px; color: var(--text-muted); word-break: break-word; line-height: 1.4; }
.se-nav-btn { padding: 6px; min-width: 32px; min-height: 32px; flex-shrink: 0; align-self: center; border-radius: 50%; }
.se-nav-btn .material-symbols-outlined { font-size: 18px; }

/* ── Match detail modal ─────────────────────────── */
.match-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.match-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

.match-detail-dialog {
  position: relative;
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  margin: 20px auto;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.99);
  box-shadow: 0 24px 64px rgba(0,0,0,0.24);
}

.match-detail-head {
  position: relative;
  display: block;
  padding-bottom: 14px;
  padding-right: 44px; /* espacio para el botón cerrar */
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.match-detail-head > button {
  position: absolute;
  top: 0;
  right: 0;
}

.match-detail-head h2 {
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
  margin: 4px 0 0;
  font-size: 20px;
  width: 100%;
}

.match-detail-body { display: grid; gap: 14px; padding-top: 14px; }

.match-detail-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.match-detail-summary-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  text-align: center;
}

.match-detail-summary-home { align-items: center; }
.match-detail-summary-away { align-items: center; }

.match-detail-summary-team .team-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.match-detail-team-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  word-break: break-word;
  text-align: center;
  line-height: 1.25;
}

.match-detail-summary-center { display: grid; gap: 4px; text-align: center; min-width: 70px; }
.match-detail-scoreline {
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
  font-size: 30px;
  font-weight: 700;
}

.match-detail-status { font-size: 11px; font-weight: 700; color: var(--muted); }
.match-detail-date { color: var(--muted); font-size: 12px; }

.match-detail-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(15,33,18,0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.match-detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.match-detail-column {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.match-detail-column-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 13px;
}

.match-detail-scorer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--line);
  gap: 3px;
}

.match-detail-scorer-name {
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.match-detail-scorer-goals {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
  color: var(--success);
}

.match-detail-scorer-goals .material-symbols-outlined { font-size: 16px; color: var(--success); }

.match-detail-scorer-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--success);
  background: rgba(21,128,61,0.1);
  padding: 3px 8px;
  border-radius: 999px;
}

/* ── Password-manager icon suppression ──────────── */
[data-lastpass-icon-root],
div[id^="__lpform_"],
div[class*="lpBoundingBox"],
div[class*="lastpass"],
[data-op-container],
[data-dashlanecreated],
.__lpIgnoreBlock,
.onepassword-button { display: none !important; width: 0 !important; height: 0 !important; overflow: hidden !important; }

/* ── Config panel — full-page ────────────────────── */
.config-panel {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.config-backdrop { display: none; }

.config-drawer {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  background: var(--bg, #f2f3f5);
}

/* Header — igual al app-topbar */
.config-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  height: 56px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--header-bg-start, #14532d), var(--header-bg-end, #16a34a));
  color: #fff;
}

.config-drawer-head > div { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.config-drawer-head .eyebrow { color: rgba(255,255,255,0.65); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }

.config-drawer-head h2 {
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tabs row */
.config-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--card, #fff);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.config-tabs::-webkit-scrollbar { display: none; }

.config-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 140ms ease;
  flex-shrink: 0;
}

.config-tab-btn .material-symbols-outlined { font-size: 15px; }

.config-tab-btn.active {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb),0.3);
  background: rgba(var(--accent-rgb),0.08);
}

/* Close button inside the green config header */
.config-drawer-head .btn-ghost {
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}
.config-drawer-head .btn-ghost:hover { background: rgba(255,255,255,0.22); color: #fff; }

/* Scrollable content */
.config-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: grid;
  align-content: start;
  width: 100%;
  box-sizing: border-box;
}

.config-tab-content { display: grid; gap: 16px; }

.config-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.config-section-head h3 { font-family: "Sora", "Plus Jakarta Sans", sans-serif; margin: 4px 0 0; font-size: 18px; }

/* ── Status stack ───────────────────────────────── */
.status-stack { display: grid; gap: 8px; }

.config-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 8px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.info-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.9);
  text-align: center;
}

.info-tile-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}

.info-tile-value {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.status-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.9);
  font-size: 13px;
}

.status-row strong {
  max-width: 60%;
  text-align: right;
  font-size: 12px;
  overflow-wrap: break-word;
}

/* ── Historial de sync ──────────────────────────── */
.historial-filters { display:flex; gap:8px; flex-wrap:wrap; align-items:flex-end; margin-bottom:12px; }
.historial-filters input[type=date],
.historial-filters select { font:inherit; font-size:13px; padding:7px 10px; border:1.5px solid var(--border); border-radius:10px; background:var(--bg); color:var(--text); height:36px; }
.historial-day { margin-bottom:12px; border:1px solid var(--border); border-radius:14px; overflow:hidden; }
.historial-day-head { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 14px; background:rgba(var(--accent-rgb),.06); border-bottom:1px solid var(--border); }
.historial-day-date { font-size:13px; font-weight:700; color:var(--text); }
.historial-day-count { font-size:11px; color:var(--muted); }
.historial-run { display:grid; grid-template-columns:80px 1fr auto auto; gap:8px 12px; align-items:center; padding:10px 14px; font-size:12px; border-bottom:1px solid var(--line); }
.historial-run:last-child { border-bottom:none; }
.historial-run-time { font-weight:700; color:var(--text); font-variant-numeric:tabular-nums; }
.historial-run-source { font-weight:600; color:var(--text); }
.historial-run-detail { color:var(--muted); font-size:11px; margin-top:2px; }
.historial-run-info { display:flex; flex-direction:column; min-width:0; }
.historial-badge { display:inline-flex; align-items:center; gap:4px; font-size:10px; font-weight:700; padding:2px 8px; border-radius:999px; text-transform:uppercase; letter-spacing:.04em; }
.historial-badge.ok { background:#dcfce7; color:#15803d; }
.historial-badge.err { background:#fee2e2; color:#dc2626; }
.historial-badge.running { background:#fef9c3; color:#a16207; }
.historial-stats { display:flex; gap:6px; flex-wrap:wrap; margin-top:4px; }
.historial-stat { font-size:11px; color:var(--muted); }
.historial-stat strong { color:var(--text); }
.historial-empty { text-align:center; color:var(--muted); padding:32px 0; font-size:13px; }
.historial-del-day { font-size:11px; padding:4px 10px; min-height:28px; border-radius:8px; }
.hdet-panel { padding:10px 14px 14px; border-bottom:1px solid var(--line); background:rgba(var(--accent-rgb),.03); }
.hdet-section { margin-bottom:10px; }
.hdet-section:last-child { margin-bottom:0; }
.hdet-label { display:inline-block; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--accent); margin-bottom:4px; }
.hdet-nums { display:block; font-size:11px; color:var(--muted); margin-bottom:4px; }
.hdet-list { font-size:11px; color:var(--text); margin-top:2px; }
.hdet-empty { font-size:11px; color:var(--muted); padding:4px 0; }
.hdet-table { width:100%; border-collapse:collapse; font-size:11px; margin-top:4px; }
.hdet-table th { text-align:left; color:var(--muted); font-weight:600; padding:3px 8px 3px 0; border-bottom:1px solid var(--line); white-space:nowrap; }
.hdet-table td { padding:3px 8px 3px 0; color:var(--text); border-bottom:1px solid var(--line); vertical-align:top; }
.hdet-table tr:last-child td { border-bottom:none; }
@media (max-width:540px) {
  .historial-run { grid-template-columns:70px 1fr auto auto; }
  .hdet-table { display:block; overflow-x:auto; }
}
/* ── Sync settings ──────────────────────────────── */
.sync-settings-panel { display: grid; gap: 14px; }

.sync-settings-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sync-preset-btn { padding: 6px 12px; min-height: 34px; font-size: 12px; border-radius: 999px; }

.sync-settings-grid { display: grid; gap: 12px; }

.sync-settings-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.9);
  display: grid;
  gap: 10px;
}

.sync-settings-card h4 { margin: 2px 0 0; font-size: 14px; }

.sync-status-options { display: grid; gap: 6px; }

.sync-interval-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.readonly-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(15,33,18,0.08);
  color: var(--muted);
  white-space: nowrap;
}

/* ── Form fields ────────────────────────────────── */
.field { display: grid; gap: 6px; }
.field span { font-size: 12px; font-weight: 700; color: var(--muted); }

.field input,
.field select,
.field textarea,
.color-field input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 13px;
  font: inherit;
  font-size: 16px; /* ≥16px evita auto-zoom de iOS Safari */
  background: rgba(255,255,255,0.98);
  color: var(--text);
  outline: none;
  transition: border-color 130ms ease, box-shadow 130ms ease;
}

.field input:focus,
.field select:focus {
  border-color: rgba(var(--accent-rgb),0.4);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.1);
}

.color-field { display: flex; align-items: stretch; gap: 8px; }
.color-field input[type="color"] { width: 64px; min-width: 64px; padding: 4px; border-radius: 10px; cursor: pointer; }

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.checkbox-field input { width: 18px; height: 18px; cursor: pointer; }

/* ── Team form ──────────────────────────────────── */
.team-form-panel {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(246,253,248,0.98);
  margin-bottom: 16px;
}

.team-form, .field { display: grid; gap: 10px; }

.team-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.source-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* ── Logo upload ────────────────────────────────── */
.logo-upload-wrap {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.logo-preview-box {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--bg);
  overflow: hidden;
}
.logo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.logo-upload-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.logo-upload-btn { align-self: flex-start; }
.logo-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
@media (max-width: 420px) {
  .logo-upload-wrap { flex-direction: column; }
  .logo-preview-box { width: 72px; height: 72px; }
}

/* ── Color palette ──────────────────────────────── */
.color-palette { display: flex; flex-wrap: wrap; gap: 8px; }

.palette-swatch {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 2px solid rgba(15,33,18,0.08);
  background: var(--swatch);
  cursor: pointer;
  transition: transform 130ms ease, border-color 130ms ease, box-shadow 130ms ease;
}

.palette-swatch.active {
  transform: translateY(-2px);
  border-color: #fff;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--swatch) 50%, rgba(15,33,18,0.15));
}

.palette-swatch:hover { transform: translateY(-1px); }

/* ── Teams grid ─────────────────────────────────── */
.teams-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.teams-wrap { display: grid; gap: 10px; }

.team-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(15,33,18,0.08);
  background: rgba(255,255,255,0.96);
}

.team-card-inactive { opacity: 0.68; }

.team-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.team-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.team-card-actions { display: flex; gap: 6px; }
.team-card-actions .btn { min-height: 34px; padding: 6px 10px; font-size: 12px; border-radius: 10px; }

.mini-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(var(--accent-rgb),0.1);
  color: var(--accent);
}

.mini-badge-alt { background: rgba(14,165,233,0.1); color: var(--accent-2); }
.mini-badge-muted { background: rgba(15,33,18,0.08); color: var(--muted); }

.meta-pill {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.88);
  font-size: 13px;
}

.meta-pill strong { display: block; margin-top: 3px; }

/* ── PLP category editor ────────────────────────── */
.plp-section-head { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; }
.cat-pages-editor { display: grid; gap: 6px; margin-bottom: 4px; }
.cat-page-row { display: flex; gap: 8px; align-items: center; }
.cat-page-row .field-input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 16px; background: var(--card); color: var(--text); }
.cat-page-row .field-input:focus { outline: none; border-color: var(--accent); }
.cat-page-row .cat-page-del { padding: 6px; min-width: 32px; min-height: 32px; flex-shrink: 0; }
#sourcePlpFields { background: rgba(var(--accent-rgb),0.04); border: 1px solid rgba(var(--accent-rgb),0.15); border-radius: 12px; padding: 14px; }

/* ── Sources list ───────────────────────────────── */
.sources-wrap { display: grid; gap: 10px; }

.source-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.96);
  display: grid;
  gap: 8px;
}

.source-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.source-card-title { font-weight: 800; font-size: 14px; margin: 0; }
.source-card-actions { display: flex; gap: 6px; }
.source-card-actions .btn { min-height: 34px; padding: 6px 10px; font-size: 12px; border-radius: 10px; }

.source-card-params {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.source-param {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(240,253,244,0.6);
  font-size: 11px;
}

.source-param-label { color: var(--muted); font-weight: 700; }
.source-param-value { font-weight: 800; font-size: 12px; }

/* ── Tables browser ─────────────────────────────── */
.tables-wrap { overflow-x: auto; }

.tables-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.tables-table th,
.tables-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.tables-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }
.tables-table tbody tr:hover { background: rgba(var(--accent-rgb),0.03); }
.table-empty-value { color: var(--muted); }
.table-cell-truncate { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.table-cell-wrap { white-space: normal; max-width: 220px; word-break: break-all; }

.tables-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* ── Empty state ────────────────────────────────── */
.empty-state {
  padding: 24px 14px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255,255,255,0.5);
  font-size: 14px;
}

/* ═══════════════════════════════════════════════
   TABLET  ≥ 640px
═══════════════════════════════════════════════ */
@media (max-width: 639px) {
  /* Mobile: todos los inputs/selects ≥16px para evitar auto-zoom de iOS Safari */
  input, select, textarea { font-size: 16px !important; }

  /* ── Header mobile: flechas a los lados, marca centrada ── */
  .app-topbar { justify-content: space-between; }
  .app-brand  { flex: 1; justify-content: center; }
  .topbar-side { display: none; }

  /* Flechas de navegación en el header — solo móvil */
  .topbar-nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    padding: 0;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 50%;
    color: rgba(255,255,255,0.92);
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: unset;
  }
  .topbar-nav-arrow .material-symbols-outlined { font-size: 24px; }
  .topbar-nav-arrow:hover  { background: rgba(255,255,255,0.26); }
  .topbar-nav-arrow:active { background: rgba(255,255,255,0.32); }
  .topbar-nav-arrow:disabled { opacity: 0.28; cursor: default; }
}

@media (min-width: 640px) {
  /* Desktop/tablet: reducir inputs a 14px (no hay riesgo de iOS auto-zoom) */
  .field input, .field select, .field textarea, .color-field input,
  .cat-page-row .field-input { font-size: 14px; }
  .category-select { font-size: 12px; }

  body { padding-bottom: 0; }

  /* Tablet+: always show kicker and desc */
  #appKicker { display: block; }
  .brand-desc { display: block; }
  .profile-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    font-size: 12px;
  }
  .profile-copy strong { font-size: 13px; }
  .profile-chip { padding: 6px 10px; border-radius: 999px; }
  .topbar-actions .btn { padding: 10px 14px; min-height: 44px; min-width: auto; border-radius: 14px; }
  .topbar-actions .btn .material-symbols-outlined { font-size: 22px; }
  .btn-label-full { display: inline; }
  .toolbar-btn { padding: 10px 18px; }

  /* Tabs become top nav */
  .view-tabs {
    position: static;
    background: transparent;
    border-top: none;
    height: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    max-width: 1480px;
    margin: 0 auto;
  }

  .view-tab-btn {
    flex-direction: row;
    flex: 0 0 auto;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    font-size: 13px;
    color: var(--muted);
  }

  .view-tab-btn .material-symbols-outlined { font-size: 18px; }

  .view-tab-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--btn-primary-bg-start), var(--btn-primary-bg-end));
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(var(--accent-rgb),0.22);
  }

  .view-tab-btn span:not(.material-symbols-outlined) { display: inline; }

  .stat-card { padding: 12px 8px; }

  .hero { padding: 16px; }

  .source-toolbar { padding: 10px 14px; }
  .panel { margin: 0 14px 14px; }
  .alert { margin: 0 14px 12px; }

  .teams-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sync-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ═══════════════════════════════════════════════
   DESKTOP  ≥ 1024px
═══════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .app-topbar { padding: 12px 24px; }

  .panel { margin: 0 20px 20px; }
  .alert { margin: 0 20px 14px; }
  .source-toolbar { padding: 10px 20px; }

  .view-tabs { padding: 8px 20px; }

  .standings-panel, .matches-panel { padding: 22px; }

  .standings-table th,
  .standings-table td { padding: 12px 10px; font-size: 14px; }

  .team-copy strong { max-width: 220px; }

  .teams-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .source-card-params { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ── Instagram Share ────────────────────────────────────── */

/* Button in section head */
.share-ig-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 36px;
  padding: 5px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.share-ig-btn:hover { background: var(--surface2, #f1f5f9); border-color: #e1306c; }
.share-ig-btn:active { background: var(--surface2, #f1f5f9); }
.ig-logo-icon { width: 20px; height: 20px; flex-shrink: 0; }
.share-ig-label { display: none; }
.share-download-btn .ig-logo-icon { width: 20px; height: 20px; }

/* Modal dialog */
.share-dialog { max-width: 500px; gap: 20px; }
.share-modal-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.share-modal-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 52%, #fcb045 100%);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* Canvas preview — sin aspect-ratio fijo para soportar altura dinámica */
.share-preview-wrap {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 36px rgba(5,46,22,0.22), 0 2px 8px rgba(5,46,22,0.12);
  background: #052e16;
}
.share-preview-wrap canvas { width: 100%; height: auto; display: block; }
.share-canvas-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #052e16;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  transition: opacity 0.3s;
}
.share-canvas-loading.hidden { display: none; }

/* Modal body */
.share-modal-body { display: grid; gap: 14px; }

/* CTA block */
.share-cta-block { display: grid; gap: 10px; }
.share-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
.share-download-btn {
  width: 100%;
  padding: 14px;
  font-size: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 52%, #fcb045 100%);
  box-shadow: 0 8px 24px rgba(131,58,180,0.3);
}
.share-download-btn:hover { box-shadow: 0 10px 28px rgba(131,58,180,0.45); }

/* Marketing tip */
.share-marketing-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(var(--accent-rgb),0.07);
  border: 1px solid rgba(var(--accent-rgb),0.18);
  font-size: 13px;
  color: var(--success);
  line-height: 1.5;
}
.share-marketing-tip .material-symbols-outlined {
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Auth subtle link ───────────────────────────────────── */
.btn-link-subtle {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 6px;
  background: none;
  border: none;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-link-subtle:hover { color: var(--accent); }

/* ── Brand preview ──────────────────────────────────────── */
.brand-preview-box {
  margin-top: 4px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.brand-preview-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--header-bg-start) 0%, var(--header-bg-end) 100%);
  color: #fff;
}
.brand-preview-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.24);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.brand-preview-mark .material-symbols-outlined { font-size: 20px; }
.brand-preview-copy { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.brand-preview-title { font-family: "Sora", sans-serif; font-size: 15px; font-weight: 700; line-height: 1.1; }
.brand-preview-kicker { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; opacity: 0.8; }
.brand-preview-desc { font-size: 10px; opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── User dropdown menu ─────────────────────────────────── */
.user-menu-wrap { position: relative; }
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  background: rgba(255,255,255,0.99);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
  z-index: 300;
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 120ms ease;
}
.user-dropdown-item:hover { background: rgba(var(--accent-rgb),0.07); }
.user-dropdown-item .material-symbols-outlined { font-size: 18px; color: var(--muted); }
.user-dropdown-danger { color: var(--danger); }
.user-dropdown-danger .material-symbols-outlined { color: var(--danger); }
.user-dropdown-divider { height: 1px; background: var(--border); margin: 0; }

/* ── View tabs centrados ─────────────────────────────────── */
.view-tabs { justify-content: center; gap: 4px; }
.view-tab-btn { flex: 0 0 auto; min-width: 88px; padding: 8px 12px; }
/* Botón usuario móvil: oculto en desktop, visible en móvil */
.mobile-user-tab { display: none; }
@media (max-width: 639px) {
  .mobile-user-tab { display: flex; }
}

/* ── Category chips (below source-toolbar) ───────────────── */
.cat-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  padding: 3px 14px 6px;
  background: var(--bg);
}
/* Force a line break between ordinal (1ra-8va) and extra categories */
.cat-chip-break {
  flex-basis: 100%;
  height: 0;
}
.cat-chip {
  padding: 4px 9px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.cat-chip.active {
  background: var(--accent);
  color: #fff;
}
.cat-chip:hover:not(.active) {
  background: rgba(var(--accent-rgb), 0.08);
}

/* ── Liga bar row (solo contenedor del bar) ─────────────── */
.liga-row-wrap {
  background: var(--bg);
}

/* ── Liga bar ───────────────────────────────────────────── */
.liga-bar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px 3px;
  background: var(--bg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.liga-bar::-webkit-scrollbar { display: none; }

.liga-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.liga-btn:hover { opacity: 0.85; }
.liga-btn--active { /* estado activo solo en el círculo del logo */ }

.liga-logo-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.50);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--accent);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  flex-shrink: 0;
}
.liga-btn--active .liga-logo-wrap {
  background: var(--header-bg-start);
  border-color: rgba(255,255,255,0.92);
  box-shadow: 0 0 0 2.5px var(--accent);
}

.liga-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.liga-logo-fallback {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.02em;
}

.liga-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}
.liga-btn--active .liga-name { color: var(--accent); }

/* ── Favorites & cat selector ───────────────────────────── */
.cat-select-wrap { display: flex; align-items: center; gap: 6px; }
.fav-btn {
  min-height: 36px; min-width: 36px; padding: 5px; border-radius: 999px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.fav-btn .material-symbols-outlined {
  font-size: 20px;
  color: var(--muted);
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" -25, "opsz" 24;
  transition: color 0.2s, font-variation-settings 0.2s;
}
.fav-btn.is-fav .material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 700, "GRAD" 0, "opsz" 24;
  color: var(--accent-light);
}
.fav-star { color: var(--accent); font-size: 12px; }

/* ── Site footer ─────────────────────────────────────────── */
.site-footer {
  background: var(--header-bg-start, #14532d);
  margin-top: 40px;
  padding: 48px 16px 32px;
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
}
.footer-logo .material-symbols-outlined { font-size: 24px; color: #fff; }
.footer-site-name {
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.footer-tagline {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255,255,255,0.62);
  max-width: 280px;
  margin: 0;
}
.footer-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(255,255,255,0.42);
  margin: 0;
}
.footer-location .material-symbols-outlined { font-size: 14px; }
.footer-nav-heading {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #22c55e;
  margin: 0 0 14px;
}
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav ul li a {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255,255,255,0.72);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-nav ul li a:hover { color: #fff; }
.footer-nav ul li a .material-symbols-outlined { font-size: 16px; flex-shrink: 0; }
.footer-seo-block {
  max-width: 960px;
  margin: 36px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-seo-block p {
  font-size: 12px;
  line-height: 1.75;
  color: rgba(255,255,255,0.38);
  margin: 0;
}
.footer-bar {
  max-width: 960px;
  margin: 20px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.32);
}
.footer-bar-dot { opacity: 0.5; }
.footer-bar-dot--push { margin-left: auto; }
.footer-bar-link {
  color: rgba(255,255,255,0.52);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-bar-link:hover { color: #fff; }
@media (min-width: 640px) {
  .footer-inner { grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; }
}
@media (min-width: 960px) {
  .site-footer { padding: 56px 24px 36px; }
}

/* Team favorite button inside standings row */
.team-fav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; padding: 0 0 0 4px;
  vertical-align: middle; opacity: 0.35; transition: opacity 0.15s;
}
.team-fav-btn:hover { opacity: 0.85; }
.team-fav-btn.is-fav { opacity: 1; }
.team-fav-btn .material-symbols-outlined { font-size: 14px; color: var(--accent); }
.team-fav-btn.is-fav .material-symbols-outlined { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

/* ── Fan user management ─────────────────────────────────── */
.fan-user-form { background: rgba(var(--accent-rgb),0.04); border: 1px solid rgba(var(--accent-rgb),0.15); border-radius: 12px; padding: 14px; margin-bottom: 4px; }
.fan-user-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); }
.fan-user-info { display: grid; gap: 2px; min-width: 0; }
.fan-user-name { font-weight: 800; font-size: 13px; }
.fan-user-meta { font-size: 11px; color: var(--muted); }
.fan-user-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Admin login modal (futsalhoy.com) ──────────────────── */
.admin-login-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.admin-login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.52);
  backdrop-filter: blur(4px);
}
.admin-login-dialog {
  position: relative;
  width: min(420px, 100%);
  background: rgba(255,255,255,0.99);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0,0,0,0.24);
  padding: 20px;
  display: grid;
  gap: 16px;
  margin: auto;
}
.admin-login-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.admin-login-head h2 {
  font-family: "Sora", "Plus Jakarta Sans", sans-serif;
  margin: 4px 0 0;
  font-size: 20px;
}
.login-form-body { display: grid; gap: 12px; }
.login-error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; border-radius: 10px; padding: 9px 12px; font-size: 13px; font-weight: 600; }
.login-error.hidden { display: none; }
/* Pantalla de acceso privado (gated) */
.admin-login-modal.login-gated { align-items: center; background: linear-gradient(160deg,#15803d 0%,#0f4f28 100%); }
.admin-login-modal.login-gated .admin-login-backdrop { display: none; }
.admin-login-modal.login-gated #loginModalClose { display: none; }
/* Toggle switch (setting-toggle) */
.setting-toggle { position:relative; width:44px; height:26px; flex-shrink:0; border-radius:999px; border:none; background:var(--border); cursor:pointer; transition:background .2s; padding:0; }
.setting-toggle.active { background:var(--accent); }
.setting-toggle:disabled { opacity:.5; cursor:not-allowed; }
.setting-toggle-thumb { position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.25); transition:transform .2s; display:block; }
.setting-toggle.active .setting-toggle-thumb { transform:translateX(18px); }
.search-result-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.search-result-card + .search-result-card { margin-top: 8px; }
/* Topbar icon buttons (sync, config, logout) */
.topbar-icon-btn {
  width: 38px; height: 38px;
  padding: 0;
  border-radius: 12px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--header-text);
  min-height: unset;
}
.topbar-icon-btn:hover { background: rgba(255,255,255,0.24); transform: none; }
.topbar-icon-btn .material-symbols-outlined { font-size: 20px; }
/* Sync: show label on desktop */
#manualSyncBtn .btn-label-full { display: none; }
@media (min-width: 640px) {
  #manualSyncBtn { width: auto; padding: 0 14px; border-radius: 14px; }
  #manualSyncBtn .btn-label-full { display: inline; }
}

/* Flechas de navegación en header: ocultas en desktop, visibles solo en móvil */
@media (min-width: 640px) {
  .topbar-nav-arrow { display: none; }
}

/* User mark — same style as brand-mark */
.topbar-user-mark {
  width: 40px; height: 40px;
  padding: 0;
  min-height: unset;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.24);
  color: var(--header-text);
  display: grid;
  place-items: center;
  transition: background 140ms ease;
}
.topbar-user-mark:hover { background: rgba(255,255,255,0.28); transform: none; }
.topbar-user-mark .material-symbols-outlined { font-size: 22px; }
/* Logged-in state: slightly highlighted */
.topbar-user-mark.is-logged-in {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.42);
}
.topbar-user-mark.is-logged-in .material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* ── Fav btn guest state ─────────────────────────────────── */
.fav-btn-guest { opacity: 0.45; }
.fav-btn-guest:hover { opacity: 0.75; }

/* ── Registration form ───────────────────────────────────── */
.reg-form-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .reg-form-grid { grid-template-columns: 1fr; } }

.club-picker {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-height: 180px; overflow-y: auto;
  padding: 6px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface);
}
.club-picker-loading { font-size: 12px; color: var(--text-muted); padding: 4px; }
.club-pick-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: transparent; border: 1.5px solid var(--border);
  border-radius: 10px; padding: 6px 8px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-width: 60px; max-width: 80px;
  font-size: 10px; font-weight: 600; color: var(--text);
  text-align: center; line-height: 1.2;
}
.club-pick-item:hover { border-color: var(--accent); background: rgba(var(--accent-rgb),0.07); }
.club-pick-item.selected { border-color: var(--accent); background: rgba(var(--accent-rgb),0.14); }
.club-pick-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; flex-shrink: 0;
}
.club-pick-logo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; border-radius: 50%;
}
.club-pick-initial { font-size: 15px; font-weight: 800; color: #fff; z-index: 1; }
.club-pick-logo ~ .club-pick-initial { display: none; }
.club-pick-name { word-break: break-word; }

/* ── Login footer links ─────────────────────────────────── */
.login-footer-links { display: flex; flex-direction: column; gap: 4px; align-items: center; }

/* ── Admin reg settings ─────────────────────────────────── */
.reg-settings-form { display: grid; gap: 10px; }
.reg-settings-form .team-form-grid { gap: 10px; }
