/* CCSL Mobile App – FIFA-style professional design */
:root {
  --primary: #0a0e27;
  --primary-dark: #060816;
  --primary-light: #141a3d;
  --accent: #00c853;
  --accent-dark: #00a843;
  --accent-gold: #ffc107;
  --bg: #0d1117;
  --bg-card: #161b22;
  --card-bg: #161b22;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --border: #21262d;
  --avatar-border: #fff;
  --success: #00c853;
  --live-red: #ff1744;
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --nav-height: 56px;
  --header-height: 48px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 12px rgba(0,0,0,0.35);
  /* Image sizes – team & player avatars 40px */
  --img-avatar: 40px;
  --img-player: 40px;
  --img-hero: 40px;
  --img-header-logo: 32px;
}

/* Light theme */
[data-theme="light"] {
  --bg: #f6f8fa;
  --bg-card: #ffffff;
  --card-bg: #ffffff;
  --text: #1c2128;
  --text-muted: #656d76;
  --border: #d0d7de;
  --primary-light: #e8ecf4;
  --avatar-border: #d0d7de;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* All team & player avatars – 40px, round, white border, shadow */
img.list-item-avatar-img,
img.team-detail-logo,
img.player-detail-photo,
.list-item-avatar img,
.list-item-rank img,
a.list-item-avatar img,
a.list-item-rank img {
  font-size: 0;
  vertical-align: middle;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  box-sizing: border-box;
  display: block !important;
  object-fit: cover !important;
  object-position: center !important;
  flex-shrink: 0 !important;
  border-radius: 50% !important;
  border: 2px solid var(--avatar-border) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.2) !important;
  background: var(--primary) !important;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-top: calc(var(--safe-top) + var(--header-height));
  padding-bottom: calc(var(--safe-bottom) + var(--nav-height));
  overflow-x: hidden;
}

/* App header - fixed */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--safe-top) + var(--header-height));
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--safe-top) 12px 12px 12px;
  z-index: 100;
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--border);
}

.app-header .back-btn {
  background: none;
  border: none;
  color: #fff;
  padding: 8px;
  font-size: 18px;
  cursor: pointer;
  display: none;
}

.app-header .back-btn.visible {
  display: block;
}

.app-header .header-brand {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.app-header .header-logo {
  height: var(--img-header-logo);
  width: auto;
  max-width: 120px;
  min-height: var(--img-header-logo);
  object-fit: contain;
  object-position: center;
  display: block;
}

.app-header .header-title {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.app-header h1 {
  font-size: 18px;
  font-weight: 700;
  flex: 1;
  text-align: center;
}

.app-header .header-action {
  background: none;
  border: none;
  color: #fff;
  padding: 8px;
  font-size: 14px;
  cursor: pointer;
  min-width: 60px;
  text-align: right;
}

/* Bottom tab bar */
.app-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--safe-bottom) + var(--nav-height));
  background: var(--primary);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: var(--safe-bottom);
  z-index: 100;
}

.app-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  transition: color 0.2s;
}

.app-nav a.active {
  color: var(--accent);
  font-weight: 600;
}

.app-nav a .icon {
  font-size: 22px;
  margin-bottom: 2px;
}

/* Screens - only active one visible */
.screen {
  display: none;
  min-height: calc(100vh - var(--header-height) - var(--nav-height) - var(--safe-top) - var(--safe-bottom));
  padding: 12px;
  animation: fadeIn 0.2s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Hide nav on admin screens only (login keeps nav) */
body.admin-mode .app-nav {
  display: none;
}

/* Header right: auth icons (guest) or profile icon (logged in) */
.app-header .header-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.app-header .header-auth-icons {
  display: flex;
  align-items: center;
  gap: 2px;
}

.app-header .header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #fff;
  border: none;
  background: transparent;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.15rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.app-header .header-icon-btn i {
  color: #fff;
}

.app-header .header-icon-btn:hover,
.app-header .header-icon-btn:focus {
  background: rgba(255, 255, 255, 0.2);
}

.app-header .header-icon-btn:active {
  background: rgba(255, 255, 255, 0.3);
}

.app-header .header-profile-btn {
  display: none;
}

.app-header .header-profile-btn i {
  color: #fff;
}

body.admin-mode .app-header .header-auth-icons {
  display: none;
}

body.admin-mode .app-header .header-profile-btn {
  display: flex;
}

/* Shared popup overlay */
.header-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.header-popup-overlay.is-open {
  display: flex;
}

.header-popup {
  width: 100%;
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--card-bg);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
  padding: 24px 20px  calc(20px + env(safe-area-inset-bottom));
}

