/* ═══════════════════════════════════════════════════════
   Stadium Pro – глобальные стили v2.0
   Fonts: Inter 400/500/600/700/800/900
          JetBrains Mono 500/700
   ═══════════════════════════════════════════════════════ */

:root {
  --bg:            #07090f;
  --bg-2:          #0f131c;
  --bg-3:          #161b27;
  --bg-4:          #1d2331;
  --line:          #1f2632;
  --line-2:        #2c3445;
  --text:          #eef1f6;
  --muted:         #8390a8;
  --muted-2:       #5a6478;
  --accent:        #9eff4d;
  --accent-2:      #7dd62e;
  --accent-glow:   rgba(158,255,77,.18);
  --warn:          #ffb84d;
  --danger:        #ff5c5c;
  --danger-dark:   #e03d3d;
  /* legacy alias used in old inline styles */
  --border:        var(--line-2);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 20% -10%, rgba(158,255,77,.05), transparent 40%),
    radial-gradient(circle at 90% 10%,  rgba(80,140,255,.04), transparent 40%);
}

a { color: inherit; text-decoration: none; }

.mono { font-family: 'JetBrains Mono', monospace; }
code  { font-family: 'JetBrains Mono', monospace; color: var(--accent); font-size: .9em; }

/* ── LAYOUT ──────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ── HEADER ──────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(7,9,15,.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex; align-items: center; gap: 36px; padding: 18px 0;
}

.brand {
  display: flex; align-items: center; gap: 11px;
  font-weight: 800; font-size: 17px; letter-spacing: -.01em; flex-shrink: 0;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #07090f;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 15px;
  box-shadow: 0 0 18px var(--accent-glow);
}

nav.links {
  display: flex; gap: 4px; margin-left: 24px;
  font-size: 14px; font-weight: 500;
}
nav.links a {
  padding: 8px 14px; border-radius: 8px;
  color: var(--muted); transition: all .15s;
}
nav.links a:hover { color: var(--text); background: var(--bg-3); }
nav.links a.active { color: var(--accent); background: var(--bg-3); }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.user {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--muted); font-weight: 500;
}
.user b { color: var(--text); font-weight: 600; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-3); border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; color: var(--accent); flex-shrink: 0;
}

/* ── BUTTONS ─────────────────────────────────────────── */
.btn-ghost {
  padding: 9px 16px;
  border: 1px solid var(--line-2); border-radius: 9px;
  font-size: 13px; color: var(--text); font-weight: 500;
  background: transparent; cursor: pointer; display: inline-block;
  transition: background .15s, border-color .15s;
}
.btn-ghost:hover { background: var(--bg-3); border-color: var(--muted-2); }

.btn {
  display: inline-block;
  background: var(--accent); color: #07090f;
  border: none; border-radius: 9px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--accent-2); }

.btn-sec {
  display: inline-block;
  background: var(--bg-3); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 9px;
  padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.btn-sec:hover { background: var(--bg-4); }

.btn-small { padding: 6px 12px !important; font-size: 12px !important; border-radius: 7px !important; }

.btn-outline {
  background: transparent !important; color: var(--accent) !important;
  border: 1px solid var(--accent) !important; border-radius: 9px;
  padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-block; transition: background .15s;
}
.btn-outline:hover { background: var(--accent-glow) !important; }

.btn-danger {
  background: var(--danger) !important; color: #fff !important;
  border: none; border-radius: 9px;
  padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-block; transition: background .15s;
}
.btn-danger:hover { background: var(--danger-dark) !important; }

/* ── FLASH MESSAGES ──────────────────────────────────── */
.flashes { padding-top: 18px; }
.flash {
  padding: 12px 18px; border-radius: 10px; margin-bottom: 10px;
  font-size: 14px; font-weight: 500;
}
.flash-success {
  background: rgba(158,255,77,.1); color: var(--accent);
  border: 1px solid rgba(158,255,77,.25);
}
.flash-error {
  background: rgba(255,92,92,.1); color: var(--danger);
  border: 1px solid rgba(255,92,92,.25);
}

/* ── HERO ────────────────────────────────────────────── */
.hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end;
}

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-3); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 7px 16px;
  font-size: 12px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 22px;
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.55} }

