/* Lipunia Typuje — motyw klubowy v2 (grafit + przygaszone złoto + oszczędna limonka).
   Ładowany PO app.css; przekierowuje jego kolory przez zmienne CSS, więc wszystkie ekrany (także panel administratora)
   zmieniają wygląd bez zmian w ich kodzie. Panel administratora ma jasne tło (klasa .theme-light).
   Obrazy tła: lekkie WebP (assets/img). Czcionki: Sora (nagłówki) i Inter (interfejs), hostowane lokalnie. */

@font-face { font-family: "Sora"; src: url("../fonts/sora.woff2") format("woff2"); font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }

:root {
  --bg: #101416; --card: #1b2124; --ink: #f1f3f2; --muted: #a8b1b4; --line: #343c40; --line-strong: #3f484d;
  --gold: #d0b45c; --gold-2: #e0c65e; --lime: #a8be36; --ok: #4b9b70; --err: #e57373;
  --navy-950: #0b0e10; --navy-900: #0b0e10; --navy-800: #1b2124; --navy-700: #242b2f; --navy-600: #343c40;
  --green-700: #d0b45c; --green-600: #4b9b70; --green-500: #e0c65e; --green-100: #1d3328; --green-50: #1f2a26;
  --red-600: #e57373; --red-100: #3a2222; --amber-600: #e0c65e; --amber-500: #d0b45c; --amber-100: #332d19;
  --silver: #aab4b8; --silver-bg: #262d31; --bronze: #cf9468; --bronze-bg: #2e2822; --gold-bg: #2f2a1a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.18);
  --c-surface-2: #242b2f; --c-input: #242b2f; --c-hover: #2c353a; --c-chip: #2a3236; --c-tab-bg: #151a1c; --c-tab-on: #2a3236;
  --c-stat: #242b2f; --c-link: #d0b45c; --c-btn-ink: #101416; --c-skel-1: #242b2f; --c-skel-2: #2d363b;
  --c-info-bg: #1c2a33; --c-info-line: #2c4553; --c-info-ink: #a9d3e8; --c-ok-ink: #8bd0aa;
  --c-warn-bg: #332d19; --c-warn-line: #5a4d22; --c-warn-ink: #e8d58a; --c-danger-bg: #3a2222; --c-danger-line: #6b3535; --c-danger-ink: #f0a8a8;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Sora", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --top-h: 68px;
}

.theme-light {
  --bg: #eef1f5; --card: #ffffff; --ink: #0f172a; --muted: #5b6678; --line: #e1e6ee; --line-strong: #cbd3df;
  --navy-950: #0a1424; --navy-900: #0f1b2d; --navy-800: #16263d; --navy-700: #213550; --navy-600: #31496b;
  --green-700: #15803d; --green-600: #16a34a; --green-500: #22c55e; --green-100: #dcfce7; --green-50: #f0fdf4;
  --red-600: #dc2626; --red-100: #fee2e2; --amber-600: #b45309; --amber-500: #f59e0b; --amber-100: #fef3c7;
  --gold: #b8860b; --gold-bg: #fff6d6; --silver: #6b7686; --silver-bg: #eef0f4; --bronze: #a05a2c; --bronze-bg: #f8e9dc;
  --shadow: 0 1px 2px rgba(15, 27, 45, 0.06), 0 4px 14px rgba(15, 27, 45, 0.05);
  --c-surface-2: #f6f8fb; --c-input: #ffffff; --c-hover: #f6f8fb; --c-chip: #eef1f5; --c-tab-bg: #e3e8ef; --c-tab-on: #ffffff;
  --c-stat: #f6f8fb; --c-link: #8a6f1d; --c-btn-ink: #101416; --c-skel-1: #e6eaf0; --c-skel-2: #f2f5f9;
  --c-info-bg: #eff6ff; --c-info-line: #bfdbfe; --c-info-ink: #1e3a8a; --c-ok-ink: #14532d;
  --c-warn-bg: #fef3c7; --c-warn-line: #fcd34d; --c-warn-ink: #78350f; --c-danger-bg: #fee2e2; --c-danger-line: #fca5a5; --c-danger-ink: #7f1d1d;
  background: var(--bg); color: var(--ink);
}

