:root {
  --bg: #f4f5f7;
  --bg-card: #ffffff;
  --bg-card-hover: #eee;
  --border: #e6e8ec;
  --text: #1a1d29;
  --text-dim: #6b7280;
  --text-faint: #9aa0ab;
  --primary: #00a650;
  --primary-dark: #00893f;
  --live: #e02020;
  --live-accent: #00a650;
  --live-accent-bg: #02ca632f;
  --header-bg: #0d1526;
  --sidebar-bg: #ffffff;
  --surface: #14181f;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a0d13;
  --bg-card: #12161f;
  --bg-card-hover: #1e2431;
  --border: #232938;
  --header-bg: #ebebeb;
  --text: #e7eaf1;
  --text-dim: #9aa3b8;
  --text-faint: #6b7488;
  --header-bg: #05070b;
  --sidebar-bg: #12161f;
  --surface: #12161f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; outline: none; scroll-behavior: smooth;}

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  font-family: 'Readex Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.15s, color 0.15s;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

/* ===== Header ===== */
.site-header {
  background: var(--header-bg);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  box-shadow: var(--shadow-md);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 20px;
  height: 56px;
}
.brand { display: flex; align-items: center; }
.brand-logo { width: 200px;}
.brand-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 166, 80, 0.25);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.header-search:hover { color: #fff; border-color: var(--primary); background: rgba(255, 255, 255, 0.12); }

/* ===== Header toggles (theme / language) ===== */
.header-toggles { display: flex; align-items: center; gap: 8px; margin-left: auto;}
.icon-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: all 0.15s;
  flex: 0 0 auto;
}
.icon-toggle:hover { border-color: var(--primary); color: #fff; }
.icon-toggle .icon-theme-light { display: none; }
:root[data-theme="dark"] .icon-toggle .icon-theme-dark { display: none; }
:root[data-theme="dark"] .icon-toggle .icon-theme-light { display: block; }
.mobile-nav-item svg { pointer-events: none; }

.lang-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 2px;
  flex: 0 0 auto;
}
.lang-toggle button, .lang-toggle a {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11.5px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-block;
}
.lang-toggle button.active, .lang-toggle a.active { background: var(--primary); color: #fff; }
.lang-toggle button:not(.active):hover, .lang-toggle a:not(.active):hover { color: #fff; }

/* ===== Search modal ===== */
.search-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 16px;
  z-index: 1000;
}
.search-modal {
  width: 100%;
  max-width: 620px;
  max-height: 76vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.search-modal-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-faint);
}
.search-modal-input-row input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
}
.search-modal-close {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.search-modal-close:hover { color: var(--text); }

.search-modal-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.search-modal-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.search-modal-tab:hover { color: var(--text); background: var(--bg-card-hover); }
.search-modal-tab.active { color: #fff; background: var(--primary); }
.search-modal-tab-count {
  font-size: 11px;
  background: var(--bg-card-hover);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 1px 6px;
}
.search-modal-tab.active .search-modal-tab-count { background: rgba(0, 0, 0, 0.2); color: #fff; }

.search-modal-results {
  overflow-y: auto;
  padding: 8px 0 12px;
}
.search-result-section h4 {
  margin: 10px 16px 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.search-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 16px;
  color: var(--text);
  text-decoration: none;
}
a.search-result-row:hover { background: var(--bg-card-hover); }
.search-result-teams {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  min-width: 0;
  overflow: hidden;
}
.search-result-teams img { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.search-result-teams span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-teams .vs { color: var(--text-faint); flex-shrink: 0; }
.search-result-meta {
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
  flex-shrink: 0;
}
.search-result-matches {
  padding: 8px;
}
.search-result-matches .match-card {
  border-top-color: var(--border);
  color: var(--text);
}
.search-result-matches .match-card:first-child { border-top: none; }
.search-result-matches .match-card:hover { background: var(--bg-card-hover); }
.search-result-matches .match-time { color: var(--text-dim); }
.search-result-matches .match-fav { color: var(--text-faint); }
.search-result-matches .match-fav:hover { color: var(--text-dim); }

/* ===== Shell layout ===== */
.site-shell {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 72px 20px 0;
}
.site-shell-main { flex: 1; min-width: 0;}
.site-shell-main .container { max-width: none; padding: 0; }

/* ===== Sidebar ===== */
.sidebar {
  width: 230px;
  flex: 0 0 230px;
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}
.sidebar-nav { display: flex; flex-direction: column; padding: 6px; }
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 13.5px;
}
.sidebar-item:hover { background: var(--bg); color: var(--text); }
.sidebar-item.active { background: rgba(0, 166, 80, 0.1); color: var(--primary-dark); }
.sidebar-item-icon { display: flex; align-items: center; justify-content: center; width: 18px; flex-shrink: 0; }
.sidebar-item-icon-img { width: 18px; height: 18px; object-fit: contain; }
.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-top: 4px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-dim);
}
.sidebar-search svg { flex-shrink: 0; }
.sidebar-search:focus-within { border-color: var(--primary); color: var(--text); }
.sidebar-search input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-weight: 500;
  font-size: 13px;
  width: 100%;
  font-family: inherit;
}
.sidebar-search input::placeholder { color: var(--text-dim); }

