/* NiVi Ski škola — izgled.
   Izvor: dizajn-paket „design_handoff_nivi_korisnici" (README + NiVi Korisnici.dc.html + styles.css), folder design/.
   Osnova je Nocturne sistem, akcenat i neutralne boje su NiVi (crna/bela/žuta iz logoa). Samo tamna tema — paket
   definiše jednu. Žuta nikad nije velika ispuna: samo linije, tačke, outline, ikone i zvezdica „*" (izuzetak: avatar).
   Telefon (< 900px): jedna kolona, traka sa logom gore, donja navigacija. Računar (≥ 900px): leva traka 240px. */

:root {
  --color-bg: #121316;
  --color-surface: #1c1d21;
  --color-text: #e9e9ed;
  --color-divider: color-mix(in srgb, #e9e9ed 14%, transparent);
  --color-accent: #f2e61f;
  --color-accent-100: #fefbd6;
  --color-accent-200: #fcf59e;
  --color-accent-300: #f8ee5c;
  --color-accent-400: #f5ea3a;
  --color-accent-500: #d9cf14;
  --color-accent-600: #b0a80e;
  --color-accent-700: #7f790a;
  --color-accent-800: #4a4608;
  --color-accent-900: #262405;
  --color-neutral-100: #f5f5f4;
  --color-neutral-200: #e6e6e4;
  --color-neutral-300: #d1d1ce;
  --color-neutral-400: #b4b4b0;
  --color-neutral-500: #959591;
  --color-neutral-600: #777773;
  --color-neutral-700: #5b5b58;
  --color-neutral-800: #40403e;
  --color-neutral-900: #2a2a29;
  --bad: #ff8a7a;

  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, Menlo, Consolas, monospace;

  /* gustina 0.7× */
  --space-1: 2.8px;
  --space-2: 5.6px;
  --space-3: 8.4px;
  --space-4: 11.2px;
  --space-6: 16.8px;
  --space-8: 22.4px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 0 0 1px #3f424d;
  --shadow-md: 0 0 0 1px #595d6c, 0 6px 18px rgba(0, 0, 0, .55);
  --shadow-lg: 0 0 0 1px #9397ab, 0 16px 40px rgba(0, 0, 0, .65);

  --tint-hover: color-mix(in srgb, var(--color-text) 6%, transparent);
  --tint-accent: color-mix(in srgb, var(--color-accent) 6%, transparent);
  /* linija koja bledi na krajevima 48px (Nocturne potpis) */
  --rule: linear-gradient(to right, transparent, color-mix(in srgb, var(--color-text) 8%, transparent) 48px,
          color-mix(in srgb, var(--color-text) 8%, transparent) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
  --rule-head: linear-gradient(to right, transparent, var(--color-divider) 48px,
          var(--color-divider) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;

  --nav-h: 62px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font: 400 14px/1.55 var(--font-body);
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--color-accent); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-300); }
img { display: block; max-width: 100%; }
p { margin: 0; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
.mono { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
svg.i { width: 18px; height: 18px; flex: none; fill: currentColor; }
.lighten { mix-blend-mode: lighten; background-color: transparent; }

/* ---------- tipografija ---------- */
h1, h2, h6 { font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: 32px; display: flex; align-items: flex-start; gap: 4px; flex-wrap: wrap; overflow-wrap: anywhere; }
h1 .star, .star { color: var(--color-accent); font-size: .6em; line-height: 1; font-weight: 600; }
h1 .count { font-size: 14px; color: var(--color-neutral-500); font-variant-numeric: tabular-nums; letter-spacing: 0; margin: 8px 0 0 8px; font-weight: 400; }
h6 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--color-neutral-500); }
.eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-neutral-500); }
.meta { font-size: 12px; color: var(--color-neutral-500); font-variant-numeric: tabular-nums; }
.lead { color: var(--color-neutral-400); max-width: 60ch; }

/* ---------- ljuska ---------- */
.app { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); }
.main {
  min-width: 0;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(ellipse 900px 420px at 0% 0%, color-mix(in srgb, var(--color-accent) 5%, transparent), transparent 70%);
}
.wrap {
  max-width: 1180px; display: flex; flex-direction: column; gap: var(--space-6);
  padding: var(--space-6) max(var(--space-6), env(safe-area-inset-right, 0px)) var(--space-8) max(var(--space-6), env(safe-area-inset-left, 0px));
}
.view { animation: nvIn 220ms ease-out; }
@keyframes nvIn { from { opacity: 0; transform: translateY(8px); } }