.hero h1 {
  font-size: 60px; line-height: 1.02;
  letter-spacing: -.035em; font-weight: 800; margin-bottom: 18px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), #7dd62e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero > .container > .hero-grid > div > p {
  font-size: 16px; color: var(--muted); max-width: 480px; line-height: 1.55;
}

.hero-panel {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; position: relative; overflow: hidden;
}
.hero-panel::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line);
}
.panel-title {
  font-size: 11px; color: var(--muted-2);
  text-transform: uppercase; letter-spacing: .16em; font-weight: 700;
}
.panel-time {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--accent);
}

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat-cell { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-size: 28px; font-weight: 800; letter-spacing: -.02em;
  line-height: 1; font-variant-numeric: tabular-nums;
}
.stat-num.acc { color: var(--accent); }
.stat-lbl {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .1em; font-weight: 600;
}

/* ── FIELDS SECTION ──────────────────────────────────── */
.fields-section { padding: 32px 0 64px; }

.field-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px;
}

.field {
  position: relative; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; cursor: pointer;
  transition: all .25s; display: flex; flex-direction: column; color: var(--text);
}
.field:hover {
  border-color: var(--accent);
  box-shadow: 0 24px 56px -28px rgba(158,255,77,.22), 0 0 0 1px var(--accent);
}

.field-vis {
  height: 120px; background: linear-gradient(135deg, #0f131c, #1d2331);
  border-bottom: 1px solid var(--line); position: relative; overflow: hidden;
}
.field-vis::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 19px,
      rgba(158,255,77,.04) 19px, rgba(158,255,77,.04) 20px),
    repeating-linear-gradient(0deg, transparent 0, transparent 19px,
      rgba(158,255,77,.04) 19px, rgba(158,255,77,.04) 20px);
}
.field-vis::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 64px; height: 64px;
  border: 1.5px solid rgba(158,255,77,.25); border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(158,255,77,.08);
}
.field-vis-mid {
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: rgba(158,255,77,.15);
}

.field-id {
  position: absolute; top: 14px; left: 18px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  color: var(--accent); letter-spacing: .06em;
  background: rgba(7,9,15,.7); padding: 4px 9px; border-radius: 6px; backdrop-filter: blur(8px);
}
.field-live {
  position: absolute; top: 14px; right: 18px;
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700;
  color: var(--accent); background: rgba(7,9,15,.7); padding: 5px 10px;
  border-radius: 6px; backdrop-filter: blur(8px);
}
.field-live .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 1.8s infinite;
}

.field-body { padding: 22px 22px 16px; }
.field h3 {
  font-size: 20px; font-weight: 700; letter-spacing: -.015em; margin-bottom: 4px;
}
.field h3 span { color: var(--muted); font-weight: 500; font-size: 15px; }
.field-loc {
  font-size: 13px; color: var(--muted);
  display: flex; align-items: center; gap: 6px; margin-bottom: 16px;
}

.attrs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.attr { padding: 12px 14px; background: var(--bg-3); display: flex; flex-direction: column; gap: 3px; }
.attr-l { font-size: 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.attr-v { font-family: 'JetBrains Mono', monospace; font-size: 13.5px; font-weight: 600; color: var(--text); }

.field-cta {
  margin-top: auto; padding: 14px 22px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line); background: var(--bg-3);
}
.slots-info {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted);
}
.slots-info .num {
  font-weight: 800; color: var(--accent); font-size: 18px; font-variant-numeric: tabular-nums;
}
.arrow-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent); color: #07090f;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px; transition: all .2s; flex-shrink: 0;
}
.field:hover .arrow-btn { background: var(--text); transform: translateX(2px); }