.sidebar-section-title {
  padding: 12px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.region-list { display: flex; flex-direction: column; padding: 0 6px 6px; }
.region-item { border-radius: 6px; }
.region-item-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 13px;
  border-radius: 6px;
  text-align: left;
}
.region-item-head:hover { background: var(--bg); color: var(--text); }
.region-item.open .region-item-head { color: var(--primary-dark); background: rgba(0, 166, 80, 0.08); }
.region-flag { width: 17px; height: 17px; object-fit: contain; border-radius: 2px; flex: 0 0 auto; }
.region-name-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-count { color: var(--text-faint); font-size: 11px; font-weight: 600; }
.region-caret { font-size: 10px; transition: transform 0.15s; color: var(--text-faint); }
.region-item.open .region-caret { transform: rotate(180deg); }
.region-item-head-static { cursor: default; color: var(--primary-dark); background: rgba(0, 166, 80, 0.08); }

.region-leagues {
  display: flex;
  flex-direction: column;
  padding: 2px 4px 6px;
  gap: 1px;
}
.region-leagues-loading { color: var(--text-faint); font-size: 12px; padding: 6px 0; }
.region-league-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 5px;
  color: var(--text-dim);
  font-size: 12.5px;
}
.region-league-link:hover { background: var(--bg); color: var(--primary-dark); }
.region-league-link img { width: 14px; height: 14px; object-fit: contain; flex: 0 0 auto; }

.sidebar-load-more {
  display: block;
  width: calc(100% - 12px);
  margin: 4px 6px 10px;
  padding: 9px 10px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.sidebar-load-more:hover:not(:disabled) { border-color: var(--primary); color: var(--primary-dark); }
.sidebar-load-more:disabled { opacity: 0.6; cursor: default; }

.load-more-btn {
  display: block;
  width: 100%;
  margin: 4px 0 16px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.load-more-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary-dark); }
.load-more-btn:disabled { opacity: 0.6; cursor: default; }

/* ===== Date strip ===== */
.date-strip {
  display: flex;
  gap: 6px;
  padding: 4px 0 16px;
}
.date-chip {
  flex: 0 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s;
}
.date-chip:hover { border-color: var(--primary); color: var(--primary-dark); }
.date-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
/* ===== Custom date picker ===== */
.date-picker { position: relative; flex: 0 0 auto; margin-left: 4px; }
.date-picker-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.date-picker-btn:hover { border-color: var(--primary); color: var(--primary-dark); }

