/* Správa výťahov – štýly. Bez externých závislostí. */
:root {
  --c-primary: #0f3d4c;
  --c-primary-600: #155566;
  --c-primary-50: #e8f1f3;
  --c-accent: #1f8a8a;
  --c-bg: #f4f6f7;
  --c-surface: #ffffff;
  --c-text: #17252b;
  --c-muted: #5f7179;
  --c-border: #dde3e6;
  --c-border-strong: #c3ccd0;
  --c-ok: #1d7a46;
  --c-ok-bg: #e6f4ec;
  --c-warn: #9a5b00;
  --c-warn-bg: #fff4dd;
  --c-danger: #b42318;
  --c-danger-bg: #fdecea;
  --c-info: #1e5aa8;
  --c-info-bg: #e9f1fc;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 40, 50, .06), 0 1px 3px rgba(16, 40, 50, .08);
  --sidebar-w: 248px;
  --tabbar-h: 60px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--c-text); background: var(--c-bg); }
a { color: var(--c-primary-600); }
a:hover { color: var(--c-accent); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
.h3, h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
pre.code { background: var(--c-primary-50); padding: 10px 12px; border-radius: var(--radius-sm); overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.muted { color: var(--c-muted); }
.small { font-size: .87rem; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt { margin-top: 16px; }
.mb0 { margin-bottom: 0; }
.hidden { display: none !important; }

.ic { width: 20px; height: 20px; flex: none; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none; background: var(--c-primary); color: #dce9ec;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-ic { width: 30px; height: 30px; color: #8fd3d3; }
.brand-name { font-weight: 650; color: #fff; }
.brand-sub { font-size: .8rem; color: #a9c4ca; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.nav { padding: 8px; flex: 1; }
.nav-group { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #8fb0b7; padding: 14px 10px 4px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: #dce9ec; text-decoration: none; font-size: .94rem; width: 100%;
}
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.nav-link .ic { width: 18px; height: 18px; opacity: .9; }
.as-button { background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.sidebar-foot { padding: 8px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-foot form { margin: 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { padding: 24px 28px 40px; max-width: 1400px; width: 100%; }
.scrim { display: none; }
.tabbar { display: none; }

.support-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  background: #5b2a86; color: #fff; padding: 6px 12px; font-size: .9rem;
}
.support-bar form { margin: 0; }
.support-bar .ic { width: 18px; height: 18px; }

.banner { display: flex; align-items: center; gap: 8px; padding: 9px 28px; font-size: .92rem; }
.banner .ic { width: 18px; height: 18px; }
.banner-warn { background: var(--c-warn-bg); color: var(--c-warn); }
.banner-danger { background: var(--c-danger-bg); color: var(--c-danger); }

/* ---------- Page ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--c-muted); font-size: .92rem; margin-top: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.breadcrumb { font-size: .88rem; margin-bottom: 6px; }
.breadcrumb a { text-decoration: none; }

.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card > h2:first-child, .card > .card-head:first-child { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; font-size: 1.05rem; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 14px 18px 0; }
.narrow { max-width: 560px; }

.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.span-2 { grid-column: span 2; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: inherit; display: block; }
a.stat:hover { border-color: var(--c-accent); }
.stat-label { font-size: .84rem; color: var(--c-muted); }
.stat-value { font-size: 1.7rem; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat.danger .stat-value { color: var(--c-danger); }
.stat.warn .stat-value { color: var(--c-warn); }

/* ---------- Alerts / badges ---------- */
.alert { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; border: 1px solid transparent; }
.alert-ok { background: var(--c-ok-bg); color: var(--c-ok); border-color: #bfe3cd; }
.alert-error { background: var(--c-danger-bg); color: var(--c-danger); border-color: #f5c2bd; }
.alert-warn { background: var(--c-warn-bg); color: var(--c-warn); border-color: #f2d7a2; }
.alert-info { background: var(--c-info-bg); color: var(--c-info); border-color: #c5d8f3; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.badge-neutral { background: #eef1f2; color: #43555c; }
.badge-ok { background: var(--c-ok-bg); color: var(--c-ok); }
.badge-warn { background: var(--c-warn-bg); color: var(--c-warn); }
.badge-danger { background: var(--c-danger-bg); color: var(--c-danger); }
.badge-info { background: var(--c-info-bg); color: var(--c-info); }
.badge-OP { background: #e3f0ff; color: #1b4f8f; }
.badge-OS { background: #f1e8ff; color: #5b2a86; }
.badge-US { background: #fff0e0; color: #8a4a00; }
.badge-MS { background: #fde7f1; color: #8f1d55; }
.badge-SERVIS { background: #e3f6ef; color: #17694a; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--c-border-strong);
  background: var(--c-surface); color: var(--c-text); font: inherit; font-weight: 550; font-size: .93rem;
  cursor: pointer; text-decoration: none; line-height: 1.3; min-height: 38px;
}
.btn:hover { border-color: var(--c-primary-600); color: var(--c-primary-600); }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-600); color: #fff; }
.btn-ok { background: var(--c-ok); border-color: var(--c-ok); color: #fff; }
.btn-ok:hover { color: #fff; filter: brightness(1.08); }
.btn-danger { color: var(--c-danger); border-color: #eab3ad; }
.btn-danger:hover { background: var(--c-danger); color: #fff; border-color: var(--c-danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 4px 10px; min-height: 30px; font-size: .85rem; }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; padding: 8px; color: inherit; cursor: pointer; display: inline-flex; border-radius: var(--radius-sm); }
.inline { display: inline; margin: 0; }

/* ---------- Forms ---------- */
.form label { display: block; font-size: .87rem; font-weight: 600; color: #34464d; margin-bottom: 12px; }
.form label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit; font-size: 1rem; font-weight: 400;
  color: var(--c-text); background: #fff; border: 1px solid var(--c-border-strong); border-radius: var(--radius-sm); min-height: 40px;
}
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; margin: 0; display: inline-block; accent-color: var(--c-primary); }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; border-color: var(--c-accent); }
input:disabled { background: #f1f4f5; color: var(--c-muted); }
.req::after { content: " *"; color: var(--c-danger); }
.field-error { color: var(--c-danger); font-size: .82rem; font-weight: 500; margin-top: 3px; }
.hint { color: var(--c-muted); font-size: .8rem; font-weight: 400; margin-top: 3px; }
fieldset { border: 1px solid var(--c-border); border-radius: var(--radius); padding: 14px 16px 4px; margin: 0 0 16px; background: var(--c-surface); }
legend { font-weight: 650; padding: 0 6px; color: var(--c-primary); }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.form-sticky { position: sticky; bottom: 0; background: linear-gradient(to top, var(--c-bg) 70%, transparent); padding: 14px 0 6px; z-index: 5; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters input, .filters select { margin: 0; width: auto; min-width: 150px; }
.filters .grow { flex: 1; min-width: 200px; }
.search { position: relative; }
.search .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--c-muted); width: 18px; height: 18px; }
.search input { padding-left: 36px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; background: var(--c-surface); font-size: .93rem; }
.table th { text-align: left; font-size: .8rem; color: var(--c-muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--c-border); white-space: nowrap; background: #fafbfb; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f8fafb; }
.table td.actions-cell { text-align: right; white-space: nowrap; }
.table a.row-link { font-weight: 600; text-decoration: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 28px 16px; text-align: center; color: var(--c-muted); }

dl.props { display: grid; grid-template-columns: minmax(140px, 38%) 1fr; gap: 6px 14px; margin: 0; font-size: .93rem; }
dl.props dt { color: var(--c-muted); }
dl.props dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--c-border); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--c-muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 550; }
.tabs a.active { color: var(--c-primary); border-bottom-color: var(--c-primary); }

.pager { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 12px; font-size: .9rem; }
.pager a, .pager span.disabled { display: inline-flex; padding: 4px; border-radius: var(--radius-sm); }
.pager span.disabled { opacity: .35; }

/* ---------- Task list ---------- */
.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--c-border); }
.task:last-child { border-bottom: 0; }
.task-date { width: 64px; flex: none; text-align: center; line-height: 1.1; }
.task-date .d { font-size: 1.3rem; font-weight: 650; }
.task-date .m { font-size: .75rem; color: var(--c-muted); text-transform: uppercase; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.task-title a { text-decoration: none; color: inherit; }
.task-sub { font-size: .86rem; color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task.overdue .task-date .d { color: var(--c-danger); }
.task-actions { display: flex; gap: 6px; flex: none; }

/* ---------- Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; background: var(--c-border); gap: 1px; }
.cal-h { background: #fafbfb; padding: 6px; font-size: .78rem; font-weight: 600; color: var(--c-muted); text-align: center; }
.cal-d { background: var(--c-surface); min-height: 108px; padding: 4px 5px; font-size: .78rem; }
.cal-d.other { background: #f8fafa; color: #9aa7ac; }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--c-accent); }
.cal-num { font-weight: 600; font-size: .82rem; margin-bottom: 2px; }
.cal-ev { display: block; border-radius: 4px; padding: 1px 5px; margin-bottom: 2px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev.done { opacity: .5; text-decoration: line-through; }
.cal-more { color: var(--c-muted); }

/* ---------- Dialog ---------- */
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(480px, calc(100vw - 24px)); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10, 30, 38, .45); }
dialog form { padding: 18px; margin: 0; }
dialog h2 { margin-top: 0; }

/* ---------- Bare (login, install) ---------- */
body.bare { display: flex; align-items: flex-start; justify-content: center; min-height: 100vh; padding: 8vh 16px 24px; background: linear-gradient(160deg, #0f3d4c 0, #0f3d4c 260px, var(--c-bg) 260px); }
.bare-card { background: var(--c-surface); border-radius: 14px; box-shadow: 0 10px 30px rgba(15, 61, 76, .18); padding: 26px 24px; width: 100%; max-width: 400px; }
.bare-card.wide { max-width: 760px; }
.bare-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--c-primary); margin-bottom: 18px; }
.checks { list-style: none; padding: 0; margin: 0 0 16px; font-size: .92rem; }
.checks .ok { color: var(--c-ok); }
.checks .fail { color: var(--c-danger); font-weight: 600; }

.net-status { margin-left: auto; font-size: .78rem; background: var(--c-warn-bg); color: var(--c-warn); padding: 2px 8px; border-radius: 999px; }

/* ---------- Mobile ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 4px 0 24px rgba(0,0,0,.2); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(10,30,38,.45); z-index: 40; }
  .topbar { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 30; background: var(--c-primary); color: #fff; padding: 6px 8px; padding-top: max(6px, env(safe-area-inset-top)); }
  .topbar-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .content { padding: 14px 12px calc(var(--tabbar-h) + 24px); }
  .banner { padding: 8px 12px; }
  .page-head h1 { font-size: 1.3rem; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .card { padding: 14px; }
  .filters > * { flex: 1 1 140px; }
  .filters input, .filters select { width: 100%; min-width: 0; }

  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--c-surface); border-top: 1px solid var(--c-border); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--tabbar-h);
    color: var(--c-muted); text-decoration: none; font: inherit; font-size: .72rem; background: none; border: 0; cursor: pointer;
  }
  .tabbar a.active { color: var(--c-primary); font-weight: 600; }
  .tabbar .ic { width: 22px; height: 22px; }

  /* Tabuľky ako karty */
  table.table-cards thead { display: none; }
  table.table-cards, table.table-cards tbody, table.table-cards tr, table.table-cards td { display: block; width: 100%; }
  table.table-cards tr { padding: 10px 14px; border-bottom: 1px solid var(--c-border); }
  table.table-cards td { border: 0; padding: 2px 0; display: flex; gap: 10px; }
  table.table-cards td::before { content: attr(data-label); color: var(--c-muted); font-size: .82rem; min-width: 120px; flex: none; }
  table.table-cards td.primary-cell { font-size: 1.05rem; padding-bottom: 4px; }
  table.table-cards td.primary-cell::before, table.table-cards td.actions-cell::before { content: none; }
  table.table-cards td.actions-cell { justify-content: flex-start; padding-top: 6px; }
  table.table-cards td:empty { display: none; }

  dl.props { grid-template-columns: minmax(0, 1fr); gap: 0; }
  dl.props dt { margin-top: 8px; font-size: .84rem; }

  .task { flex-wrap: wrap; }
  .task-actions { width: 100%; padding-left: 76px; }
  .cal-d { min-height: 64px; padding: 3px; }
  .cal-ev { font-size: .66rem; padding: 0 3px; }
  .cal-h { font-size: .68rem; padding: 4px 2px; }
  .form-sticky { bottom: var(--tabbar-h); }
}


/* ---------- Kontrolný zoznam protokolu ---------- */
.checklist-tools { display: flex; gap: 6px; justify-content: flex-end; margin: -4px 0 8px; }
.checklist-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.ck-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--c-border); }
.ck-item.is-no { background: var(--c-danger-bg); }
.ck-label { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; font-size: .93rem; }
.ck-num { color: var(--c-muted); font-variant-numeric: tabular-nums; min-width: 26px; text-align: right; }
.form .ck-custom { margin: 0; min-height: 34px; padding: 4px 8px; }
.checklist-grid.ro .ck-item { font-size: .9rem; }
.checklist-grid.ro .is-no strong { color: var(--c-danger); }
.seg { display: inline-flex; border: 1px solid var(--c-border-strong); border-radius: var(--radius-sm); overflow: hidden; flex: none; }
.form .seg label { margin: 0; font-weight: 600; font-size: .85rem; color: var(--c-muted); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 6px 11px; min-width: 44px; text-align: center; border-left: 1px solid var(--c-border); }
.seg label:first-child span { border-left: 0; }
.seg input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: -2px; }
.seg .seg-A input:checked + span { background: var(--c-ok); color: #fff; }
.seg .seg-N input:checked + span { background: var(--c-danger); color: #fff; }
.seg .seg-X input:checked + span { background: #6b7c83; color: #fff; }
.zaver-opts { display: grid; gap: 4px; margin-bottom: 12px; }
.zaver-opts .check { padding: 8px 10px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); margin: 0 !important; }
.zaver-opts .check:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-50); }
@media (max-width: 860px) {
  .checklist-grid { grid-template-columns: minmax(0, 1fr); }
  .seg span { padding: 9px 12px; min-width: 50px; }
}


/* ---------- Materiál na doklade ---------- */
.material .card-head h2 { display: flex; align-items: center; gap: 8px; }
.material-add { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 12px 18px 16px; border-top: 1px solid var(--c-border); background: #fafbfb; }
.material-add label { margin: 0 !important; }
.material-add .grow { flex: 1 1 260px; }
.material-add .qty { width: 110px; }
.lines { width: 100%; border-collapse: collapse; }
.lines td { padding: 4px 6px 4px 0; vertical-align: top; }
.lines td input, .lines td select { margin: 0; }
.lines .c-q { width: 120px; } .lines .c-c { width: 130px; } .lines .c-x { width: 40px; }
.qty-low { color: var(--c-danger); font-weight: 650; }
@media (max-width: 860px) {
  .lines, .lines tbody, .lines tr, .lines td { display: block; width: 100% !important; }
  .lines tr { border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 8px; margin-bottom: 8px; background: #fff; }
  .lines thead { display: none; }
  .material-add .qty { width: auto; flex: 1 1 100px; }
}


/* ---------- Závady pri bodoch kontrolného zoznamu ---------- */
.ck-item { flex-wrap: wrap; }
.checklist-grid .ck-item.is-no { grid-column: 1 / -1; padding: 8px 10px; border-radius: var(--radius-sm); border-bottom-color: transparent; margin: 2px 0; }
.ck-zav { flex: 0 0 100%; display: flex; flex-direction: column; gap: 8px; padding: 8px 0 2px 32px; }
.ck-zav[hidden] { display: none; }
.zchips { display: flex; flex-wrap: wrap; gap: 6px; }
.zchips:empty { display: none; }
.zchip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; background: var(--c-surface); border: 1px solid #eab3ad; border-radius: 6px; padding: 3px 2px 3px 10px; font-size: .88rem; line-height: 1.35; }
.zchip > span { overflow-wrap: anywhere; }
.zchip .zchip-x { border: 0; background: none; color: var(--c-danger); font: inherit; font-size: 1.15rem; line-height: 1; padding: 2px 7px; cursor: pointer; border-radius: 4px; min-height: 0; }
.zchip .zchip-x:hover { background: var(--c-danger-bg); }
.zcombo { position: relative; max-width: 640px; }
.form .zcombo-input { margin: 0; min-height: 38px; font-size: .95rem; background: var(--c-surface); padding-left: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f7179' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 10px center; background-size: 16px; }
.zcombo-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; max-height: 320px; overflow-y: auto; background: var(--c-surface); border: 1px solid var(--c-border-strong); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(16, 40, 50, .16); padding: 4px 0; }
.zcombo-list[hidden] { display: none; }
.zcombo-group { padding: 8px 12px 3px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); }
.zcombo-opt { display: flex; gap: 10px; padding: 7px 12px; cursor: pointer; font-size: .92rem; line-height: 1.35; }
.zcombo-opt.active, .zcombo-opt:hover { background: var(--c-primary-50); }
.zcombo-kod { color: var(--c-muted); font-variant-numeric: tabular-nums; flex: none; min-width: 72px; font-size: .84rem; padding-top: 1px; }
.zcombo-own { color: var(--c-primary-600); font-weight: 600; border-top: 1px solid var(--c-border); margin-top: 4px; }
.zcombo-empty { padding: 10px 12px; color: var(--c-muted); font-size: .9rem; }
.zavady-list { margin: 0; padding: 0; list-style: none; }
.zavady-list li { padding: 7px 0; border-bottom: 1px solid var(--c-border); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.zavady-list li:last-child { border-bottom: 0; }
.zavady-list .zbod { color: var(--c-muted); min-width: 140px; font-size: .88rem; }
.prir-table select { margin: 0; min-height: 34px; font-size: .9rem; }
.prir-table td { vertical-align: middle; }
@media (max-width: 860px) {
  .ck-zav { padding-left: 0; }
  .checklist-grid .ck-item.is-no { padding: 8px 6px; }
  .zcombo-list { max-height: 260px; }
}

@media print {
  .sidebar, .topbar, .tabbar, .actions, .filters, .banner, .support-bar, .form-actions { display: none !important; }
  .content { padding: 0; }
  .card { box-shadow: none; }
}
