:root {
  --navy: #0d1b3d;
  --navy-2: #172a5a;
  --blue: #2457f5;
  --yellow: #ffc83d;
  --bg: #f5f3ee;
  --card: #ffffff;
  --ink: #141824;
  --muted: #646b7d;
  --line: #e3e0d8;
  --danger: #d63a3a;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(13,27,61,.06), 0 8px 24px rgba(13,27,61,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--blue); }
img, video { display: block; max-width: 100%; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 24px; padding-bottom: 48px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.02em; }
h1 { font-weight: 900; font-size: clamp(28px, 5vw, 44px); }
h2 { font-weight: 800; font-size: 24px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { color: #fff; text-decoration: none; font-weight: 900; font-size: 19px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ball {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background:
    radial-gradient(circle at 30% 30%, transparent 0 40%, var(--yellow) 41% 52%, transparent 53%),
    conic-gradient(from 30deg, #fff 0 120deg, var(--yellow) 120deg 240deg, var(--blue) 240deg 360deg);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.9);
}
.nav { display: flex; align-items: center; gap: 6px; }
.nav a, .nav button.linklike {
  color: #dfe5f5; text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 8px 12px; border-radius: 999px; background: none; border: 0; cursor: pointer; font-family: inherit;
}
.nav a:hover, .nav button.linklike:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav .pill { background: var(--yellow); color: var(--navy); }
.nav .pill:hover { background: #ffd666; color: var(--navy); }
.nav .who { color: #9fb0d8; font-size: 13px; padding: 0 6px; }
@media (max-width: 600px) { .nav .who { display: none; } .nav a, .nav button.linklike { padding: 8px 9px; } }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 14px/1 inherit; font-family: inherit; padding: 11px 18px; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none; transition: transform .08s, background .15s;
  background: var(--blue); color: #fff;
}
.btn:hover { background: #1946d6; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.yellow { background: var(--yellow); color: var(--navy); }
.btn.yellow:hover { background: #ffd666; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: #ebe8e0; }
.btn.danger { background: transparent; color: var(--danger); border-color: #f0c9c9; }
.btn.danger:hover { background: #fdeeee; }
.btn.small { padding: 7px 12px; font-size: 13px; }

label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
input[type=text], input[type=password], textarea, select {
  display: block; width: 100%; margin-top: 6px; padding: 11px 13px; font: inherit; font-weight: 400;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,87,245,.15); }
textarea { resize: vertical; min-height: 70px; }
.form-error { color: var(--danger); font-size: 14px; min-height: 1.4em; margin: 0 0 10px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-card { max-width: 420px; margin: 32px auto; padding: 28px; }
.auth-card .btn { width: 100%; margin-top: 4px; }
.auth-card p.switch { text-align: center; margin: 16px 0 0; font-size: 14px; }

/* ---------- Home ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: clamp(28px, 6vw, 56px);
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 55%, var(--blue) 140%);
  color: #fff; margin-bottom: 32px;
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero p { color: #c7d2ef; max-width: 52ch; margin: 0 0 20px; font-size: 17px; }
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 300px; height: 300px; border-radius: 50%;
  background:
    conic-gradient(from 30deg, rgba(255,255,255,.10) 0 120deg, rgba(255,200,61,.22) 120deg 240deg, rgba(36,87,245,.25) 240deg 360deg);
  opacity: .8;
  pointer-events: none;
}
.hero .stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 8px; }
.hero .stat b { display: block; font-size: 28px; font-weight: 900; color: var(--yellow); }
.hero .stat span { font-size: 13px; color: #aebbe0; text-transform: uppercase; letter-spacing: .08em; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.cat-card { text-decoration: none; color: inherit; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(13,27,61,.08), 0 16px 32px rgba(13,27,61,.14); }
.cat-cover { aspect-ratio: 16/10; background: var(--navy-2); position: relative; overflow: hidden; }
.cat-cover img { width: 100%; height: 100%; object-fit: cover; }
.cat-cover.empty { display: grid; place-items: center; background: linear-gradient(135deg, var(--navy-2), var(--blue)); }
.cat-cover.empty .ball { width: 54px; height: 54px; opacity: .85; }
.cat-body { padding: 16px 18px 18px; }
.cat-body h3 { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.cat-body p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.counts { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #eef1fb; color: var(--navy-2); }
.chip.y { background: #fff3cf; color: #7a5800; }

/* ---------- Category page ---------- */
.crumb { font-size: 14px; margin-bottom: 8px; display: inline-block; text-decoration: none; font-weight: 600; }
.cat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.cat-head p { margin: 0; }
.tabs { display: inline-flex; background: #e9e6de; border-radius: 999px; padding: 4px; margin-bottom: 20px; }
.tabs button { border: 0; background: none; font: 600 14px inherit; font-family: inherit; padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

.masonry { columns: 4 240px; column-gap: 14px; }
.tile {
  break-inside: avoid; margin-bottom: 14px; border-radius: 12px; overflow: hidden; position: relative;
  background: #dcd8cf; cursor: zoom-in; border: 0; padding: 0; width: 100%; display: block;
}
.tile img, .tile video { width: 100%; height: auto; transition: transform .25s; }
.tile:hover img, .tile:hover video { transform: scale(1.03); }
.tile .play {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  background: linear-gradient(transparent 50%, rgba(0,0,0,.35));
}
.tile .play::before {
  content: ""; width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.92);
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.tile .play::after {
  content: ""; position: absolute; border-left: 18px solid var(--navy); border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px;
}
.tile .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; color: #fff; font-size: 13px; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.65)); opacity: 0; transition: opacity .2s;
}
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; }
.empty-state { text-align: center; padding: 56px 16px; }
.empty-state .ball { display: block; width: 64px; height: 64px; margin: 0 auto 16px; }
.load-more { display: flex; justify-content: center; margin-top: 16px; }

/* ---------- Modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(8,14,30,.6); z-index: 50; display: grid; place-items: center; padding: 16px;
  animation: fade .15s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head h2 { margin: 0; }
.x { border: 0; background: #eeebe4; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; line-height: 1; color: var(--ink); }
.dropzone {
  border: 2px dashed #c9c4b8; border-radius: 14px; padding: 28px 16px; text-align: center; cursor: pointer;
  background: #faf9f6; transition: border-color .15s, background .15s; margin-bottom: 14px;
}
.dropzone.over { border-color: var(--blue); background: #eef2ff; }
.dropzone strong { display: block; font-size: 16px; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-bottom: 14px; }
.previews .pv { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #e7e4dc; }
.previews .pv img, .previews .pv video { width: 100%; height: 100%; object-fit: cover; }
.previews .pv button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; }
.previews .pv .tag { position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 700; background: rgba(0,0,0,.6); color: #fff; padding: 1px 5px; border-radius: 4px; }
.progress { height: 8px; background: #e7e4dc; border-radius: 999px; overflow: hidden; margin: 6px 0 14px; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), #5b8cff); transition: width .2s; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(5,8,18,.95); z-index: 60; display: flex; flex-direction: column; color: #fff; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; gap: 10px; }
.lb-top .meta { font-size: 13px; color: #aab3c8; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-top .actions { display: flex; gap: 6px; flex: none; }
.lb-btn { background: rgba(255,255,255,.1); color: #fff; border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer; font: 600 13px inherit; font-family: inherit; text-decoration: none; }
.lb-btn:hover { background: rgba(255,255,255,.2); }
.lb-btn.danger:hover { background: var(--danger); }
.lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; min-height: 0; padding: 0 56px; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 22px; cursor: pointer; }
.lb-nav:hover { background: rgba(255,255,255,.25); }
.lb-nav.prev { left: 8px; } .lb-nav.next { right: 8px; }
.lb-caption { text-align: center; padding: 12px 16px 18px; font-size: 15px; min-height: 48px; }
@media (max-width: 600px) { .lb-stage { padding: 0 8px; } .lb-nav { top: auto; bottom: -46px; } }

/* ---------- Admin ---------- */
.admin-section { padding: 20px; margin-bottom: 24px; }
.row-list { display: flex; flex-direction: column; gap: 10px; }
.row-item { display: grid; grid-template-columns: 1fr 2fr auto; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.row-item label { margin: 0; font-size: 12px; color: var(--muted); }
.row-item .btns { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 760px) { .row-item { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
td .btns { display: flex; gap: 6px; }
.badge { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: #eef1fb; color: var(--navy-2); text-transform: uppercase; letter-spacing: .05em; }
.badge.admin { background: var(--yellow); color: var(--navy); }
.badge.off { background: #fdeeee; color: var(--danger); }
.new-cat { display: grid; grid-template-columns: 1fr 2fr auto; gap: 10px; align-items: end; margin-top: 16px; }
.new-cat label { margin: 0; }
@media (max-width: 760px) { .new-cat { grid-template-columns: 1fr; } }

/* ---------- Toast & footer ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; z-index: 80;
  transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: var(--danger); }
.footer { color: var(--muted); font-size: 13px; padding-top: 16px; padding-bottom: 24px; text-align: center; }
.app-version { display: block; margin-top: 4px; font-size: 11px; opacity: .75; }
.spinner { width: 28px; height: 28px; border: 3px solid #d9d5cb; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; margin: 48px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== v2: bajnokság ===================== */
.topbar-inner { height: auto; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { font-size: 17px; min-width: 0; }
.nav { flex-wrap: wrap; gap: 4px 10px; justify-content: flex-end; }
.nav-main, .nav-user { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav a.active { background: rgba(255,255,255,.14); color: #fff; }
@media (max-width: 900px) {
  .topbar-inner { justify-content: center; }
  .brand { width: 100%; justify-content: center; }
  .nav { width: 100%; justify-content: space-between; }
}
@media (max-width: 600px) { .nav .who { display: inline-block; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

.h-md { font-size: 30px; }
.small { font-size: 13px; }
small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 4px; }
.spacer { flex: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 800; color: var(--yellow) !important; margin: 0 0 8px !important; }
.hero h1 { max-width: 22ch; }
.brand-logo { width: 40px; height: 40px; flex: none; }
.hero-logo {
  position: absolute; right: clamp(16px, 5vw, 56px); top: 50%; transform: translateY(-50%);
  width: clamp(120px, 22vw, 220px); height: auto; z-index: 1;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.35));
}
.hero > *:not(.hero-logo) { position: relative; z-index: 1; }
.hero:has(.hero-logo) > *:not(.hero-logo) { max-width: calc(100% - clamp(140px, 26vw, 260px)); }
.hero:has(.hero-logo)::after { display: none; }
@media (max-width: 640px) {
  .hero-logo { position: static; transform: none; width: 110px; margin-bottom: 12px; }
  .hero:has(.hero-logo) > *:not(.hero-logo) { max-width: none; }
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn.ghost-light:hover { background: rgba(255,255,255,.1); }
.btn.red { background: var(--danger); color: #fff; }
.btn.red:hover { background: #b92d2d; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
label.check input { width: 18px; height: 18px; margin: 0; }
input[type=number], input[type=datetime-local], input[type=file], input[type=color] {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; font-weight: 400;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
input[type=color] { height: 44px; padding: 4px; cursor: pointer; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
h3.sub { margin: 8px 0 10px; font-size: 16px; }
.modal.wide { max-width: 760px; }
.modal-actions { align-items: center; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { margin: 0; }
.section { padding: 20px; margin-bottom: 20px; }
.section-plain { margin: 28px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.section h2 { margin-bottom: 12px; }
.season-select { margin: 0; min-width: 180px; }
.inline-select { width: auto; margin: 0; padding: 8px 12px; }
.admin-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 20px; border: 2px dashed #ffd666; box-shadow: none; }
.legend { margin: 12px 0 0; line-height: 1.6; }

/* Tabella */
table.standings td, table.standings th { padding: 9px 8px; }
table .num { text-align: center; }
table.standings tbody tr:hover { background: #f8f6f1; }
table.standings tr.top4 .pos { background: var(--navy); color: #fff; }
.pos { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #eeebe4; font-weight: 800; font-size: 13px; }
.team-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; }
.team-link:hover { color: var(--blue); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.form { display: inline-flex; gap: 3px; }
.form i { font-style: normal; font-size: 10px; font-weight: 800; width: 24px; height: 20px; display: grid; place-items: center; border-radius: 5px; color: #fff; }
.form i.w { background: #2f9e63; } .form i.l { background: #d65050; }
table.compact td, table.compact th { padding: 7px 6px; }

/* Mérkőzések */
.round { margin-bottom: 18px; }
.round h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 6px; }
.match {
  display: grid; grid-template-columns: 150px 1fr auto 1fr auto; gap: 10px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; background: #fff;
}
.match.played { background: #fcfbf8; }
.m-time { font-size: 13px; font-weight: 600; }
.m-time small { margin: 0; }
.m-team { font-weight: 600; min-width: 0; }
.m-team a { color: var(--ink); text-decoration: none; }
.m-team a:hover { color: var(--blue); }
.m-team.home { text-align: right; }
.m-team.win { font-weight: 900; }
.m-team .tbd { color: var(--muted); font-style: italic; font-weight: 500; font-size: 13px; }
.m-score { text-align: center; min-width: 74px; }
.m-score b { font-size: 20px; font-weight: 900; }
.m-score span { margin: 0 4px; color: var(--muted); }
.m-score .vs { color: var(--muted); font-size: 18px; }
.m-score small { margin: 0; font-size: 11px; white-space: nowrap; }
.m-extra { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.m-notes { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.doc-chip { font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 999px; background: #eef1fb; text-decoration: none; white-space: nowrap; }
@media (max-width: 760px) {
  .match { grid-template-columns: 1fr auto 1fr; }
  .m-time { grid-column: 1 / -1; }
  .m-extra { grid-column: 1 / -1; justify-content: flex-start; }
}
.m-extra:empty { display: none; }

/* Rájátszás */
.bracket { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 1000px) { .bracket { grid-template-columns: 1fr; } }
.bracket-group h3 { font-size: 16px; margin-bottom: 10px; }
.bracket-match { margin-bottom: 10px; }
.b-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); margin: 0 0 4px 4px; }
.bracket .match, .home-grid .match { grid-template-columns: 1fr auto 1fr; }
.bracket .m-time, .home-grid .m-time { grid-column: 1 / -1; }
.bracket .m-extra, .home-grid .m-extra { grid-column: 1 / -1; justify-content: flex-start; }
.final-ranking ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.final-ranking li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.final-ranking .place { font-size: 20px; font-weight: 900; width: 32px; text-align: center; }

/* Főoldal */
.home-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: start; margin-bottom: 12px; }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } }
.team-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.team-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; }
.team-pill:hover { box-shadow: 0 0 0 2px var(--c), var(--shadow); }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 12px; flex: none; }
.avatar.big { width: 84px; height: 84px; font-size: 30px; border: 4px solid #fff; box-shadow: var(--shadow); }

/* Csapatok */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.team-card { text-decoration: none; color: inherit; overflow: hidden; transition: transform .15s; border-top: 5px solid var(--c); }
.team-card:hover { transform: translateY(-3px); }
.team-cover { aspect-ratio: 16/9; display: grid; place-items: center; overflow: hidden; }
.team-cover img { width: 100%; height: 100%; object-fit: cover; }
.team-initials { color: rgba(255,255,255,.9); font-size: 46px; font-weight: 900; letter-spacing: -.03em; }
.team-hero {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 24px; border-radius: 20px; margin-bottom: 20px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--c) 18%, #fff), #fff 70%); box-shadow: var(--shadow); border-left: 8px solid var(--c);
}
.team-hero-text { flex: 1; min-width: 200px; }
.team-hero h1 { margin-bottom: 4px; }
.lead { font-size: 17px; margin: 0 0 6px; }
.prose p { margin: 0; line-height: 1.65; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.player-card { border: 0; padding: 0; text-align: left; cursor: pointer; overflow: hidden; font: inherit; color: inherit; transition: transform .15s; }
.player-card:hover { transform: translateY(-3px); }
.player-photo { position: relative; aspect-ratio: 4/5; display: grid; place-items: center; overflow: hidden; }
.player-photo img { width: 100%; height: 100%; object-fit: cover; }
.player-photo > span:first-child:not(.jersey) { color: rgba(255,255,255,.9); font-size: 44px; font-weight: 900; }
.jersey { position: absolute; right: 10px; bottom: 10px; background: #fff; color: var(--navy); font-weight: 900; font-size: 18px; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.player-body { padding: 12px 14px 16px; }
.player-body h3 { font-size: 17px; margin-bottom: 6px; }
.player-body p { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.player-detail { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.player-photo.large { border-radius: 14px; }
.meta-line { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
@media (max-width: 600px) { .player-detail { grid-template-columns: 1fr; } .player-photo.large { max-width: 240px; } }

/* Admin */
.cols-season { grid-template-columns: 2fr 1fr auto !important; }
@media (max-width: 760px) { .cols-season { grid-template-columns: 1fr !important; } }
.new-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 16px; }
.new-row label { margin: 0; flex: 1; min-width: 180px; }
.new-row label.check { flex: none; min-width: 0; margin-bottom: 10px; }
table.users select { margin: 0; padding: 6px 8px; min-width: 130px; }
.badge.superadmin { background: var(--navy); color: var(--yellow); }
.badge.team_admin { background: #e5f6ee; color: #1e7a4c; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-del { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: 14px; }
.chip-del a { color: var(--ink); text-decoration: none; }
.chip-del button { border: 0; background: #f2efe8; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; color: var(--danger); }
table.docs td { white-space: normal; }
table.docs td:first-child a { font-weight: 700; text-decoration: none; }

/* ---------- Biztonsági kérdés ---------- */
.auth-card + .auth-card { margin-top: -12px; }
.auth-card p.switch + p.switch { margin-top: 8px; }
.sec-question { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; margin: 4px 0 14px;
  border-radius: 10px; background: color-mix(in srgb, currentColor 6%, transparent); }
.sec-question .muted { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.notice { padding: 10px 12px; border-radius: 10px; background: #fff4d6; color: #6b4e00; font-size: 14px; }
.sec-line { margin-top: 2px; font-size: 13px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Ideiglenes jelszó megjelenítése (új fiók / jelszó-visszaállítás) */
.temp-pass { margin: 12px 0; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 10px; background: #faf8f3;
  font: 600 14px/1.6 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; user-select: all; }
.small-note { font-size: 13px; margin: 8px 0 0; }

/* ===================== v5: sorsolás, edzések, sürgős meghívók ===================== */
input[type=date], input[type=time] {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; font-weight: 400;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.btns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Összes Mérkőzés */
.schedule-list { display: grid; gap: 20px; }
.schedule-img { margin: 0; overflow: hidden; }
.schedule-open { display: block; width: 100%; padding: 0; border: 0; background: #fff; cursor: zoom-in; }
.schedule-open img { width: 100%; height: auto; }
.schedule-img figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-top: 1px solid var(--line); font-weight: 600; }

/* Edzésidőpontok (mint egy nyitvatartás) */
.practice-list { display: grid; gap: 10px; }
.practice-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.practice-days { display: flex; gap: 4px; }
.practice-days span { display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 6px; border-radius: 8px;
  background: var(--navy); color: var(--yellow); font-weight: 800; font-size: 13px; }
.practice-info { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.practice-time { font-size: 20px; font-weight: 900; letter-spacing: -.01em; }
.day-picker { border: 0; padding: 0; margin: 0 0 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.day-picker legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.day-picker label { margin: 0; cursor: pointer; }
.day-picker input { position: absolute; opacity: 0; pointer-events: none; }
.day-picker span { display: inline-grid; place-items: center; min-width: 44px; height: 40px; padding: 0 8px; border-radius: 10px;
  border: 1.5px solid var(--line); font-weight: 800; background: #fff; }
.day-picker input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--yellow); }
.day-picker input:focus-visible + span { box-shadow: 0 0 0 3px rgba(36,87,245,.3); }

/* Sürgős edzés-meghívók */
.invite-banner { margin-bottom: 24px; padding: 18px; border-radius: 20px; background: #fff3cf; border: 2px solid var(--yellow); }
.invite-banner .section-head h2 { font-size: 22px; }
.invite-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.invite { padding: 18px; border-top: 6px solid var(--c, var(--yellow)); display: flex; flex-direction: column; gap: 8px; }
.invite h3 { font-size: 19px; font-weight: 900; margin: 0; }
.invite p { margin: 0; }
.invite-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.invite-tag { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px;
  border-radius: 999px; background: var(--danger); color: #fff; animation: pulse 2s ease-in-out infinite; }
.invite.full .invite-tag { background: #2f9e63; animation: none; }
.invite.closed .invite-tag { background: var(--muted); animation: none; }
.invite.closed { opacity: .75; }
@keyframes pulse { 50% { opacity: .65; } }
@media (prefers-reduced-motion: reduce) { .invite-tag { animation: none; } }
.invite-where { font-weight: 600; }
.invite-note { color: var(--muted); font-size: 14px; }
.invite-count { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.invite-count .big { font-size: 40px; line-height: 1; font-weight: 900; color: var(--danger); }
.invite.full .invite-count b { color: #2f9e63; font-size: 18px; }
.invite-count .muted { margin-left: auto; }
.invite-bar { height: 8px; border-radius: 999px; background: #eeebe4; overflow: hidden; }
.invite-bar div { height: 100%; background: linear-gradient(90deg, var(--yellow), #2f9e63); transition: width .3s; }
.signup-list { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.signup-list li { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: 999px;
  background: #eef1fb; font-size: 13px; font-weight: 600; }
.signup-list li:not(:has(button)) { padding-right: 10px; }
.signup-list button { border: 0; background: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; color: var(--danger); line-height: 1; }
.invite-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.name-row { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.name-row input { margin: 0; }

/* Verzió a jobb felső sarokban, Verziók oldal, fejlesztői elérhetőség a láblécben */
.nav .ver-pill { position: relative; margin-left: 4px; padding: 4px 10px; font-size: 12px; font-weight: 700;
  border: 1px solid rgba(255,255,255,.25); color: #9fb0d8; font-variant-numeric: tabular-nums; }
.nav .ver-pill:hover, .nav .ver-pill.active { color: var(--yellow); border-color: var(--yellow); background: transparent; }
.new-dot { position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 2px var(--navy); }
.release-list { display: grid; gap: 16px; max-width: 820px; }
.release.current { box-shadow: 0 0 0 2px var(--yellow), var(--shadow); }
.release-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.release-head h2 { margin: 0; }
.release-head .muted { margin-left: auto; }
.release ul { margin: 0; padding-left: 20px; }
.release li { margin: 4px 0; }
.release code { font-size: .9em; padding: 1px 5px; border-radius: 5px; background: #f2efe8; }
.footer > div + div { margin-top: 4px; }
.dev-credit a { color: inherit; font-weight: 600; }
.dev-credit a:hover { color: var(--blue); }
.dev-credit .sep { opacity: .5; margin: 0 2px; }
a.app-version { color: inherit; text-decoration: none; }
a.app-version:hover { color: var(--blue); text-decoration: underline; }
@media (max-width: 520px) { .dev-credit .sep { display: none; } .dev-credit a { display: block; } }

/* Elérhetőségeink */
.contact-intro { max-width: 70ch; margin-top: 4px !important; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.contact-card dl { margin: 0; display: grid; gap: 10px; }
.contact-row { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 12px; align-items: baseline;
  padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-row dt { color: var(--muted); font-size: 14px; font-weight: 600; }
.contact-row dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.contact-row dd:only-child { grid-column: 1 / -1; }
.contact-row a { color: var(--blue); text-decoration: none; }
.contact-row a:hover { text-decoration: underline; }
.contact-editor { max-width: 900px; }
.ce-section { padding: 16px; margin-bottom: 16px; }
.ce-head { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.ce-head label { flex: 1; min-width: 220px; margin: 0; }
.ce-rows { display: grid; gap: 8px; margin-bottom: 10px; }
.ce-row { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr auto; gap: 8px; align-items: center; }
.ce-row input { margin: 0; }
.ce-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; position: sticky; bottom: 0;
  padding: 12px 0; background: var(--bg); }
@media (max-width: 640px) {
  .contact-row { grid-template-columns: 1fr; gap: 2px; }
  .ce-row { grid-template-columns: 1fr; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
}

/* Kilépés: külön, jól látható piros gomb a jobb szélen (ne lehessen véletlenül megnyomni) */
.nav .nav-sep { width: 1px; height: 22px; background: rgba(255,255,255,.25); margin: 0 10px 0 8px; }
.nav .logout-btn {
  font: 700 13px/1 inherit; font-family: inherit; cursor: pointer; padding: 8px 14px; border-radius: 999px;
  background: var(--danger); color: #fff; border: 1.5px solid var(--danger); transition: background .15s;
}
.nav .logout-btn:hover { background: #b92d2d; border-color: #b92d2d; }
.nav .logout-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(214,58,58,.45); }
.nav .ver-pill { margin: 0 6px 0 0; }
.nav .who { color: #dfe5f5; }
/* A menü kitölti a sort: a menüpontok balra, a fiók + Kilépés mindig a jobb szélre kerül (törésnél is) */
.nav { flex: 1 1 auto; justify-content: space-between; }
.nav-user { margin-left: auto; }

/* Szabályok / Dokumentumok */
.lib-group { margin-bottom: 28px; }
.lib-group h2 { font-size: 20px; margin-bottom: 10px; }
.lib-list { display: grid; gap: 10px; }
.lib-doc { display: flex; align-items: center; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
.doc-icon { flex: none; width: 48px; height: 56px; border-radius: 8px; display: grid; place-items: center; color: #fff;
  font-size: 11px; font-weight: 900; letter-spacing: .04em; position: relative; }
.doc-icon::after { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 12px 12px 0;
  border-color: transparent var(--card) rgba(255,255,255,.35) transparent; border-top-right-radius: 8px; }
.doc-icon.pdf { background: #d63a3a; } .doc-icon.word { background: #2b579a; } .doc-icon.excel { background: #217346; }
.doc-icon.ppt { background: #c4502b; } .doc-icon.img { background: #7a4fc4; } .doc-icon.txt { background: var(--muted); }
.lib-info { flex: 1; min-width: 200px; }
.lib-info h3 { font-size: 17px; margin: 0 0 2px; }
.lib-info h3 a { color: var(--ink); text-decoration: none; }
.lib-info h3 a:hover { color: var(--blue); text-decoration: underline; }
.lib-info p { margin: 0 0 2px; }
.lib-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
@media (max-width: 600px) { .lib-actions { width: 100%; } }

/* Szezonok kezelése ablak */
.season-rows { display: grid; gap: 8px; margin-bottom: 8px; }
.season-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.season-row input { margin: 0; }

/* Nem szerkeszthető mező (pl. felhasználónév a Fiókom oldalon) */
input:disabled { background: #f2efe8; color: var(--muted); cursor: not-allowed; }

/* Rendszerüzenet a főoldal tetején (a szuperadmin állítja be az Admin Panelen) */
.site-notice {
  display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; padding: 14px 18px;
  border-radius: 16px; border: 2px solid #b9cbfb; background: #eaf0ff; color: var(--navy); font-weight: 600;
}
.site-notice.warning { border-color: var(--yellow); background: #fff3cf; }
.site-notice.danger { border-color: #f0b4b4; background: #fdeeee; color: #8a1f1f; }
.site-notice.success { border-color: #a8dcc0; background: #e5f6ee; color: #1e5a3a; }
.site-notice-icon { font-size: 20px; line-height: 1.3; }

/* Admin Panel: webhely-szövegek és rendszerüzenet űrlapjai */
.stack-form h3 { margin-top: 18px; font-size: 17px; }
.stack-form .btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.form-row, .form-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
input[type=datetime-local] {
  display: block; width: 100%; margin-top: 6px; padding: 10px 13px; font: inherit; font-weight: 400;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}

/* Csapatoldal: melyik szezonokban játszik */
.team-seasons { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.team-seasons a.chip { text-decoration: none; }

/* Csapatlogó: a színes pötty / monogram helyett, ha fel van töltve */
.team-logo { width: 22px; height: 22px; object-fit: contain; flex: none; border-radius: 4px; }
.m-team a { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.m-team.home a { flex-direction: row-reverse; }
.m-team .dot { display: inline-block; }
.avatar.logo { background: #fff; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.avatar.logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.avatar.big.logo img { padding: 6px; }
.team-cover { position: relative; }
.team-cover img.cover-logo { width: 62%; height: 62%; object-fit: contain; background: #fff; border-radius: 16px; padding: 10px; }
.team-cover img.corner-logo { position: absolute; right: 10px; bottom: 10px; width: 52px; height: 52px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; box-shadow: var(--shadow); }
.logo-edit { display: flex; gap: 14px; align-items: center; margin: 4px 0 12px; }
.logo-edit p { margin: 2px 0 0; }
input[type=file] { display: block; margin-top: 6px; font: inherit; font-weight: 400; }

/* Mérkőzés szerkesztése: jegyzőkönyv-képek */
button.doc-chip { border: 0; cursor: pointer; font-family: inherit; color: var(--blue); }
button.doc-chip:hover { background: #dfe6fb; }
.report-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.report-thumbs figure { position: relative; margin: 0; }
.report-thumbs .rep-open { display: block; padding: 0; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; cursor: zoom-in; background: #fff; }
.report-thumbs img { width: 96px; height: 120px; object-fit: cover; }
.report-thumbs .rep-del { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; cursor: pointer; font-weight: 800; }

/* YouTube-videók a galériában: bélyegkép + címke a rácsban, 16:9 lejátszó a nagyítóban */
.tile img.yt { aspect-ratio: 16 / 9; object-fit: cover; }
.tile .yt-tag { position: absolute; top: 8px; left: 8px; background: #e00; color: #fff; font-size: 11px; font-weight: 800;
  padding: 2px 7px; border-radius: 4px; letter-spacing: .02em; }
.lb-stage .yt-frame { width: min(100%, calc((100vh - 170px) * 16 / 9)); aspect-ratio: 16 / 9; }
.lb-stage .yt-frame iframe { width: 100%; height: 100%; border: 0; border-radius: 6px; background: #000; }

/* Játékos szerkesztő: szezonok fejléce a jelölőnégyzetek fölött */
.field-title { margin: 14px 0 6px; }