.date-strip-search {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.date-strip-search:hover { border-color: var(--primary); color: var(--primary-dark); }
.date-picker.open .date-picker-btn {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
}

.date-picker-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 288px;
  max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 14px;
  z-index: 60;
  animation: date-picker-pop 0.14s ease-out;
  transform-origin: top right;
}
@keyframes date-picker-pop {
  from { opacity: 0; transform: scale(0.94) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.date-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.date-picker-month {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  text-transform: capitalize;
}
.date-picker-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
}
.date-picker-nav:hover { border-color: var(--primary); color: var(--primary-dark); }

.date-picker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.date-picker-weekdays span {
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
}

.date-picker-grid { display: flex; flex-direction: column; gap: 2px; }
.date-picker-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.date-picker-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.12s;
}
.date-picker-day:hover:not(.selected) { background: var(--bg); }
.date-picker-day.muted { color: var(--text-faint); font-weight: 400; }
.date-picker-day.today { color: var(--primary-dark); box-shadow: inset 0 0 0 1.5px var(--primary); }
.date-picker-day.selected { background: var(--primary); color: #fff; box-shadow: none; }

.date-picker-today-btn {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.date-picker-today-btn:hover { border-color: var(--primary); color: var(--primary-dark); }

.filters { display: flex; gap: 10px; margin-bottom: 16px; }

/* ===== Native <select>: custom chevron + polished states ===== */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--bg-card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'%3E%3Cpath fill='%236b7280' d='M6.7 9.3a1 1 0 0 1 1.4 0L12 13.2l3.9-3.9a1 1 0 1 1 1.4 1.4l-4.6 4.6a1 1 0 0 1-1.4 0L6.7 10.7a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 34px 9px 12px;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
select::-ms-expand { display: none; }
select:hover { border-color: var(--primary); }
select:focus-visible, select.open {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 166, 80, 0.12);
}
select:disabled { cursor: default; opacity: 0.6; }
select option {
  background: var(--bg-card);
  color: var(--text);
}
:root[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'%3E%3Cpath fill='%239aa3b8' d='M6.7 9.3a1 1 0 0 1 1.4 0L12 13.2l3.9-3.9a1 1 0 1 1 1.4 1.4l-4.6 4.6a1 1 0 0 1-1.4 0L6.7 10.7a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
}

.native-select {
  font-weight: 600;
  min-width: 140px;
}

/* ===== Custom select (JS dropdown) ===== */
.select { position: relative; }
.select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  min-width: 140px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.select-trigger:hover { border-color: var(--primary); }
.select-trigger.open,
.select-trigger:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 166, 80, 0.12);
}
.select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-caret { flex-shrink: 0; color: var(--text-faint); transition: transform 0.15s; }
.select-trigger.open .select-caret { transform: rotate(180deg); }

.select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  max-height: 240px;
  overflow-y: auto;
  outline: none;
}
.select-option {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.select-option.active { background: var(--bg); }
.select-option.selected { color: var(--primary); font-weight: 700; }

.admin-form .select-trigger { padding: 10px 12px; font-weight: 400; font-size: 13.5px; border-radius: 7px; }
.ad-slot-row-top .select { min-width: 170px; }

.static-page-content { line-height: 1.7; color: var(--text); font-size: 14.5px; }
.static-page-content :first-child { margin-top: 0; }
.static-page-content :last-child { margin-bottom: 0; }
.static-page-content p { margin: 0 0 14px; }
.static-page-content h1 { font-size: 24px; margin: 28px 0 14px; }
.static-page-content h2 { font-size: 20px; margin: 26px 0 12px; }
.static-page-content h3 { font-size: 16.5px; margin: 22px 0 10px; }
.static-page-content h4, .static-page-content h5, .static-page-content h6 { font-size: 14.5px; margin: 18px 0 8px; }
.static-page-content ul, .static-page-content ol { margin: 0 0 14px; padding-left: 22px; }
.static-page-content li { margin-bottom: 4px; }
.static-page-content a { color: var(--primary-dark); text-decoration: underline; }
.static-page-content blockquote {
  margin: 0 0 14px;
  padding: 4px 16px;
  border-left: 3px solid var(--primary);
  color: var(--text-dim);
}
.static-page-content pre {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow-x: auto;
  font-size: 13px;
}
.static-page-content img { max-width: 100%; height: auto; border-radius: 6px; }
.static-page-content strong { font-weight: 700; }

.state-msg { text-align: center; color: var(--text-faint); padding: 48px 0; font-size: 14px; }
.state-msg.error { color: var(--live); }

/* ===== League group ===== */
.league-group {
  /* background: var(--bg-card); */
  /* border: 1px solid var(--border); */
  /* border-radius: var(--radius); */
  margin-bottom: 14px;
  /* overflow: hidden; */
  /* box-shadow: var(--shadow-sm); */
}
.league-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 0;
  /* border-bottom: 1px solid var(--border); */
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}
.league-group-header img { width: 18px; height: 18px; object-fit: contain; border-radius: 3px; }
.region-name { color: var(--text-faint); font-weight: 500; margin-left: auto; font-size: 12px; }

