/* Dizajn prema Stitch sustavu "High-Performance Fencing Telemetry" (DESIGN.md):
   karbon/čelik tamne površine, jantarni naglasak, Outfit za naslove, Inter za tekst, Space Grotesk za oznake. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("inter-latin-ext-400-normal.woff2") format("woff2"); 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: "Inter"; font-weight: 400; font-display: swap; src: url("inter-latin-400-normal.woff2") format("woff2"); 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: "Inter"; font-weight: 500; font-display: swap; src: url("inter-latin-ext-500-normal.woff2") format("woff2"); 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: "Inter"; font-weight: 500; font-display: swap; src: url("inter-latin-500-normal.woff2") format("woff2"); 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: "Inter"; font-weight: 600; font-display: swap; src: url("inter-latin-ext-600-normal.woff2") format("woff2"); 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: "Inter"; font-weight: 600; font-display: swap; src: url("inter-latin-600-normal.woff2") format("woff2"); 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: "Inter"; font-weight: 700; font-display: swap; src: url("inter-latin-ext-700-normal.woff2") format("woff2"); 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: "Inter"; font-weight: 700; font-display: swap; src: url("inter-latin-700-normal.woff2") format("woff2"); 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: "Outfit"; font-weight: 600; font-display: swap; src: url("outfit-latin-ext-600-normal.woff2") format("woff2"); 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: "Outfit"; font-weight: 600; font-display: swap; src: url("outfit-latin-600-normal.woff2") format("woff2"); 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: "Outfit"; font-weight: 700; font-display: swap; src: url("outfit-latin-ext-700-normal.woff2") format("woff2"); 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: "Outfit"; font-weight: 700; font-display: swap; src: url("outfit-latin-700-normal.woff2") format("woff2"); 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: "Outfit"; font-weight: 800; font-display: swap; src: url("outfit-latin-ext-800-normal.woff2") format("woff2"); 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: "Outfit"; font-weight: 800; font-display: swap; src: url("outfit-latin-800-normal.woff2") format("woff2"); 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: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("space-grotesk-latin-ext-700-normal.woff2") format("woff2"); 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: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("space-grotesk-latin-700-normal.woff2") format("woff2"); 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 {
  --bg: #0f1115;
  --sur-low: #0c0e12;
  --sur: #181b22;
  --sur-hi: #222734;
  --sur-top: #2a303f;
  --line: #333c4d;
  --line-hi: #475569;
  --text: #f8fafc;
  --text-2: #e2e8f0;
  --steel: #94a3b8;
  --muted: #64748b;
  --amber: #f59e0b;
  --amber-hi: #ffc174;
  --amber-ink: #0f1115;
  --amber-wash: rgba(245, 158, 11, .12);
  --green: #10b981;
  --green-wash: rgba(16, 185, 129, .15);
  --cyan: #38bdf8;
  --red: #ef4444;
  --red-wash: rgba(239, 68, 68, .14);
  --silver-wash: rgba(148, 163, 184, .12);
  --r: 4px;
  --r-lg: 8px;
  --fh: "Outfit", "Inter", system-ui, sans-serif;
  --fb: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fl: "Space Grotesk", "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text-2);
  font: 400 14px/1.45 var(--fb); font-variant-numeric: tabular-nums;
}
h1, h2, h3 { margin: 0; line-height: 1.2; font-family: var(--fh); color: var(--text); }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 19px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0 0 10px; }
a { color: var(--amber-hi); }
b, strong { font-weight: 600; color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.muted { color: var(--steel); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.boot { padding: 60px 20px; text-align: center; color: var(--steel); }
[hidden] { display: none !important; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -4px; }

/* oznake (Space Grotesk, razmaknuta slova) */
.lbl { font-family: var(--fl); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--steel); }
.lbl.amber { color: var(--amber); }
.lbl.green { color: var(--green); }

