/* Učitelj – stil. Mobilno najprej, zaslon računalnika od 900 px. */
:root {
  --bg: #fbf5ee;
  --surface: #fffdf9;
  --surface-2: #f6ece0;
  --text: #3e3029;
  --muted: #8a7867;
  --line: #ecdfcf;
  --primary: #bf6a4a;
  --primary-ink: #ffffff;
  --primary-soft: #fbe4d8;
  --danger: #c0443a;
  --danger-soft: #fbe2dc;
  --forgot: #96610f;   --forgot-bg: #fdecc9;
  --learning: #4b5fa6; --learning-bg: #e5e9fa;
  --discipline: #ad4259; --discipline-bg: #fbe2e6;
  --praise: #3f7a52;   --praise-bg: #e0f0dc;
  --note: #76658a;     --note-bg: #efe8f3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(110, 70, 40, .07), 0 4px 14px rgba(110, 70, 40, .06);
  --nav-h: 66px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #211b18; --surface: #2b2420; --surface-2: #362d28; --text: #f5ebe1; --muted: #b8a999; --line: #45392f;
    --primary: #f0a47f; --primary-ink: #3a1d10; --primary-soft: #4b3025;
    --danger: #f29a8c; --danger-soft: #472622;
    --forgot: #f2c872; --forgot-bg: #3e3119; --learning: #adbbf3; --learning-bg: #282d4b;
    --discipline: #f4a0ae; --discipline-bg: #4a272e; --praise: #a3d7aa; --praise-bg: #233b29; --note: #d0bbe0; --note-bg: #352a3d;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #211b18; --surface: #2b2420; --surface-2: #362d28; --text: #f5ebe1; --muted: #b8a999; --line: #45392f;
  --primary: #f0a47f; --primary-ink: #3a1d10; --primary-soft: #4b3025;
  --danger: #f29a8c; --danger-soft: #472622;
  --forgot: #f2c872; --forgot-bg: #3e3119; --learning: #adbbf3; --learning-bg: #282d4b;
  --discipline: #f4a0ae; --discipline-bg: #4a272e; --praise: #a3d7aa; --praise-bg: #233b29; --note: #d0bbe0; --note-bg: #352a3d;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; touch-action: pan-x pan-y; } /* brez povečave s prsti in dvojnim dotikom */
body { overflow-x: hidden; }
@supports (overflow: clip) { body { overflow-x: clip; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
h1 { font-size: 1.6rem; margin: 0 0 .25rem; line-height: 1.2; }
h2 { font-size: 1.15rem; margin: 1.4rem 0 .6rem; }
h3 { font-size: 1.02rem; margin: 0 0 .4rem; }
h4 { font-size: .98rem; margin: .8rem 0 .35rem; }
p { margin: 0 0 .6rem; }
a { color: var(--primary); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center-pad { padding: 2rem 1rem; text-align: center; }
.prewrap { white-space: pre-wrap; }

/* ---------- postavitev ---------- */
#app { min-height: 100vh; }
.view-inner { max-width: 880px; margin: 0 auto; }
main#view { padding: 16px 14px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); outline: none; }
.page { display: flex; flex-direction: column; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-lg { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.center { align-items: center; }
.row.wrap { flex-wrap: wrap; }
.gap { gap: 10px; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.nav {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-top: 1px solid var(--line);
}
.brand { display: none; }
.nav-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none;
  color: var(--muted); font-size: .74rem; font-weight: 600;
}
.nav-ic { font-size: 1.4rem; line-height: 1; width: 40px; height: 34px; display: grid; place-items: center; }
.nav-link.on { color: var(--primary); }
.nav-link.accent .nav-ic {
  background: var(--nav-acc, #bf6a4a); color: #fff; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; font-size: 1.7rem; font-weight: 500; line-height: 1; padding-bottom: 3px;
}
@media (min-width: 900px) {
  .nav {
    top: 0; bottom: auto; right: auto; width: 220px; height: 100vh; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
    border-top: 0; border-right: 1px solid var(--line);
  }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; padding: 4px 10px 16px; }
  .nav-link { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 12px; border-radius: 12px; font-size: 1rem; }
  .nav-link.on { background: var(--primary-soft); }
  .nav-link .nav-ic { width: auto; height: auto; }
  .nav-link.accent .nav-ic { width: 1.4em; height: auto; background: none; color: inherit; font-size: 1.5rem; font-weight: 600; padding-bottom: 0; }
  main#view { margin-left: 220px; padding: 28px 32px 60px; }
}

/* ---------- gumbi in obrazci ---------- */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.primary:hover { filter: brightness(1.08); background: var(--primary); }
.btn.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn.big { min-height: 52px; font-size: 1.05rem; width: 100%; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .9rem; border-radius: 10px; }
.btn:disabled, .icon-btn:disabled { opacity: .45; cursor: default; }
.icon-btn {
  appearance: none; border: 0; background: transparent; color: inherit; width: 40px; height: 40px; border-radius: 10px; font-size: 1.25rem; cursor: pointer; flex: none;
  display: inline-flex; align-items: center; justify-content: center; padding: 0; line-height: 1;
}
.icon-btn:hover { background: var(--surface-2); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; }

input[type=text], input[type=email], input[type=search], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px;
}
textarea { resize: vertical; min-height: 70px; }
input[type=date] { width: auto; min-width: 150px; }
input[type=file] { max-width: 100%; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-weight: 700; font-size: .92rem; margin-bottom: 4px; }
.field > .field-label { margin-bottom: 0; }
.hint { color: var(--muted); font-size: .85rem; }
.check { display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; }
.check input { width: 20px; height: 20px; flex: none; }
.check.tiny { font-size: .8rem; min-height: 32px; }
.form-error { color: var(--danger); font-weight: 600; }
.search { flex: 1; min-width: 160px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.card-list { display: flex; flex-direction: column; gap: 10px; }
.card-list.tight { gap: 6px; }
a.card { text-decoration: none; color: inherit; }
.card-title { font-weight: 700; font-size: 1.02rem; color: inherit; text-decoration: none; display: block; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tag { margin-left: 8px; font-size: .72rem; font-weight: 700; background: var(--surface-2); color: var(--muted); padding: 2px 8px; border-radius: 99px; }
.internal-note { background: var(--note-bg); color: var(--note); border-radius: 10px; padding: 8px 12px; font-size: .92rem; }

/* ---------- vrste (barve) ---------- */
.t-forgot { --c: var(--forgot); --cb: var(--forgot-bg); }
.t-ucenje, .t-odnosi, .t-komunikacija, .t-pouk { --c: var(--learning); --cb: var(--learning-bg); }
.t-vedenje { --c: var(--discipline); --cb: var(--discipline-bg); }
.t-pohvale, .t-izboljsanja { --c: var(--praise); --cb: var(--praise-bg); }
.t-splosno { --c: var(--note); --cb: var(--note-bg); }
/* lastne kategorije (c1, c2 …) */
[class^="t-c"], [class*=" t-c"] { --c: var(--primary); --cb: var(--primary-soft); }
.chip-group { margin: 2px 0 10px; }
.grp-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.grp-tab { appearance: none; font: inherit; font-size: .85rem; font-weight: 700; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.grp-tab.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.grp-tab .badge { position: static; }
.trk-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto 18px; gap: 8px; align-items: center; }
.trk-row.tk { grid-template-columns: minmax(0, 1fr) auto 18px; }
.trk-name { font-weight: 700; }
.trk-row .seg { flex-wrap: wrap; overflow: visible; }
.trk-row .seg-btn { min-height: 36px; padding: 0 10px; font-size: .9rem; }
.bz-badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 800; background: var(--praise-bg); color: var(--praise); vertical-align: middle; white-space: nowrap; }
.student-h1 .bz-badge { font-size: .8rem; }
.trk-row.bz { grid-template-columns: 100px minmax(0, 1fr) 150px 18px; }
.tag.ok { background: var(--praise-bg); color: var(--praise); }
.cat-card > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; list-style: none; font-weight: 800; font-size: 1.05rem; }
.cat-card > summary::-webkit-details-marker { display: none; }
.cat-card > summary::after { content: '▾'; color: var(--muted); margin-left: 6px; }
.cat-card[open] > summary { margin-bottom: 10px; }
.cat-card[open] > summary::after { content: '▴'; }
.cat-sum { flex: 1; }
@media (max-width: 600px) {
  .trk-row { grid-template-columns: 1fr auto 18px; }
  .trk-row .trk-name { grid-column: 1 / -1; }
  .trk-row.tk { grid-template-columns: minmax(0, 1fr) 18px; }
  .trk-row.bz { grid-template-columns: minmax(0, 1fr) 140px 18px; }
  .trk-row.bz .trk-name { grid-column: 1 / -1; margin-bottom: -4px; }
  .trk-row.tk .seg { grid-column: 1; }
}
.chip-group-title { font-size: .82rem; font-weight: 700; color: var(--muted); margin: 6px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.cat-grp > .btn { margin-top: 10px; }
.icon-in::placeholder { color: var(--muted); opacity: .45; font-size: 1.1rem; }
.cat-grp-title { font-size: .95rem; margin: 14px 0 6px; color: var(--muted); }
.t-note { --c: var(--note); --cb: var(--note-bg); }

.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: var(--cb); color: var(--c);
  font-weight: 600; font-size: .9rem; border: 0; font-family: inherit; text-align: left;
}
.pill.clickable { cursor: pointer; min-height: 34px; }
.pill-area { font-weight: 500; opacity: .85; }
.pill-area::before { content: '· '; }
.sev { letter-spacing: 1px; font-size: .7rem; }
.note-line { margin: 6px 0 0; font-size: .92rem; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.stat { background: var(--cb); color: var(--c); border-radius: 12px; padding: 10px 12px; }
.stat.zero { opacity: .55; }
.stat-n { font-size: 1.35rem; font-weight: 800; }
.stat-l { font-size: .8rem; font-weight: 600; }
.mini-counts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mc { background: var(--cb); color: var(--c); padding: 2px 8px; border-radius: 99px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.mc.zero { opacity: .4; }

.row-card { display: flex; align-items: center; gap: 12px; }
.row-card.inactive { opacity: .6; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; flex: none; }
.alert { border-left: 5px solid var(--c, var(--line)); }
.alert-line + .alert-line { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.alert.k-forgot { --c: var(--forgot); }
.alert.k-vedenje { --c: var(--discipline); }

.date-nav { display: flex; align-items: center; gap: 6px; }
.date-title { min-width: 150px; }
.date-main { font-size: 1.25rem; font-weight: 800; text-transform: capitalize; }

/* ---------- hitri vnos ---------- */
.entry-form { gap: 14px; }
.type-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.type-tab { min-width: 0; overflow: hidden; }
.type-tab > span { max-width: 100%; text-align: center; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) { .type-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* vnos: samo navpično drsenje (brez vodoravnega premikanja in povečave) */
.entry-form { touch-action: pan-y; max-width: 100%; overflow-x: clip; }
.type-tab {
  appearance: none; border: 2px solid transparent; background: var(--cb); color: var(--c); border-radius: 12px; padding: 8px 2px; font: inherit; font-size: .74rem; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; opacity: .7;
}
.type-tab.on { opacity: 1; border-color: var(--c); }
.type-ic { font-size: 1.35rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  appearance: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border-radius: 99px; border: 2px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.chip-ic { font-size: 1.25rem; }
.chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.student-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.stu {
  appearance: none; position: relative; min-height: 50px; padding: 6px 8px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; text-align: center; line-height: 1.15;
}
.stu.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.badge { position: absolute; top: -6px; right: -6px; background: var(--forgot); color: #fff; border-radius: 99px; font-size: .7rem; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; }
.save-btn { position: sticky; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); z-index: 5; }
.dlg .save-btn { bottom: 0; }
@media (min-width: 900px) { .save-btn { bottom: 14px; } }

/* ---------- zavihki ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
.tab { padding: 10px 12px; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tab.on { color: var(--primary); border-color: var(--primary); }
.tab-body { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.toolbar select { width: auto; }
.student-h1 { margin-top: 6px; }

.seg { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.seg-btn { appearance: none; border: 2px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; min-height: 40px; padding: 0 14px; font: inherit; font-weight: 700; cursor: pointer; flex: none; }
.seg-btn.on { border-color: var(--c, var(--primary)); background: var(--cb, var(--primary-soft)); color: var(--c, var(--primary)); }

/* ---------- zgodovina ---------- */
.month-h { text-transform: capitalize; margin: 14px 0 6px; }
.hist-row { appearance: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font: inherit; color: inherit; cursor: pointer; }
.hist-note { color: var(--muted); font-size: .92rem; flex: 1 1 200px; }
.ln-date { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 52px; font-size: .9rem; flex: none; }

/* ---------- list (povzetek / tisk) ---------- */
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.sheet-head { border-bottom: 2px solid var(--primary); padding-bottom: 10px; margin-bottom: 14px; }
.sheet-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 800; color: var(--primary); }
.sheet-name { font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.sheet-sub { color: var(--muted); font-size: .92rem; }
.sheet-foot { margin-top: 18px; font-size: .78rem; color: var(--muted); text-align: center; }
.sec { margin-top: 18px; }
.sec h3 { font-size: 1.1rem; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.sec.good h3 { color: var(--praise); }
.sec.improve h3 { color: var(--forgot); }
.sub { margin-top: 12px; }
.tally, .lines { list-style: none; padding: 0; margin: 4px 0 8px; }
.tally li { padding: 2px 0; }
.lines li { display: flex; gap: 8px; padding: 3px 0; border-bottom: 1px dotted var(--line); }
.ln-text { flex: 1; }
.ln-note { color: var(--muted); }
.area-block { margin-bottom: 8px; }
.area-name { font-weight: 700; }
.talk-print { white-space: pre-wrap; }
.print-only { display: none; }

/* ---------- konec leta ---------- */
.area-card { display: flex; flex-direction: column; gap: 10px; }
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.lvl { appearance: none; border: 2px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; min-height: 44px; padding: 4px 6px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; line-height: 1.1; }
.lvl.lv4.on, .lvl-tag.lv4 { background: var(--praise-bg); border-color: var(--praise); color: var(--praise); }
.lvl.lv3.on, .lvl-tag.lv3 { background: var(--learning-bg); border-color: var(--learning); color: var(--learning); }
.lvl.lv2.on, .lvl-tag.lv2 { background: var(--forgot-bg); border-color: var(--forgot); color: var(--forgot); }
.lvl.lv1.on, .lvl-tag.lv1 { background: var(--discipline-bg); border-color: var(--discipline); color: var(--discipline); }
.lvl-tag { display: inline-block; margin-left: 10px; font-size: .8rem; padding: 2px 10px; border-radius: 99px; border: 1px solid; vertical-align: middle; }
.ev-details summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.sign-row { display: flex; justify-content: space-between; gap: 20px; margin-top: 40px; font-size: .95rem; }

/* ---------- pogovorna okna ---------- */
.dlg { border: 0; padding: 0; border-radius: 18px; width: min(560px, calc(100vw - 16px)); max-height: 92vh; background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.dlg.wide { width: min(780px, calc(100vw - 16px)); }
.dlg::backdrop { background: rgba(10, 20, 20, .5); }
.dlg-inner { display: flex; flex-direction: column; max-height: 92vh; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 8px 18px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { margin: 0; font-size: 1.1rem; }
.dlg-body { padding: 16px 18px 20px; overflow-y: auto; }
@media (max-width: 700px) {
  .dlg, .dlg.wide { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 18px 18px 0 0; max-height: 94vh; }
  .dlg-inner { max-height: 94vh; }
}

.toast { position: fixed; z-index: 100; left: 50%; transform: translate(-50%, 30px); bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); max-width: min(94vw, 480px);
  background: #22302f; color: #fff; padding: 12px 16px; border-radius: 12px; display: flex; gap: 14px; align-items: center; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.error { background: #8e2b22; }
.toast-btn { appearance: none; border: 0; background: transparent; color: #ffd36b; font: inherit; font-weight: 800; cursor: pointer; padding: 4px 6px; }
@media (min-width: 900px) { .toast { bottom: 24px; } }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.tbl { border-collapse: collapse; width: 100%; font-size: .9rem; }
.tbl th, .tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; min-width: 110px; }
.tbl th select { min-height: 38px; font-size: 14px; }
.cat-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 6px; align-items: center; touch-action: pan-y; -webkit-touch-callout: none; background: var(--surface); border-radius: 12px; }
.cat-item { position: relative; overflow: hidden; border-radius: 12px; touch-action: pan-y; }
.cat-swipe-del { position: absolute; top: 0; right: 0; bottom: 0; width: 88px; border: 0; background: #d92d20; color: #fff; font: inherit; font-weight: 700; border-radius: 0 12px 12px 0; cursor: pointer; }
.cat-row { position: relative; z-index: 1; will-change: transform; }
.cat-swipe-del { visibility: hidden; }
.cat-item.sw .cat-swipe-del { visibility: visible; }
input[type=text]:focus, input[type=email]:focus, input[type=number]:focus, input[type=password]:focus, input[type=search]:focus, input:not([type]):focus, select:focus, textarea:focus, .cat-row input:focus-visible, .cat-row input:focus { outline: 2px solid color-mix(in srgb, var(--primary) 70%, transparent); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .cat-swipe-del { display: none; } }
.cat-item.lift { z-index: 5; overflow: visible; box-shadow: 0 8px 24px rgba(0,0,0,.28); transform-origin: center; background: var(--surface-2); outline: 2px solid var(--primary); user-select: none; -webkit-user-select: none; }
.cat-item.lift input { pointer-events: none; }
.cat-handle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 44px; font-size: 22px; line-height: 1; color: var(--muted); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.cat-item.lift .cat-swipe-del { display: none; }
.cat-desk { display: none; }
.icon-in { text-align: center; padding-left: 4px; padding-right: 4px; }
@media (max-width: 600px) {
  .cat-row { grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 6px; }
  .cat-row .check span { display: none; }
  .cat-row .check { padding: 0 4px; }
  .cat-row input[type=text] { min-width: 0; padding-left: 8px; padding-right: 4px; font-size: 16px; }
  .cat-row .icon-in { padding-left: 2px; padding-right: 2px; }
}

/* miška (namizje): puščice in koš, brez potegov */
@media (hover: hover) and (pointer: fine) {
  .cat-row, .cat-row { grid-template-columns: 56px minmax(0, 1fr) auto auto auto auto; }
  .cat-row .check span { display: inline; }
  .cat-desk { display: inline-flex; }
  .cat-handle { display: none; }
}
@media (hover: hover) and (pointer: fine) and (max-width: 600px) {
  .cat-row { grid-template-columns: 40px minmax(0, 1fr) auto auto auto auto; gap: 4px; }
  .cat-row .check span { display: none; }
  .cat-row .icon-btn { width: 32px; min-width: 32px; }
  .cat-swipe-del { display: none; }
}

/* ---------- prijava ---------- */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px 24px; box-shadow: var(--shadow); text-align: center; display: flex; flex-direction: column; gap: 8px; }
.login-card form { display: flex; flex-direction: column; gap: 10px; text-align: left; margin: 10px 0; }
.login-card label { font-weight: 700; }
.login-card h1 { margin: 0; }
.login-logo { align-self: center; border-radius: 18px; }

/* ---------- tisk / PDF ---------- */
@media print {
  @page { size: A4; margin: 14mm 14mm 18mm; }
  :root { --bg: #fff; --surface: #fff; --surface-2: #f2f2f2; --text: #111; --muted: #555; --line: #cfcfcf; --primary: #8a4a30;
    --forgot: #8a5300; --forgot-bg: #fff3d4; --learning: #1d4f99; --learning-bg: #e2edfb; --discipline: #a3281e; --discipline-bg: #fde8e6; --praise: #1d6b40; --praise-bg: #ddf3e6; --note: #444; --note-bg: #eee; color-scheme: light; }
  body { background: #fff; font-size: 11pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .nav, .noprint, .toast, dialog, .tabs { display: none !important; }
  main#view { margin: 0 !important; padding: 0 !important; }
  .view-inner { max-width: none; }
  .print-only { display: block !important; }
  .sheet { border: 0; box-shadow: none; padding: 0; border-radius: 0; }
  .area-block, .sub { break-inside: avoid; }
  .sec h3 { break-after: avoid; }
  .sec li { break-inside: avoid; }
  .sheet-name { font-size: 20pt; }
  textarea { display: none !important; }
  .sheet-foot { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; font-size: 8.5pt; color: #666; text-align: center; }
}


/* izdelava PDF na iPhonu/iPadu (skrita postavitev širine A4) */
.pdf-stage { position: absolute; left: -10000px; top: 0; width: 700px; }
.pdf-mode { --bg: #fff; --surface: #fff; --surface-2: #f2f2f2; --text: #111; --muted: #555; --line: #cfcfcf; --primary: #8a4a30;
  --forgot: #8a5300; --forgot-bg: #fff3d4; --learning: #1d4f99; --learning-bg: #e2edfb; --discipline: #a3281e; --discipline-bg: #fde8e6; --praise: #1d6b40; --praise-bg: #ddf3e6; --note: #444; --note-bg: #eee;
  color-scheme: light; background: #fff; color: var(--text); font-size: 14.5px; }
.pdf-mode .print-only { display: block !important; }
.pdf-mode .sheet { border: 0; box-shadow: none; padding: 0; border-radius: 0; background: #fff; }
.pdf-mode .sheet-name { font-size: 26px; }

/* preklop teme */
.theme-seg { display: flex; gap: 8px; flex-wrap: wrap; }

/* prijava s Face ID */
.or-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 4px 0; }
.or-sep::before, .or-sep::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.pk-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* sinhronizacija */
.syncbar {
  position: fixed; z-index: 90; top: calc(8px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  max-width: min(94vw, 560px); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-size: .82rem; font-weight: 700; line-height: 1.25;
  box-shadow: 0 2px 10px rgba(110, 70, 40, .18); cursor: pointer; text-align: center;
}
.syncbar.warn { background: var(--forgot-bg); color: var(--forgot); border-color: var(--forgot); }
.syncbar.off { background: var(--note-bg); color: var(--note); }
.syncbar.info { background: var(--learning-bg); color: var(--learning); }
@media (min-width: 900px) { .syncbar { left: calc(50% + 110px); } }

/* ---- več uporabnikov ---- */
.wsbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin: 0 0 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; font-weight: 700; }
.wsbar.collab { background: var(--accent-soft, var(--surface-2)); border-color: var(--accent, var(--line)); }
.wsbar select { flex: 1 1 200px; min-width: 0; }
.user-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.user-row.inactive { opacity: .6; }
.cred { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; }
input.mono { font-size: 1rem; }
@media print { .wsbar { display: none !important; } }

/* zavihki učenca na ozkem zaslonu: vsi štirje vidni */
@media (max-width: 600px) { .tabs { gap: 0; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; } .tab { flex: 0 0 auto; padding: 10px 9px; font-size: .9rem; } }

/* ---------- barvne palete (Nastavitve → Barvna paleta); odtenki so izpeljani iz privzete terakote z drugim barvnim tonom ---------- */
:root { --nav-acc: #bf6a4a; }
:root[data-accent="modra"] { --bg: #eef3fb; --surface: #f9fcff; --surface-2: #e0e9f6; --text: #29323e; --muted: #67768a; --line: #cfdbec; --primary: #4a7bbf; --primary-soft: #d8e7fb; --primary-ink: #ffffff; --nav-acc: #4a7bbf; }
:root[data-accent="morska"] { --bg: #eefbfb; --surface: #f9ffff; --surface-2: #e0f6f6; --text: #293e3e; --muted: #678a8a; --line: #cfecec; --primary: #318b8b; --primary-soft: #d8fbfb; --primary-ink: #ffffff; --nav-acc: #318b8b; }
:root[data-accent="zelena"] { --bg: #effaf3; --surface: #f9fffb; --surface-2: #e1f5e8; --text: #2a3d30; --muted: #698873; --line: #d0ebd9; --primary: #3a9257; --primary-soft: #daf9e4; --primary-ink: #ffffff; --nav-acc: #3a9257; }
:root[data-accent="vijolicna"] { --bg: #f4eefb; --surface: #fcf9ff; --surface-2: #eae0f6; --text: #33293e; --muted: #77678a; --line: #ddcfec; --primary: #814abf; --primary-soft: #e8d8fb; --primary-ink: #ffffff; --nav-acc: #814abf; }
:root[data-accent="roza"] { --bg: #fbeef3; --surface: #fff9fc; --surface-2: #f6e0e9; --text: #3e2932; --muted: #8a6776; --line: #eccfdb; --primary: #bf4a7b; --primary-soft: #fbd8e7; --primary-ink: #ffffff; --nav-acc: #bf4a7b; }
:root[data-accent="grafit"] { --bg: #f3f4f6; --surface: #fbfcfd; --surface-2: #e9ebed; --text: #323335; --muted: #75787c; --line: #dbdde0; --primary: #77808d; --primary-soft: #e6e9ed; --primary-ink: #ffffff; --nav-acc: #77808d; }
@media (prefers-color-scheme: dark) { :root[data-accent="modra"]:not([data-theme="light"]) { --bg: #181c21; --surface: #20252b; --surface-2: #282e36; --text: #e1e9f5; --muted: #99a6b8; --line: #2f3845; --primary: #7faef0; --primary-ink: #10213a; --primary-soft: #25354b; --nav-acc: #4a7bbf; } }
:root[data-accent="modra"][data-theme="dark"] { --bg: #181c21; --surface: #20252b; --surface-2: #282e36; --text: #e1e9f5; --muted: #99a6b8; --line: #2f3845; --primary: #7faef0; --primary-ink: #10213a; --primary-soft: #25354b; --nav-acc: #4a7bbf; }
@media (prefers-color-scheme: dark) { :root[data-accent="morska"]:not([data-theme="light"]) { --bg: #182121; --surface: #202b2b; --surface-2: #283636; --text: #e1f5f5; --muted: #99b8b8; --line: #2f4545; --primary: #7ff0f0; --primary-ink: #103a3a; --primary-soft: #254b4b; --nav-acc: #318b8b; } }
:root[data-accent="morska"][data-theme="dark"] { --bg: #182121; --surface: #202b2b; --surface-2: #283636; --text: #e1f5f5; --muted: #99b8b8; --line: #2f4545; --primary: #7ff0f0; --primary-ink: #103a3a; --primary-soft: #254b4b; --nav-acc: #318b8b; }
@media (prefers-color-scheme: dark) { :root[data-accent="zelena"]:not([data-theme="light"]) { --bg: #18211b; --surface: #212a24; --surface-2: #29352d; --text: #e2f4e8; --muted: #9bb6a4; --line: #304437; --primary: #85eaa7; --primary-ink: #12381f; --primary-soft: #274932; --nav-acc: #3a9257; } }
:root[data-accent="zelena"][data-theme="dark"] { --bg: #18211b; --surface: #212a24; --surface-2: #29352d; --text: #e2f4e8; --muted: #9bb6a4; --line: #304437; --primary: #85eaa7; --primary-ink: #12381f; --primary-soft: #274932; --nav-acc: #3a9257; }
@media (prefers-color-scheme: dark) { :root[data-accent="vijolicna"]:not([data-theme="light"]) { --bg: #1c1821; --surface: #25202b; --surface-2: #2f2836; --text: #eae1f5; --muted: #a799b8; --line: #392f45; --primary: #b47ff0; --primary-ink: #24103a; --primary-soft: #37254b; --nav-acc: #814abf; } }
:root[data-accent="vijolicna"][data-theme="dark"] { --bg: #1c1821; --surface: #25202b; --surface-2: #2f2836; --text: #eae1f5; --muted: #a799b8; --line: #392f45; --primary: #b47ff0; --primary-ink: #24103a; --primary-soft: #37254b; --nav-acc: #814abf; }
@media (prefers-color-scheme: dark) { :root[data-accent="roza"]:not([data-theme="light"]) { --bg: #21181c; --surface: #2b2025; --surface-2: #36282e; --text: #f5e1e9; --muted: #b899a6; --line: #452f38; --primary: #f07fae; --primary-ink: #3a1021; --primary-soft: #4b2535; --nav-acc: #bf4a7b; } }
:root[data-accent="roza"][data-theme="dark"] { --bg: #21181c; --surface: #2b2025; --surface-2: #36282e; --text: #f5e1e9; --muted: #b899a6; --line: #452f38; --primary: #f07fae; --primary-ink: #3a1021; --primary-soft: #4b2535; --nav-acc: #bf4a7b; }
@media (prefers-color-scheme: dark) { :root[data-accent="grafit"]:not([data-theme="light"]) { --bg: #1c1c1d; --surface: #252526; --surface-2: #2e2f30; --text: #e9ebed; --muted: #a6a8ab; --line: #383a3c; --primary: #adb6c2; --primary-ink: #212429; --primary-soft: #35373b; --nav-acc: #77808d; } }
:root[data-accent="grafit"][data-theme="dark"] { --bg: #1c1c1d; --surface: #252526; --surface-2: #2e2f30; --text: #e9ebed; --muted: #a6a8ab; --line: #383a3c; --primary: #adb6c2; --primary-ink: #212429; --primary-soft: #35373b; --nav-acc: #77808d; }
.accent-seg { display: flex; flex-wrap: wrap; gap: 10px; }
.accent-btn { appearance: none; border: 2px solid var(--line); background: var(--surface); color: var(--text); border-radius: 12px; padding: 6px 10px 6px 6px; display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; cursor: pointer; }
.accent-btn.on { border-color: var(--primary); background: var(--primary-soft); }
.accent-dot { width: 26px; height: 26px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 3px rgba(255,255,255,.55); }

/* ---------- zaklep s PIN-om ---------- */
html.locked #app, html.locked #toast { visibility: hidden; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.pin-dlg { border: 0; padding: 22px 18px 18px; border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); width: min(340px, calc(100vw - 24px)); max-height: 100dvh; overflow-y: auto; }
.pin-dlg::backdrop { background: rgba(10, 20, 20, .55); }
.pin-dlg.lock-screen { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border-radius: 0; box-shadow: none; background: var(--bg);
  padding: max(24px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); }
.pin-dlg.lock-screen[open] { display: flex; align-items: center; justify-content: center; }
.pin-dlg.lock-screen::backdrop { background: var(--bg); }
.pin-box { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; width: 100%; max-width: 320px; margin: 0 auto; }
.pin-box h2 { margin: 4px 0 0; font-size: 1.2rem; }
.pin-sub { margin: 0; }
.pin-logo { border-radius: 14px; }
.pin-dots { display: flex; gap: 14px; justify-content: center; min-height: 22px; margin: 10px 0 2px; }
.pin-dots span { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--primary); transition: background .12s; }
.pin-dots span.on { background: var(--primary); }
.pin-dots.shake { animation: pin-shake .4s; }
@keyframes pin-shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
@media (prefers-reduced-motion: reduce) { .pin-dots.shake { animation: none; } }
.pin-msg { min-height: 1.3em; margin: 0; color: var(--danger); font-size: .92rem; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 74px); gap: 14px 22px; justify-content: center; margin: 4px 0 6px; }
.pin-key { width: 74px; height: 74px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-size: 1.7rem; font-weight: 500;
  display: flex; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.pin-key:active, .pin-key.down { background: var(--primary-soft); }
.pin-key.pin-del.down, .pin-key.pin-face.down { background: var(--surface-2); }
.pin-key.pin-ok.down { filter: brightness(1.12); }
.pin-key.pin-del, .pin-key.pin-face { background: transparent; border-color: transparent; font-size: 1.5rem; }
.pin-key.pin-ok { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.pin-key.pin-ok:disabled { opacity: .35; cursor: default; }
@media (max-height: 640px) { .pin-pad { grid-template-columns: repeat(3, 64px); gap: 10px 20px; } .pin-key { width: 64px; height: 64px; font-size: 1.5rem; } .pin-logo { display: none; } }
.pin-box:focus { outline: none; }

/* tekmovanja: izbira priznanja */
.seg.tk-award { flex-wrap: wrap; overflow: visible; }
.seg.tk-award .seg-btn { min-height: 38px; padding: 0 12px; }
.seg.tk-award + input { margin-top: 8px; }
.tk-date { max-width: 220px; }

/* ---------- najem, registracija, plačilo ---------- */
.tag.bad { background: var(--danger-soft); color: var(--danger); }
.tag.warn { background: var(--forgot-bg); color: var(--forgot); }
.trial-bar { position: sticky; top: calc(env(safe-area-inset-top) + 6px); z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin: 0 0 12px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--forgot-bg); color: var(--forgot); text-decoration: none; font-size: .9rem; font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.trial-bar.urgent { background: var(--danger-soft); color: var(--danger); }
.trial-pay { flex: none; background: var(--primary); color: var(--primary-ink); padding: 8px 12px; border-radius: 10px; font-weight: 700; white-space: nowrap; }
.login-card.wide-card, .login-card.pay-card { width: min(460px, 100%); }
.login-card .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.login-card .check.terms { align-items: flex-start; font-weight: 400; text-align: left; }
.login-card .check.terms input { margin-top: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.center-link { text-align: center; }
.inline-form { display: inline; margin: 0; }
.login-card form.inline-form { display: inline; margin: 0; }
.form-ok { color: var(--praise); font-weight: 600; background: var(--praise-bg); padding: 10px 12px; border-radius: 12px; }
.pay-state { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); text-align: left; }
.pay-state.locked { background: var(--danger-soft); color: var(--danger); }
.pay-state.ok { background: var(--praise-bg); color: var(--praise); }
.pay-state.trial { background: var(--forgot-bg); color: var(--forgot); }
.pay-price { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 6px 0 4px; }
.pay-amount { font-size: 2.4rem; font-weight: 800; line-height: 1.1; }
.upn { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.upn canvas { width: 231px; height: 231px; max-width: 100%; image-rendering: pixelated; border-radius: 8px; border: 1px solid var(--line); }
.upn-data { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; text-align: left; margin: 4px 0; width: 100%; }
.upn-data dt { color: var(--muted); font-weight: 600; }
.upn-data dd { margin: 0; overflow-wrap: anywhere; }
.upn-data .btn.small { min-height: 30px; padding: 0 10px; margin-left: 6px; }
.pay-links { justify-content: center; margin-top: 8px; }
@media (max-width: 420px) { .login-card .grid2 { grid-template-columns: 1fr; } }
.user-row > .grow { flex: 1 1 240px; min-width: 0; }
.user-row > .row { flex: 0 1 auto; }
.user-row select { width: auto; min-width: 150px; }

/* ---------- urejanje kategorij ---------- */
.cat-head { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.cat-head-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; align-items: center; }
.cat-head-row input:last-child { font-weight: 700; }
.cat-card.is-hidden > summary { opacity: .6; }
.grp-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; margin: 10px 0 6px; }
.grp-head .grp-ic { color: var(--muted); }
.grp-head .grp-name { font-weight: 700; }
.new-grp { margin-top: 6px; }
.new-grp input { flex: 1; min-width: 0; }

/* ---------- lastna plačilna stran (Stripe Elements) ---------- */
.login-card.co { gap: 14px; text-align: left; }
.co-top { display: flex; align-items: center; gap: 10px; }
.co-back { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 1.2rem; }
.co-back:hover { background: var(--surface-2); color: var(--text); }
.co-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.co-brand img { border-radius: 8px; }
.co-secure { margin-left: auto; font-size: .8rem; font-weight: 700; color: var(--praise); background: var(--praise-bg); padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.co-sum { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px; border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-soft), var(--surface-2)); }
.co-ic { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 4px 12px rgba(110, 70, 40, .18); }
.co-what { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.co-what strong { font-size: 1.02rem; }
.co-what span { color: var(--muted); font-size: .85rem; }
.co-amt { font-size: 1.6rem; font-weight: 800; white-space: nowrap; }
.co-who { margin: -4px 0 0; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.co-who strong { color: var(--text); font-weight: 600; }
.co-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.co-pay { min-height: 200px; position: relative; }
.co-pay.ready { min-height: 0; }
.co-pay.ready .co-skel { display: none; }
.co-skel { display: flex; flex-direction: column; gap: 12px; }
.co-skel i { display: block; height: 48px; border-radius: 12px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: co-shimmer 1.3s ease-in-out infinite; }
.co-skel i:nth-child(2) { width: 70%; }
@keyframes co-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.co-loading { text-align: center; margin: 10px 0 0; }
.co-btn { position: relative; width: 100%; min-height: 54px; font-size: 1.08rem; }
.co-btn[disabled] { opacity: .55; cursor: not-allowed; }
.co-spin { display: none; width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: co-rot .7s linear infinite; margin-right: 8px; vertical-align: -3px; }
.co-btn.busy .co-spin { display: inline-block; }
.co-btn.busy { opacity: .85; }
@keyframes co-rot { to { transform: rotate(360deg); } }
.co-trust { list-style: none; margin: 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; border-radius: 12px; background: var(--surface-2); font-size: .88rem; }
.co-alt { text-align: center; margin: 0; }
@media (max-width: 380px) { .co-sum { grid-template-columns: auto 1fr; } .co-amt { grid-column: 1 / -1; text-align: right; } }
@media (prefers-reduced-motion: reduce) { .co-skel i, .co-spin { animation: none; } }

/* ---------- spol učenca ---------- */
.gender-pick { display: flex; gap: 8px; }
.g-btn { flex: 1; min-height: 44px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.g-btn.on.g-m { border-color: var(--learning); background: var(--learning-bg); color: var(--learning); }
.g-btn.on.g-f { border-color: var(--discipline); background: var(--discipline-bg); color: var(--discipline); }
.gender-pick.compact { flex: none; gap: 6px; }
.gender-pick.compact .g-btn { flex: none; width: 44px; min-height: 38px; padding: 0; }
.imp-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; padding-right: 2px; }
.imp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.imp-name { min-width: 0; overflow-wrap: anywhere; }
.imp-file summary { cursor: pointer; font-weight: 600; }
.pick-hint { margin: 0; padding: 14px; border-radius: 14px; background: var(--surface-2); color: var(--muted); text-align: center; font-weight: 600; }
.g-missing { display: flex; flex-direction: column; gap: 8px; }
.rule-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.rule-row select { flex: 1 1 160px; width: auto; }
.rule-num { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); }
.rule-num input { width: 68px; text-align: center; }
/* vnos: izbira učencev – zračnejša glava, iskanje in mreža */
.stu-box { display: flex; flex-direction: column; gap: 10px; }
.stu-box .search { flex: none; min-height: 46px; }
.stu-box > .row { flex-wrap: wrap; row-gap: 8px; }
@media (max-width: 430px) and (min-width: 401px), (max-width: 340px) { .type-tab > span:not(.type-ic) { font-size: .68rem; letter-spacing: -.01em; } }