.league-group-matches { display: flex; flex-direction: column; gap:5px;}

/* ===== Match card (row) ===== */
.match-card {
  position: relative;
  display: grid;
  grid-template-columns: 50px 1fr 24px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text);
  background-color: var(--bg-card);
  transition: background 0.12s;
  border-radius: 8px;
  overflow: hidden;
}
.match-card:first-child { border-top: none; }
.match-card:hover { background: var(--bg-card-hover); }

.match-card.is-live {
  padding: 10px 12px 10px 10px;
  border-top: none;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.match-card.is-live::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, var(--live-accent-bg),transparent);
}

.match-card.is-live::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 5px;
  border-radius: 0 10px 10px 0;
  background: var(--live-accent);
}

.match-time {
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  color: var(--text-dim);
  white-space: nowrap;
  border-right: 1px solid var(--border);
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.match-time.live {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-items: center;
  line-height: 1.15;
  color: var(--live-accent);
}
.minute-main { font-size: 12px; font-weight: 800; color: var(--text); }
.minute-extra { font-size: 11px; font-weight: 700; color: var(--live-accent); }
.match-time.finished { color: var(--text-faint); }
.match-time.postponed { color: #b45309; }

.status-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 5px;
  text-align: center;
  white-space: nowrap;
  min-width: 40px;
}
.status-pill.upcoming { color: var(--text-dim); background: var(--bg); }
.status-pill.finished { color: var(--text-faint); background: var(--bg); }
.status-pill.postponed { color: #b45309; background: rgba(180, 83, 9, 0.12); }
.status-pill.live {
  color: var(--live);
  background: rgba(224, 32, 32, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.status-pill.live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  animation: pulse-dot 1.4s ease-in-out infinite;
}

.match-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.match-team-row { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; min-width: 0; }
.match-team-row img { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.match-team-row span:not(.row-score) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.row-score { font-weight: 800; font-size: 13.5px; }
.is-live .row-score { color: var(--text); font-size: 15px; }

.match-fav {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.match-fav:hover { color: var(--text-dim); }
.match-fav.active { color: #f5a623; }
.match-fav.active svg path { fill: currentColor; }

/* ===== Sports grid ===== */
.sports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.sport-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
}
.sport-card img { width: 30px; height: 30px; }
.sport-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }

h1 { font-size: 21px; font-weight: 800; letter-spacing: -0.3px; }
.page-header { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; }
.page-header-icon { width: 30px; height: 30px; }

.league-pills { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 16px; }
.league-pill {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.league-pill:hover { border-color: var(--primary); color: var(--primary-dark); }
.league-pill img { width: 16px; height: 16px; }

/* ===== Standings ===== */
.standings-table-wrap {
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  width: 100%;
}
.standings-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13px; }
.standings-table th, .standings-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
}
.standings-table th {
  color: var(--text-faint);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: var(--bg-card);
}
.standings-table tbody tr:hover { background: var(--bg-card-hover); }
.standings-table tbody tr:last-child td { border-bottom: none; }
.team-cell { display: flex; align-items: center; gap: 8px; text-align: left !important; font-weight: 600; white-space: nowrap; }
.team-cell img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.pts { font-weight: 800; color: var(--primary-dark); }

.form-badges { display: flex; gap: 3px; justify-content: center; }
.form-badge {
  width: 19px;
  height: 19px;
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.form-badge.form-w { background: var(--primary); }
.form-badge.form-d { background: var(--text-faint); }
.form-badge.form-l { background: var(--live); }

/* ===== Match detail ===== */
.match-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin: 4px 0 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.league-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 20px;
  padding: 5px 12px;
  background: var(--bg);
  border-radius: 999px;
}
.league-link img { width: 16px; height: 16px; }
.match-header-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.team-block { display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 700; font-size: 14.5px; }
.team-block img { width: 60px; height: 60px; object-fit: contain; }
.match-header-score { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.match-header-score .score { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }
.kickoff { font-size: 17px; color: var(--text-dim); font-weight: 700; }
.venue-info { color: var(--text-faint); font-size: 12.5px; margin-top: 20px; }
.match-info-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  color: var(--text-faint);
  font-size: 12.5px;
  margin-top: 20px;
}

/* ===== Lineups ===== */
.lineup-section { margin: 22px 0; }
.lineup-section h2 { font-size: 16px; margin-bottom: 10px; }
.lineup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.lineup-team {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.lineup-team-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.lineup-team-head img { width: 20px; height: 20px; object-fit: contain; }
.lineup-group { margin-bottom: 12px; }
.lineup-group:last-child { margin-bottom: 0; }
.lineup-group-title {
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.lineup-group ul { list-style: none; margin: 0; padding: 0; }
.lineup-player {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  font-size: 13px;
}
.lineup-shirt {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--bg);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.lineup-name { flex: 1; }
.lineup-captain {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.h2h-section { margin: 22px 0; }
.h2h-section h2 { font-size: 16px; margin-bottom: 10px; }
.h2h-list { list-style: none; padding: 0; margin: 0; }
.h2h-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}
.h2h-list a { display: flex; gap: 8px; align-items: center; font-weight: 600; min-width: 0; overflow: hidden; }
.h2h-list a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2h-date { color: var(--text-faint); font-size: 11.5px; flex-shrink: 0; }

/* ===== Match detail: tabs + sidebar layout ===== */
.match-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 16px;
  align-items: start;
  margin: 16px 0;
}
.match-main { min-width: 0; }

.match-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow-x: auto;
}
.match-tab {
  flex: 1 0 auto;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
}
.match-tab:hover { color: var(--text); }
.match-tab.active { color: var(--primary-dark); border-bottom-color: var(--primary); }

.match-tab-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.match-tab-panel .lineup-grid { gap: 14px; }
.match-tab-panel .h2h-list { margin: 0; }
.match-tab-panel .h2h-list li:last-child { margin-bottom: 0; }

/* ---- Sidebar ---- */
.match-sidebar { display: flex; flex-direction: column; gap: 10px; }
.match-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.match-sidebar-card-title {
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}
.match-sidebar-entity { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.match-sidebar-entity img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.match-sidebar-text { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 600; }
.match-sidebar-faint { color: var(--text-faint); font-size: 12px; font-weight: 500; }

/* ---- Incidents tab ---- */
.incident-list { list-style: none; margin: 0; padding: 0; }
.incident-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.incident-row:last-child { border-bottom: none; }
.incident-minute { color: var(--text-faint); font-size: 12px; font-weight: 700; min-width: 30px; flex-shrink: 0; }
.incident-icon { flex-shrink: 0; font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.incident-icon.yellow, .incident-icon.red {
  width: 11px;
  height: 15px;
  border-radius: 2px;
}
.incident-icon.yellow { background: #f5c518; }
.incident-icon.red { background: var(--live); }
.incident-icon.sub { color: var(--primary-dark); }
.incident-icon.goal { color: var(--text); }
.incident-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.incident-label strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.incident-sub { color: var(--text-faint); font-size: 11.5px; }
.incident-row.side-away { flex-direction: row-reverse; text-align: right; }
.incident-row.side-away .incident-label { align-items: flex-end; }

/* ---- Stats tab ---- */
.stats-list { display: flex; flex-direction: column; gap: 14px; }
.stat-row { display: flex; flex-direction: column; gap: 6px; }
.stat-values { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.stat-value { font-weight: 800; min-width: 30px; }
.stat-value.away { text-align: right; }
.stat-label { color: var(--text-dim); font-weight: 600; font-size: 12px; text-align: center; }
.stat-bar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--bg); }
.stat-bar-home { background: var(--primary); }
.stat-bar-away { background: var(--text-faint); }

/* ---- Trends tab ---- */
.trends-legend { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; margin-bottom: 10px; }
.trends-legend-item.home { color: var(--primary-dark); }
.trends-legend-item.away { color: var(--text-faint); }
.trends-chart { position: relative; height: 140px; background: var(--bg); border-radius: 6px; }
.trends-center-line { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--border); }
.trends-bar { position: absolute; border-radius: 1px; }
.trends-bar.home { background: var(--primary); }
.trends-bar.away { background: var(--text-faint); }

@media (max-width: 720px) {
  .match-layout { grid-template-columns: 1fr; }
}

/* ===== Ad slot ===== */
.ad-slot { margin: 16px 0; text-align: center; min-height: 0; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding: 24px 0;
  color: var(--text-faint);
  font-size: 12.5px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.footer-brand { color: var(--text); font-weight: 700; font-size: 14px; }
.footer-tagline { color: var(--text-dim); font-size: 12.5px; margin-top: 2px; }
.footer-trust-note { max-width: 480px; margin: 6px auto 0; line-height: 1.6; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
}
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--primary-dark); }
.footer-copyright { margin-top: 4px; }

.home-articles {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.home-articles-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.home-articles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.home-articles-list a {
  color: var(--text);
  font-size: 14px;
}
.home-articles-list a:hover { color: var(--primary-dark); }

/* ===== Author / E-E-A-T box ===== */
.author-box {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.author-box-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 166, 80, 0.12);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.author-box-name { color: var(--text); font-weight: 700; font-size: 13.5px; }
.author-box-role { color: var(--text-dim); font-size: 12px; margin-top: 1px; }
.author-box-bio { color: var(--text-dim); font-size: 12.5px; line-height: 1.6; margin-top: 6px; }
.author-box-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--text-faint);
  font-size: 11.5px;
  margin-top: 8px;
}
.author-box-link { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--primary-dark); }
.author-box-link:hover { text-decoration: underline; }

/* ===== Admin: shared brand ===== */
.admin-brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 166, 80, 0.2);
  flex: 0 0 auto;
}