/* ── CONTENT SECTION WRAPPER ─────────────────────────── */
.content-section { padding: 40px 0 60px; }

/* ── PAGE HEAD ───────────────────────────────────────── */
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 24px;
}
.page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }

/* ── BACK LINK ───────────────────────────────────────── */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px; margin-bottom: 20px;
}
.back-link:hover { color: var(--text); }

/* ── FORM CARD ───────────────────────────────────────── */
.form-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 32px; max-width: 480px; margin: 40px auto;
}
.form-card h1 {
  font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 24px;
}
.form-card label {
  display: block; margin-bottom: 16px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
}
.form-card .row { display: flex; gap: 14px; }
.form-card .row label { flex: 1; }
.form-card p.muted { margin-top: 20px; text-align: center; font-size: 13px; }
.form-card p.muted a { color: var(--accent); }
.form-card p { font-size: 14px; color: var(--muted); }

/* ── INPUTS ──────────────────────────────────────────── */
input[type=text], input[type=email], input[type=password],
input[type=tel], input[type=number], textarea, select {
  width: 100%; padding: 11px 14px;
  background: var(--bg-3); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 9px;
  font-size: 14px; margin-top: 6px; font-family: inherit; font-weight: 400;
  letter-spacing: normal;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input[type=checkbox] {
  width: auto; margin: 0; cursor: pointer; accent-color: var(--accent);
}
textarea { resize: vertical; min-height: 80px; }

/* ── SUMMARY (confirm.html) ──────────────────────────── */
.summary { list-style: none; padding: 0; margin-bottom: 24px; }
.summary li {
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  font-size: 14px; display: flex; gap: 10px; align-items: flex-start;
}
.summary li:last-child { border-bottom: none; }
.summary li strong {
  color: var(--muted-2); min-width: 60px; font-size: 11px;
  text-transform: uppercase; letter-spacing: .08em; padding-top: 2px;
}

/* ── DATE TABS ───────────────────────────────────────── */
.date-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 20px 0; }
.date-tab {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 14px; text-align: center; color: var(--muted);
  min-width: 64px; font-size: 13px; font-weight: 600; transition: all .15s;
}
.date-tab:hover { border-color: var(--muted-2); color: var(--text); }
.date-tab.active { background: var(--accent); border-color: var(--accent); color: #07090f; }
.date-tab .dow {
  display: block; font-size: 10px; font-weight: 700; margin-top: 2px;
  text-transform: uppercase; letter-spacing: .06em;
}
.schedule-day {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  color: var(--muted); margin-bottom: 16px;
}

/* ── SLOTS ───────────────────────────────────────────── */
.slots {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px; margin-top: 8px;
}
.slot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-2);
}
.slot-time {
  font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 13px;
}
.slot-label {
  font-size: 11px; font-weight: 700; color: var(--muted-2);
  text-transform: uppercase; letter-spacing: .06em;
}
.slot-free { border-color: rgba(158,255,77,.35); }
.slot-taken { background: var(--bg-3); opacity: .65; }

/* ── TABLES ──────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); margin-top: 4px;
}
.table {
  width: 100%; border-collapse: collapse; background: var(--bg-2);
}
.table th {
  text-align: left; padding: 10px 16px;
  font-size: 11px; color: var(--muted-2); text-transform: uppercase;
  letter-spacing: .1em; font-weight: 700; border-bottom: 1px solid var(--line);
}
.table td {
  text-align: left; padding: 12px 16px;
  font-size: 14px; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-3); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── BADGES ──────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; font-family: 'JetBrains Mono', monospace;
}
.badge-ok {
  background: rgba(158,255,77,.15); color: var(--accent);
  border: 1px solid rgba(158,255,77,.25);
}
.badge-wait {
  background: rgba(255,184,77,.12); color: var(--warn);
  border: 1px solid rgba(255,184,77,.25);
}

/* ── PANELS (team_detail, etc.) ──────────────────────── */
.panel {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; margin-bottom: 20px;
}
.panel h2 {
  font-size: 11px; color: var(--muted-2); font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; margin-bottom: 16px;
}