/* ---------- okvir ---------- */
.topbar { background: var(--sur-low); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 36px; height: 36px; border-radius: var(--r); background: var(--amber); color: var(--amber-ink); display: grid; place-items: center; flex: none; }
.brand-mark svg.i { width: 22px; height: 22px; stroke-width: 2.2; }
.brand-name { font-family: var(--fh); font-weight: 800; font-size: 17px; line-height: 1.1; color: var(--text); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-family: var(--fl); font-size: 10px; letter-spacing: .14em; color: var(--amber); text-transform: uppercase; line-height: 1.2; }
.topbar .spacer { flex: 1; }
.role { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; height: 32px; border-radius: var(--r); background: var(--sur-hi); border: 1px solid var(--line); font-family: var(--fl); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; }
.role i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.topbar select { background: var(--sur-hi); color: var(--text); border: 1px solid var(--line); border-radius: var(--r); padding: 0 8px; height: 32px; font-family: var(--fl); font-weight: 700; font-size: 12px; letter-spacing: .04em; width: auto; flex: none; }
.linkbtn { background: none; border: 0; padding: 4px 2px; color: var(--amber-hi); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 500; font-size: inherit; }
.topbar .linkbtn { color: var(--steel); font-family: var(--fl); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.topbar .linkbtn:hover { color: var(--text); }

.nav { background: var(--sur-low); border-bottom: 1px solid var(--line); position: sticky; top: 57px; z-index: 19; }
.nav-in { max-width: 1240px; margin: 0 auto; padding: 0 8px; display: flex; gap: 2px; }
.nav a { display: inline-flex; align-items: center; gap: 7px; color: var(--steel); text-decoration: none; padding: 11px 14px; font-family: var(--fl); font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; border-bottom: 2px solid transparent; margin-bottom: -1px; position: relative; }
.nav a:hover { color: var(--text); }
.nav a.on { color: var(--amber); border-bottom-color: var(--amber); }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; font-family: var(--fl); }