/* ---------- baza ---------- */
body { font-family: var(--font); background: var(--bg); color: var(--ink); }
h1, h2, h3, .page-title, .brand-name, .round-title, .stat b, .card-title { font-family: var(--font-head); }
a { color: var(--c-link); }
:focus-visible { outline-color: var(--gold-2); }
.boot { background: var(--navy-950); }
.page-title { font-weight: 800; }
.page-title.with-ico { display: flex; align-items: center; gap: 10px; }
.gold-ico { color: var(--gold); width: 26px; height: 26px; }
.muted, .page-sub { color: var(--muted); }

/* ---------- nagłówek ---------- */
.topbar {
  gap: 10px; border-bottom: 1px solid var(--line); color: var(--ink);
  background: linear-gradient(90deg, rgba(11, 14, 16, 0.97) 0%, rgba(11, 14, 16, 0.8) 55%, rgba(11, 14, 16, 0.92) 100%), url("../img/stadium-top.webp") center 28% / cover, var(--navy-950);
}
.brand img { width: 46px; height: 46px; border-radius: 0; object-fit: contain; }
.brand-name { font-style: italic; font-weight: 800; letter-spacing: -0.02em; font-size: 20px; line-height: 1.1; color: #fff; }
.brand-name b { color: var(--gold); font-weight: 800; }
.brand-tag { font-size: 11.5px; font-style: italic; color: #c3cacd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-season { color: var(--muted); }
.bell { color: var(--ink); }
.bell:hover { background: rgba(255, 255, 255, 0.08); }
.badge { background: var(--gold); color: #101416; }
.user-wrap { position: relative; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(11, 14, 16, 0.65); color: var(--ink); font-weight: 600; }
.user-chip:hover { background: rgba(27, 33, 36, 0.9); }
.user-chip .user-name { display: none; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-caret { width: 1em; height: 1em; opacity: 0.8; }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 230px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); }
.um-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); text-decoration: none; text-align: left; font-weight: 600; }
.um-item:hover { background: var(--c-hover); }

/* ---------- nawigacja ---------- */
.bottomnav { background: var(--navy-950); border-top: 1px solid var(--line); }
.bottomnav[data-count="6"] { grid-template-columns: repeat(6, 1fr); }
.bottomnav[data-count="6"] .nav-link { font-size: 10.5px; }
.nav-link { color: var(--muted); }
.nav-link[aria-current="page"] { color: var(--gold-2); }
.nav-link[aria-current="page"]::before { background: var(--gold); }
.sidenav { background: var(--navy-950); border-right: 1px solid var(--line); }