/* ── INLINE FORM (team_detail add rep) ───────────────── */
.inline-form {
  display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; align-items: flex-end;
}
.inline-form input { flex: 1; min-width: 220px; margin-top: 0; }

/* ── CARDS (my_team, etc.) ───────────────────────────── */
.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-top: 20px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; color: var(--text); transition: all .2s; cursor: pointer;
}
.card:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.card h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.card-cta { margin-top: auto; padding-top: 14px; color: var(--accent); font-weight: 600; font-size: 13px; }

/* ── EMPTY STATE ─────────────────────────────────────── */
.empty {
  text-align: center; padding: 60px 20px; color: var(--muted);
  background: var(--bg-2); border: 1px dashed var(--line-2);
  border-radius: 16px; margin-top: 20px;
}
.empty p { margin-bottom: 8px; }
.empty .btn { margin-top: 16px; }

/* ── TYPOGRAPHY HELPERS ──────────────────────────────── */
h1 { font-size: 1.7rem; }
h2 { font-size: 1.2rem; }
.lead  { color: var(--muted); font-size: 15px; margin-bottom: 12px; }
.muted { color: var(--muted); font-size: 0.9rem; }

/* ── ADMIN BAR ───────────────────────────────────────── */
.admin-bar {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 6px; display: flex; gap: 4px; margin-bottom: 28px;
}
.admin-bar a {
  color: var(--muted); font-weight: 600; font-size: 13px;
  padding: 8px 16px; border-radius: 9px; transition: all .15s;
}
.admin-bar a:hover { color: var(--text); background: var(--bg-3); }
.admin-bar a.active { color: var(--accent); background: var(--bg-3); }

/* ── STAT CARDS (admin dashboard) ───────────────────── */
.stat-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px; margin-top: 16px;
}
.stat-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 18px; position: relative; overflow: hidden;
}
.stat-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.stat-value {
  font-size: 2.2rem; font-weight: 800; color: var(--accent);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 11px; color: var(--muted); margin-top: 6px;
  text-transform: uppercase; letter-spacing: .1em; font-weight: 600;
}

/* ── FOOTER ──────────────────────────────────────────── */
footer {
  padding: 36px 0; border-top: 1px solid var(--line);
  color: var(--muted-2); font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: .06em; text-align: center;
}

/* ── FIELD PHOTO BANNER ──────────────────────────────────── */
.field-photo {
  width: 100%; height: 260px;
  background-size: cover; background-position: center;
  border-radius: 16px; overflow: hidden;
  position: relative; margin-bottom: 4px;
}
.field-photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(7,9,15,.65));
}

/* ── FIELD CARD BANNER (index) ────────────────────────────── */
.field-banner {
  height: 140px;
  background-size: cover; background-position: center;
  border-bottom: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.field-banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(7,9,15,.55));
}
.field-banner .field-id,
.field-banner .field-live { z-index: 1; }

/* ── FIELD RATING ROW (index card) ───────────────────────── */
.field-rating-row {
  display: flex; align-items: center; gap: 2px;
  margin: 6px 0 10px;
}
.field-rating-val {
  font-weight: 700; font-size: 13px; color: var(--text);
  margin-left: 5px;
}
.field-rating-cnt {
  font-size: 12px; color: var(--muted-2); margin-left: 2px;
}

/* ── STAR COMPONENTS ─────────────────────────────────────── */
.star {
  font-size: 18px; line-height: 1;
  transition: transform .1s;
}
.star-sm { font-size: 14px; }
.star-full { color: var(--accent); }
.star-empty { color: var(--muted-2); }