.logo { overflow: hidden; }
.logo img { max-width: none; }
.logo-sm { width: 112px; height: 40px; }
.logo-sm img { width: 150px; margin: -52px 0 0 -18px; }
.logo-lg { width: 180px; height: 64px; }
.logo-lg img { width: 240px; margin: -84px 0 0 -30px; }

.avatar {
  width: 32px; height: 32px; flex: none; border-radius: var(--radius-md); display: grid; place-items: center;
  background: var(--color-accent-900); color: var(--color-accent); font-weight: 600; font-size: 12px; letter-spacing: .02em;
}

/* telefon: traka sa logom */
.mtop { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-6) 0; }

/* leva traka (samo računar) */
.rail { display: none; }
.rail-brand { padding: 0 var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); }
.season { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--color-neutral-500); display: flex; align-items: center; gap: 6px; }
.season .i { width: 14px; height: 14px; color: var(--color-accent); }
.rail-group { display: flex; flex-direction: column; }
.rail-title { padding: var(--space-2) var(--space-6); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-neutral-600); }
.rail-item {
  position: relative; display: flex; align-items: center; gap: var(--space-4); height: 38px; padding: 0 var(--space-6);
  color: var(--color-neutral-400); text-decoration: none; font-size: 14px;
}
.rail-item:hover { color: var(--color-text); background: var(--tint-hover); }
.rail-item .lbl { flex: 1; }
.rail-item .star { font-size: 16px; opacity: 0; }
.rail-item.active { color: var(--color-accent); background: var(--tint-accent); }
.rail-item.active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; background: var(--color-accent); }
.rail-item.active .star { opacity: 1; }
.rail-me { margin-top: auto; padding: var(--space-4) var(--space-6) 0; display: flex; align-items: center; gap: var(--space-3); box-shadow: inset 0 1px 0 var(--color-divider); }
.rail-me .who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.rail-me .who b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-me .who span { font-size: 12px; color: var(--color-neutral-500); }
.rail-me form { margin: 0 0 0 auto; }
.rail-me .btn-icon { color: var(--color-neutral-400); }

/* donja navigacija (telefon) */
.bnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--color-surface); box-shadow: 0 -1px 0 var(--color-divider);
}
.bnav form { margin: 0; display: contents; }
.bnav-item {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; background: transparent; color: var(--color-neutral-400); font-size: 10.5px; text-decoration: none; min-width: 0;
}
.bnav-item .i { width: 21px; height: 21px; }
.bnav-item.active { color: var(--color-accent); }
.bnav-item.active::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; background: var(--color-accent); }
.bnav-item:focus-visible { outline-offset: -2px; }

/* ---------- dugmad ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none;
  min-height: 38px; padding: var(--space-2) var(--space-6); border: 1px solid transparent; border-radius: var(--radius-md);
  background: transparent; color: var(--color-text); font-weight: 500; font-size: 14px; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn .i { width: 16px; height: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { color: var(--color-accent); border-color: var(--color-accent); }
.btn-primary:hover { color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 12%, transparent); }
.btn-primary:active { background: color-mix(in srgb, var(--color-accent) 22%, transparent); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { color: var(--color-text); background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-neutral-400); padding-inline: var(--space-1); min-height: 32px; }
.btn-ghost:hover { color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost .i { width: 15px; height: 15px; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { color: var(--bad); }
.btn-danger.outlined { border-color: var(--bad); }
.btn-danger:disabled:hover { background: transparent; }
.btn-icon { width: 36px; height: 36px; min-height: 0; padding: 0; color: var(--color-neutral-400); }
.btn-icon:hover { color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-tall { height: 40px; padding-inline: var(--space-8); }
.btn:disabled:hover { background: transparent; }

/* ---------- forme ---------- */
.field > label, .field > .lbl { display: block; font-size: 12px; margin-bottom: 5px; color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.input {
  width: 100%; height: 40px; padding: 6px 10px; font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
.input.mono { font-family: var(--font-mono); }
.input::placeholder { color: var(--color-neutral-500); }
.field .msg { display: block; font-size: 12px; margin-top: 5px; color: var(--color-neutral-500); }
.field.err .input { border-color: var(--bad); }
.field.err .msg { color: var(--bad); }
.pw { position: relative; }
.pw .input { padding-right: 42px; }
.pw .btn-icon { position: absolute; right: 2px; top: 2px; }
.pw .btn-icon .i { width: 17px; height: 17px; }

.section { display: flex; flex-direction: column; gap: var(--space-4); }
.section.tight { gap: var(--space-3); }

.roles { display: flex; flex-direction: column; gap: var(--space-2); }
.role-opt {
  position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) 16px; gap: var(--space-4); align-items: center;
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--color-divider); cursor: pointer;
}
.role-opt:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.role-opt .ico { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--color-neutral-900); color: var(--color-neutral-400); }
.role-opt .t { display: flex; flex-direction: column; gap: 2px; }
.role-opt .k { font-weight: 500; font-size: 14px; }
.role-opt .d { font-size: 12px; color: var(--color-neutral-400); line-height: 1.35; }
.role-opt input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.role-opt .dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--color-divider); }
.role-opt:hover .dot { border-color: var(--color-accent); }
.role-opt:has(input:checked) { box-shadow: inset 0 0 0 1px var(--color-accent); background: var(--tint-accent); }
.role-opt:has(input:checked) .ico { color: var(--color-accent); }
.role-opt input:checked + .dot { border-color: var(--color-accent); background: var(--color-accent); box-shadow: inset 0 0 0 4px var(--color-bg); }
.role-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.role-opt:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.role-opt:has(input:disabled):hover { background: transparent; }
.role-opt:has(input:disabled):hover .dot { border-color: var(--color-divider); }
.hint { font-size: 12px; color: var(--color-neutral-400); }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); padding-top: var(--space-4); box-shadow: inset 0 1px 0 var(--color-divider); }
.actions .btn { height: 40px; }
.actions .btn-primary { padding-inline: var(--space-8); }