.main { max-width: 1240px; margin: 0 auto; padding: 20px 16px 90px; }
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 16px; }
.head h1 { margin-right: auto; display: flex; align-items: center; gap: 10px; }
.head h1::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.panel { background: var(--sur); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-pad { padding: 16px; }
.stack > * + * { margin-top: 16px; }
.empty { padding: 36px 20px; text-align: center; color: var(--steel); }
.empty b { display: block; color: var(--text); font-family: var(--fh); font-size: 17px; margin-bottom: 4px; }
.cards { display: grid; gap: 10px; }

/* ---------- gumbi i polja ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 14px;
  border: 1px solid var(--line-hi); border-radius: var(--r); background: var(--sur); color: var(--text-2);
  font-family: var(--fh); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--sur-hi); border-color: var(--steel); }
.btn.primary { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.btn.primary:hover { background: #eab308; border-color: #eab308; box-shadow: 0 0 16px rgba(245, 158, 11, .25); }
.btn.dark { background: var(--sur-hi); border-color: var(--line-hi); color: var(--text); }
.btn.dark:hover { border-color: var(--steel); }
.btn.danger { color: #fca5a5; border-color: rgba(239, 68, 68, .45); background: var(--red-wash); }
.btn.danger:hover { background: rgba(239, 68, 68, .22); }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: default; }
.seg { max-width: 100%; overflow-x: auto; display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); background: var(--sur); scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; white-space: nowrap; border: 0; background: none; padding: 7px 13px; min-height: 36px; cursor: pointer; color: var(--steel); font-family: var(--fl); font-weight: 700; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--amber); color: var(--amber-ink); }

input[type=text], input[type=date], input[type=month], input[type=number], input[type=password], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sur); color: var(--text);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: var(--amber); outline: none; }
input[type=date], input[type=month] { color-scheme: dark; }
label.f { display: block; font-family: var(--fl); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--steel); }
label.f > input, label.f > select, label.f > textarea { margin-top: 5px; font-family: var(--fb); font-weight: 400; letter-spacing: 0; text-transform: none; }
.hint { font-family: var(--fb); font-size: 12.5px; color: var(--muted); font-weight: 400; letter-spacing: 0; text-transform: none; margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; font-size: 13.5px; cursor: pointer; color: var(--text-2); }
.check input { width: 18px; height: 18px; accent-color: var(--amber); }
.filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 14px; }
.filters input[type=search] { width: 230px; }
.filters select { width: auto; }
.filters.cats { gap: 6px 8px; margin-top: -6px; }
.filters.cats .lbl { margin-right: 4px; }
.check.cat { padding: 4px 9px 4px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sur); font-family: var(--fl); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--steel); gap: 6px; }
.check.cat input { width: 15px; height: 15px; }
.check.cat:has(input:checked) { background: var(--sur-hi); color: var(--text); }
.check.cat.cat-c:has(input:checked) { border-color: var(--cyan); color: var(--cyan); }
.check.cat.cat-s:has(input:checked) { border-color: var(--amber); color: var(--amber-hi); }
.check.cat.cat-y:has(input:checked) { border-color: var(--steel); }
.comp-files { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.comp-files a, .file-row a { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; }
.comp-files svg.i, .file-row svg.i { width: 15px; height: 15px; }
.files { display: grid; gap: 6px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sur-hi); }
.file-row a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.print-head { display: none; }
.btn.disabled { opacity: .45; pointer-events: none; }
.sk { color: var(--cyan) !important; }

.chip { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: var(--r); background: var(--sur-hi); border: 1px solid var(--line); font-family: var(--fl); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--steel); line-height: 1.4; }
.chip.cat-y { color: var(--steel); border-color: var(--steel); }
.chip.cat-c { color: var(--cyan); border-color: var(--cyan); }
.chip.cat-s { color: var(--amber); border-color: var(--amber); }
.chip.w-M { background: var(--sur-hi); color: var(--text); border-color: var(--line-hi); }
.chip.w-F { background: var(--amber-wash); color: var(--amber-hi); border-color: rgba(245, 158, 11, .45); }
.chip.w-MF { background: var(--sur-hi); color: var(--text-2); border-color: var(--line-hi); }
.chip.g-M { background: rgba(56, 189, 248, .12); color: #7dd3fc; border-color: rgba(56, 189, 248, .45); }
.chip.g-Z { background: rgba(244, 114, 182, .12); color: #f9a8d4; border-color: rgba(244, 114, 182, .45); }
.chip.g-MZ { background: var(--sur-hi); color: var(--text-2); border-color: var(--line-hi); }
.chip.ok { background: var(--green-wash); color: #6ee7b7; border-color: rgba(16, 185, 129, .4); }
.chip.bad { background: var(--red-wash); color: #fca5a5; border-color: rgba(239, 68, 68, .4); }
.chip.warn { background: var(--amber-wash); color: var(--amber-hi); border-color: rgba(245, 158, 11, .4); }
.chip button { border: 0; background: none; padding: 0 0 0 5px; cursor: pointer; font-weight: 700; color: inherit; font-size: 13px; line-height: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- tablice ---------- */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th, .t td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t th { font-family: var(--fl); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--steel); background: var(--sur-low); white-space: nowrap; position: sticky; top: 0; }
.t td.num, .t th.num { text-align: right; }
.t td.c, .t th.c { text-align: center; }
.t td.right { text-align: right; }
.t tr:last-child td { border-bottom: 0; }
.t tfoot td { font-weight: 700; color: var(--text); background: var(--sur-low); border-top: 2px solid var(--line-hi); }
.t .grp td { background: var(--sur-hi); color: var(--amber-hi); font-family: var(--fl); font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; }
.t .name { font-weight: 600; color: var(--text); white-space: nowrap; }
.t .stick { position: sticky; left: 0; background: var(--sur); z-index: 1; }
.t th.stick { background: var(--sur-low); z-index: 2; }
.t tfoot .stick { background: var(--sur-low); }
.t .grp .stick { background: var(--sur-hi); }
.t tr.inactive td { color: var(--muted); }
.code { font-family: var(--fl); font-weight: 700; letter-spacing: .08em; font-size: 13.5px; color: var(--amber-hi); user-select: all; }