/* ── RATING BLOCK (field_schedule) ──────────────────────── */
.rating-block {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.rating-display {
  display: flex; align-items: center; gap: 3px;
}
.rating-value {
  font-weight: 800; font-size: 17px; color: var(--text);
  margin-left: 8px; font-variant-numeric: tabular-nums;
}
.rating-count {
  font-size: 12px; color: var(--muted); margin-left: 4px;
}

/* ── INTERACTIVE STARS ───────────────────────────────────── */
.stars-interactive-form {
  display: flex; align-items: center; gap: 10px;
}
.rate-label {
  font-size: 12px; color: var(--muted); white-space: nowrap;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
}
.stars-interactive {
  display: flex; gap: 2px;
}
.istar {
  background: none; border: none; cursor: pointer;
  font-size: 22px; line-height: 1; padding: 2px;
  color: var(--muted-2); transition: color .1s, transform .1s;
}
.istar:hover,
.istar.istar-hover { color: var(--accent); transform: scale(1.18); }
.istar.istar-active { color: var(--accent); }

/* ── VIDEO SECTION (field_schedule) ─────────────────────── */
.field-video-section {
  margin: 20px 0;
}
.field-video-label {
  font-size: 11px; color: var(--muted-2); font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; margin-bottom: 10px;
}
.field-video-wrap {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-2);
}
.field-video-wrap iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border: none;
}

/* ── COMMENTS SECTION ────────────────────────────────────── */
.comments-section {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--line);
}
.comments-header {
  font-size: 16px; font-weight: 700; color: var(--text);
  margin-bottom: 18px; display: flex; align-items: center; gap: 10px;
}
.comments-count {
  background: var(--bg-3); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 2px 10px;
  font-size: 12px; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.comment-form { margin-bottom: 24px; }
.comment-form textarea {
  width: 100%; min-height: 80px; resize: vertical;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px 14px; font-size: 14px; font-family: inherit;
  margin-top: 0;
  transition: border-color .15s, box-shadow .15s;
}
.comment-form textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.comments-list { display: flex; flex-direction: column; gap: 12px; }
.comment {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px;
  position: relative;
}
.comment-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-4); border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--accent);
  flex-shrink: 0; text-transform: uppercase;
}
.comment-body { flex: 1; min-width: 0; }
.comment-meta {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap;
}
.comment-author { font-size: 13px; font-weight: 700; color: var(--text); }
.comment-date {
  font-size: 11px; color: var(--muted-2);
  font-family: 'JetBrains Mono', monospace;
}
.comment-text {
  font-size: 14px; color: var(--text); line-height: 1.5;
  word-break: break-word;
}
.comment-delete-form { margin-left: auto; flex-shrink: 0; }
.comment-delete-btn {
  background: none; border: none; cursor: pointer;
  color: var(--muted-2); font-size: 13px; padding: 4px 6px;
  border-radius: 6px; transition: color .15s, background .15s;
}
.comment-delete-btn:hover { color: var(--danger); background: rgba(255,92,92,.1); }

/* ── ADMIN MEDIA SECTION ─────────────────────────────────── */
.admin-photo-preview {
  max-width: 100%; max-height: 200px;
  border-radius: 10px; border: 1px solid var(--line-2);
  object-fit: cover; display: block;
}
.field-media-section {
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--line);
}
.field-media-label {
  font-size: 11px; color: var(--muted-2); font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; margin-bottom: 12px;
}
input[type=url] {
  width: 100%; padding: 11px 14px;
  background: var(--bg-3); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 9px;
  font-size: 14px; margin-top: 6px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input[type=url]:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input[type=file] {
  width: 100%; padding: 9px 14px;
  background: var(--bg-3); color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 9px;
  font-size: 13px; margin-top: 6px; cursor: pointer;
}

/* ── MOBILE HAMBURGER + DRAWER ───────────────────────── */
.nav-hamburger {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--bg-3); border: 1px solid var(--line-2);
  color: var(--text); cursor: pointer; margin-left: auto;
  flex-shrink: 0; padding: 0;
}
.nav-hamburger .ico-close { display: none; }