/* napomena (info) */
.note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--color-neutral-300); }
.note .i { width: 16px; height: 16px; margin-top: 1px; }
.note.boxed { font-size: 12px; padding: var(--space-3); border-radius: var(--radius-sm); background: var(--color-neutral-900); }
.note.boxed .i { width: 15px; height: 15px; }

/* poruka o grešci / uspehu sa servera */
.alert { display: flex; gap: 8px; align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-size: 13px; }
.alert .i { width: 16px; height: 16px; margin-top: 1px; }
.alert.bad { color: var(--bad); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 55%, transparent); background: color-mix(in srgb, var(--bad) 8%, transparent); }
.alert.ok { color: var(--color-text); box-shadow: inset 0 0 0 1px var(--color-divider); background: var(--color-surface); }
.alert.ok .i { color: var(--color-accent); }

/* kartica */
.card { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.card-kicker { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-accent); }
.card-status { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.card-body { font-size: 13px; opacity: .8; line-height: 1.5; }
.card-btns { display: flex; flex-direction: column; gap: var(--space-2); }
.card-btns .btn { justify-content: flex-start; height: 38px; }

/* status: kvadratić (žut = aktivan) */
.sq { width: 7px; height: 7px; flex: none; border-radius: 2px; background: var(--color-accent); }
.sq.off { background: var(--color-neutral-600); }
.card-status .sq { width: 8px; height: 8px; }

/* oznake uloga */
.tag { display: inline-flex; align-items: center; font-size: 11px; letter-spacing: .02em; padding: 3px 10px; border-radius: 6px; white-space: nowrap; }
.tag-neutral { background: var(--color-neutral-800); color: var(--color-neutral-100); }
.tag-outline { box-shadow: inset 0 0 0 1px var(--color-accent); color: var(--color-accent); }

/* ---------- lista korisnika ---------- */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.head-t { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.tools { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: space-between; }
.search { position: relative; flex: 1 1 260px; max-width: 380px; }
.search .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--color-neutral-500); pointer-events: none; }
.search .input { height: 38px; padding-left: 34px; }