/* ---------- kalendar ---------- */
.month { margin-top: 24px; }
.month:first-child { margin-top: 0; }
.month-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.month-h h2 { text-transform: capitalize; }
.month-h .n { font-family: var(--fl); font-size: 11px; color: var(--steel); letter-spacing: .06em; }
.month-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--amber) 0 24px, var(--line) 24px); align-self: center; }
.comp {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: start; width: 100%; text-align: left;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--sur); color: inherit; cursor: pointer; position: relative; overflow: hidden;
}
.comp::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--amber), var(--amber-hi), transparent); }
.comp.past::before { background: var(--line); }
button.comp:hover { border-color: var(--line-hi); box-shadow: 0 0 16px rgba(245, 158, 11, .12); }
.comp.past { opacity: .72; }
.comp-top { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.comp-name { font-family: var(--fh); font-weight: 700; font-size: 18px; color: var(--text); margin-top: 4px; }
.comp-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; }
.comp-meta > div { display: flex; align-items: center; gap: 7px; min-width: 0; }
.comp-meta svg.i { color: var(--amber); width: 16px; height: 16px; }
.comp-meta .v { font-weight: 600; color: var(--text-2); }
.comp-meta .v small { display: block; font-family: var(--fl); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); font-weight: 700; }
.comp-cats { margin-top: 10px; }
.comp-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; font-size: 13px; }
.comp-side .n { font-family: var(--fl); font-weight: 700; color: var(--text); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.deadline { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: var(--r); background: var(--sur-hi); border: 1px solid var(--line); font-size: 12.5px; color: var(--steel); }
.deadline.open { background: var(--amber-wash); border-color: rgba(245, 158, 11, .4); color: var(--amber-hi); }
.deadline svg.i { width: 15px; height: 15px; }
.comp-side .btn { margin-top: 2px; }
.comp-side a { font-size: 12.5px; }

/* kompaktni kalendar: jedno natjecanje = jedan red */
.clist { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--sur); overflow: hidden; }
.crow { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto 200px 150px; gap: 12px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--line); cursor: pointer; }
.crow.noside { grid-template-columns: 96px minmax(0, 1fr) auto 200px; }
.crow:first-child { border-top: 0; }
.crow:hover, .crow:focus-visible { background: var(--sur-hi); }
.crow.past { opacity: .6; }
.c-dt small { display: block; font-family: var(--fl); font-weight: 700; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--amber); line-height: 1.2; }
.c-dt b { font-family: var(--fh); font-weight: 700; font-size: 14px; color: var(--text); white-space: nowrap; }
.crow.past .c-dt small { color: var(--steel); }
.c-nm { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-nm b { font-weight: 600; color: var(--text); }
.c-city { color: var(--steel); font-size: 13px; }
.c-ln { display: inline-flex; vertical-align: -3px; margin-left: 7px; color: var(--amber-hi); }
.c-ln svg.i { width: 15px; height: 15px; }
.c-tg, .c-ct { display: flex; flex-wrap: wrap; gap: 4px; }
.c-side { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 12.5px; color: var(--steel); white-space: nowrap; }
.c-reg { display: inline-flex; align-items: center; gap: 4px; font-family: var(--fl); font-weight: 700; color: var(--text); }
.c-reg svg.i { width: 14px; height: 14px; }
.dl-open { color: var(--amber-hi); }
.print-out { display: none; }
.month .clist { margin-bottom: 4px; }
.month { margin-top: 18px; }
.month-h { margin-bottom: 6px; }
.month-h h2 { font-size: 16px; }

/* ---------- evidencija treninga ---------- */
.att-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.att-date { display: inline-flex; align-items: center; gap: 4px; }
.att-date input { width: 165px; font-weight: 600; }
.att-count { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--fl); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--steel); margin: 0 0 12px; }
.att-count b { color: var(--text); }
.att-count .p::before, .att-count .e::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.att-count .p::before { background: var(--green); } .att-count .e::before { background: var(--amber); }
.att-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.att-row:last-child { border-bottom: 0; }
.att-row .nm { grid-column: 1; grid-row: 1; font-family: var(--fh); font-weight: 600; font-size: 16px; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-row .st { grid-column: 1; grid-row: 2; font-size: 12px; color: var(--steel); }
.att-row .st b { color: var(--green); font-family: var(--fl); font-size: 13px; }
.att-row .st .sep { color: var(--muted); }
.att-row .lamps { grid-column: 2; grid-row: 1 / 3; display: flex; gap: 6px; }
.lamp {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; min-width: 112px; padding: 6px 12px; border-radius: var(--r);
  border: 1px solid var(--line-hi); background: var(--sur-hi); font-family: var(--fl); font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--steel); cursor: pointer;
}
.lamp .s { display: none; }
.lamp svg.i { width: 16px; height: 16px; }
.lamp.p.on { background: var(--green-wash); border-color: var(--green); color: #6ee7b7; box-shadow: 0 0 12px rgba(16, 185, 129, .25); }
.lamp.e.on { background: rgba(56, 189, 248, .14); border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 12px rgba(56, 189, 248, .2); }
.att-count .e::before { background: var(--cyan); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--line); vertical-align: -1px; }
.dot + .dot { margin-left: 3px; }
.dot.P { background: var(--green); box-shadow: 0 0 6px rgba(16, 185, 129, .7); }
.dot.S { background: var(--cyan); box-shadow: 0 0 6px rgba(56, 189, 248, .7); }