.mobile-menu {
  display: none;
  position: fixed; inset: 0; z-index: 100;
  background: rgba(7,9,15,.96);
  backdrop-filter: blur(16px);
  flex-direction: column;
  padding: 80px 24px 32px;
  overflow-y: auto;
}
.mobile-nav-links {
  display: flex; flex-direction: column; gap: 4px;
  flex: 1;
}
.mobile-nav-links a {
  display: flex; align-items: center;
  padding: 12px 16px; border-radius: 10px;
  font-size: 16px; font-weight: 600; color: var(--muted);
  min-height: 46px; transition: color .15s, background .15s;
}
.mobile-nav-links a:hover { color: var(--text); background: var(--bg-3); }
.mobile-nav-links a.active { color: var(--accent); background: var(--bg-3); }

.mobile-menu-foot {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.mobile-user-block {
  display: flex; align-items: center; gap: 12px; padding: 4px 0 8px;
}
.mobile-user-name { font-size: 14px; font-weight: 600; color: var(--text); }

body.menu-open { overflow: hidden; }
body.menu-open .mobile-menu { display: flex; }
body.menu-open .nav-hamburger .ico-hamburger { display: none; }
body.menu-open .nav-hamburger .ico-close { display: block; }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 900px) {
  .container    { padding: 0 16px; }
  .field-grid   { grid-template-columns: 1fr; }
  .hero-grid    { grid-template-columns: 1fr; }
  .hero h1      { font-size: 40px; }
  nav.links     { display: none; }
  .nav-right    { display: none; }
  .nav-hamburger { display: flex; }
  .form-card    { padding: 24px 16px; margin: 20px auto; }
  .table td, .table th { padding: 10px 10px; font-size: 12px; }
  .stats-grid   { grid-template-columns: 1fr 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
}

/* ── AVATAR IMG SUPPORT ──────────────────────────────── */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.comment-avatar { overflow: hidden; }
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── PROFILE PAGE ────────────────────────────────────── */
.profile-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px; align-items: start;
}

.profile-sidebar {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 28px 20px;
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; text-align: center;
}

.profile-avatar-wrap {
  width: 120px; height: 120px; border-radius: 50%;
  overflow: hidden; border: 2px solid var(--line-2);
  flex-shrink: 0;
}

.profile-avatar-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.profile-name {
  font-size: 17px; font-weight: 700; color: var(--text);
  line-height: 1.2;
}

.profile-email-sub {
  font-size: 12px; color: var(--muted);
  word-break: break-all;
}

.profile-avatar-upload-btn {
  cursor: pointer; display: block; text-align: center;
  width: 100%; box-sizing: border-box;
}

.profile-content {
  display: flex; flex-direction: column; gap: 20px;
}

.profile-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px;
}

.profile-card label {
  display: block; margin-bottom: 16px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
}

.profile-card .row { display: flex; gap: 14px; }
.profile-card .row label { flex: 1; }

.profile-card-head {
  font-size: 11px; font-weight: 700; color: var(--muted-2);
  text-transform: uppercase; letter-spacing: .14em; margin-bottom: 18px;
}

.profile-static-field {
  padding: 11px 14px; background: var(--bg-3);
  border: 1px solid var(--line-2); border-radius: 9px;
  font-size: 14px; color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

/* ── LIVE MODAL ──────────────────────────────────────── */
.live-modal {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(7,9,15,.85); backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 20px;
}
body.live-open .live-modal { display: flex; }

.live-modal-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 16px; width: 90vw; max-width: 900px;
  position: relative; overflow: hidden;
}