/* filter po ulozi: na uskom ekranu skroluje horizontalno (stranica ne) */
.seg { display: inline-flex; max-width: 100%; overflow-x: auto; border: 1px solid var(--color-divider); border-radius: var(--radius-md); scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg-opt { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; flex: none; }
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.seg-opt .n { font-size: 11px; color: var(--color-neutral-500); font-variant-numeric: tabular-nums; }
.seg-opt:has(input:checked) { color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }

/* Jedan red za oba prikaza: na telefonu lista (ikonica · ime · uloga/status), na računaru red tabele. */
.list { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.thead { display: none; }
.row {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: var(--space-4); align-items: center;
  min-height: 64px; padding: var(--space-3) 0; color: inherit; text-align: left;
  background: var(--rule);
}
.row.link { cursor: pointer; }
.row.link:hover { background: linear-gradient(color-mix(in srgb, var(--color-text) 4%, transparent), color-mix(in srgb, var(--color-text) 4%, transparent)) no-repeat 0 0 / 100% 100%, var(--rule); }
.row:focus-visible { outline-offset: -2px; }
.row.off { opacity: .5; }
.row.flash { animation: rowFlash 3300ms ease-out; }
@keyframes rowFlash { 0%, 72% { background-color: color-mix(in srgb, var(--color-accent) 12%, transparent); } 100% { background-color: transparent; } }
.c-name { display: contents; }
.role-ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--color-neutral-900); color: var(--color-accent-300); }
.role-ico .i { width: 18px; height: 18px; }
.row.off .role-ico { color: var(--color-neutral-400); }
.row.me .role-ico { background: var(--color-accent); color: var(--color-accent-900); }
.who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who .name { font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .you { font-size: 11px; color: var(--color-accent); font-weight: 400; margin-left: 6px; }
.who .sub { font-size: 12px; color: var(--color-neutral-500); display: flex; flex-wrap: wrap; column-gap: 10px; }
.side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--color-neutral-400); white-space: nowrap; }
.status .sq { width: 6px; height: 6px; }
.c-user, .c-tel, .c-chg, .c-act { display: none; }

.empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding: var(--space-8) 0; }
.empty > .i { width: 28px; height: 28px; color: var(--color-neutral-600); }
.empty strong { font-size: 18px; font-weight: 500; }
.empty span { color: var(--color-neutral-400); }

/* ---------- forma korisnika ---------- */
.page-head { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.form-grid { display: grid; grid-template-columns: minmax(0, 560px); gap: var(--space-8); align-items: start; }
.form-col { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.narrow > * { max-width: 480px; }

/* ---------- učitavanje ---------- */
.loading { position: relative; height: 2px; overflow: hidden; background: var(--color-divider); border-radius: 1px; }
.loading::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; background: var(--color-accent); animation: load 1100ms ease-in-out infinite alternate; }
@keyframes load { from { left: 0; } to { left: 70%; } }

/* ---------- dijalog ---------- */
.dialog-backdrop {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: var(--space-4);
  background: color-mix(in srgb, #000 55%, transparent);
}
.dialog {
  width: min(440px, 100%); display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-lg);
  animation: nvIn 200ms ease-out;
}
.dialog-title { font-size: 20px; font-weight: 500; line-height: 1.2; }
.dialog-body { font-size: 14px; opacity: .85; }
.dialog-body strong { font-weight: 600; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 50; left: 0; right: 0; margin-inline: auto; width: max-content; max-width: calc(100% - 32px);
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: var(--radius-md);
  background: var(--color-surface); box-shadow: var(--shadow-md); font-weight: 500; white-space: nowrap; pointer-events: none;
  animation: nvIn 200ms ease-out, toastOut 1ms linear 2400ms forwards;
}
.toast .i { width: 18px; height: 18px; color: var(--color-accent); }
@keyframes toastOut { from, to { visibility: hidden; opacity: 0; } }

/* ---------- Blazor greška ---------- */
#blazor-error-ui {
  display: none; position: fixed; z-index: 100; left: 0; right: 0; bottom: 0; padding: 12px 16px;
  background: var(--color-surface); color: var(--bad); box-shadow: 0 -1px 0 var(--bad); font-weight: 500;
}
#blazor-error-ui .reload { margin-left: 8px; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; font-size: 20px; line-height: 1; color: var(--color-neutral-400); }

/* ---------- telefon: polja 16px da iOS ne zumira pri unosu ---------- */
@media (max-width: 899.98px) {
  .input { font-size: 16px; }
}