.header-popup-title {
  margin: 0 0 4px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.header-popup-subtitle {
  margin: 0 0 16px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

/* Register popup: two options side by side */
.header-popup-register .header-popup-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.header-popup-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.header-popup-option i {
  font-size: 1.75rem;
  color: #fff;
}

.header-popup-option:active {
  transform: scale(0.98);
}

.header-popup-close {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.header-popup-close:hover {
  background: var(--border);
}

/* Profile menu popup */
.header-popup-profile .header-popup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.header-popup-profile .header-popup-item i {
  width: 22px;
  color: var(--accent);
}

.header-popup-profile .header-popup-item:hover {
  background: var(--border);
}

.header-popup-item-danger {
  color: #e53e3e;
}

.header-popup-item-danger i {
  color: #e53e3e;
}

.header-popup-profile .header-popup-close {
  margin-top: 8px;
}

/* Image editor popup */
.img-editor-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.img-editor-overlay.is-open {
  display: flex;
}

.img-editor-modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-width: 100%;
  max-height: 95vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.img-editor-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.img-editor-canvas-wrap {
  position: relative;
  width: 320px;
  height: 426px;
  max-width: 100%;
  margin: 12px auto;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.img-editor-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: move;
}

.img-editor-crop-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--accent);
}

.img-editor-toolbar {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  flex-wrap: wrap;
}

.img-editor-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.img-editor-btn:hover {
  background: var(--border);
  color: var(--accent);
}

.img-editor-btn i {
  font-size: 1.1rem;
}

.img-editor-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0 16px 8px;
}

.img-editor-actions {
  display: flex;
  gap: 12px;
  padding: 12px 16px 20px;
}

.img-editor-actions .btn {
  flex: 1;
}

/* Image field preview (after editor save) */
.img-field-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  background: var(--border);
  border-radius: var(--radius-sm);
}

.img-field-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg);
}

.img-field-label {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text);
}

.img-field-remove {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.img-field-remove:hover {
  background: var(--live-red);
  color: #fff;
}

/* Cards – FIFA-style dark cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.02em;
}

.card-body {
  padding: 16px;
}

.card-body-flex {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Team hero card – fixed size */
/* Team logo – 40px, round, white border, shadow (detail hero) */
.card-team-hero .team-detail-logo {
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
  border: 2px solid var(--avatar-border);
  background: var(--primary);
  display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.2);
}

/* Player photo – 40px, round, white border, shadow (detail + lists) */
.player-detail-photo,
.list-item-avatar-img.avatar-player {
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
  border: 2px solid var(--avatar-border);
  background: var(--primary);
  display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.2);
}

[data-theme="light"] .card-team-hero .team-detail-logo,
[data-theme="light"] .player-detail-photo,
[data-theme="light"] .list-item-avatar-img.avatar-player {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.06);
}

.team-detail-info,
.player-detail-info {
  flex: 1;
  min-width: 0;
}

.team-detail-name,
.player-detail-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.team-detail-meta,
.player-detail-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin: 6px 0 0 0;
}

.player-detail-dob {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 0 0;
}

/* Lists */
.list-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
  min-height: 56px;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:active {
  background: var(--primary-light);
}

.list-item .list-item-main {
  flex: 1;
  min-width: 0;
}

.list-item .list-item-title {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item .list-item-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.list-item .list-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

/* List items with avatar (team logo / player photo) */
.list-item-avatar {
  gap: 14px;
}

.list-item-avatar-img {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center !important;
  flex-shrink: 0 !important;
  background: var(--primary) !important;
  border: 2px solid var(--avatar-border) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.2) !important;
  display: block !important;
}