/* ===== Admin: login ===== */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #16213a 0%, var(--header-bg) 55%);
  padding: 20px;
}
.admin-login-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 36px 32px;
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.admin-login-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.admin-login-sub { margin: -6px 0 4px; color: var(--text-faint); font-size: 13px; }

/* ===== Admin: shell ===== */
.admin-shell { display: flex; min-height: 100vh; background: var(--bg); }
.admin-sidebar {
  width: 230px;
  flex: 0 0 230px;
  background: var(--header-bg);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-weight: 800;
  font-size: 14.5px;
  padding: 6px 8px 18px;
  letter-spacing: -0.2px;
}
.admin-sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.admin-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.15s;
}
.admin-sidebar nav a svg { flex: 0 0 auto; opacity: 0.8; }
.admin-sidebar nav a.active { background: var(--primary); color: #fff; }
.admin-sidebar nav a.active svg { opacity: 1; }
.admin-sidebar nav a:not(.active):hover { background: rgba(255, 255, 255, 0.07); color: #fff; }

.admin-sidebar-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 8px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 8px;
}
.admin-user { display: flex; align-items: center; gap: 9px; color: rgba(255, 255, 255, 0.85); font-size: 13px; font-weight: 600; }
.admin-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 800;
  flex: 0 0 auto;
}
.admin-sidebar-footer button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.15s;
}
.admin-sidebar-footer button:hover { color: var(--live); background: rgba(224, 32, 32, 0.12); }