/* ---------- računar ---------- */
@media (min-width: 900px) {
  .app { grid-template-columns: 240px minmax(0, 1fr); }
  .main { padding-bottom: 0; }
  .mtop, .bnav { display: none; }
  .rail {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: var(--space-4);
    padding: var(--space-6) 0; background: var(--color-surface); box-shadow: inset -1px 0 0 var(--color-divider); overflow-y: auto;
  }
  .wrap { padding: var(--space-8) 40px 48px; }
  h1 { font-size: 42px; }
  .toast { bottom: 24px; }

  /* tabela */
  /* zajednička lista (Korisnici): Ime · Uloga · Korisničko ime · Telefon · Izmenjeno · Status · akcije */
  .list { --cols: minmax(150px, 2.6fr) minmax(100px, .9fr) minmax(104px, 1fr) 124px minmax(108px, 1.25fr) minmax(96px, .85fr) 84px; }
  .thead, .row { grid-template-columns: var(--cols); gap: 0; }
  .thead {
    display: grid; background: var(--rule-head);
    font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--color-text) 60%, transparent);
  }
  .thead > span { padding: var(--space-2); }
  .row { min-height: 0; padding: 0; }
  .row > * , .row .side > * { padding: var(--space-3) var(--space-2); }
  .c-name { display: flex; align-items: center; gap: var(--space-4); min-width: 0; }
  .c-name > * { padding: 0; }
  .role-ico { width: 30px; height: 30px; }
  .role-ico .i { width: 16px; height: 16px; }
  .who .name { font-size: 14px; }
  .who .sub { display: none; }
  .side { display: contents; }
  .c-user, .c-tel, .c-chg { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--color-neutral-300); }
  .c-user { font-family: var(--font-mono); font-size: 13px; }
  .c-chg { font-size: 12px; color: var(--color-neutral-500); }
  .status { font-size: 12px; color: inherit; gap: 6px; }
  .status .sq { width: 7px; height: 7px; }
  .c-act { display: flex; gap: 2px; justify-content: flex-end; }
  .c-act .btn-icon { width: 32px; height: 32px; }
  .c-act .btn-icon .i { width: 16px; height: 16px; }

  .form-grid.with-side { grid-template-columns: minmax(0, 560px) minmax(240px, 300px); }
}

@media (prefers-reduced-motion: reduce) {
  .view, .dialog, .toast, .row.flash { animation: none; }
  .toast { animation: toastOut 1ms linear 2400ms forwards; }
  .loading::after { animation: none; left: 35%; }
}
.wrap > .btn { align-self: flex-start; }

/* Stranica „Više" (telefon): iste stavke kao leva traka. */
.more { display: flex; flex-direction: column; gap: var(--space-4); margin: 0 calc(-1 * var(--space-6)); }
.more form { margin: 0; }
.more button.rail-item { width: 100%; border: 0; background: transparent; font: inherit; cursor: pointer; text-align: left; }

/* ---------- sortiranje lista (SortHead / SortBar) ---------- */
.thead .sort {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; white-space: nowrap;
}
.thead .sort .i { width: 12px; height: 12px; opacity: .45; flex: none; }
.thead .sort:hover { color: var(--color-text); }
.thead .sort.on { color: var(--color-accent); }
.thead .sort.on .i { opacity: 1; }
.thead .sort:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 4px; }
.sortbar { display: flex; align-items: center; gap: var(--space-3); }
.sortbar label { font-size: 12px; color: var(--color-neutral-500); white-space: nowrap; }
.sortbar select.input { flex: 1; min-width: 0; height: 38px; }
@media (min-width: 900px) { .sortbar { display: none; } }

/* ---------- samo telefon / samo računar ----------
   Skeniranje kartica postoji samo na uređaju sa dodirom (telefon, tablet). Računar = miš (fina pokazivačka sprava)
   i hover. Tako se laptop sa dodirnim ekranom ponaša kao računar ako se koristi mišem. */
.desktop-only { display: none !important; }
@media (hover: hover) and (pointer: fine) {
  .phone-only { display: none !important; }
  .desktop-only { display: flex !important; }
}

/* ---------- ceo tekst na prelaz mišem (js/puni-tekst.js) ---------- */
.full-text-tip {
  position: fixed; z-index: 200; max-width: min(420px, calc(100vw - 16px));
  padding: 6px 10px; border-radius: 6px;
  background: var(--color-surface); color: var(--color-text);
  box-shadow: 0 0 0 1px var(--color-divider), 0 6px 18px rgb(0 0 0 / .45);
  font-size: 13px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere;
  pointer-events: none;
}

/* Naslovi kolona koji ne staju: skraćuju se sa „…" (ceo naziv u title / oblačiću), ne preklapaju susedne. */
.thead > * { min-width: 0; }
.thead .sort { max-width: 100%; min-width: 0; }
.thead .sort .sort-l { min-width: 0; white-space: normal; overflow-wrap: normal; word-break: keep-all; text-align: left; }

/* Tabele na računaru (kao u NIX-u): tekst koji ne staje prelazi u drugi red u istoj ćeliji, umesto da se seče „…".
   Važi za sve liste (.list .row); dugmad, oznake i ikonice ostaju u jednom redu. Na telefonu (kartice) bez promene. */