.live-modal-title {
  padding: 16px 52px 16px 20px;
  font-size: 14px; font-weight: 700; color: var(--text);
  border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.live-modal-close {
  position: absolute; top: 10px; right: 14px;
  background: var(--bg-3); border: 1px solid var(--line-2);
  color: var(--text); border-radius: 8px;
  width: 32px; height: 32px; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.live-modal-close:hover { background: var(--bg-4); }

.live-modal-iframe {
  position: relative; padding-bottom: 56.25%; height: 0;
}
.live-modal-iframe iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: none;
}

/* ── BTN LIVE — компактная (на карточке поля) ───────────────── */
.btn-live {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(158,255,77,.12);
  color: var(--accent);
  border: 1px solid rgba(158,255,77,.4);
  border-radius: 999px;
  padding: 6px 12px 6px 10px;
  font-size: 11px; font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap; flex-shrink: 0;
}
.btn-live:hover {
  background: rgba(158,255,77,.22);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -8px rgba(158,255,77,.55);
}
.btn-live .live-dot {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: #ff3838;
  box-shadow: 0 0 0 0 rgba(255,56,56,.7);
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,56,56,.7); }
  50%      { box-shadow: 0 0 0 7px rgba(255,56,56,0); }
}

/* ── BTN LIVE — крупная (на странице поля) ───────────────── */
.btn-live-lg {
  padding: 14px 22px;
  font-size: 13px;
  border-radius: 14px;
  letter-spacing: .12em;
  background: linear-gradient(135deg, rgba(158,255,77,.18), rgba(158,255,77,.08));
  border: 1px solid rgba(158,255,77,.45);
  box-shadow: 0 14px 40px -16px rgba(158,255,77,.45), inset 0 1px 0 rgba(158,255,77,.15);
  margin-bottom: 24px;
  gap: 14px;
}
.btn-live-lg:hover {
  background: linear-gradient(135deg, rgba(158,255,77,.28), rgba(158,255,77,.14));
  box-shadow: 0 20px 50px -16px rgba(158,255,77,.6), inset 0 1px 0 rgba(158,255,77,.2);
  transform: translateY(-2px);
}
.btn-live-lg .live-dot { width: 9px; height: 9px; }
.btn-live-lg .live-play {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #07090f;
  margin-left: 4px;
}
.btn-live-lg .live-play svg { display: block; }

/* ── REFEREES — HERO + FILTERS ───────────────────────── */
.referees-hero { padding: 36px 0 16px; }
.referees-hero h1 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }

.referee-filters {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px;
}

/* ── REFEREE GRID + CARD ─────────────────────────────── */
.referee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px; margin-top: 24px;
}

.referee-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  transition: border-color .15s, transform .15s;
}
.referee-card:hover { border-color: var(--line-2); transform: translateY(-2px); }

.referee-card-photo {
  width: 100px; height: 100px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--line-2); flex-shrink: 0;
}

