/* ============ Mustangs Gameday ============ */
@font-face { font-family: "Orelega One"; src: url("fonts/OrelegaOne-latin-ext.woff2") format("woff2"); font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Orelega One"; src: url("fonts/OrelegaOne-latin.woff2") format("woff2"); font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans"; src: url("fonts/NotoSans-latin-ext.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans"; src: url("fonts/NotoSans-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --red: #ed1e25;
  --red-dark: #c8141b;
  --navy: #2b2d42;
  --navy-deep: #1d1f2f;
  --bg: #edf2f4;
  --card: #fff;
  --line: #d9dfe3;
  --gray: #5d6170;
  --green: #17803d;
  --green-bg: #e3f4e8;
  --amber-bg: #fff3d6;
  --amber: #7a4d00;
  --radius: 10px;
  --font-heading: "Orelega One", Georgia, serif;
  --font-body: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.5; color: var(--navy); background: var(--bg); }
a { color: var(--red-dark); }
a:hover { color: var(--red); }
h1, h2 { font-family: var(--font-heading); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(26px, 3vw + 14px, 38px); }
h2 { font-size: 22px; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.muted { color: var(--gray); }
.small { font-size: 14px; }

.wrap { width: 100%; max-width: 1100px; margin-inline: auto; padding-inline: 16px; }
main.wrap { padding-block: 24px 64px; }

/* ---- hlavička ---- */
.top { background: var(--red); color: #fff; }
.top-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--font-heading); font-size: 24px; }
.brand:hover { color: #fff; }
.brand img { width: 40px; height: 40px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.nav a, .nav .linklike { color: #fff; text-decoration: none; font-weight: 700; padding: 6px 0; }
.nav a:hover, .nav .linklike:hover { color: #fff; text-decoration: underline; }
.nav form { margin: 0; }

/* ---- stavební prvky ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.narrow { max-width: 440px; margin: 32px auto; }
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.head h1 { margin: 0; }
.crumb { margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 2px solid var(--navy);
  background: #fff; color: var(--navy); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--navy); color: #fff; }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-danger { border-color: var(--red-dark); color: var(--red-dark); }
.btn-danger:hover { background: var(--red-dark); color: #fff; }
.btn-block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--red-dark); text-decoration: underline; cursor: pointer; }
.linklike:hover { color: var(--red); }

.flash { padding: 12px 16px; border-radius: var(--radius); background: var(--green-bg); color: #0d5527; border: 1px solid #b5e0c1; font-weight: 600; }
.flash-err { background: #fde8e8; color: #8f1116; border-color: #f3b9bb; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; background: var(--navy); color: #fff; }
.badge-flag { background: #0b6e99; }
.badge-tackle { background: var(--red); }
.badge-harpie { background: #7b2d8e; }
.badge-admin { background: var(--navy); }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; margin: 2px 4px 2px 0; }
.chip-miss { background: var(--amber-bg); color: var(--amber); }
.chip-mine { background: var(--green-bg); color: #0d5527; }

/* ---- formuláře ---- */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 4px; font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="time"], input[type="number"], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #9aa1ad; border-radius: 8px; font: inherit; color: var(--navy); background: #fff; }
textarea { min-height: 88px; resize: vertical; }
.row3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.form .btn { justify-self: start; }
.field-err { color: var(--red-dark); font-weight: 700; font-size: 14px; }
.form-inline { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.form .check { display: flex; align-items: center; gap: 8px; min-height: 44px; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--red); }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.types legend { grid-column: 1 / -1; }
.form .type { display: flex; align-items: center; gap: 10px; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.type:has(input:checked) { border-color: var(--red); background: #fff5f5; }
.type span { display: grid; }

/* ---- seznam zápasů ---- */
.games { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.game { padding: 0; margin: 0; }
.game-link { display: block; padding: 20px; color: inherit; text-decoration: none; border-radius: var(--radius); height: 100%; }
.game-link:hover { color: inherit; box-shadow: 0 6px 20px rgb(0 0 0 / .1); }
.game-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 10px; }
.game-date { font-family: var(--font-heading); font-weight: 400; font-size: 22px; }
.game-title { color: var(--gray); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 12px; }
.facts dt { font-size: 13px; color: var(--gray); text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 0; font-weight: 700; }
.facts .grow { flex: 1 1 200px; }
.facts-big dd { font-size: 18px; }
.fill { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
progress { flex: 1; height: 10px; border: 0; border-radius: 999px; overflow: hidden; background: var(--line); accent-color: var(--red); }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--red); }
progress::-moz-progress-bar { background: var(--red); }
.fill-text { font-size: 14px; font-weight: 700; white-space: nowrap; }
.ok { color: var(--green); }
.missing, .mine { margin: 6px 0 0; }

/* ---- detail zápasu ---- */
.game-head h1 { margin: 6px 0 0; }
.note { background: var(--bg); border-radius: 8px; padding: 10px 14px; }
.roles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); align-items: start; }
.role { margin: 0; scroll-margin-top: 16px; border-top: 4px solid var(--red); }
.role-full { border-top-color: var(--green); }
.role-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.role-head h2 { margin: 0; font-size: 20px; }
.count { font-weight: 700; color: var(--red-dark); }
.count.ok { color: var(--green); }
.spots { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; gap: 6px; }
.spot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 6px 12px; border-radius: 8px; background: var(--bg); font-weight: 600; }
.spot form { margin: 0; }
.spot .linklike { font-size: 14px; white-space: nowrap; }
.spot-mine { background: var(--green-bg); }
.spot-free { background: none; border: 2px dashed var(--line); color: var(--gray); font-weight: 400; }
.assign { margin-top: 12px; }
.assign summary { cursor: pointer; color: var(--red-dark); font-weight: 600; padding: 6px 0; }
.assign .form { margin-top: 10px; }

/* ---- tabulky ---- */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--gray); }
.table tr.off td { color: var(--gray); }
.actions { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.actions form { margin: 0; }
.roles-table { max-width: 460px; margin-bottom: 16px; }
.num { width: 84px !important; }
.danger { border-color: #f3b9bb; }