@media (min-width: 900px) {
  .list .row :where(span, div, a, b, small, time):not(.btn, .btn *, .tag, .tag *, .role-ico, .role-ico *, .sq, .keep, .keep *, .c-from, .c-to, .c-tel, .who .name) {
    white-space: normal !important; text-overflow: clip !important; overflow: visible !important; overflow-wrap: break-word;
  }
  .list .row { align-items: center; }
  .thead .sort { align-items: flex-start; }
}

/* Datumi, brojevi telefona i sve sa .keep ostaju u jednom redu (ne prelamaju se ni u uskoj koloni). */
@media (min-width: 900px) {
  .list .row :is(.keep, .c-from, .c-to, .c-tel) { white-space: nowrap !important; overflow-wrap: normal; }
}

/* Album učenika (samo Admin, Components/Shared/AlbumBadge): na telefonu u drugom redu kartice (.ab-m u .sub),
   na računaru odmah posle imena (.ab-d). „N neposlato" na dugmetu Album u kartici učenika i rezervacije. */
.ab-d { display: none; }
@media (min-width: 900px) { .ab-d { display: inline; } .ab-m { display: none; } }
.album-new { color: var(--color-accent); font-weight: 400; }

/* Ime učenika/roditelja/osobe: nikad se ne lomi usred reči — samo na razmaku, i to tek kad ceo ne staje u red. */
:is(.name, .parent, .kid-name, .ins-name, .sc-name, .c-who), :is(.name, .parent, .kid-name, .ins-name, .sc-name, .c-who) * {
  overflow-wrap: normal !important; word-break: keep-all !important; hyphens: none;
}

/* ---------- ocena instruktora (Components/Shared/Ocena*.razor) ----------
   Završena rezervacija bez ocene instruktora: crvena oznaka ispod imena u listi rezervacija (telefon i tabela)
   i na pregledu Ocene. */
.no-eval { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; letter-spacing: .02em; color: var(--bad) !important; white-space: nowrap; }
.no-eval::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--bad); flex: none; }

/* Tabele na računaru — pregledniji izgled po uzoru na NIX (rezervacije1.png), za sve liste (Rezervacije, Učenici,
   Prisustvo, izveštaji…): ime krupnije i podebljano, roditelj u istom redu svetlije; tekst u ćelijama 14 px i svetliji;
   više vazduha u redu. Ime se prelama samo na razmaku; reč duža od kolone se skraćuje „…" (ceo tekst u oblačiću na
   prelaz mišem — js/puni-tekst.js). */
@media (min-width: 900px) {
  .row > *, .row .side > * { padding-block: 14px; }
  .list .row .who .name {
    font-size: 15px; line-height: 1.4; font-weight: 600; color: var(--color-text);
    white-space: normal; overflow: hidden; text-overflow: ellipsis;
  }
  .list .row .who .name .parent { font-weight: 400; color: var(--color-neutral-400); }
  /* naslov kolone imena sa više sortiranja (Ime · Prezime · Album): prelaze u novi red kad ne staju */
  .thead .h-name { display: flex; flex-wrap: wrap; column-gap: 10px; min-width: 0; }
  .list .row .side > span:not(.c-act, .status, .c-chg, .c-sag, .c-foto, .dim) { font-size: 14px; line-height: 1.4; color: var(--color-neutral-200); }
}

/* Korisnici na užem računaru (900–1199): bez kolone Izmenjeno (vidi se u izmeni korisnika) */
@media (min-width: 900px) and (max-width: 1199.98px) {
  .list:not([class*=" "]) { --cols: minmax(150px, 2.6fr) minmax(100px, .9fr) minmax(104px, 1fr) 124px minmax(96px, .85fr) 84px; }
  .list:not([class*=" "]) .h-chg, .list:not([class*=" "]) .c-chg { display: none !important; }
}
@media (min-width: 900px) and (max-width: 1023.98px) {
  .list:not([class*=" "]) { --cols: minmax(150px, 2.6fr) minmax(100px, .9fr) minmax(104px, 1fr) minmax(96px, .85fr) 84px; }
  .list:not([class*=" "]) .h-tel, .list:not([class*=" "]) .c-tel { display: none !important; }
}

/* Oznaka S = rezervacija naplaćena (bar jedna uplata): lista rezervacija, naslov i kartica rezervacije, uplate. */
.s-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px;
  background: #2f9e55; color: #fff; font-weight: 800; font-size: 12px; line-height: 1; letter-spacing: .02em; vertical-align: middle; flex: none; }
.s-badge.big { min-width: 28px; height: 28px; font-size: 16px; border-radius: 8px; }
