:root {
  --bg: #f4f7fb; --surface: #fff; --surface-2: #f1f5f9; --text: #0f172a; --text-muted: #64748b;
  --border: #e2e8f0; --primary: #0b2a5b; --primary-hover: #123a7a; --accent: #1d5fd1;
  --live: #e11d2e; --success: #16a34a; --warning: #d97706; --header: #0a2147;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05); --radius: 8px;
}
[data-theme="dark"] {
  --bg: #080d16; --surface: #111827; --surface-2: #172033; --text: #f8fafc; --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, .08); --primary: #2f6fe0; --primary-hover: #4a84ec; --accent: #5b9bff;
  --live: #ff3b4a; --success: #22c55e; --warning: #f59e0b; --header: #0b1730; --shadow: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); overflow-x: hidden;
  font: 14px/1.45 Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
img { max-width: 100%; }
.container { max-width: 1440px; margin: 0 auto; padding: 24px 32px 40px; }

/* header */
.topbar { background: var(--header); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(255,255,255,.06); }
.topbar-inner { max-width: 1440px; margin: 0 auto; padding: 0 32px; height: 76px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand img { width: 48px; height: 48px; object-fit: contain; }
.brand-text strong { display: block; font-size: 18px; letter-spacing: .06em; line-height: 1.1; }
.brand-text small { display: block; font-size: 10.5px; letter-spacing: .08em; color: #aebbd3; margin-top: 3px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { padding: 8px 12px; font-size: 14px; font-weight: 500; color: #d5deee; border-bottom: 2px solid transparent; }
.nav a:hover { color: #fff; }
.nav a.active { color: #fff; border-bottom-color: #fff; }
.nav a.nav-live { color: #ff5a67; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: #d5deee; border-radius: var(--radius); cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.btn-login { background: #fff; color: #0a2147; font-weight: 700; padding: 10px 22px; border-radius: 6px; font-size: 14px; }
.btn-login:hover { background: #e6edf9; }
.menu-btn { display: none; }
.i-sun { display: none; }
[data-theme="dark"] .i-sun { display: block; }
[data-theme="dark"] .i-moon { display: none; }

/* typography & cards */
h1, h2, h3 { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.page-title { font-size: 22px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.block-title { font-size: 16px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.muted { color: var(--text-muted); }
.link-more { color: var(--accent); font-weight: 600; font-size: 13px; }
.link-more:hover { text-decoration: underline; }

/* layout */
.layout > * { min-width: 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
.stack > * { min-width: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.date-picker { display: flex; align-items: center; gap: 8px; }
.date-box { position: relative; display: inline-flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; height: 40px; padding: 0 12px; cursor: pointer; font-size: 14px; }
.date-box input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.sq-btn { width: 40px; height: 40px; border: 1px solid var(--border); background: var(--surface); border-radius: 6px; cursor: pointer; font-size: 16px; }
.sq-btn:hover { background: var(--surface-2); }

/* tabs */
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); border-radius: 6px; padding: 9px 16px; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tab.live { color: var(--live); }
.tab.live.active { background: var(--live); border-color: var(--live); color: #fff; }
.tabs-flat { gap: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); width: max-content; max-width: 100%; }
.tabs-flat .tab { border: 0; border-right: 1px solid var(--border); border-radius: 0; background: transparent; }
.tabs-flat .tab:last-child { border-right: 0; }
.tabs-flat .tab.active { background: var(--primary); color: #fff; }

/* match rows */
.match-list { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.match-row {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) 92px minmax(0, 1fr) 44px; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.match-row .m-home { justify-content: flex-end; flex-direction: row-reverse; text-align: right; }
.match-row:last-child { border-bottom: 0; }
.match-row:hover { background: var(--surface-2); }
.match-row.is-live { background: color-mix(in srgb, var(--live) 6%, var(--surface)); }
.m-time { font-weight: 700; font-size: 15px; display: grid; gap: 2px; }
.m-time small { font-weight: 500; font-size: 11.5px; color: var(--text-muted); line-height: 1.25; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--live); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .05em; border-radius: 4px; padding: 3px 8px; width: max-content; }
.live-badge::before { content: ""; width: 6px; height: 6px; background: #fff; border-radius: 50%; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.live-min { font-weight: 700; color: var(--live); font-size: 14px; }
.m-team { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 700; font-size: 14.5px; }
.m-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-score { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 800; font-size: 20px; letter-spacing: .02em; }
.m-score .sep { opacity: .6; }
.m-score.is-live { color: var(--live); }
.m-score.pending { color: var(--text-muted); font-weight: 500; }
.m-go { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); justify-self: end; }
.match-row.is-live .m-go { background: var(--primary); color: #fff; border-color: var(--primary); }
.m-venue { grid-column: 2 / 5; text-align: center; font-size: 11.5px; color: var(--text-muted); margin-top: -8px; }
.crest { width: 32px; height: 32px; border-radius: 50%; object-fit: contain; flex: none; background: transparent; }
.crest-fallback { width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-muted); font-size: 11px; font-weight: 800; border: 1px solid var(--border); }
.crest-lg { width: 72px; height: 72px; }
.crest-fallback.crest-lg { font-size: 22px; }
.crest-sm { width: 24px; height: 24px; }
.crest-fallback.crest-sm { font-size: 9px; }

/* sidebar filters */
.filters { padding: 18px; position: sticky; top: 92px; }
.filters h3 { font-size: 16px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; margin-bottom: 14px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; color: var(--text-muted); }
.select, .field select { width: 100%; height: 40px; padding: 0 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text); }
.select-sm { width: auto; min-width: 150px; height: 38px; padding: 0 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text); }
.btn-primary { width: 100%; height: 44px; border: 0; border-radius: 6px; background: var(--primary); color: #fff; font-weight: 700; cursor: pointer; }
.btn-primary:hover { background: var(--primary-hover); }
.filters-toggle { display: none; }
.sheet-close { display: none; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
th { background: var(--surface-2); color: var(--text-muted); font-size: 12px; font-weight: 600; text-align: left; padding: 11px 12px; white-space: nowrap; }
td { padding: 11px 12px; border-top: 1px solid var(--border); white-space: nowrap; }
tr:hover td { background: var(--surface-2); }
.num { text-align: center; }
.club-cell { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.rank { font-weight: 700; text-align: center; width: 44px; }
tr.top td:first-child { box-shadow: inset 3px 0 0 var(--success); }
.form { display: inline-flex; gap: 5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.dot.w { background: var(--success); } .dot.d { background: #94a3b8; } .dot.l { background: var(--live); }

/* bottom blocks */
.mini-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 64px minmax(0, 1fr); align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--border); font-size: 13.5px; }
.mini-row:first-of-type { border-top: 0; }
.mini-row:hover { background: var(--surface-2); }
.mini-row .d { color: var(--text-muted); font-size: 12.5px; }
.mini-row .t { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; }
.mini-row .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row .t.h { justify-content: flex-end; flex-direction: row-reverse; }
.mini-row .s { text-align: center; font-weight: 800; }
.scorer-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) 56px; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 13.5px; }
.scorer-row:hover { background: var(--surface-2); }
.scorer-row .p { display: flex; align-items: center; gap: 10px; font-weight: 700; min-width: 0; }
.scorer-row .p span, .scorer-row .c { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scorer-row .g { text-align: right; font-weight: 800; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); }
.list-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; }
.cols-head { display: grid; padding: 0 16px 8px; font-size: 12px; color: var(--text-muted); }

/* clubs grid */
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.club-card { display: flex; align-items: center; gap: 14px; padding: 16px; }
.club-card strong { display: block; }
.club-card small { color: var(--text-muted); }

/* match detail */
.match-hero { padding: 24px; text-align: center; }
.match-hero .meta { color: var(--text-muted); font-size: 13px; margin-bottom: 18px; }
.hero-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.hero-team { display: grid; justify-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.hero-score { font-size: 46px; font-weight: 800; letter-spacing: .04em; line-height: 1; }
.hero-score.live { color: var(--live); }
.hero-status { margin-top: 10px; display: flex; justify-content: center; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 16px; }
.kv div { background: var(--surface-2); border-radius: 6px; padding: 12px; }
.kv small { display: block; color: var(--text-muted); font-size: 12px; }
.kv strong { display: block; margin-top: 2px; }
.roster-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 80px 120px; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 13.5px; }
.roster-title { padding: 14px 16px; font-weight: 800; text-transform: uppercase; font-size: 14px; }
.event-row { display: grid; grid-template-columns: 70px 1fr 90px; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 13.5px; }

/* states */
.empty { padding: 28px 16px; text-align: center; color: var(--text-muted); }
.error-box { padding: 24px 16px; text-align: center; }
.error-box p { margin: 0 0 12px; color: var(--text-muted); }
.btn-retry { border: 1px solid var(--border); background: var(--surface); border-radius: 6px; padding: 9px 18px; font-weight: 700; cursor: pointer; }
.btn-retry:hover { background: var(--surface-2); }
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 6px; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: translateX(-100%); animation: shimmer 1.4s infinite; }
[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-row { height: 64px; margin: 10px 16px; }
.sk-line { height: 40px; margin: 8px 16px; }

.footer { background: var(--header); color: #aebbd3; font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.footer a:hover { color: #fff; }
.sync { font-size: 12px; color: var(--text-muted); }

/* responsive */
@media (max-width: 1199px) {
  .nav a { padding: 8px 8px; font-size: 13px; }
  .layout { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (max-width: 1023px) {
  .container { padding: 20px; }
  .topbar-inner { padding: 0 20px; height: 64px; gap: 12px; }
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--header); flex-direction: column; align-items: stretch; padding: 8px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.08); margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 13px 4px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 15px; }
  .topbar-actions { margin-left: auto; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .filters-toggle { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--border); background: var(--surface); border-radius: 6px; font-weight: 700; cursor: pointer; }
  .filters { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 80; border-radius: 14px 14px 0 0; max-height: 86vh; overflow: auto; transform: translateY(105%); transition: transform .22s ease; box-shadow: 0 -12px 40px rgba(0,0,0,.35); }
  .filters.open { transform: none; }
  .sheet-close { display: inline-flex; float: right; border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: var(--text-muted); }
  .sheet-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.45); }
}
@media (max-width: 767px) {
  .container { padding: 14px 12px 28px; }
  .topbar-inner { padding: 0 12px; }
  .brand img { width: 40px; height: 40px; }
  .brand-text strong { font-size: 16px; }
  .brand-text small { display: none; }
  .btn-login { padding: 8px 14px; }
  .two-col { grid-template-columns: 1fr; }
  .page-title { font-size: 19px; }
  .head-row { align-items: stretch; }
  .date-picker { width: 100%; }
  .date-box { flex: 1; justify-content: space-between; }
  .match-row { grid-template-columns: 54px minmax(0, 1fr) 36px 30px; grid-template-areas: "t h s g" "t a s g"; gap: 6px 8px; padding: 12px; }
  .match-row .m-time { grid-area: t; font-size: 13px; }
  .match-row .m-home { grid-area: h; justify-content: flex-start; flex-direction: row; text-align: left; }
  .match-row .m-away { grid-area: a; }
  .match-row .m-score { grid-area: s; flex-direction: column; gap: 6px; font-size: 16px; }
  .match-row .m-score .sep { display: none; }
  .match-row .m-go { grid-area: g; width: 28px; height: 28px; }
  .m-venue { display: none; }
  .m-team { font-size: 13.5px; }
  .crest, .crest-fallback { width: 26px; height: 26px; }
  .mini-row { grid-template-columns: 1fr 52px; grid-template-areas: "d d" "h s" "a s"; gap: 4px 8px; }
  .mini-row .d { grid-area: d; }
  .mini-row .t.h { grid-area: h; justify-content: flex-start; flex-direction: row; }
    .mini-row .t.a { grid-area: a; }
  .mini-row .s { grid-area: s; font-size: 15px; }
  .scorer-row { grid-template-columns: 22px minmax(0, 1fr) 44px; }
  .scorer-row .c { display: none; }
  .hero-grid { gap: 8px; }
  .hero-team { font-size: 14px; }
  .hero-score { font-size: 34px; }
  .crest-lg { width: 56px; height: 56px; }
  .roster-row { grid-template-columns: 34px minmax(0, 1fr) 56px; }
  .roster-row .x { display: none; }
}
@media (max-width: 479px) {
  .page-title { font-size: 17px; }
  .tab { padding: 8px 12px; font-size: 12px; }
}

/* sedmični harmonik utakmica */
.week { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.week > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 16px; user-select: none; }
.week > summary::-webkit-details-marker { display: none; }
.wk-title { font-weight: 800; font-size: 15px; }
.wk-range { color: var(--text-muted); font-size: 13px; flex: 1; min-width: 0; }
.wk-badge { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.wk-count { background: var(--surface-2); color: var(--text-muted); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.wk-chev { flex-shrink: 0; color: var(--text-muted); transition: transform .2s ease; }
.week[open] > summary { border-bottom: 1px solid var(--border); }
.week[open] .wk-chev { transform: rotate(180deg); }
.wk-body { padding: 0 12px 12px; }
.wk-body .match-list { border: 0; margin-top: 8px; }
.wk-body .block-title { margin-top: 14px !important; }
@media (max-width: 560px) { .week > summary { flex-wrap: wrap; row-gap: 4px; } .wk-range { order: 3; flex-basis: 100%; } .wk-title { flex: 1; } }
/* ---- sedmični boxovi (v2) ---- */
.week { margin-top: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 2px 8px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.06); overflow: hidden; transition: box-shadow .2s ease; }
.week[open] { box-shadow: 0 6px 18px rgba(15,23,42,.14); border-color: var(--primary); }
.week > summary { padding: 12px 14px; gap: 12px; flex-wrap: nowrap; }
.week > summary:hover { background: var(--surface-2); }
.wk-num { flex: none; min-width: 42px; height: 42px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--text); font-weight: 800; font-size: 16px; }
.week[open] .wk-num { background: var(--primary); color: #fff; }
.wk-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.wk-info .wk-range { flex: none; font-size: 12.5px; }
.week[open] > summary { border-bottom: 1px solid var(--border); }
@media (max-width: 560px) {
  .week > summary { flex-wrap: nowrap; row-gap: 0; padding: 10px 12px; gap: 10px; }
  .wk-range { order: 0; flex-basis: auto; }
  .wk-badge { display: none; }
  .week[open] .wk-badge { display: inline-block; }
}

/* ---- detalji utakmice, mobile first ---- */
.match-hero { padding: 18px 12px; overflow: hidden; }
.match-hero .meta { font-size: 12px; margin-bottom: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.hero-grid { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; }
.hero-team { font-size: 13px; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; text-align: center; }
.hero-score { font-size: 32px; white-space: nowrap; }
.kv { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; padding: 12px; }
.kv div { min-width: 0; overflow-wrap: anywhere; }
.roster-row, .event-row { overflow-wrap: anywhere; }
@media (min-width: 640px) {
  .match-hero { padding: 24px; }
  .match-hero .meta { font-size: 13px; }
  .hero-grid { gap: 20px; }
  .hero-team { font-size: 18px; }
  .hero-score { font-size: 46px; }
  .kv { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); padding: 16px; gap: 12px; }
}

/* ---- utakmice, mobile first (v3) ---- */
@media (max-width: 400px) {
  .topbar-inner { padding: 0 8px; gap: 6px; }
  .topbar-actions { gap: 6px; }
  .brand { gap: 8px; min-width: 0; }
  .brand img { width: 34px; height: 34px; }
  .brand-text strong { font-size: 14px; }
}
@media (max-width: 560px) {
  .head-row { gap: 8px; }
  .head-row .select-sm { width: 100%; min-width: 0; height: 44px; font-size: 14px; }
  .week { margin-top: 10px; border-radius: 12px; }
  .week > summary { min-height: 60px; }
  .wk-num { min-width: 38px; height: 38px; font-size: 15px; }
  .wk-title { font-size: 14px; }
  .wk-count { font-size: 11px; padding: 2px 7px; }
  .wk-body { padding: 0 8px 8px; }
  .wk-body .block-title { font-size: 12.5px; color: var(--text-muted); margin-top: 12px !important; }
  .wk-body .match-list { margin-top: 6px; border: 1px solid var(--border); border-radius: 10px; }
  .wk-body .match-row { padding: 10px; gap: 4px 8px; grid-template-columns: 48px minmax(0, 1fr) 32px 28px; }
  .wk-body .m-time { font-size: 12.5px; }
  .wk-body .m-time small { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 48px; }
  .wk-body .m-team { font-size: 13px; gap: 8px; }
  .wk-body .m-score { font-size: 15px; }
  .wk-body .m-go { width: 26px; height: 26px; }
}

/* footer uvijek na dnu ekrana */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main#app { flex: 1 0 auto; width: 100%; }
body > .footer { margin-top: auto; flex-shrink: 0; }

/* ---- stranica kluba ---- */
a.club-card { color: inherit; text-decoration: none; transition: box-shadow .15s ease, transform .15s ease; }
a.club-card:hover { box-shadow: 0 6px 16px rgba(15,23,42,.14); transform: translateY(-1px); }
.club-head { display: flex; align-items: center; gap: 14px; padding: 16px; min-width: 0; }
.club-head > div { min-width: 0; overflow-wrap: anywhere; }
.club-head .crest-lg, .club-head .crest-fallback.crest-lg { width: 64px; height: 64px; }
.club-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0; }
.export-btns { display: flex; align-items: center; gap: 8px; }
.btn-exp { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: 9px 14px; font-size: 13px; font-weight: 700; cursor: pointer; min-height: 40px; }
.btn-exp:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.mem-card { margin-top: 14px; overflow: hidden; }
.mem-title { display: flex; align-items: center; gap: 8px; padding: 14px 16px; margin: 0; border-bottom: 1px solid var(--border); }
.mem-list { list-style: none; margin: 0; padding: 0; }
.mem-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); align-items: center; }
.mem-list li:last-child { border-bottom: 0; }
.mem-name { font-weight: 700; overflow-wrap: anywhere; }
.mem-meta { grid-row: 2; font-size: 12.5px; color: var(--text-muted); }
.mem-st { grid-row: 1 / span 2; grid-column: 2; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.mem-st.on { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
.mem-st.off { background: var(--surface-2); color: var(--text-muted); }
.mem-empty { color: var(--text-muted); grid-template-columns: 1fr !important; }
@media (max-width: 560px) { .club-tools { flex-direction: column; align-items: stretch; } .export-btns { justify-content: space-between; } .export-btns .btn-exp { flex: 1; } }
.mem-last { grid-row: 3; grid-column: 1; font-size: 12px; color: var(--text-muted); }
.mem-last:empty { display: none; }
.mem-list li { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px 14px; padding: 9px 16px; }
.mem-meta, .mem-last, .mem-st { grid-row: auto; grid-column: auto; }
.mem-last:empty { display: block; }
.mem-st { justify-self: end; white-space: nowrap; }
@media (max-width: 600px) {
  .mem-list li { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 14px; }
  .mem-name { grid-column: 1; grid-row: 1; }
  .mem-st { grid-column: 2; grid-row: 1; }
  .mem-meta { grid-column: 1 / -1; grid-row: 2; display: inline; }
  .mem-last { grid-column: 1 / -1; grid-row: 3; }
  .mem-last:empty { display: none; }
}
/* clanovi kluba v3: kartice */
.mem-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.mem-list li, .mem-list li:last-child { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 1px 3px rgba(15, 23, 42, .06); position: relative; min-width: 0; }
.mem-list li.mem-empty { grid-column: 1 / -1; border: 0; box-shadow: none; }
.mem-name { font-size: 14px; padding-right: 0; }
.mem-meta, .mem-last { font-size: 12px; color: var(--text-muted); grid-row: auto; grid-column: auto; }
.mem-last:empty { display: none; }
.mem-st { align-self: flex-start; margin-top: 4px; justify-self: auto; grid-row: auto; grid-column: auto; }
@media (max-width: 900px) { .mem-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .mem-list { grid-template-columns: 1fr; padding: 10px; } }
.club-cell .cn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
@media (max-width: 600px) { .club-cell .cn { max-width: 130px; } }

/* raspored: paginacija po kolima */
.rp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 8px; border-bottom: 1px solid var(--border); }
.rp-title { font-weight: 800; font-size: 18px; text-align: center; flex: 1; }
.rp-title small { font-weight: 500; font-size: 12px; color: var(--muted, #64748b); margin-left: 6px; }
.round-pager { padding: 14px 8px; border-top: 1px solid var(--border); }
.rp-nums { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: none; position: relative; }
.rp-nums::-webkit-scrollbar { display: none; }
.rp-num, .rp-arrow { height: 36px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer; padding: 0; }
.rp-num { flex: 1 0 28px; }
.rp-arrow { width: 40px; flex: none; font-size: 18px; }
.rp-num:hover, .rp-arrow:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.rp-num.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.rp-arrow:disabled { opacity: .35; cursor: default; }.rp-nums { justify-content: center; }
.rp-num { max-width: 52px; }