.list-item-chevron {
  color: var(--text-muted);
  font-size: 12px;
  flex-shrink: 0;
}

/* Ensure icon, label, and chevron stay on one line in Quick links / More */
.list-item > i.fa-chevron-right {
  margin-left: 12px;
  color: var(--text-muted);
  font-size: 12px;
  flex-shrink: 0;
}

/* Quick links: icon and label on same line */
.list-item-quicklink .list-item-quicklink-content {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item-quicklink .list-item-quicklink-content i {
  color: var(--accent);
  flex-shrink: 0;
}

/* Upcoming match card: team1 vs team2 + icon rows (field, date, time) */
.upcoming-match {
  display: block;
  padding: 14px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
}
.upcoming-match:active {
  background: var(--primary-light);
}
.upcoming-match-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 10px;
  line-height: 1.3;
}
.upcoming-match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.upcoming-match-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.upcoming-match-meta span i {
  color: var(--accent);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

/* Top scorers: clean two-line layout – Line1: PIC NAME GOAL, Line2: team Assists */
.list-item-rank {
  align-items: flex-start;
  min-height: 64px;
  padding: 12px 16px;
  gap: 12px;
}
.list-item-rank .list-item-avatar-img,
.list-item-rank img {
  flex-shrink: 0;
}
.list-item-rank .list-item-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  justify-content: center;
  margin-top: 2px;
}
.list-item-rank .scorer-line1 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  line-height: 1.25;
}
.list-item-rank .scorer-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.list-item-rank .scorer-goals {
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  min-width: 24px;
  text-align: right;
}
.list-item-rank .scorer-line2 {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item-rank .list-item-chevron {
  margin-left: 4px;
  flex-shrink: 0;
  align-self: center;
}

/* Top scorers list header (PIC | NAME | GOAL) */
.scorer-list-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.scorer-list-header .sh-pic {
  width: 40px;
  flex-shrink: 0;
}
.scorer-list-header .sh-name {
  flex: 1;
  min-width: 0;
}
.scorer-list-header .sh-goals {
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

/* Live badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  background: var(--live-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.live-badge .pulse {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  margin-right: 4px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Match row (score strip) – FIFA-style */
.match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
}

.match-row:active {
  background: var(--primary-light);
}

.match-row .team {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  min-width: 0;
}

.match-row .team.team2 {
  text-align: right;
}

.match-row .score {
  min-width: 64px;
  text-align: center;
  font-weight: 800;
  font-size: 18px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.match-row .vs {
  font-size: 11px;
  color: var(--text-muted);
}

.match-row .match-meta {
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Standings table */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.standings-table th {
  background: var(--primary-light);
  padding: 10px 6px;
  text-align: center;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.standings-table th.team-col {
  text-align: left;
  padding-left: 12px;
}

.standings-table td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.standings-table td.team-col {
  text-align: left;
  padding-left: 12px;
  font-weight: 600;
}

.standings-table .pos {
  width: 28px;
  color: var(--accent);
  font-weight: 700;
}

.standings-table .pts {
  font-weight: 700;
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
  width: 100%;
  font-weight: 700;
}

.btn-primary:active {
  background: var(--accent-dark);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:active {
  background: rgba(29, 17, 89, 0.1);
}

.mr-2 { margin-right: 8px; }

/* Form */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  background: var(--bg-card);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 200, 83, 0.25);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-group .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: normal;
  cursor: pointer;
}

.form-group .checkbox-label input[type="checkbox"] {
  width: auto;
  margin-top: 4px;
  flex-shrink: 0;
}

.form-group input[type="file"] {
  padding: 8px 0;
}

/* Hero / welcome – FIFA-style banner */
.hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 50%, var(--primary-dark) 100%);
  color: #fff;
  padding: 28px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.hero p {
  font-size: 14px;
  opacity: 0.92;
}

/* Section title */
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 16px 0 10px 0;
  padding-left: 4px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Admin badge in list */
.admin-badge {
  font-size: 10px;
  background: var(--primary);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

/* Score input (admin live score) */
.score-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.score-input-row:last-child {
  border-bottom: none;
}

.score-input-row .team-name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}

.score-input-row input {
  width: 64px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: 8px;
}

.score-input-row input:focus {
  border-color: var(--primary);
  outline: none;
}

/* Tabs (Schedule / Results) */
.tabs {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.tabs a {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
}

.tabs a.active {
  background: var(--accent);
  color: #0a0e27;
}

.standings-season-tabs,
.matches-season-tabs {
  flex-wrap: wrap;
  gap: 6px;
}

.standings-season-tabs a {
  flex: 0 0 calc(33.333% - 4px);
  min-width: calc(33.333% - 4px);
  box-sizing: border-box;
}

/* Matches season: exactly 3 buttons per line, then wrap to second line */
.matches-season-tabs a {
  flex: 0 0 calc((100% - 12px) / 3);
  min-width: calc((100% - 12px) / 3);
  box-sizing: border-box;
}

/* Divider text */
.divider-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 16px 0 8px 0;
  padding-left: 4px;
}

/* More screen: all list icons green */
#screen-more .card .list-item i.fas {
  color: #22c55e;
}

/* Theme toggle (More screen) – icon + single name, then theme label + switch */
.list-item-theme {
  cursor: default;
  pointer-events: auto;
}
.list-item-more-theme-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 8px;
  flex-shrink: 0;
}