.referee-card-info { text-align: center; flex: 1; width: 100%; }
.referee-card-name { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.referee-card-years { font-size: 12px; margin-top: 4px; }
.referee-card-rating { margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 1px; }
.referee-card-btn { margin-top: 4px; width: 100%; text-align: center; }

/* ── REFEREE BADGE ───────────────────────────────────── */
.referee-badge {
  display: inline-block;
  background: rgba(158,255,77,.10); color: var(--accent);
  border: 1px solid rgba(158,255,77,.22);
  border-radius: 6px; padding: 2px 8px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
}
.referee-badge-lg { font-size: 12px; padding: 4px 10px; }

/* ── REFEREE DETAIL PAGE ─────────────────────────────── */
.referee-detail {
  display: flex; gap: 40px; margin-top: 24px; align-items: flex-start;
}
.referee-detail-photo-col { flex-shrink: 0; }
.referee-detail-photo {
  width: 200px; height: 200px; border-radius: 16px;
  object-fit: cover; border: 2px solid var(--line-2);
  display: block;
}
.referee-detail-info-col { flex: 1; min-width: 0; }

.referee-contacts {
  display: flex; flex-direction: column; gap: 7px;
  font-size: 14px; color: var(--muted);
}

/* ── REF PICKER MODAL ────────────────────────────────── */
.ref-picker-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65); backdrop-filter: blur(6px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ref-picker-modal[aria-hidden="true"] { display: none; }
body.ref-picker-open { overflow: hidden; }

.ref-picker-card {
  background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 20px; padding: 28px;
  width: 100%; max-width: 420px; position: relative;
}
.ref-picker-title {
  font-size: 18px; font-weight: 700; margin-bottom: 20px;
}
.ref-picker-close {
  position: absolute; top: 20px; right: 20px;
  background: none; border: none; color: var(--muted);
  font-size: 18px; cursor: pointer; line-height: 1; padding: 4px;
}
.ref-picker-close:hover { color: var(--text); }
.ref-picker-slot {
  font-size: 13px; color: var(--muted); margin-bottom: 16px;
}
.ref-picker-select {
  width: 100%; background: var(--bg-3);
  border: 1px solid var(--line-2); color: var(--text);
  border-radius: 10px; padding: 10px 14px;
  font-size: 14px; margin-top: 0;
}

/* ── SLOT REFEREE HINT ───────────────────────────────── */
.slot-referee {
  font-size: 10px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: .06em;
  background: rgba(158,255,77,.1); border-radius: 5px;
  padding: 2px 6px;
}

/* ── RESPONSIVE REFEREE ──────────────────────────────── */
@media (max-width: 640px) {
  .referee-detail { flex-direction: column; }
  .referee-detail-photo { width: 120px; height: 120px; }
  .referee-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ── RATING SUMMARY (referee detail top block) ───────── */
.rating-summary {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.rating-summary-stars {
  display: flex; align-items: center; gap: 3px;
}
.rating-summary-num {
  font-size: 26px; font-weight: 800; color: var(--text);
  margin-left: 10px; line-height: 1; font-variant-numeric: tabular-nums;
}
.rating-summary-sub {
  font-size: 13px; color: var(--muted); margin-left: 4px;
}
.rating-summary-cnt {
  font-size: 13px; color: var(--muted-2);
}

/* ── RATING BREAKDOWN (3 criteria rows) ─────────────── */
.rating-breakdown {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 0 4px;
}
.rating-breakdown-row {
  display: flex; align-items: center; gap: 10px;
}
.rating-breakdown-label {
  width: 130px; flex-shrink: 0;
  font-size: 12px; color: var(--muted); font-weight: 500;
}
.rating-breakdown-stars { display: flex; gap: 1px; }
.rating-breakdown-val {
  font-size: 12px; font-weight: 700; color: var(--text);
  min-width: 28px; font-variant-numeric: tabular-nums;
}

/* ── REVIEW CARD (feed on detail page) ──────────────── */
.reviews-list { display: flex; flex-direction: column; gap: 12px; }

.review-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px;
}
.review-card-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; border: 1px solid var(--line-2);
  flex-shrink: 0;
}
.review-card-body { flex: 1; min-width: 0; }
.review-card-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px;
}
.review-card-author { font-size: 13px; font-weight: 700; color: var(--text); }
.review-card-date {
  font-size: 11px; color: var(--muted-2);
  font-family: 'JetBrains Mono', monospace;
}
.review-card-stars { display: flex; gap: 1px; margin-left: auto; }
.review-card-criteria {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted); margin-bottom: 8px;
}
.review-card-criteria b { color: var(--text); }
.review-card-comment {
  font-size: 14px; color: var(--text); line-height: 1.5;
  word-break: break-word;
}

/* ── RATE REFEREE FORM LAYOUT ────────────────────────── */
.rate-referee-layout {
  display: flex; flex-direction: column; gap: 16px;
  max-width: 640px; margin: 0 auto;
}
.rate-criterion {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.rate-criterion:last-of-type { border-bottom: none; }
.rate-criterion-label {
  width: 140px; flex-shrink: 0;
  font-size: 13px; font-weight: 600; color: var(--text);
}