@media (min-width: 720px) {
  :root { --top-h: 80px; }
  .user-chip .user-name { display: inline; }
  .brand img { width: 56px; height: 56px; }
  .brand-name { font-size: 28px; }
  .brand-tag { font-size: 13.5px; }
}
@media (min-width: 960px) {
  :root { --top-h: 92px; }
  .app { grid-template-columns: 124px minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .topbar { grid-column: 1 / -1; grid-row: 1; justify-content: flex-start; padding: 0 22px; background-color: var(--navy-950); color: var(--ink); border-bottom: 1px solid var(--line); }
  .topbar .brand { display: flex; }
  .topbar .bell { color: var(--ink); }
  .topbar .bell:hover { background: rgba(255, 255, 255, 0.08); }
  .topbar::after { content: ""; position: absolute; left: 470px; top: 6px; width: 360px; height: 80px; pointer-events: none; opacity: 0.9;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 80' fill='none'%3E%3Cpath d='M4 70C80 60 160 44 238 16' stroke='%23d0b45c' stroke-width='5' stroke-linecap='round' opacity='.9'/%3E%3Cpath d='M44 74C110 66 190 52 256 30' stroke='%23d0b45c' stroke-width='2' stroke-linecap='round' opacity='.5'/%3E%3Ccircle cx='296' cy='28' r='24' fill='%23f1f3f2' stroke='%23101416' stroke-width='2.5'/%3E%3Cpath d='M296 14l11 8-4 13h-14l-4-13z' fill='%23101416'/%3E%3Cpath d='M296 14V6M307 22l10-3M303 35l6 9M289 35l-6 9M285 22l-10-3' stroke='%23101416' stroke-width='2.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat; }
  .top-season { margin-left: 14px; }
  .sidenav { grid-column: 1; grid-row: 2; top: var(--top-h); height: calc(100vh - var(--top-h)); padding: 14px 10px; }
  .sidenav .side-links { display: flex; flex-direction: column; gap: 6px; }
  .sidenav .nav-link { flex-direction: column; justify-content: center; gap: 6px; height: 78px; padding: 0 4px; border-radius: 12px; font-size: 13px; }
  .sidenav .nav-link .icon { width: 26px; height: 26px; }
  .sidenav .nav-link:hover { background: var(--navy-700); color: var(--ink); }
  .sidenav .nav-link[aria-current="page"] { background: rgba(208, 180, 92, 0.16); color: var(--gold-2); }
  .sidenav .nav-link[aria-current="page"]::before { left: 0; right: auto; top: 14px; bottom: 14px; width: 4px; height: auto; background: var(--gold); border-radius: 0 4px 4px 0; }
  .view { grid-column: 2; grid-row: 2; }
  .view.wide { max-width: 1280px; }
  .savebar { left: 124px; }
}

/* ---------- karty i elementy podstawowe ---------- */
.card, .match, .notif, .pod { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn { background: var(--c-surface-2); border-color: var(--line); color: var(--ink); }
.btn:hover { background: var(--c-hover); }
.btn.primary, .btn.gold { background: var(--gold); border-color: var(--gold); color: var(--c-btn-ink); font-weight: 800; }
.btn.primary:hover, .btn.gold:hover { background: var(--gold-2); border-color: var(--gold-2); }
.btn.gold { min-height: 50px; padding: 0 20px; }
.btn.gold.small { min-height: 38px; padding: 0 14px; }
.btn.dark { background: var(--navy-700); border-color: var(--navy-700); color: var(--ink); }
.icon-btn { color: var(--ink); }
.icon-btn:hover { background: var(--c-hover); }
.chip { background: var(--c-chip); color: var(--muted); }
.chip.green { background: var(--green-100); color: var(--c-ok-ink); }
.chip.amber { background: var(--amber-100); color: var(--c-warn-ink); }
.chip.red { background: var(--red-100); color: var(--c-danger-ink); }
.chip.navy { background: var(--navy-700); color: var(--ink); }
.chip.gold { background: var(--gold-bg); color: var(--gold-2); }
.theme-light .chip.gold { color: #7a5a06; }
.banner { background: var(--card); border-color: var(--line); color: var(--ink); }
.banner.info { background: var(--c-info-bg); border-color: var(--c-info-line); color: var(--c-info-ink); }
.banner.warn { background: var(--c-warn-bg); border-color: var(--c-warn-line); color: var(--c-warn-ink); }
.banner.danger { background: var(--c-danger-bg); border-color: var(--c-danger-line); color: var(--c-danger-ink); }
.banner.ok { background: var(--green-50); border-color: var(--c-ok-ink); color: var(--c-ok-ink); }
.banner.compact { padding: 10px 12px; font-size: 14px; }
.banner .btn { margin-top: 8px; }
.skeleton { background: linear-gradient(90deg, var(--c-skel-1) 25%, var(--c-skel-2) 37%, var(--c-skel-1) 63%); background-size: 400% 100%; }
.tabs { background: var(--c-tab-bg); }
.tab { color: var(--muted); }
.tab[aria-selected="true"] { background: var(--c-tab-on); color: var(--ink); box-shadow: none; }
.tabs.fit { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; padding: 0; background: transparent; overflow: visible; }
.tabs.fit .tab { min-height: 42px; padding: 0 4px; font-size: 14px; text-align: center; overflow: hidden; text-overflow: ellipsis; background: var(--c-surface-2); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.tabs.fit .tab[aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: var(--c-btn-ink); }
.tabs.fit.sub .tab { min-height: 38px; font-size: 13px; background: transparent; color: var(--muted); }
.tabs.fit.sub .tab[aria-selected="true"] { background: var(--c-tab-on); color: var(--gold-2); border-color: var(--gold); }
.select, .input { background: var(--c-input); color: var(--ink); border-color: var(--line); }
.input:focus { outline-color: rgba(224, 198, 94, 0.35); border-color: var(--gold); }
.stat { background: var(--c-stat); border-color: var(--line); }
.empty .icon { color: var(--line-strong); }
.link-btn { color: var(--c-link); }
.confirm-card { border-color: var(--gold); background: var(--green-50); }
.me-row { background: rgba(208, 180, 92, 0.12); }
.theme-light .me-row { background: var(--green-50); }
.progress { background: var(--navy-700); }
.progress > i { background: var(--gold); }

/* ---------- logowanie ---------- */
.auth { background: radial-gradient(1200px 500px at 50% -10%, #1d262a 0%, var(--navy-950) 60%); }
.auth-card { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.auth-brand img { width: 64px; height: 64px; border-radius: 0; object-fit: contain; }
.auth-brand h1 { font-style: italic; font-weight: 800; }
.auth-brand h1 b { color: var(--gold); font-weight: 800; }
.auth-brand p, .auth-foot { color: var(--muted); }

/* ---------- Start ---------- */
.home-grid { display: grid; gap: 14px; }
@media (min-width: 1100px) { .home-grid { grid-template-columns: minmax(0, 1fr) 390px; align-items: start; gap: 18px; } }
.greet {
  position: relative; padding: 22px 20px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden;
  background: linear-gradient(90deg, rgba(11, 14, 16, 0.94) 0%, rgba(11, 14, 16, 0.6) 55%, rgba(11, 14, 16, 0.3) 100%), url("../img/stadium.webp") center 38% / cover, var(--navy-950);
}
.greet h1 { font-size: clamp(28px, 5.4vw, 42px); font-weight: 800; letter-spacing: -0.02em; }
.greet p { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: #c3cacd; font-size: 17px; }
.greet-ball { width: 22px; height: 22px; animation: ballArc 1s cubic-bezier(0.3, 0.8, 0.4, 1) 1 both; }
@keyframes ballArc { 0% { transform: translate(-40px, 20px) rotate(-200deg); opacity: 0; } 60% { transform: translate(-6px, -6px) rotate(40deg); opacity: 1; } 100% { transform: none; opacity: 1; } }

.club-card {
  position: relative; overflow: hidden; border-color: #4a5359;
  background: linear-gradient(180deg, rgba(27, 33, 36, 0.9) 0%, rgba(16, 20, 22, 0.86) 100%), url("../img/pitch.webp") center bottom / cover, var(--card);
}
.tag-gold { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 7px 14px; border-radius: 8px; background: var(--gold); color: #101416; font-weight: 800; font-size: 14px; }
.club-vs { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 18px; align-items: center; }
.club-sep { display: none; width: 1px; align-self: stretch; background: var(--gold); opacity: 0.55; }
.club-names { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-family: var(--font-head); font-weight: 800; font-size: clamp(20px, 3.4vw, 30px); line-height: 1.15; min-width: 0; }
.club-names em { font-style: normal; color: var(--gold-2); font-size: 0.62em; line-height: 1; letter-spacing: 0.04em; }
.club-team { overflow-wrap: anywhere; }
.club-when { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.club-when > div { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.club-when .icon { color: var(--gold); }
.club-foot .btn { width: 100%; }
@media (min-width: 720px) { .club-foot .btn { width: auto; } }
.club-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.st { display: flex; align-items: center; gap: 12px; min-width: 0; }
.st-ico { width: 40px; height: 40px; flex: none; color: var(--muted); }
.st-ico.ok circle { fill: var(--ok); stroke: var(--ok); }
.st-ico.ok path { stroke: #fff; }
.st-title { font-family: var(--font-head); font-weight: 800; font-size: 17px; }
.st-sub { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.st-sub b { color: var(--ink); }
.my-tip { margin-left: 2px; }
@media (min-width: 720px) {
  .club-vs { grid-template-columns: auto 1px minmax(0, 1fr) 1px auto; gap: 20px; }
  .club-sep { display: block; }
  .club-when { grid-column: auto; flex-direction: column; align-items: flex-start; gap: 8px; }
}

.progress-card { display: flex; flex-direction: column; gap: 14px; }
.pc-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pc-btn { width: 100%; }
.pc-btn .pc-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: #101416; color: var(--gold-2); font-size: 13px; font-weight: 800; }
@media (min-width: 720px) { .pc-btn { width: auto; align-self: flex-end; } }
.pc-ico { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--c-surface-2); color: var(--gold); }
.pc-ico .icon { width: 26px; height: 26px; }
.pc-head { font-weight: 600; font-size: 16px; }
.pc-head b { color: var(--ink); font-family: var(--font-head); white-space: nowrap; }
.pc-sub { margin-top: 2px; font-size: 13px; color: var(--muted); }
.pc-sub b { color: var(--ink); }
.progress.gold { height: 10px; margin-top: 10px; background: #2a3236; }
.pc-pct { min-width: 60px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; text-align: center; font-weight: 800; background: var(--c-surface-2); }

.last-round .lr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 0; }
.lr-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 6px; text-align: center; min-width: 0; border-left: 1px solid var(--line); }
.lr-cell:first-child { border-left: 0; }
.lr-cell b { font-family: var(--font-head); font-size: 22px; line-height: 1.1; }
.lr-cell b:empty { display: none; }
.lr-cell span { font-size: 13px; color: var(--muted); line-height: 1.25; }
.lr-coin { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--gold); color: #101416 !important; border: 3px solid var(--gold-2); font-family: var(--font-head); font-weight: 800; font-size: 20px !important; }
.lr-ico { width: 34px; height: 34px; color: var(--gold); }
.lr-cell.best { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
.lr-cell.best:first-child { border-top: 0; padding-top: 4px; }
.lr-best-label { font-size: 13px; color: var(--muted); }
.lr-best { display: flex; align-items: center; gap: 12px; text-align: left; }
.lr-best b { display: block; font-size: 20px; }
.lr-trophy { width: 40px; height: 40px; color: var(--gold-2); }
.lr-trophy.off { color: var(--line-strong); }
.chg { font-weight: 800; font-size: 13px; }
.chg.up { color: var(--ok); } .chg.down { color: var(--err); } .chg.flat { color: var(--muted); }
.lr-notes { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
@media (min-width: 720px) {
  .last-round .lr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .lr-cell.best { grid-column: auto; border-top: 0; padding-top: 4px; border-left: 1px solid var(--line); }
  .lr-cell.best:first-child { border-left: 0; }
}
.card-title .link-btn { white-space: nowrap; }
.card-title > span:first-child { min-width: 0; }
.hide-sm { display: inline; }
@media (max-width: 520px) { .hide-sm { display: none; } }

/* ranking na Starcie */
.card-title.big { font-size: 19px; text-transform: none; letter-spacing: 0; color: var(--ink); margin-bottom: 14px; }
.card-title.big .link-btn { font-family: var(--font); font-size: 13.5px; color: var(--gold-2); }
.card-title .icon { vertical-align: -0.25em; }
.rk-body { margin-top: 12px; }
.rk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rk-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 54px; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; }
.rk-row + .rk-row { border-top: 1px solid var(--line); }
.rk-row.me { background: var(--gold); color: #101416; font-weight: 800; border-top-color: transparent; }
.rk-num { text-align: center; font-weight: 800; color: var(--muted); }
.rk-row.me .rk-num, .rk-row.me .rk-pct { color: #101416; }
.rk-row.me .medal-ring { background: #101416; color: var(--gold-2); box-shadow: none; }
.rk-pts { font-weight: 700; white-space: nowrap; }
.rk-pct { text-align: right; color: var(--muted); font-size: 14px; }
.rk-gap { text-align: center; color: var(--muted); line-height: 1; padding: 2px 0; }
.rk-note { margin: 0 0 8px; color: var(--gold-2); font-size: 13px; font-weight: 700; }
.rk-empty { padding: 10px 0; }

.brand-banner {
  display: flex; align-items: center; justify-content: flex-end; min-height: 170px; padding: 18px 20px; overflow: hidden; border: 1px solid var(--gold); border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(11, 14, 16, 0.05) 0%, rgba(11, 14, 16, 0.55) 55%, rgba(11, 14, 16, 0.85) 100%), url("../img/ball-grass.webp") left center / cover, var(--card);
}
.bb-text { text-align: right; }
.bb-text b { display: block; font-family: var(--font-head); font-style: italic; font-size: 32px; line-height: 1.1; letter-spacing: -0.02em; color: var(--gold-2); }
.bb-text span { font-style: italic; font-size: 15px; color: #e6e9ea; }

/* ---------- herby drużyn ---------- */
.crest { display: inline-grid; place-items: center; flex: none; width: 36px; height: 40px; }
.crest img { width: 100%; height: 100%; object-fit: contain; display: block; }
.crest.sm { width: 22px; height: 26px; }
.crest.lg { width: 52px; height: 58px; }
.crest.xl { width: 84px; height: 96px; }
.crest-fallback { display: grid; place-items: center; width: 100%; height: 100%; background: #4b5357; color: #e6e9ea; font-family: var(--font-head); font-weight: 800; font-size: 13px; letter-spacing: 0.02em; clip-path: polygon(50% 0, 100% 12%, 100% 58%, 50% 100%, 0 58%, 0 12%); padding-bottom: 4px; }
.crest.sm .crest-fallback { font-size: 9px; }
.crest.lg .crest-fallback { font-size: 18px; }
.crest.xl .crest-fallback { font-size: 28px; }
.team.has-crest { display: flex; align-items: center; gap: 10px; }
.team .team-name { min-width: 0; overflow-wrap: anywhere; }

/* ---------- mecze i typowanie ---------- */
.match.off { background: #171c1e; }
.match.dirty { border-color: var(--gold); }
.match-top .when { color: var(--ink); }
.stepper { background: var(--c-surface-2); border-color: var(--line); }
.stepper button { background: var(--card); color: var(--ink); }
.stepper button:active { background: var(--c-hover); }
.stepper button[disabled] { color: #5d676b; background: #181d1f; }
.stepper input { background: var(--c-surface-2); color: var(--ink); }
.stepper input::placeholder { color: #66717b; }
.stepper input:focus { background: #2c353a; }
.stepper input[disabled] { background: #181d1f; -webkit-text-fill-color: var(--ink); }
.score-static { background: var(--c-surface-2); }
.score-static.none { color: #66717b; }
.match-foot { border-top-color: var(--line); }
.foot-left .cd { color: var(--ink); }
.state.saved { color: var(--ok); }
.points { background: var(--c-chip); color: var(--muted); }
.points.p3 { background: var(--ok); color: #fff; }
.points.p1 { background: var(--amber-100); color: var(--c-warn-ink); }
.postponed-panel { background: #1f1c12; border-color: #6d5d25; }
.postponed-panel .card-title { color: var(--gold-2); }
.savebar { background: rgba(11, 14, 16, 0.97); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.4); }
.day-head { color: var(--muted); }
.toast-success { background: #2f6f50; }

/* ---------- ranking (strona) ---------- */
.medal-ring { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; font-family: var(--font-head); font-weight: 800; color: #101416; }
.medal-ring b { position: relative; z-index: 1; font-weight: 800; }
.medal-ring.sm { width: 30px; height: 30px; font-size: 14px; }
.medal-ring.lg { width: 50px; height: 50px; font-size: 22px; }
.medal-ring.gold { background: var(--gold); box-shadow: inset 0 0 0 3px #ecd98f; }
.medal-ring.silver { background: #aeb7ba; box-shadow: inset 0 0 0 3px #d5dbdd; }
.medal-ring.bronze { background: #c58a5c; box-shadow: inset 0 0 0 3px #e0b08c; }
.laurel { position: absolute; left: -11px; top: -11px; width: calc(100% + 22px); height: calc(100% + 22px); fill: var(--gold-2); opacity: 0.92; pointer-events: none; }
.podium { align-items: end; gap: 10px; margin-top: 16px; margin-bottom: 16px; }
.pod { padding: 16px 8px 14px; border-radius: 14px; border-top-width: 3px; box-shadow: none; }
.pod .medal-ring { margin: 0 auto 16px; }
.pod.lead { padding-top: 28px; padding-bottom: 22px; background: #25221a; border-color: var(--gold); }
.pod.silver { border-top-color: #aeb7ba; }
.pod.bronze { border-top-color: #c58a5c; }
.pod .nm { font-family: var(--font-head); font-weight: 800; font-size: 14px; }
.pod .pt { font-size: 18px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.pod.lead .pt { color: var(--gold-2); }
.pod.me { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.rank th { background: #151a1c; color: var(--muted); border-bottom-color: var(--line); }
.rank td { border-bottom-color: var(--line); }
.rank tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
.rank tr.me td { background: var(--gold); color: #101416; font-weight: 800; }
.rank tr.gold td.c-pos, .rank tr.gold td.c-name { color: var(--gold-2); }
.rank tr.silver td.c-pos, .rank tr.silver td.c-name { color: #cfd6d8; }
.rank tr.bronze td.c-pos, .rank tr.bronze td.c-name { color: #e0b08c; }
.rank tr.me td.c-pos, .rank tr.me td.c-name { color: #101416; }
.theme-light .rank tr.me td { background: var(--green-50); color: var(--ink); }
.theme-light .rank tbody tr:nth-child(even) td { background: transparent; }
.theme-light .rank tr.gold td.c-pos, .theme-light .rank tr.gold td.c-name { color: var(--gold); }
.theme-light .rank tr.silver td.c-pos, .theme-light .rank tr.silver td.c-name { color: var(--silver); }
.theme-light .rank tr.bronze td.c-pos, .theme-light .rank tr.bronze td.c-name { color: var(--bronze); }
.club-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--gold); border-radius: var(--radius); background: rgba(208, 180, 92, 0.09); }
.club-banner b { color: var(--gold-2); font-family: var(--font-head); font-size: 17px; }
.cb-info { width: 24px; height: 24px; color: var(--gold-2); flex: none; }
.champ-bar { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--gold); border-radius: var(--radius); background: rgba(208, 180, 92, 0.08); }
.champ-ico { width: 34px; height: 34px; color: var(--gold-2); flex: none; }
.champ-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; }
.champ-name { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: var(--gold-2); overflow-wrap: anywhere; }
.champ-name span { font-family: var(--font); font-weight: 600; font-size: 15px; color: var(--ink); }
.champ-name.muted { color: var(--muted); font-size: 15px; font-weight: 600; }
details.rw summary { color: var(--ink); }
.rw-row { border-top-color: var(--line); }
.honour .icon { color: var(--gold); }

/* ---------- aktywność, powiadomienia, profil ---------- */
.act-row { border-top-color: var(--line); }
.dot.red { background: var(--err); } .dot.green { background: var(--ok); } .dot.yellow { background: var(--gold); }
.notif.unread { background: #20261f; border-color: #3d5a47; }
.notif .ico { background: var(--c-chip); color: var(--muted); }
.notif.unread .ico { background: var(--gold); color: #101416; }
.notif-body { color: #c8cfd1; }
.pred-row { border-top-color: var(--line); }
.mini-rank li { border-top-color: var(--line); }
.form-bars { display: flex; align-items: flex-end; gap: 8px; height: 84px; margin: 6px 0 10px; }
.form-bars .bar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.form-bars .bar i { display: block; width: 100%; max-width: 38px; background: var(--gold); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.form-bars .bar span { font-size: 11px; color: var(--muted); }
.form-bars .bar b { font-size: 12px; }
.h-1 { height: 8%; } .h-2 { height: 16%; } .h-3 { height: 24%; } .h-4 { height: 32%; } .h-5 { height: 40%; }
.h-6 { height: 48%; } .h-7 { height: 56%; } .h-8 { height: 64%; } .h-9 { height: 72%; } .h-10 { height: 80%; }

dialog.sheet { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
dialog.sheet::backdrop { background: rgba(5, 8, 9, 0.7); }

/* ---------- Koordynator i Pula ---------- */
.coord-row { display: grid; gap: 10px; }
.coord-row .teams { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.coord-score { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.coord-score .btn { flex: 1 1 150px; white-space: nowrap; }
.coord-score input { width: 64px; text-align: center; font-weight: 800; font-size: 20px; }
.pool-total { font-family: var(--font-head); font-size: 34px; font-weight: 800; color: var(--gold-2); line-height: 1.1; }
.pool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pct-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--c-surface-2); }
.switch input { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 26px; border-radius: 13px; background: #4b5357; position: relative; cursor: pointer; transition: background 0.15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch input:checked { background: var(--gold); }
.switch input:checked::after { transform: translateX(20px); background: #101416; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--c-surface-2); }
.radio-card:has(input:checked) { border-color: var(--gold); background: rgba(208, 180, 92, 0.08); }
.theme-light .radio-card:has(input:checked) { background: #fffbea; }
.payout-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.payout-row:first-child { border-top: 0; }
.team-admin-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.team-admin-row:first-of-type { border-top: 0; }
.team-admin-row .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.logo-file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- panel administratora (jasny) w ciemnej ramie ---------- */
.view.theme-light { width: calc(100% - 24px); max-width: 1120px; margin: 12px auto; border-radius: 18px; padding-top: 18px; border: 1px solid var(--line); }
@media (min-width: 960px) { .view.theme-light { width: calc(100% - 40px); margin: 16px auto; } }

@media (max-width: 360px) {
  .card-title { font-size: 12px; letter-spacing: 0.02em; }
  .last-round .card-title .icon { display: none; }
}
@media (max-width: 420px) {
  .pc-main { gap: 10px; }
  .pc-ico { width: 38px; height: 38px; }
  .pc-ico .icon { width: 22px; height: 22px; }
  .pc-pct { min-width: 52px; padding: 6px 8px; }
  .tabs:not(.fit) .tab { padding: 0 9px; font-size: 13px; }
  .tabs.fit { gap: 4px; }
  .tabs.fit .tab { font-size: 12.5px; }
  .rk-row { grid-template-columns: 32px minmax(0, 1fr) auto 46px; gap: 8px; padding: 10px 8px; }
  .brand-tag { font-size: 10.5px; }
  .brand img { width: 40px; height: 40px; }
}
@media (min-width: 560px) { .pool-grid { grid-template-columns: repeat(4, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- panel administratora: kategorie ----------
   Na komputerze (bez ekranu dotykowego) pasek kategorii nie dawał się przesuwać — teraz zawija się do kolejnych wierszy,
   więc widać wszystkie. Na telefonie zostaje przewijanie palcem, z delikatnym cieniem przy prawej krawędzi. */
.view.theme-light .admin-nav { scrollbar-width: thin; }
@media (min-width: 720px) {
  .view.theme-light .admin-nav { flex-wrap: wrap !important; overflow: visible !important; row-gap: 8px; }
}
@media (max-width: 719px) {
  .view.theme-light .admin-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%); }
  .view.theme-light .admin-nav .admin-link { scroll-snap-align: start; flex: none; }
}

/* ---------- herb: podgląd przed / po ---------- */
.logo-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.logo-fig { margin: 0; text-align: center; min-width: 0; }
.logo-fig figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.logo-prev { display: block; height: 190px; padding: 10px; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
  background-color: #2c3337; background-image: linear-gradient(45deg, #384046 25%, transparent 25%, transparent 75%, #384046 75%), linear-gradient(45deg, #384046 25%, transparent 25%, transparent 75%, #384046 75%);
  background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.logo-prev canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.logo-msg { min-height: 1.4em; color: var(--muted); }
.logo-msg.ok { color: var(--ok); font-weight: 700; }
.logo-msg.warn { color: var(--gold-2); font-weight: 600; }
.logo-tol input[type="range"] { width: 100%; accent-color: var(--gold); }
@media (max-width: 420px) { .logo-prev { height: 150px; } }

/* ---------- wiersze-przyciski (np. Aktywność graczy u administratora) ----------
   W app.css (Etap 4) jest `button.act-row:hover { background: #f6f8fb }` — jasne tło przy jasnym tekście motywu ciemnego
   dawało biały, nieczytelny pasek. Tu tło przy najechaniu i przy fokusie klawiatury pochodzi z palety motywu. */
button.act-row { color: var(--ink); transition: background 0.12s; }
button.act-row:hover, button.act-row:focus-visible { background: var(--c-hover); color: var(--ink); }
button.act-row.me-row, button.act-row.me-row:hover { color: var(--ink); }
button.act-row.me-row { background: rgba(208, 180, 92, 0.12); width: calc(100% + 16px); }
button.act-row.me-row:hover, button.act-row.me-row:focus-visible { background: rgba(208, 180, 92, 0.24); }
.theme-light button.act-row.me-row { background: var(--green-50); }
.theme-light button.act-row.me-row:hover { background: #e3f6e9; }
a.stat.linky:hover { border-color: var(--gold); }