/* ---------- članarine ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--sur); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; }
.stat .v { font-family: var(--fh); font-weight: 800; font-size: 26px; color: var(--text); line-height: 1.1; margin-top: 4px; }
.stat .v.green { color: var(--green); } .stat .v.amber { color: var(--amber); } .stat .v.red { color: #fca5a5; }
.fee { text-align: right; white-space: nowrap; font-weight: 600; }
.fee.paid { background: var(--green-wash); color: #6ee7b7; }
.fee.covered { background: rgba(16, 185, 129, .07); color: #6ee7b7; font-weight: 500; }
.fee.partial { background: var(--amber-wash); color: var(--amber-hi); }
.fee.due { background: var(--red-wash); color: #fca5a5; }
.fee.pending { background: var(--amber-wash); color: var(--amber-hi); font-weight: 500; }
.fee.future, .fee.na { color: var(--line-hi); font-weight: 400; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--steel); padding: 10px 14px; border-top: 1px solid var(--line); }
.legend span::before { content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid; }
.legend .lg-paid::before { background: rgba(16, 185, 129, .6); border-color: var(--green); }
.legend .lg-covered::before { background: rgba(16, 185, 129, .2); border-color: rgba(16, 185, 129, .5); }
.legend .lg-pending::before { background: rgba(245, 158, 11, .6); border-color: var(--amber); }
.legend .lg-due::before { background: rgba(239, 68, 68, .6); border-color: var(--red); }
.pos { color: #6ee7b7; } .neg { color: #fca5a5; }

.pay { display: grid; grid-template-columns: 96px 1fr auto; gap: 2px 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: start; }
.pay:last-child { border-bottom: 0; }
.pay-date { font-family: var(--fl); font-size: 12px; letter-spacing: .04em; color: var(--steel); }
.pay-amt { font-family: var(--fh); font-weight: 700; font-size: 17px; color: var(--text); }
.pay-who { font-weight: 600; color: var(--text); }
.pay-desc { font-size: 13px; color: var(--steel); overflow-wrap: anywhere; }
.pay-note { font-size: 13px; color: var(--amber-hi); margin-top: 3px; }
.pay-to { font-size: 13.5px; margin-top: 3px; color: var(--text-2); }
.pay-act { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.statline { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; align-items: center; }
.statline button { border: 1px solid var(--line); background: var(--sur); border-radius: var(--r); padding: 6px 11px; font-family: var(--fl); font-weight: 700; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--steel); cursor: pointer; }
.statline button.on { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); }
.statline button b { color: inherit; margin-left: 5px; }

/* ---------- dijalog ---------- */
dialog.dlg { border: 1px solid var(--amber); border-radius: var(--r-lg); padding: 0; width: min(560px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 24px rgba(245, 158, 11, .12); color: var(--text-2); background: var(--sur); }
dialog.dlg.wide { width: min(900px, calc(100vw - 20px)); }
dialog.dlg::backdrop { background: rgba(5, 6, 8, .72); }
.dlg-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3; background: linear-gradient(180deg, rgba(245, 158, 11, .08), var(--sur)); }
.dlg-h h2 { flex: 1; }
.dlg-x { border: 1px solid var(--line); background: var(--sur-hi); color: var(--text); width: 34px; height: 34px; border-radius: var(--r); font-size: 18px; line-height: 1; cursor: pointer; }
.dlg-b { padding: 16px 18px; }
.dlg-b > * + * { margin-top: 12px; }
.dlg-f { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--sur); }
.dlg-f .left { margin-right: auto; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 14px; }
.kv dt { font-family: var(--fl); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--steel); padding-top: 2px; }
.kv dd { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.note { background: var(--amber-wash); color: var(--amber-hi); border: 1px solid rgba(245, 158, 11, .35); border-radius: var(--r); padding: 9px 12px; font-size: 13.5px; }
.note.bad { background: var(--red-wash); color: #fca5a5; border-color: rgba(239, 68, 68, .4); }
.note.plain { background: var(--sur-hi); color: var(--text-2); border-color: var(--line); }

.toasts { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 24px); }
.toast { background: var(--sur-hi); color: var(--text); border: 1px solid var(--green); padding: 9px 16px; border-radius: var(--r); font-family: var(--fl); font-weight: 700; font-size: 12.5px; letter-spacing: .04em; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.toast.err { border-color: var(--red); color: #fca5a5; }

/* ---------- prijava ---------- */
.gate { min-height: 100dvh; display: grid; place-items: center; background: radial-gradient(ellipse at top, rgba(245, 158, 11, .10), transparent 55%), var(--bg); padding: 20px; }
.gate-box { width: min(440px, 100%); background: var(--sur); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 24px 24px; position: relative; overflow: hidden; }
.gate-box::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--amber), var(--amber-hi)); }
.gate-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.gate-box h1 { margin-bottom: 2px; }
.gate-box form > * + * { margin-top: 14px; }
.gate-box .btn { width: 100%; min-height: 48px; font-size: 15px; }
.gate-code { font-family: var(--fl) !important; font-size: 20px !important; font-weight: 700; letter-spacing: .12em; text-align: center; min-height: 54px !important; color: var(--amber-hi) !important; background: var(--sur-low) !important; }