.admin-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 36px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.admin-topbar h1 { margin: 0; font-size: 19px; }
.admin-topbar p { margin: 3px 0 0; color: var(--text-faint); font-size: 12.5px; }
.admin-view-site {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 7px;
  transition: all 0.15s;
}
.admin-view-site:hover { border-color: var(--primary); color: var(--primary-dark); }

.admin-content { flex: 1; padding: 28px 36px; max-width: 820px; }

/* ===== Admin: cards ===== */
.admin-card-stack { display: flex; flex-direction: column; gap: 18px; }
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.admin-card-header { padding: 18px 22px 0; }
.admin-card-header h3 { margin: 0; font-size: 15px; }
.admin-card-header p { margin: 4px 0 0; color: var(--text-faint); font-size: 12.5px; }
.admin-card-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-card-header-row .btn-secondary { margin-top: 2px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-faint);
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--border);
}
.admin-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.admin-table-actions .btn-secondary { padding: 6px 10px; font-size: 12.5px; }
.admin-table-actions .btn-icon-danger { width: 28px; height: 28px; }
.pill-ok, .pill-off {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.pill-ok { background: rgba(0, 166, 80, 0.12); color: var(--primary-dark); }
.pill-off { background: rgba(154, 160, 171, 0.15); color: var(--text-faint); }
.admin-card-body { padding: 20px 22px; }
.admin-card-footer {
  display: flex;
  align-items: center;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
}
.admin-card-footer.standalone { border-top: none; background: none; padding: 0; }
.admin-card-footer { gap: 10px; }
.admin-card-footer > button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s;
}
.admin-card-footer > button:hover { background: var(--primary-dark); }

