/* Helpdesk DVO – dizajn manuál DVO (Exo 2 nadpisy, Inter text, oranžová DVO len na akcie a aktívny stav),
   bočné menu so skupinami (Práca, Klienti, CMDB, Financie, Nastavenia) */
:root {
  --paper: #F3F3F2; --surface: #FFFFFF; --sunk: #F8F8F7; --ink: #262626; --muted: #616161; --line: #DDDDDB;
  --brand: #FF7B21; --brand-ink: #1E1E1E; --link: #B24700;
  --green: #11764A; --green-bg: #E1F2E9; --amber: #7A5F00; --amber-bg: #FFF4C2;
  --red: #B42318; --red-bg: #FDECEA; --violet: #5B3E96; --violet-bg: #EEE8F8; --note: #FFF8DB; --note-line: #E2B40A;
  --sans: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --cond: "Exo 2", "Segoe UI", system-ui, sans-serif;
  --side-w: 264px;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  /* staré názvy premenných používané v šablónach */
  --text: var(--ink); --border: var(--line); --bg: var(--paper); --primary: var(--link); --primary-weak: #FFEBDD;
  --danger: var(--red); --danger-weak: var(--red-bg); --gray-weak: var(--sunk);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #161616; --surface: #202020; --sunk: #1B1B1B; --ink: #EDEDED; --muted: #A8A8A8; --line: #363636;
  --link: #FF9A52; --green: #43B883; --green-bg: #173327; --amber: #E8C23C; --amber-bg: #3A3210;
  --red: #F07260; --red-bg: #3A1C19; --violet: #B9A2F0; --violet-bg: #2A2340; --note: #2E2914; --note-line: #C9A227;
  --primary-weak: #3A2512; color-scheme: dark; } }
:root[data-theme="dark"] {
  --paper: #161616; --surface: #202020; --sunk: #1B1B1B; --ink: #EDEDED; --muted: #A8A8A8; --line: #363636;
  --link: #FF9A52; --green: #43B883; --green-bg: #173327; --amber: #E8C23C; --amber-bg: #3A3210;
  --red: #F07260; --red-bg: #3A1C19; --violet: #B9A2F0; --violet-bg: #2A2340; --note: #2E2914; --note-line: #C9A227;
  --primary-weak: #3A2512; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--cond); line-height: 1.15; text-wrap: balance; }
h1 { font-size: 1.85rem; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 8px; font-family: var(--sans); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono, .ref { font-family: var(--mono); font-size: .78rem; color: var(--muted); white-space: nowrap; font-weight: 400; }
code { font-family: var(--mono); font-size: .8rem; background: var(--sunk); border: 1px solid var(--line); padding: 0 4px; border-radius: 4px; }

/* --- rozloženie: bočné menu + obsah -------------------------------------- */
.wrap { max-width: 1280px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shell { display: flex; min-height: 100vh; }
.content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.main { padding: 24px 32px 64px; width: 100%; max-width: 1360px; }
.logo { height: 30px; width: auto; display: block; flex: none; }
.logo-d { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-l { display: none; } :root:not([data-theme="light"]) .logo-d { display: block; } }
:root[data-theme="dark"] .logo-l { display: none; } :root[data-theme="dark"] .logo-d { display: block; }

.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; flex: 0 0 var(--side-w); width: var(--side-w);
  display: flex; flex-direction: column; gap: 2px; padding: 12px 12px 12px; background: var(--surface); border-right: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  scrollbar-width: thin; z-index: 30; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 2px 4px 10px; }
.side-label { font: 600 .7rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.brandbar { display: flex; justify-content: center; padding: 18px 32px 14px; background: var(--surface); border-top: 4px solid var(--brand); }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand .logo { height: 36px; }
.side-logo { display: flex; align-items: center; min-width: 0; padding-left: 4px; text-decoration: none; }
.side-logo .logo { height: 32px; max-width: 170px; }
.topbar-logo { display: none; text-decoration: none; }
.topbar-logo .logo { height: 24px; }
.side-app { font: 700 1.25rem/1 var(--cond); padding: 0 4px 12px; }
.side-btn { width: 36px; height: 36px; flex: none; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.side-btn:hover { background: var(--sunk); }
.side-close, .side-open { display: none; }
.side-search { position: relative; margin: 0 0 4px; }
.side-search .ico { position: absolute; left: 10px; top: 10px; width: 18px; height: 18px; color: var(--muted); }
.side-search input[type=search] { width: 100%; height: 38px; border: 1px solid var(--muted); border-radius: 4px; padding: 0 10px 0 36px; background: var(--surface); font-size: .9rem; }
.grp-h { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 12px 6px; border: 0; background: transparent;
  font: 600 .7rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.grp-h .ico { width: 12px; height: 12px; transition: transform .15s; }
.grp.closed .grp-h .ico { transform: rotate(-90deg); }
.grp:not(:has(a.it)) { display: none; }   /* skupina bez dostupnej položky sa nezobrazí */
.grp-h[draggable=true] { cursor: grab; }
.grp.dragging { opacity: .45; }
.grp.drop-before { box-shadow: 0 -2px 0 var(--brand); }
.grp.drop-after { box-shadow: 0 2px 0 var(--brand); }
.grp.closed .grp-b { display: none; }
.grp-b { display: flex; flex-direction: column; gap: 2px; }
.it { position: relative; display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 0 12px; border-radius: 8px; color: var(--ink);
  font-weight: 500; font-size: .92rem; line-height: 1.2; text-decoration: none; }
.it:hover { background: var(--sunk); color: var(--ink); text-decoration: none; }
.it.on { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.it.on:hover { background: var(--brand); }
.it .ico { flex: none; }
.it .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it.soon { opacity: .55; cursor: default; }
.it.soon:hover { background: transparent; }
.cnt { font: 600 .7rem/1 var(--sans); min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--sunk); border: 1px solid var(--line); color: var(--ink); font-variant-numeric: tabular-nums; }
.cnt.hot { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.it.on .cnt { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.tag-soon { font: 600 .62rem/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; padding: 3px 6px; border-radius: 4px; border: 1px solid currentColor; }
.dot { display: none; position: absolute; top: 7px; right: 12px; width: 8px; height: 8px; border-radius: 4px; background: var(--brand); }
.side-fill { flex: 1 1 auto; min-height: 16px; }
.side-foot { position: sticky; bottom: -12px; margin: 0 -12px -12px; padding: 10px 12px 12px; background: var(--surface); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 4px 2px; }
.me-av { width: 34px; height: 34px; font-size: .78rem; }
.me-txt { flex: 1; min-width: 0; line-height: 1.25; display: flex; flex-direction: column; }
.me-txt strong { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-txt small { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* zbalené menu – iba ikony */
.shell.collapsed { --side-w: 72px; }
.shell.collapsed .side .lbl, .shell.collapsed .side .cnt, .shell.collapsed .side .tag-soon, .shell.collapsed .side-app,
.shell.collapsed .side-search, .shell.collapsed .me-txt, .shell.collapsed .side-label, .shell.collapsed .grp-h span,
.shell.collapsed .grp-h .ico, .shell.collapsed .me form, .shell.collapsed .side-logo { display: none; }
.shell.collapsed .side-top { justify-content: center; padding-inline: 0; }
.shell.collapsed .it { justify-content: center; padding: 0; }
.shell.collapsed .dot { display: block; }
.shell.collapsed .grp-h { padding: 10px 0 4px; justify-content: center; cursor: default; }
.shell.collapsed .grp-h::after { content: ""; width: 24px; border-top: 1px solid var(--line); }
.shell.collapsed .grp.closed .grp-b { display: flex; }
.shell.collapsed .me { justify-content: center; padding-inline: 0; }

/* horná lišta obsahu */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 32px;
  background: var(--surface); border-top: 4px solid var(--brand); border-bottom: 1px solid var(--line); }
.crumb { font-size: .85rem; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb strong { color: var(--ink); font-weight: 600; }
.topbar-fill { flex: 1; }
.topbar-new .ico { width: 16px; height: 16px; }
.side-scrim { display: none; }

@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(304px, 86vw); flex-basis: auto; transform: translateX(-105%); transition: transform .18s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,.25); }
  .shell.drawer .side { transform: none; }
  .shell.drawer .side-scrim { display: block; position: fixed; inset: 0; background: rgba(20,20,20,.45); z-index: 25; }
  .side-close, .side-open { display: inline-flex; }
  .topbar-logo { display: inline-flex; align-items: center; }
  .side-collapse { display: none; }
  .shell.collapsed { --side-w: 264px; }
  .shell.collapsed .side .lbl, .shell.collapsed .side .cnt, .shell.collapsed .side-app, .shell.collapsed .side-search, .shell.collapsed .me-txt,
  .shell.collapsed .side-label, .shell.collapsed .grp-h span, .shell.collapsed .grp-h .ico, .shell.collapsed .me form,
  .shell.collapsed .side-logo { display: revert; }
  .shell.collapsed .it { justify-content: flex-start; padding: 0 12px; }
  .shell.collapsed .dot { display: none; }
  .topbar { padding: 8px 16px; min-height: 56px; }
  .crumb { font-size: .8rem; }
  .topbar-new span { display: none; }
  .topbar-new { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .main { padding: 20px 16px 48px; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }
.role-chip { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px; background: var(--sunk); border: 1px solid var(--line); color: var(--muted); }
.role-chip.admin { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.count { font-size: .75rem; font-weight: 700; background: var(--sunk); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; color: var(--muted); }

/* --- karty a rozloženie ---------------------------------------------------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head > div:first-child { min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; margin-bottom: 16px; min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 20px; }
.stat { background: var(--surface); padding: 12px 16px; display: block; color: var(--ink); }
.stat:hover { background: var(--sunk); text-decoration: none; }
.stat .num { font-family: var(--cond); font-weight: 600; font-size: 1.75rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--muted); font-size: .85rem; font-weight: 500; }
.stat.danger .num { color: var(--red); } .stat.warn .num { color: var(--amber); }

/* --- tlačidlá a formuláre -------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 8px 14px; min-height: 40px; font-weight: 600; cursor: pointer; color: var(--ink); }
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 700; }
.btn-primary:hover { border-color: var(--brand); filter: brightness(1.06); }
.btn-sm { min-height: 32px; padding: 4px 11px; font-size: .88rem; }
.btn.danger { color: var(--red); border-color: var(--red); background: var(--red-bg); }
input[type=text], input[type=url], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], input[type=time], input[type=month], select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; min-height: 40px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--primary-weak); border-color: var(--brand); }
input[readonly] { background: var(--sunk); color: var(--muted); }
label { font-weight: 500; font-size: .85rem; color: var(--muted); display: block; margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.field .help, .help { font-size: .82rem; color: var(--muted); margin-top: 3px; }
.field input[type=checkbox], .checks input[type=checkbox] { width: auto; min-height: 0; accent-color: var(--brand); }
.checks label { font-weight: 500; font-size: .9rem; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; margin-right: 12px; }
.checks ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.row { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; min-width: 0; }
.error { color: var(--red); font-size: .85rem; font-weight: 500; margin-top: 3px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); }

/* --- tabuľky --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
table.list { border-collapse: collapse; width: 100%; font-size: .93rem; }
table.list th, table.list td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--sunk); white-space: nowrap; }
table.list th.sortable a { color: inherit; display: inline-flex; gap: 4px; align-items: center; }
table.list th.sortable a:hover { color: var(--ink); text-decoration: none; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover td { background: var(--sunk); }
.card table.list th { background: transparent; }
.ticket-subject { font-weight: 600; color: var(--ink); }
.ticket-subject:hover { color: var(--link); }

/* --- štítky ---------------------------------------------------------------- */
.badge, .sla { display: inline-block; font-size: .78rem; font-weight: 600; padding: 1px 9px; border-radius: 999px; white-space: nowrap; background: var(--sunk); border: 1px solid var(--line); color: var(--muted); }
.st-new { background: var(--primary-weak); border-color: transparent; color: var(--link); }
.st-open { background: var(--sunk); color: var(--ink); }
.st-pending, .st-on_hold { background: var(--violet-bg); border-color: transparent; color: var(--violet); }
.st-resolved { background: var(--green-bg); border-color: transparent; color: var(--green); }
.st-closed { background: var(--sunk); color: var(--muted); }
.pr-urgent { background: var(--red); border-color: var(--red); color: #fff; }
.pr-high { background: var(--amber-bg); border-color: transparent; color: var(--amber); }
.pr-normal { background: var(--sunk); color: var(--ink); }
.pr-low { background: transparent; color: var(--muted); }
.sla { border-color: transparent; font-variant-numeric: tabular-nums; }
.sla-ok, .sla-met { background: var(--green-bg); color: var(--green); }
.sla-warning { background: var(--amber-bg); color: var(--amber); }
.sla-breached { background: var(--red-bg); color: var(--red); }
.sla-paused { background: var(--violet-bg); color: var(--violet); }
.sla-none { background: transparent; color: var(--muted); }
.tag { display: inline-block; border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; font-size: .75rem; color: var(--muted); margin-left: 3px; background: var(--surface); }
.avatar { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: .72rem; font-weight: 700; align-items: center; justify-content: center; font-family: var(--cond); letter-spacing: .03em; }

/* --- záložky a filtre ------------------------------------------------------ */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 12px 10px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 600; }
.tabs a.active { color: var(--ink); border-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters > * { width: auto; flex: 0 1 190px; }
.filters input[type=search] { flex: 1 1 260px; }
.filters .btn { flex: 0 0 auto; }

/* --- detail ticketu -------------------------------------------------------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 8px; min-width: 0; }
.msg-head { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .9rem; flex-wrap: wrap; }
.msg-body { padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-in { border-left-color: var(--muted); }
.msg-out { border-left-color: var(--brand); }
.msg-out .msg-head { background: var(--sunk); }
.msg-auto { border-left-color: var(--line); }
.msg-auto .msg-body { color: var(--muted); font-size: .9rem; }
.msg-note { background: var(--note); border-left-color: var(--note-line); }
.msg-note .msg-head { border-color: var(--line); }
.msg-error { background: var(--red-bg); color: var(--red); padding: 8px 14px; font-size: .9rem; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 500; }
.atts { padding: 0 14px 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.att { border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; font-size: .85rem; background: var(--sunk); }
.event { font-size: .82rem; color: var(--muted); padding: 0 6px; display: flex; gap: 8px; }
.event::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); margin-top: 7px; flex: none; }
.composer [data-pane] { display: none; } .composer [data-pane].active { display: block; }
.composer .tabs a { cursor: pointer; }
.side dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: .9rem; }
.side dt { color: var(--muted); } .side dd { margin: 0; text-align: right; }
.progress { height: 6px; background: var(--sunk); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.progress > span { display: block; height: 100%; background: var(--green); }
.progress.warning > span { background: var(--amber); } .progress.breached > span { background: var(--red); }
.progress.paused > span { background: var(--violet); }
.sla-row { margin-bottom: 12px; font-size: .9rem; }
.sla-row .top { display: flex; justify-content: space-between; gap: 8px; border: 0; background: none; }

/* --- hlásenia, stránkovanie ------------------------------------------------ */
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { padding: 10px 14px; border-radius: 8px; margin-bottom: 6px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--link); font-weight: 500; }
.messages li.success { border-left-color: var(--green); background: var(--green-bg); color: var(--green); }
.messages li.error { border-left-color: var(--red); background: var(--red-bg); color: var(--red); }
.pagination { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.empty { text-align: center; padding: 32px 20px; color: var(--muted); }
.html-body { white-space: normal; }
.html-body table { border-collapse: collapse; } .html-body td { padding: 2px 6px; }
details summary { cursor: pointer; color: var(--muted); font-size: .85rem; font-weight: 500; }
#conds td { padding: 6px; }

/* --- prihlásenie ----------------------------------------------------------- */
.login-page { min-height: 100vh; display: flex; flex-direction: column; }
.login { max-width: 420px; width: calc(100% - 32px); margin: 8vh auto; border-top: 5px solid var(--brand); }
.login .logo { height: 40px; margin-bottom: 14px; }
.ms-btn { width: 100%; justify-content: center; gap: 10px; padding: 10px 14px; min-height: 46px; }
.login details summary { font-size: .88rem; }

/* --- zákaznícky portál ----------------------------------------------------- */
.portal { background: var(--paper); }
.portal-wrap { max-width: 1000px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.portal-head { background: var(--surface); border-bottom: 1px solid var(--line); border-top: 5px solid var(--brand); }
.portal-head .portal-wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 12px; }
.portal-brand { display: flex; gap: 12px; align-items: center; color: var(--ink); }
.portal-brand:hover { text-decoration: none; }
.portal-brand .brand-title { font-size: 1.55rem; }
.portal-user { display: flex; gap: 12px; align-items: center; font-size: .9rem; flex-wrap: wrap; }
.brand-dot { display: none; }

@media (max-width: 1000px) {
  .detail, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .brand-title { font-size: 1.5rem; padding-left: 10px; }
  .logo { height: 30px; }
  .userbox .who { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* --- úlohy, výkazy, vyhodnotenie SLA --- */
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.task-todo { background: var(--primary-weak); border-color: transparent; color: var(--link); }
.task-in_progress { background: var(--violet-bg); border-color: transparent; color: var(--violet); }
.task-done { background: var(--green-bg); border-color: transparent; color: var(--green); }
.task-cancelled { color: var(--muted); }
.wt-onsite { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.assess { border: 1px solid var(--line); border-left: 6px solid var(--green); background: var(--surface); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.assess-ok { border-left-color: var(--green); } .assess-over { border-left-color: var(--red); background: var(--red-bg); }
.assess-low { border-left-color: var(--amber); background: var(--amber-bg); } .assess-none { border-left-color: var(--line); }
.meter { display: flex; align-items: center; gap: 8px; }
.meter-track { flex: 1; height: 8px; border-radius: 4px; background: var(--sunk); border: 1px solid var(--line); overflow: hidden; min-width: 70px; }
.meter-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--green); }
.meter-fill.m-low { background: var(--amber); } .meter-fill.m-over { background: var(--red); }
.meter-lbl { font-variant-numeric: tabular-nums; font-weight: 600; font-size: .85rem; min-width: 3.2em; text-align: right; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); margin: -4px 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sw-sla { background: var(--brand); } .sw-extra { background: var(--muted); }
.sw-line { height: 0; border-top: 2px dashed var(--ink); border-radius: 0; }
.trend { margin-top: 4px; }
.trend-plot { position: relative; display: flex; align-items: flex-end; gap: 10px; height: 170px; margin-top: 22px; border-bottom: 1px solid var(--line); }
.trend-ref { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--ink); opacity: .55; pointer-events: none; z-index: 1; }
.trend-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; min-width: 0; color: var(--ink); }
.trend-col:hover { text-decoration: none; }
.trend-col:hover .trend-bar { filter: brightness(1.08); }
.trend-bar { position: relative; width: min(44px, 100%); display: flex; flex-direction: column; gap: 2px; min-height: 2px; }
.trend-bar > .seg-sla, .trend-bar > .seg-extra { min-height: 0; }
.trend-bar > :nth-child(2) { border-radius: 4px 4px 0 0; }
.seg-sla { background: var(--brand); } .seg-extra { background: var(--muted); }
.trend-val { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding-bottom: 3px; font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trend-axis { display: flex; gap: 10px; margin-top: 6px; }
.trend-axis span { flex: 1; text-align: center; font-size: .75rem; color: var(--muted); min-width: 0; }
.trend-axis span.cur { color: var(--ink); font-weight: 700; }
.month-nav { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; margin: 0; }
.month-nav input[type=month] { width: 170px; min-height: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; }
.month-nav .btn { flex: none; }

/* --- register firiem --- */
.ico-row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.ico-row .field { flex: 0 1 220px; }
.ico-row .btn { margin-top: 23px; }
.registry-status { border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: -2px 0 14px; font-size: .92rem; background: var(--sunk); }
.rs-ok { border-left-color: var(--green); background: var(--green-bg); }
.rs-warn { border-left-color: var(--amber); background: var(--amber-bg); }
.rs-err { border-left-color: var(--red); background: var(--red-bg); color: var(--red); }
.rs-wait { border-left-color: var(--brand); }
input.filled, textarea.filled { background: var(--green-bg); transition: background 1.5s; }
.side .reg-dl { grid-template-columns: 92px 1fr; } .side .reg-dl dd { text-align: left; }

/* --- fakturácia nad rámec SLA / Raynet / iDoklad ------------------------------ */
.bill-draft { background: var(--amber-bg); border-color: transparent; color: var(--amber); }
.bill-approved { background: var(--sunk); color: var(--ink); }
.bill-exported { background: var(--green-bg); border-color: transparent; color: var(--green); }
.bill-failed { background: var(--red-bg); border-color: transparent; color: var(--red); }
.bill-cancelled { background: var(--sunk); color: var(--muted); text-decoration: line-through; }
.ext-tag { font-size: .7rem; }
.bill-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; flex-wrap: wrap; }
.bill-steps li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 600; font-size: .9rem; }
.bill-steps b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--sunk); font-size: .8rem; }
.bill-steps li.cur { color: var(--ink); border-color: var(--brand); }
.bill-steps li.cur b { background: var(--brand); color: var(--brand-ink); }
.bill-steps li.done { color: var(--green); }
.bill-steps li.done b { background: var(--green-bg); color: var(--green); }
.bill-tbl input:not([type=checkbox]) { width: 100%; min-width: 0; padding: 5px 7px; }
.bill-tbl td { vertical-align: middle; }
.bill-tbl td:nth-child(2) { min-width: 240px; }
.bill-tbl input.qty { width: 90px; text-align: right; }
.bill-tbl input.unit { width: 60px; }
.bill-tbl th.c, .bill-tbl td.c, table.list td.c, table.list th.c { text-align: center; width: 44px; }
.bill-tbl tr.off td:not(.c) { opacity: .45; }
.bill-tbl tr.off td.line-total { text-decoration: line-through; }
.bill-tbl tfoot td { border-top: 2px solid var(--line); padding-top: 10px; }
.bill-new input::placeholder { color: var(--muted); }
table.list td.num, table.list th.num { text-align: right; }

/* --- portál: navigácia, účet, MFA, štatistika ------------------------------- */
.portal-nav { display: flex; gap: 2px; padding-top: 0 !important; padding-bottom: 0 !important; overflow-x: auto; }
.portal-nav a { padding: 8px 14px 10px; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.portal-nav a.active { color: var(--ink); border-color: var(--brand); }
.portal-nav a:hover { text-decoration: none; color: var(--ink); }
.portal-who { display: flex; gap: 10px; align-items: center; color: var(--ink); line-height: 1.25; }
.portal-who:hover { text-decoration: none; }
.portal-who .avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-weight: 700; flex: none; }
.pw-rules { list-style: none; padding: 0; margin: -4px 0 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); }
.pw-rules li::before { content: "○ "; }
.pw-rules li.ok { color: var(--green); }
.pw-rules li.ok::before { content: "✓ "; }
.qr { background: #fff; padding: 8px; border-radius: 8px; display: inline-block; border: 1px solid var(--line); margin-bottom: 8px; }
.qr svg { display: block; width: 200px; height: 200px; }
.secret { font-size: 1rem; letter-spacing: .05em; word-break: break-all; }
.mfa-input { font-size: 1.4rem !important; letter-spacing: .2em; text-align: center; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 14px 0; }
.codes code { display: block; font-size: 1.05rem; padding: 6px 10px; background: var(--sunk); border-radius: 6px; text-align: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg a { padding: 7px 12px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.seg a + a { border-left: 1px solid var(--line); }
.seg a.active { background: var(--brand); color: var(--brand-ink); }
.seg a:hover { text-decoration: none; }
.sw-created { background: var(--line); }
.sw-breach { background: var(--red); }
.pchart { display: flex; gap: 8px; align-items: flex-end; height: 220px; padding-top: 18px; }
.pcol { flex: 1; display: flex; flex-direction: column; height: 100%; min-width: 0; }
.pbars { flex: 1; display: flex; gap: 3px; align-items: flex-end; border-bottom: 1px solid var(--line); }
.pb { flex: 1; position: relative; border-radius: 4px 4px 0 0; min-height: 0; }
.pb em { position: absolute; top: -17px; left: 0; right: 0; text-align: center; font-style: normal; font-size: .72rem; color: var(--muted); }
.pb-created { background: var(--line); }
.pb-res { display: flex; flex-direction: column-reverse; height: 100%; background: transparent; }
.pb-res .seg-ok { background: var(--green); border-radius: 4px 4px 0 0; }
.pb-res .seg-breach { background: var(--red); }
.pb-res em { position: static; order: 3; margin-bottom: 2px; }
.plabel { text-align: center; font-size: .75rem; color: var(--muted); padding-top: 4px; white-space: nowrap; }
.hbar { display: grid; grid-template-columns: 110px 1fr 36px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: .9rem; }
.ht { height: 12px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
.ht span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.hn { text-align: right; font-variant-numeric: tabular-nums; }
.btn-danger { color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red-bg); }
.radios { display: grid; gap: 6px; }
label.radio { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; cursor: pointer; }
label.radio input { margin-top: 4px; }
.pw-box { padding: 12px 14px; background: var(--sunk); border-radius: 8px; margin-bottom: 12px; }
.pw-box[hidden] { display: none; }
.reg-dl { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0; }
.reg-dl dt { color: var(--muted); }
.reg-dl dd { margin: 0; }
.portal-head .portal-nav { justify-content: flex-start; padding-left: max(20px, env(safe-area-inset-left, 0px)); }
input:disabled { background: var(--sunk); color: var(--muted); }
@media (max-width: 640px) {
  .pchart { gap: 4px; }
  .plabel { font-size: .65rem; }
  .hbar { grid-template-columns: 90px 1fr 28px; }
  .portal-who > span:last-child { display: none; }
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-radio { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: var(--surface); font-weight: 600; color: var(--ink); font-size: .9rem; cursor: pointer; margin: 0; }
.chip-radio:has(input:checked) { border-color: var(--brand); background: var(--primary-weak); }
.chip-radio input { accent-color: var(--brand); margin: 0; }
#new-contact[hidden], #res-box[hidden] { display: none; }
input[type=datetime-local] { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; min-height: 40px; }
.src-badge { font-family: var(--sans); background: var(--primary-weak); border-color: transparent; color: var(--link); }
/* --- licencie --- */
a.stat { color: inherit; } a.stat:hover { text-decoration: none; }
.renew-steps { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; }
.renew-steps li { padding: 6px 10px 6px 30px; border-radius: 6px; background: var(--sunk); position: relative; font-size: .92rem; }
.renew-steps li::before { content: "○"; position: absolute; left: 10px; color: var(--muted); }
.renew-steps li.done { background: var(--green-bg); }
.renew-steps li.done::before { content: "✓"; color: var(--green); font-weight: 700; }
.renew-form { border-top: 1px solid var(--line); padding-top: 12px; }
.ev-row { padding: 4px 0; border-bottom: 1px solid var(--line); } .ev-row:last-child { border-bottom: 0; }
.secret-box { white-space: pre-wrap; word-break: break-all; background: var(--sunk); padding: 8px; border-radius: 6px; font-size: .9rem; margin: 0 0 6px; }
.nowrap { white-space: nowrap; }
.brand-title { font-family: var(--cond); font-weight: 700; font-size: 1.6rem; line-height: 1; margin: 0; padding-left: 14px; border-left: 2px solid var(--line); }
.brandbar .brand-title { font-size: 2rem; }
@media (max-width: 900px) { .brandbar .brand-title { font-size: 1.35rem; padding-left: 10px; } }

/* Systémové nastavenia */
.cfg-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.cfg-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 76px; }
.cfg-nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; border-left: 3px solid transparent; }
.cfg-nav a:hover { background: var(--surface); text-decoration: none; }
.cfg-nav a.on { background: var(--surface); border-left-color: var(--brand); font-weight: 700; }
.cfg-nav a:last-child { margin-top: 8px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; padding-top: 12px; color: var(--muted); }
.cfg-card { margin-bottom: 0; }
.cfg-head { padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.cfg-head h2 { margin: 0 0 2px; }
.cfg-row { display: grid; grid-template-columns: minmax(180px, 34%) minmax(0, 1fr); gap: 6px 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cfg-row:last-of-type { border-bottom: 0; }
.cfg-lbl label { font-weight: 600; display: block; }
.cfg-in input[type=text], .cfg-in input[type=url], .cfg-in input[type=email], .cfg-in input[type=password], .cfg-in select, .cfg-in textarea { width: 100%; }
.cfg-row.has-error input, .cfg-row.has-error select { border-color: var(--red); }
.src { display: inline-block; margin-top: 4px; font-size: .72rem; font-weight: 600; letter-spacing: .02em; padding: 1px 7px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); background: var(--sunk); }
.src-app { border-color: var(--brand); color: var(--brand-ink); background: var(--primary-weak); }
:root[data-theme="dark"] .src-app { color: var(--ink); background: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .src-app { color: var(--ink); background: transparent; } }
.cfg-reset { display: flex; gap: 6px; align-items: center; font-size: .82rem; color: var(--muted); margin-top: 6px; font-weight: 400; }
.cfg-reset input { width: auto; min-height: 0; }
.cfg-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); margin-top: 4px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; min-height: 0; border-radius: 12px; background: var(--line); border: 0; position: relative; cursor: pointer; transition: background .15s; margin: 0; padding: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { left: 21px; }
.switch input:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.day-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.day-pills label { cursor: pointer; }
.day-pills input { position: absolute; opacity: 0; pointer-events: none; }
.day-pills span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; background: var(--surface); }
.day-pills input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.day-pills input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.nowrap { white-space: nowrap; }
@media (max-width: 900px) {
  .cfg-layout { grid-template-columns: minmax(0, 1fr); }
  .cfg-nav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .cfg-nav a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; }
  .cfg-nav a.on { border-bottom-color: var(--brand); }
  .cfg-nav a:last-child { margin-top: 0; border-top: 0; padding-top: 8px; }
  .cfg-row { grid-template-columns: minmax(0, 1fr); }
}

/* Roly riešiteľov */
.trole { display: inline-block; font-size: .72rem; font-weight: 600; padding: 1px 7px; border-radius: 10px; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); margin-left: 4px; vertical-align: 1px; white-space: nowrap; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.role-card h3 { margin: 0 0 4px; }
.role-card .members { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
.role-card .role-stats { display: flex; gap: 14px; font-size: .85rem; color: var(--muted); }
.role-card.off { opacity: .6; }
.member-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
.member-checks label { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.member-checks input { width: auto; min-height: 0; accent-color: var(--brand); }
.page-head .ref { white-space: normal; }

/* Ako to funguje – dokumentácia */
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 16px; }
.help-card { color: var(--ink); text-decoration: none; margin: 0; transition: border-color .15s; }
.help-card:hover { border-color: var(--brand); text-decoration: none; }
.help-card h3 { margin: 0 0 4px; color: var(--link); }
.help-flow { margin: 0; padding-left: 20px; line-height: 1.6; }
.help-flow li { margin-bottom: 6px; }
.help-toc { display: flex; flex-direction: column; margin: 2px 0 8px 12px; border-left: 2px solid var(--line); }
.help-toc a { font-size: .84rem; font-weight: 400; padding: 4px 10px; color: var(--muted); border-left: 0 !important; margin: 0 !important; border-top: 0 !important; }
.help-nav > a:last-of-type { margin-top: 0; border-top: 0; padding-top: 8px; color: var(--ink); }
.ver-badge { display: inline-block; font: 600 .8rem/1 var(--mono); padding: 3px 8px; border-radius: 10px; background: var(--primary-weak); border: 1px solid var(--brand); color: var(--ink); }
.doc { max-width: 920px; line-height: 1.6; }
.doc h1 { font-size: 1.7rem; margin: 0 0 12px; }
.doc h2 { font-size: 1.3rem; margin: 26px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.doc h3 { font-size: 1.05rem; margin: 18px 0 6px; scroll-margin-top: 80px; }
.doc table { border-collapse: collapse; width: 100%; margin: 10px 0 14px; font-size: .9rem; display: block; overflow-x: auto; }
.doc th, .doc td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; }
.doc th { background: var(--sunk); }
.doc pre { background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; font-size: .82rem; }
.doc pre code { border: 0; background: none; padding: 0; }
.doc blockquote { margin: 10px 0; padding: 6px 12px; border-left: 4px solid var(--brand); background: var(--sunk); }
.side-ver { display: block; font: 500 .72rem/1 var(--mono); color: var(--muted); padding: 6px 12px 0; text-decoration: none; }
.side-ver:hover { color: var(--link); }
.shell.collapsed .side-ver { text-align: center; padding: 6px 0 0; }
.doc > h1:first-child { display: none; }

/* --- ERP: obchod (kanban, fázy) --- */
.ph-gray { background: var(--sunk); color: var(--muted); }
.ph-blue { background: var(--primary-weak); color: var(--primary); border-color: transparent; }
.ph-teal { background: var(--primary-weak); color: var(--ink); border-color: transparent; }
.ph-green { background: var(--green-bg); color: var(--green); border-color: transparent; }
.ph-amber { background: var(--amber-bg); color: var(--amber); border-color: transparent; }
.ph-orange { background: var(--amber-bg); color: var(--brand); border-color: transparent; }
.ph-red { background: var(--red-bg); color: var(--red); border-color: transparent; }
.ph-purple { background: var(--violet-bg); color: var(--violet); border-color: transparent; }
.late { color: var(--red); font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--line); }
/* Obchodná nástenka */
.nb-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 16px; margin-bottom: 16px; }
.nb-title { flex: 0 0 auto; }
.nb-title h1 { font-family: var(--sans); font-weight: 400; font-size: 1.7rem; letter-spacing: -.01em; margin: 0; line-height: 1.15; }
.nb-sort select { border: 0; background-color: transparent; padding: 0 22px 0 0; min-height: 0; font-size: .85rem; font-weight: 600; color: var(--muted); cursor: pointer; width: auto; field-sizing: content; max-width: 100%; box-shadow: none; }
.nb-filters { flex: 1 1 420px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 0; }
.nb-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--surface);
  box-shadow: 0 1px 3px rgba(0,0,0,.08); border: 1px solid transparent; color: var(--ink); font-weight: 500; font-size: .84rem; text-decoration: none; white-space: nowrap; }
a.nb-pill:hover { border-color: var(--line); text-decoration: none; }
.nb-pill.on { border-color: var(--brand); background: var(--primary-weak); }
.nb-sel { padding: 0 6px 0 14px; }
.nb-sel select { border: 0; background-color: transparent; min-height: 32px; padding: 0 26px 0 0; font: inherit; color: inherit; width: auto; min-width: 0; field-sizing: content; max-width: 220px; cursor: pointer; box-shadow: none; }
.nb-search { padding: 0 6px 0 14px; } .nb-search .ico { width: 16px; height: 16px; color: var(--muted); }
.nb-search input { border: 0; background: transparent; min-height: 32px; padding: 0 6px; width: 150px; font: inherit; box-shadow: none; }
.nb-search input:focus, .nb-sel select:focus { outline: none; }
.nb-pill:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.nb-clear { font-size: .88rem; }
.nb-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; margin-left: auto; }
.nb-add { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--green); color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.nb-add .ico { width: 24px; height: 24px; stroke-width: 2.5; } .nb-add:hover { filter: brightness(1.08); }

.kanban { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 12px; align-items: stretch; scroll-snap-type: x proximity; }
.kb-col { flex: 0 0 248px; width: 248px; min-width: 0; max-width: 248px; scroll-snap-align: start; border-radius: 10px;
  display: flex; flex-direction: column; min-height: calc(100vh - 310px); }
.kb-head { --kh-bg: var(--sunk); --kh-fg: var(--muted); display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
  background: var(--kh-bg); color: var(--kh-fg); padding: 8px 28px 8px 14px; margin: 0 -10px 8px 0; min-height: 58px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
.kb-head h2 { font-family: var(--sans); font-size: .74rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 4px; color: var(--kh-fg); }
.kb-sum { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: .84rem; font-variant-numeric: tabular-nums; }
.kb-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--kh-fg); color: var(--kh-bg); font-size: .72rem; }
.kb-w { font-size: .7rem; opacity: .8; margin-top: 2px; }
.kb-plus { font-size: 1.35rem; line-height: 1; font-weight: 300; color: var(--kh-fg); text-decoration: none; padding: 6px 2px; align-self: center; }
.kb-plus:hover { text-decoration: none; transform: scale(1.15); }
.kb-head.ph-purple { --kh-bg: #E6DDF9; --kh-fg: #6A3FC8; } .kb-head.ph-blue { --kh-bg: #DCE9FB; --kh-fg: #2F5FB3; }
.kb-head.ph-teal { --kh-bg: #D5F0EE; --kh-fg: #1D756D; } .kb-head.ph-green { --kh-bg: #DDF3D4; --kh-fg: #3C7A22; }
.kb-head.ph-amber { --kh-bg: #F6EDA8; --kh-fg: #7A6400; } .kb-head.ph-orange { --kh-bg: #FBDCCB; --kh-fg: #B4501A; }
.kb-head.ph-red { --kh-bg: #F9D3E7; --kh-fg: #B0306E; } .kb-head.ph-gray { --kh-bg: #E7E7E5; --kh-fg: #555; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kb-head { --kh-bg: #2A2A2A; }
  :root:not([data-theme="light"]) .kb-head.ph-purple { --kh-bg: #2E2645; --kh-fg: #C6B2F5; } :root:not([data-theme="light"]) .kb-head.ph-blue { --kh-bg: #1D2B40; --kh-fg: #9CC0F5; }
  :root:not([data-theme="light"]) .kb-head.ph-teal { --kh-bg: #17332F; --kh-fg: #7FD3C9; } :root:not([data-theme="light"]) .kb-head.ph-green { --kh-bg: #1E3318; --kh-fg: #9AD67F; }
  :root:not([data-theme="light"]) .kb-head.ph-amber { --kh-bg: #36300F; --kh-fg: #E8D06A; } :root:not([data-theme="light"]) .kb-head.ph-orange { --kh-bg: #3A2416; --kh-fg: #F5A97A; }
  :root:not([data-theme="light"]) .kb-head.ph-red { --kh-bg: #3A1D2C; --kh-fg: #F29BC6; } :root:not([data-theme="light"]) .kb-head.ph-gray { --kh-bg: #2A2A2A; --kh-fg: #BDBDBD; } }
:root[data-theme="dark"] .kb-head.ph-purple { --kh-bg: #2E2645; --kh-fg: #C6B2F5; } :root[data-theme="dark"] .kb-head.ph-blue { --kh-bg: #1D2B40; --kh-fg: #9CC0F5; }
:root[data-theme="dark"] .kb-head.ph-teal { --kh-bg: #17332F; --kh-fg: #7FD3C9; } :root[data-theme="dark"] .kb-head.ph-green { --kh-bg: #1E3318; --kh-fg: #9AD67F; }
:root[data-theme="dark"] .kb-head.ph-amber { --kh-bg: #36300F; --kh-fg: #E8D06A; } :root[data-theme="dark"] .kb-head.ph-orange { --kh-bg: #3A2416; --kh-fg: #F5A97A; }
:root[data-theme="dark"] .kb-head.ph-red { --kh-bg: #3A1D2C; --kh-fg: #F29BC6; } :root[data-theme="dark"] .kb-head.ph-gray { --kh-bg: #2A2A2A; --kh-fg: #BDBDBD; }

.kb-cards { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 60px; padding: 0 8px 0 0; }
.kb-card { min-width: 0; overflow: hidden; background: var(--surface); border-radius: 8px; padding: 10px 12px 9px; box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 1px rgba(0,0,0,.03); }
.kb-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.10); }
.kb-card[draggable=true] { cursor: grab; }
.kb-card.dragging { opacity: .45; }
.kb-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.kb-name { display: block; font-weight: 600; font-size: .86rem; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.kb-name:hover { color: var(--link); }
.kb-flag { flex: 0 0 auto; width: 22px; height: 9px; border-radius: 999px; background: #52B57E; margin-top: 4px; }
.kb-flag.late { background: var(--red); }
.kb-org { color: var(--muted); font-size: .8rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-code { color: var(--muted); font-size: .72rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kb-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.kb-av { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sunk); color: var(--muted);
  font-family: var(--cond); font-weight: 700; font-size: .72rem; flex: 0 0 auto; }
.kb-date { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: .74rem; white-space: nowrap; min-width: 0; overflow: hidden; }
.kb-date .ico { width: 12px; height: 12px; } .kb-date.late { color: var(--red); font-weight: 600; }
.kb-val { margin-left: auto; text-align: right; font-weight: 600; font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kb-val small { display: block; color: var(--muted); font-size: .68rem; font-weight: 400; }
.kb-select { margin-top: 10px; }
.kb-select select { min-height: 32px; font-size: .85rem; padding: 2px 6px; }
@media (hover: hover) and (pointer: fine) { .kb-select { display: none; } }
.kb-col.over { outline: 2px dashed var(--brand); outline-offset: 4px; background: var(--primary-weak); }
.kb-drop.over { outline: 2px dashed var(--brand); outline-offset: 2px; }
.kb-empty { padding: 8px 4px; }
.kb-drops { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 18px; }
.kb-drop { border: 2px dashed var(--line); border-radius: 10px; padding: 14px; text-align: center; font-weight: 600; color: var(--muted); }
.kb-drop-won { border-color: var(--green); color: var(--green); background: var(--green-bg); }
.kb-drop-lost { border-color: var(--red); color: var(--red); background: var(--red-bg); }
.kb-hint { margin-top: 6px; }
.kb-msg:not(:empty) { margin-top: 10px; padding: 8px 12px; border-radius: 6px; background: var(--red-bg); color: var(--red); }
@media (max-width: 720px) { .kb-col { flex-basis: 84vw; width: 84vw; max-width: 84vw; min-height: 0; } .nb-title { flex: 1 1 0; min-width: 0; } .nb-title h1 { font-size: 1.6rem; } .nb-actions { order: 1; margin-top: 18px; } .nb-actions .nb-pill { display: none; } .nb-add { width: 48px; height: 48px; } .nb-filters { order: 2; margin-top: 0; flex-basis: 100%; } .nb-search { flex: 1 1 100%; } .nb-search input { width: 100%; } }
table.list tfoot td { border-top: 2px solid var(--line); }
.item-acts { margin-top: 4px; }
.item-acts form { display: inline; }
.linkish { background: none; border: 0; padding: 0; min-height: 0; color: var(--link); font: inherit; cursor: pointer; }
.linkish:hover { text-decoration: underline; }
/* bočný stĺpec na detailoch (<aside class="side">) nesmie dediť štýl hlavného menu (nav.side) */
aside.side, .shell aside.side { position: static; height: auto; overflow: visible; flex: none; width: auto; display: block;
  padding: 0; background: none; border: 0; transform: none; transition: none; z-index: auto; }

/* karty otvorených záznamov (pod hornou lištou) */
.sticky-head { position: sticky; top: 0; z-index: 20; }
.sticky-head .topbar { position: static; }
.tabbar { display: flex; align-items: stretch; gap: 0; min-height: 40px; padding: 0 12px 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--line); }
.tabbar[hidden] { display: none; }
.tab-list { flex: 1; min-width: 0; display: flex; overflow-x: auto; scrollbar-width: none; }
.tab-list::-webkit-scrollbar { display: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; max-width: 230px; padding: 0 8px 0 12px;
  color: var(--muted); text-decoration: none; font-size: .8rem; border-right: 1px solid var(--line); border-top: 3px solid transparent; }
.tab:hover { color: var(--ink); background: var(--sunk); text-decoration: none; }
.tab.on { color: var(--link); background: var(--paper); border-top-color: var(--brand); font-weight: 600; }
.tab-ic .ico { width: 15px; height: 15px; display: block; }
.tab-code { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tab-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; color: var(--muted); max-width: 110px; }
.tab-x { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 4px; padding: 0; background: transparent;
  color: inherit; cursor: pointer; opacity: 0; }
.tab-x .ico { width: 13px; height: 13px; }
.tab:hover .tab-x, .tab.on .tab-x, .tab-x:focus-visible { opacity: 1; }
.tab-x:hover { background: var(--line); }
.tab-scroll, .tab-closeall { flex: none; width: 30px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.2rem; }
.tab-scroll { display: none; }
.tabbar.overflow .tab-scroll { display: block; }
.tab-scroll:disabled { opacity: .3; cursor: default; }
.tab-closeall .ico { width: 14px; height: 14px; }
.tab-closeall:hover, .tab-scroll:not(:disabled):hover { color: var(--ink); }
@media (max-width: 900px) { .tabbar { padding: 0 4px; } .tab-title { display: none; } .tab-x { opacity: 1; } }

/* hromadná úprava ticketov */
.sel-col { width: 34px; padding-right: 0 !important; }
.sel-col input { width: 16px; height: 16px; }
tr.selected td { background: var(--primary-weak); }
.bulk-bar { position: sticky; bottom: 12px; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--brand); border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12); flex-wrap: wrap; }
.bulk-bar[hidden] { display: none; }
.bulk-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .9rem; }
.bulk-dialog { width: min(820px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; background: var(--surface); color: var(--ink); }
.bulk-dialog::backdrop { background: rgba(20,20,20,.45); }
.bulk-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bulk-head h2 { margin: 0; font-size: 1.15rem; }
.bulk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }
.bulk-tags { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px 10px; margin: 6px 0 12px; }
.bulk-tags legend { font-weight: 600; font-size: .85rem; padding: 0 4px; }
.bulk-tags div { display: flex; flex-wrap: wrap; gap: 4px 14px; max-height: 150px; overflow: auto; }
.bulk-tags label { font-weight: 400; display: inline-flex; gap: 6px; align-items: center; }
.bulk-grid ul { list-style: none; padding: 0; margin: 4px 0 0; max-height: 160px; overflow: auto; }
.bulk-grid ul li label { font-weight: 400; display: flex; gap: 6px; align-items: center; }
.bulk-actions { display: flex; gap: 8px; margin-top: 10px; }