.list-item-theme:active {
  background: var(--primary-light);
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border);
  border-radius: 26px;
  transition: background 0.2s;
}

.theme-switch-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.theme-switch input:checked + .theme-switch-slider {
  background: var(--accent);
}

.theme-switch input:checked + .theme-switch-slider::before {
  transform: translateX(22px);
}

/* Contact screen (same as contact.php) */
.contact-intro {
  text-align: center;
  margin-bottom: 20px;
}

.contact-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px 0;
}

.contact-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.contact-message {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.contact-message-success {
  background: rgba(0, 200, 83, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
}

.contact-message-error {
  background: rgba(255, 23, 68, 0.1);
  border: 1px solid var(--live-red);
  color: var(--live-red);
}

.contact-form .form-group:last-of-type {
  margin-bottom: 16px;
}

.contact-location-name,
.contact-location-address,
.contact-location-phone {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: var(--text);
}

.contact-location-address,
.contact-location-phone {
  color: var(--text-muted);
}

/* Match events list (timeline-style) */
.match-events-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.match-event-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.match-event-item:last-child {
  border-bottom: none;
}

.match-event-minute {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--accent);
  min-width: 36px;
}

.match-event-type {
  flex-shrink: 0;
  text-transform: capitalize;
  color: var(--text-muted);
  min-width: 80px;
}

.match-event-detail {
  flex: 1;
  min-width: 0;
  color: var(--text);
}

.match-event-item.match-event-goal .match-event-type {
  color: var(--accent);
}

.match-event-item.match-event-yellow_card .match-event-minute {
  color: var(--accent-gold);
}

.match-event-item.match-event-red_card .match-event-minute {
  color: var(--live-red);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* Admin/Coach screen content loaded from PHP (same DB as website) */
.app-ccsl-screen-content {
  min-height: 120px;
}
.app-ccsl-fragment {
  padding: 0;
  color: var(--text);
}
.app-ccsl-fragment a {
  color: var(--accent);
}
.app-ccsl-fragment .bg-gray-100,
.app-ccsl-fragment .bg-white {
  background: var(--card-bg) !important;
}
.app-ccsl-fragment .text-gray-800,
.app-ccsl-fragment .text-gray-700 {
  color: var(--text) !important;
}
.app-ccsl-fragment .border-gray-200,
.app-ccsl-fragment .border-gray-300 {
  border-color: var(--border) !important;
}
.app-ccsl-fragment table {
  color: var(--text);
}
.app-ccsl-fragment .max-w-full {
  max-width: 100%;
}
.app-ccsl-fragment {
  overflow-x: auto;
}