.admin-form { display: flex; flex-direction: column; gap: 16px; }
.admin-form h2 { font-size: 14px; margin: 4px 0 0; }
.admin-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.admin-form input[type="text"], .admin-form input:not([type]), .admin-form input[type="password"],
.admin-form input[type="file"], .admin-form textarea, .admin-form select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
}
.admin-form select { padding-right: 34px; }
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 166, 80, 0.12);
}
.admin-form textarea { resize: vertical; font-family: 'SFMono-Regular', Consolas, monospace; }

/* ---- Summernote editor: fit the admin theme ---- */
.note-editor.note-frame {
  border-color: var(--border);
  border-radius: 7px;
  overflow: hidden;
}
.note-editor .note-toolbar, .note-editor .note-statusbar {
  background: var(--bg);
  border-color: var(--border);
}
.note-editor .note-editing-area .note-editable {
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
}
.note-editor .note-btn,
.note-editor .note-btn-group .dropdown-toggle,
.note-editor button {
  background: var(--bg-card) !important;
  color: var(--text-dim) !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}
.note-editor .note-btn:hover,
.note-editor .note-btn.active,
.note-editor .note-btn-group .dropdown-toggle:hover {
  background: var(--bg-card-hover) !important;
  color: var(--text) !important;
}
.note-editor .note-dropdown-menu { background: var(--bg-card); border-color: var(--border); color: var(--text); }
.note-editor .note-dropdown-menu a { color: var(--text); }
.note-editor .note-dropdown-menu a:hover { background: var(--bg-card-hover); }