/* ---------- pogled za sportaša ---------- */
.me-card { display: flex; gap: 14px; align-items: center; padding: 16px; margin-bottom: 16px; }
.me-av { width: 56px; height: 56px; border-radius: var(--r); background: var(--sur-hi); border: 1px solid var(--line-hi); display: grid; place-items: center; font-family: var(--fh); font-weight: 800; font-size: 20px; color: var(--amber); flex: none; }
.me-card h1 { font-size: 22px; }
.me-card .sub { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 4px; font-size: 13px; color: var(--steel); align-items: center; }
.me-head { margin-bottom: 14px; }
.me-head p { margin: 2px 0 0; color: var(--steel); }
.mrow { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: 0; }
.mrow .m { font-weight: 600; color: var(--text); text-transform: capitalize; }
.bar { width: 110px; height: 8px; border-radius: 4px; background: var(--sur-hi); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); box-shadow: 0 0 8px rgba(16, 185, 129, .6); }
.pct { font-family: var(--fh); font-weight: 800; font-size: 28px; color: var(--green); }

/* ---------- mobitel ---------- */
@media (max-width: 760px) {
  h1 { font-size: 22px; }
  .main { padding: 14px 12px 96px; }
  .topbar-in { padding: 8px 12px; gap: 8px; }
  .who { display: none; }
  .nav { position: fixed; top: auto; bottom: 0; left: 0; right: 0; border-top: 1px solid var(--line); border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); background: var(--sur-low); }
  .nav-in { padding: 0; justify-content: space-around; }
  .nav a { flex: 1; flex-direction: column; gap: 3px; text-align: center; padding: 9px 2px 8px; font-size: 10px; letter-spacing: .04em; border-bottom: 0; margin: 0; }
  .nav a svg.i { width: 22px; height: 22px; }
  .nav .badge { position: absolute; top: 4px; right: calc(50% - 22px); }
  .comp { grid-template-columns: 1fr; padding: 12px 14px; }
  .crow, .crow.noside { grid-template-columns: 70px auto minmax(0, 1fr); gap: 5px 4px; padding: 8px 10px; align-items: start; }
  .crow .c-dt { grid-row: 1 / 4; margin-right: 6px; }
  .c-dt b { font-size: 12.5px; }
  .c-nm { grid-column: 2 / 4; white-space: normal; }
  .c-tg { grid-column: 2; }
  .c-ct { grid-column: 3; }
  .c-side { grid-column: 2 / 4; justify-content: flex-start; white-space: normal; flex-wrap: wrap; }
  .comp-side { align-items: stretch; text-align: left; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
  .comp-side .btn { margin: 0; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .att-row { padding: 9px 10px; gap: 2px 8px; }
  .att-row .nm { font-size: 15px; }
  .lamp { min-width: 0; padding: 6px 9px; gap: 5px; }
  .att-row .st .l { display: none; }
  .filters.cats .lbl { width: 100%; }
  .brand-sub { display: none; }
  .pay { grid-template-columns: 1fr auto; }
  .pay-date { grid-column: 1 / -1; display: flex; gap: 10px; align-items: baseline; }
  .pay-act { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; margin-top: 6px; }
  .filters input[type=search] { width: 100%; }
  .t th, .t td { padding: 7px 8px; }
  .mrow .bar { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .lamp, .btn, .comp { transition: background .12s, border-color .12s, box-shadow .12s; }
}
@media print {
  :root { color-scheme: light; }
  @page { size: A4 portrait; margin: 11mm 10mm; }
  body { background: #fff; color: #000; }
  .topbar, .nav, .filters, .head, .toasts, dialog, #list { display: none !important; }
  .main { padding: 0; max-width: none; }
  .print-out { display: block; color: #111; font: 400 8.6pt/1.3 var(--fb); }
  .print-out h1 { font: 700 15pt var(--fh); margin: 0; color: #000; }
  .print-out h1::before { display: none; }
  .print-out .ph-sub { font-size: 8.5pt; color: #444; margin: 2px 0 7px; padding-bottom: 5px; border-bottom: 1.5pt solid #000; }
  .ptab { width: 100%; border-collapse: collapse; }
  .ptab thead { display: table-header-group; }
  .ptab th { font: 700 7pt var(--fl); letter-spacing: .06em; text-transform: uppercase; text-align: left; color: #444; border-bottom: 1pt solid #000; padding: 3px 4px; }
  .ptab td { padding: 2.5px 4px; border-bottom: .5pt solid #ccd1d8; vertical-align: top; color: #111; }
  .ptab tr { break-inside: avoid; }
  .ptab tr.pmo td { font: 700 9pt var(--fh); text-transform: capitalize; border-bottom: 1pt solid #000; padding-top: 7px; color: #000; break-after: avoid; }
  .ptab td.pd { white-space: nowrap; font-weight: 600; }
  .ptab td.pd small { color: #666; font-weight: 400; }
  .ptab td.pn { font-weight: 600; }
  .ptab th.pd { width: 15%; } .ptab th.pm { width: 20%; } .ptab th.pw { width: 19%; } .ptab th.pc { width: 15%; } .ptab th.pr { width: 10%; }
  .pk { display: inline-block; border: .6pt solid #888; border-radius: 2px; padding: 0 3px; font: 700 6.6pt var(--fl); letter-spacing: .03em; color: #111; white-space: nowrap; }
  .pk.gZ { border-color: #be185d; color: #be185d; } .pk.gM { border-color: #0369a1; color: #0369a1; }
  a { color: #000; text-decoration: none; }
}