.admin-form button {
  align-self: flex-start;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s;
}
.admin-form button:hover { background: var(--primary-dark); }
.btn-secondary {
  align-self: flex-start;
  background: none !important;
  color: var(--primary-dark) !important;
  border: 1px dashed var(--border) !important;
}
.btn-secondary:hover { border-color: var(--primary) !important; background: rgba(0, 166, 80, 0.06) !important; }
.btn-icon-danger {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-faint);
  width: 32px;
  height: 32px;
  border-radius: 7px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: all 0.15s;
}
.btn-icon-danger:hover { background: var(--live); border-color: var(--live); color: #fff; }
.save-status { margin-left: 12px; color: var(--primary-dark); font-size: 13px; font-weight: 600; }
.form-error { color: var(--live); font-size: 13px; font-weight: 600; }
.hint { color: var(--text-faint); font-size: 12.5px; margin: -6px 0 0; }
.empty-state { color: var(--text-faint); font-size: 13px; padding: 14px; text-align: center; border: 1px dashed var(--border); border-radius: 8px; }

.upload-field { display: flex; flex-direction: column; gap: 10px; }
.upload-field > label { font-size: 13.5px; font-weight: 700; color: var(--text); }
.upload-dropzone {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.upload-preview { width: 64px; height: 64px; object-fit: contain; background: var(--bg-card); padding: 6px; border-radius: 6px; border: 1px solid var(--border); }
.upload-placeholder { color: var(--text-faint); font-size: 12.5px; flex: 1; }
.upload-btn {
  margin-left: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.upload-btn:hover { border-color: var(--primary); color: var(--primary-dark); }

.meta-tag-row, .ad-slot-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}
.meta-tag-row input { flex: 1; }
.ad-slot-row { flex-direction: column; align-items: stretch; }
.ad-slot-row-top { display: flex; gap: 8px; align-items: center; }
.ad-slot-row-top input, .ad-slot-row-top select { flex: 1; }
.toggle { display: flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; }

/* ===== Mobile bottom nav ===== */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--header-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10.5px;
  font-weight: 600;
  padding: 6px 2px;
  cursor: pointer;
}
.mobile-nav-item.active { color: #fff; }
.mobile-nav-item.active svg { color: var(--primary); }

/* ===== Mobile sheet (drawer) ===== */
.mobile-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
}
.mobile-sheet {
  width: 100%;
  max-height: 78vh;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
}
.mobile-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.mobile-sheet-close {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.mobile-sheet-body { overflow-y: auto; padding: 8px; }
.mobile-sheet-links { display: flex; flex-direction: column; gap: 2px; }
.mobile-sheet-links a {
  padding: 12px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.mobile-sheet-links a:hover, .mobile-sheet-links a.active { background: rgba(0, 166, 80, 0.1); color: var(--primary-dark); }

.mobile-sheet .sidebar {
  width: 100%;
  position: static;
  max-height: none;
  border: none;
  box-shadow: none;
  background: none;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .site-shell { flex-direction: column; padding: 68px 12px 0; }
  .sidebar { display: none; }
  .mobile-nav { display: flex; }
  .site-main, .site-footer { padding-bottom: 64px; }
  .lineup-grid { grid-template-columns: 1fr; }

  .header-inner { padding: 0 14px; }
  .header-toggles { margin-left: auto; }
}

@media (max-width: 640px) {
  .match-header-teams { gap: 8px; }
  .team-block img { width: 44px; height: 44px; }
  .team-block { font-size: 12.5px; }
  .match-header-score .score { font-size: 24px; }

  .filters { flex-wrap: wrap; }
  .filters .select, .filters select { flex: 1; min-width: 130px; }

  .date-picker-panel { right: -10px; }
}

@media (max-width: 780px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; flex: none; height: auto; position: static; flex-direction: row; overflow-x: auto; align-items: center; -webkit-overflow-scrolling: touch; }
  .admin-brand { padding: 6px 12px; flex-shrink: 0; }
  .admin-sidebar nav { flex-direction: row; flex-shrink: 0; }
  .admin-sidebar nav a { white-space: nowrap; }
  .admin-sidebar-footer { display: none; }

  .admin-topbar { padding: 14px 16px; flex-wrap: wrap; gap: 10px; }
  .admin-topbar h1 { font-size: 17px; }
  .admin-view-site span { display: none; }
  .admin-view-site { padding: 8px; }

  .admin-content { padding: 16px; max-width: 100%; }
  .admin-card-header-row { flex-wrap: wrap; }

  .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -1px; }
  .admin-table { min-width: 480px; }

  .upload-dropzone { flex-wrap: wrap; }
  .upload-btn { margin-left: 0; }

  .ad-slot-row-top { flex-wrap: wrap; }
  .ad-slot-row-top .btn-icon-danger { margin-left: auto; }

  .meta-tag-row { flex-wrap: wrap; }
  .meta-tag-row input { flex: 1 1 100%; }

  .note-toolbar { flex-wrap: wrap; }

  .admin-login { padding: 16px; }
  .admin-login-card { width: 100%; max-width: 340px; padding: 28px 22px; }
}

@media (max-width: 420px) {
  .admin-sidebar nav a { padding: 10px 12px; font-size: 12.5px; }
  .match-tabs { font-size: 12px; }
}
