:root {
  /* Protokoly: tmavě modrý panel (#0F253D), modrá lišta a tlačítka; výrazná #168BFF je akcent (tlačítka tmavší kvůli kontrastu bílého textu) */
  --side: #0F253D;
  --top: #0E6FD8;
  --brand: #0E6FD8;
  --brand-dark: #0A58AD;
  --accent: #168BFF;
  --brand-ink: #fff;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, #fff);
  --side-ink: #fff;
  --bg: #eef0f2;
  --surface: #fff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-soft: #eff1f4;
  --danger: #b42318;
  --warn: #b25e09;
  --ok: #059669;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.06);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.45 var(--font); background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
a { color: var(--brand-dark); }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.boot { padding: 40vh 0; text-align: center; color: var(--muted); }

/* tlačítka a pole */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 8px; padding: 9px 16px;
  background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 40px; white-space: nowrap; }
.btn:disabled { opacity: .55; cursor: default; }
.btn:hover { background: var(--brand-dark); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #d8dde3; }
.btn.ghost:hover { background: #f6f8fa; }
.btn.outline { background: #fff; color: var(--brand-dark); border: 1px solid var(--brand); }
.btn.outline:hover { background: var(--brand-soft); }
.btn.danger { background: var(--danger); }
.btn.small { padding: 5px 10px; min-height: 32px; font-size: 13px; }
.btn.full { width: 100%; }
.btn.on-top { background: #fff; color: var(--side); font-weight: 700; }
.btn.on-top:hover { background: #f1f4f8; }
.btn.on-top-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn.on-top-ghost:hover { background: rgba(255,255,255,.12); }
.icon-btn { border: 0; background: transparent; font-size: 17px; cursor: pointer; padding: 6px 8px; border-radius: 6px; color: var(--muted); }
.icon-btn:hover { background: #0000000d; }
.icon-btn.danger:hover { color: var(--danger); }
.linkish { border: 0; background: none; color: inherit; cursor: pointer; font: inherit; text-decoration: underline; }
input, select, textarea { font: inherit; color: inherit; width: 100%; padding: 8px 11px; border: 1px solid #dde2e8; border-radius: 8px; background: #fff; min-height: 40px; }
textarea { min-height: 110px; resize: vertical; }
/* select vlastní šipkou: Safari jinak kreslí nativní nízký rozbalovač a ignoruje výšku a odsazení */
select { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 34px; cursor: pointer; }
select::-ms-expand { display: none; }
input:focus, select:focus, textarea:focus, .rte:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--brand); }
input[type=color] { padding: 3px; width: 56px; }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: 12px; font-weight: 500; margin-bottom: 5px; color: #4b5563; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 700px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.check input { margin-top: 3px; }

/* rich text */
.rte-bar { display: flex; gap: 2px; border: 1px solid #dde2e8; border-bottom: 0; border-radius: 8px 8px 0 0; padding: 4px; background: #fafbfc; }
.rte-bar button { border: 0; background: none; padding: 4px 9px; border-radius: 5px; cursor: pointer; font: inherit; }
.rte-bar button:hover { background: #0000000f; }
.rte { border: 1px solid #dde2e8; border-radius: 0 0 8px 8px; padding: 10px 12px; min-height: 160px; background: #fff; overflow-wrap: anywhere; }
.rte p { margin: 0 0 8px; }

/* přihlášení */
.auth { position: fixed; inset: 0; overflow-y: auto; overscroll-behavior: none; display: grid; place-items: center; padding: 20px; }
html:has(.auth), html:has(.auth) body { overflow: hidden; overscroll-behavior: none; height: 100%; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 28px; }
.auth-card h1 { margin: 8px 0 6px; }
.auth-card form { margin-top: 16px; }
.auth-logo { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 26px; letter-spacing: -.02em; color: #0F253D; margin-bottom: 10px; }
.auth-card > h1, .auth-card > h1 + p.muted { text-align: center; }
.auth-logo img { height: 36px; width: auto; }
.auth-foot { margin-top: 16px; font-size: 14px; text-align: center; color: var(--muted); }

/* rozvržení: zelený boční panel + zelená lišta s nadpisem stránky */
.shell { display: flex; min-height: 100vh; }
.side { width: 220px; flex: none; background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 12px 12px; gap: 18px; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: inherit; text-decoration: none; min-width: 0; }
.side-logo { width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,.16); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; overflow: hidden; }
.side-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.side-name { display: block; font-weight: 700; font-size: 14px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.side-ver { display: block; font-size: 12px; color: rgba(255,255,255,.7); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: rgba(255,255,255,.85); font-weight: 500; text-decoration: none; }
.side-nav a:hover { background: rgba(255,255,255,.08); }
.side-nav a.on { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.ico { display: inline-flex; }
.side-user { margin-top: auto; border-top: 1px solid rgba(255,255,255,.15); padding-top: 8px; }
.side-user > .umenu-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 8px; background: none; color: #fff; font: inherit; cursor: pointer; text-align: left; }
.side-user > .umenu-btn:hover { background: rgba(255,255,255,.08); }
.side-who { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.side-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-who small { color: rgba(255,255,255,.7); font-size: 12px; }
.side-user .umenu-drop { top: auto; bottom: 100%; left: 0; right: auto; margin: 0 0 4px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--top); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.mainwrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; min-height: 72px; background: var(--top); color: #fff; display: flex; align-items: center; gap: 12px; padding: 12px 32px; }
.top-content { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; }
.top-head { min-width: 0; }
.top-title { font-size: 22px; font-weight: 700; color: #fff; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-sub { color: rgba(255,255,255,.82); font-size: 13px; margin-top: 2px; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.top-back { color: #fff; text-decoration: none; font-weight: 500; white-space: nowrap; }
.top-back:hover { text-decoration: underline; color: #fff; }
.top-proto { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.top-proto small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.8); }
.top-crumb { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 13px; color: rgba(255,255,255,.82); }
.top-crumb a { display: inline-flex; align-items: center; gap: 3px; margin: -4px 0 -4px -6px; padding: 4px 8px 4px 6px; border-radius: 6px; color: #fff;
  font-weight: 600; text-decoration: none; background: rgba(255,255,255,.14); }
.top-crumb a:hover { background: rgba(255,255,255,.24); color: #fff; }
.top-crumb a:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.top-crumb > span[aria-hidden] { opacity: .7; }
.top-crumb-cur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.top-crumb .src-tag.on-dark { margin-left: 0; }
.top-proto b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .save-state { color: rgba(255,255,255,.9); font-size: 13px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.top .save-state:empty { display: none; }
.top .save-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.umenu { position: relative; }
.top-user { display: none; }
.top-user > .umenu-btn { border: 0; background: none; padding: 0; cursor: pointer; }
.top-user .avatar { background: rgba(255,255,255,.2); width: 36px; height: 36px; }
.umenu-drop { position: absolute; right: 0; top: 100%; margin-top: 4px; background: #fff; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.15); padding: 6px 0; min-width: 170px; z-index: 50; }
.umenu-drop a, .umenu-drop button { display: block; width: 100%; text-align: left; padding: 8px 16px; font: inherit; color: #374151; text-decoration: none; background: none; border: 0; cursor: pointer; }
.umenu-drop a:hover, .umenu-drop button:hover { background: #f6f8fa; }
.queue-badge { background: var(--warn); color: #fff; border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 700; }
.operator-bar { background: #fde2df; color: #8a1c12; font-size: 13px; font-weight: 600; text-align: center; padding: 7px; border-bottom: 1px solid #f5b8b0; }
.trial-bar { background: #fff7e6; color: #7a4a00; font-size: 13px; text-align: center; padding: 6px; border-bottom: 1px solid #f3dfb6; }
.main { width: 100%; max-width: 1180px; padding: 22px 32px 48px; }
.main.wide { max-width: 1400px; }
.bottomnav { display: none; }
@media (max-width: 767px) {
  .side { display: none; }
  .top { min-height: 60px; padding: 10px 14px; flex-wrap: wrap; }
  .top-title { font-size: 19px; }
  .top-user { display: block; }
  .top-actions { order: 3; flex-basis: 100%; }
  .top-actions .btn { flex: 1; }
  .top .save-state { display: none; }
  .main { padding: 14px 14px calc(90px + env(safe-area-inset-bottom)); }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: #4b5563; text-decoration: none; padding: 4px 10px; }
  .bottomnav a.on { color: var(--brand-dark); font-weight: 700; }
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.notice { background: #fff7e6; border: 1px solid #f3dfb6; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.empty { text-align: center; padding: 40px; color: var(--muted); }
.search { margin-bottom: 14px; }
.sentinel { text-align: center; color: var(--muted); padding: 16px; font-size: 14px; }

/* panel nástrojů (hledání, přepínače, řazení): přilepený pod lištou, všechny prvky stejně vysoké a ve stejném stylu */
.toolbar { --ctl: 40px; position: sticky; top: var(--top-h, 72px); z-index: 15; background: var(--bg);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 0; margin: -12px 0 4px; }
.searchbox { flex: 1 1 260px; max-width: 380px; position: relative; display: flex; align-items: center; }
.searchbox .ico { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.toolbar input, .toolbar select { height: var(--ctl); min-height: var(--ctl); border: 1px solid #dde2e8; border-radius: 8px; background-color: #fff; }
.searchbox input { padding: 0 12px 0 36px; }
.toolbar select { width: auto; padding: 0 32px 0 12px; }
.seg { display: flex; height: var(--ctl); background: #fff; border: 1px solid #dde2e8; border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { height: 100%; border: 0; background: transparent; padding: 0 12px; border-radius: 6px; font: inherit; color: #374151; cursor: pointer; white-space: nowrap; }
.seg button:hover { background: #f1f4f7; }
.seg button.on { background: var(--side); color: #fff; font-weight: 600; }
.toolbar .push { margin-left: auto; }
@media (max-width: 767px) {
  /* mobil: hledání + řazení v jednom řádku, přepínače pod nimi přes celou šířku */
  .toolbar { gap: 8px; }
  .searchbox { flex: 1 1 150px; max-width: none; }
  .toolbar .push { order: 1; margin-left: 0; }
  .seg { order: 2; flex: 1 1 auto; }
  .seg button { flex: 1; padding: 0 8px; }
}

/* seznam protokolů: tabulka na šířku, karty na mobilu */
.ptable { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: clip; }
.prow { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.3fr) 170px 140px 130px; gap: 16px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.prow:hover { background: #f9fafc; }
.prow.head { border-top: 0; font-size: 12px; color: var(--muted); padding-top: 12px; padding-bottom: 10px; }
.prow.head:hover { background: none; }
.pobj { display: flex; gap: 12px; align-items: center; min-width: 0; }
.pthumb { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: #e5e9ec; display: grid; place-items: center; flex: none; color: #9ca3af; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; }
.ptitle { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psub, .pdate { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcust { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pstep { font-size: 12px; color: #374151; }
.pbar { height: 6px; background: #eceef1; border-radius: 99px; margin-top: 6px; width: 140px; max-width: 100%; }
.pbar > div { height: 100%; background: var(--brand); border-radius: 99px; }
.pdone { display: inline-block; background: var(--side); color: #fff; border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.pgo { display: flex; justify-content: flex-end; align-items: center; gap: 2px; color: var(--brand-dark); font-weight: 600; white-space: nowrap; }
.pgo .icon-btn { opacity: .35; }
.prow:hover .pgo .icon-btn, .pgo .icon-btn:focus-visible { opacity: 1; }
@media (max-width: 1000px) { .prow { grid-template-columns: minmax(0, 1fr) 150px 110px; } .prow > :nth-child(2), .prow > :nth-child(4) { display: none; } }
@media (max-width: 600px) {
  .prow { grid-template-columns: minmax(0, 1fr) auto; } .prow.head { display: none; }
  .prow { grid-template-columns: minmax(0, 1fr) auto auto; }
  .pgo > span { display: none; } .pgo .icon-btn { opacity: .6; width: 40px; height: 40px; } .pbar { width: 80px; }
}

/* průvodce: kontrolní seznam kroků vlevo (stav + shrnutí každého kroku), obsah vpravo */
.wizard { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 24px; align-items: start; }
.wlist { position: sticky; top: calc(var(--top-h, 72px) + 24px); max-height: calc(100vh - var(--top-h, 72px) - 48px); overflow-y: auto;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.wl-head { display: flex; gap: 12px; align-items: center; padding: 2px 4px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.ring { --p: 0%; width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--brand) var(--p), #e5e9ee 0); }
.ring span { width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 700; color: var(--side); }
.wl-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 8px; color: inherit; text-decoration: none; cursor: pointer; }
.wl-item:hover { background: #f4f6f8; }
.wl-item.on { background: color-mix(in srgb, var(--brand) 10%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 42%, #fff); }
.wl-item.on b { color: var(--side); }
.wl-item.disabled { pointer-events: none; opacity: .5; }
.wl-text { display: flex; flex-direction: column; min-width: 0; }
.wl-text b { font-weight: 600; }
.wl-opt { font-weight: 400; font-size: 12px; color: var(--muted); }
.wl-note { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-note.warn { color: var(--warn); }
.ci { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; box-sizing: border-box;
  border: 2px solid #c8cfd7; color: #4b5563; background: #fff; }
.ci.done { background: var(--brand); border-color: var(--brand); color: #fff; }
.ci.warn { border-color: #d97706; color: var(--warn); }
.ci.opt { border-style: dashed; font-weight: 500; }
.wl-item.on .ci:not(.done):not(.warn) { background: var(--side); border-color: var(--side); color: #fff; }
.wl-hist { margin-top: 8px; padding: 8px 6px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
.wl-hist summary { cursor: pointer; color: var(--brand-dark); font-weight: 600; padding: 4px 0; }
/* navigace průvodce: přilepená pod hlavičkou */
.step-bar { position: sticky; top: var(--top-h, 72px); z-index: 15; background: var(--bg); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px; align-items: center; padding: 12px 0; margin: -12px 0 10px; border-bottom: 1px solid var(--line); }
.sb-back { justify-self: start; max-width: 100%; }
.sb-next { justify-self: end; max-width: 100%; }
.step-bar .btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-where { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; color: inherit; text-decoration: none; line-height: 1.25; }
.sb-where small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-dark); }
.sb-where b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sb-hub { font-size: 12px; font-weight: 600; color: var(--brand-dark); }
.mob-only { display: none; }
.step-head { margin-bottom: 14px; }
.step-head h2 { margin: 0 0 4px; font-size: 22px; font-weight: 700; }
.step-head p { margin: 0; }
.step-card { padding: 24px; margin: 0; }
.step-hist-item { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid var(--line); }
.step-hist-item:last-child { border-bottom: 0; }
.step-hist-item span { color: var(--muted); font-size: 12px; }
.save-state { font-size: 13px; color: var(--muted); }
.field > span::after { content: ""; }
@media (max-width: 1180px) { .wizard { grid-template-columns: 250px minmax(0, 1fr); } }
@media (max-width: 767px) {
  .wizard { grid-template-columns: minmax(0, 1fr); }
  .wlist { display: none; }
  .desk-only { display: none; } .mob-only { display: inline; }
  .top-actions:has(.pdf-link) { display: none; }
  .step-bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; margin: -14px -14px 12px; padding: 8px 14px; background: #fff; }
  .step-bar .btn { min-height: 44px; padding: 0 12px; }
  /* mobil: místo menu kroků odkaz na rozcestník protokolu */
  .step-card { padding: 16px; }
  .defect-row { flex-wrap: wrap; }
  .defect-row .name { flex-basis: 100%; }
}

/* plochy a vady */
.block { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 14px; }
.block-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.block-body { padding: 14px; }
.defect-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.defect-row:last-child { border-bottom: 0; }
.defect-row .name { flex: 1; min-width: 0; }
.defect-row input.count { width: 70px; text-align: center; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: #eef0f3; color: var(--muted); }
.sev { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #cbd5e1; }
.sev.s1 { background: var(--danger); } .sev.s2 { background: #d97706; } .sev.s3 { background: #9ca3af; }
.typeahead { position: relative; }
.typeahead-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 12; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.1); max-height: 300px; overflow: auto; }
.typeahead-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; cursor: pointer; font: inherit; }
.typeahead-list button:hover, .typeahead-list button.hl { background: var(--brand-soft); }

/* fotky */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.photo { position: relative; border-radius: 8px; overflow: hidden; background: #eef0f3; aspect-ratio: 4/3; border: 2px solid transparent; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.selected { border-color: var(--brand); }
.photo .sel { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; }
.photo .del { position: absolute; top: 4px; right: 4px; background: #000a; color: #fff; border: 0; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; }
.photo .badge { position: absolute; bottom: 4px; left: 4px; background: #000a; color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.photo-add { display: grid; place-items: center; aspect-ratio: 4/3; border: 2px dashed var(--line); border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 600; text-align: center; padding: 6px; }
.photo-add:hover { border-color: var(--brand); color: var(--brand); }
.photo-add input { display: none; }
.cover { width: 100%; max-width: 420px; aspect-ratio: 4/3; border-radius: 8px; background: #eef0f3; display: grid; place-items: center; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }

/* katalog: seznam vlevo, detail vpravo */
.md { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
/* seznam vad/technologií = stejná karta jako levý seznam kroků průvodce a menu nastavení */
.md-list { position: sticky; top: calc(var(--top-h, 60px) + 72px); max-height: calc(100vh - var(--top-h, 60px) - 92px); overflow-y: auto;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.crow { padding: 7px 8px; }
.crow .sico { border-color: #dde2e8; color: var(--brand-dark); }
.crow .ccode { font-size: 9px; font-weight: 700; letter-spacing: -.02em; }
.crow.on .sico { background: var(--side); border-color: var(--side); color: #fff; }
.crow .wl-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-list .empty { padding: 20px 8px; text-align: center; color: var(--muted); }
.md-detail { position: sticky; top: calc(var(--top-h, 60px) + 72px); }
.md-detail .card { margin: 0; }
.md-empty { background: var(--surface); border-radius: var(--radius); padding: 40px 20px; text-align: center; color: var(--muted); }
.detail-head { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.detail-head h2 { flex: 1; margin: 0; font-size: 17px; }
.more { position: relative; }
.more > summary { list-style: none; }
.more > summary::-webkit-details-marker { display: none; }
.more-drop { position: absolute; right: 0; top: 100%; margin-top: 4px; background: #fff; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.15); padding: 6px 0; min-width: 170px; z-index: 30; }
.more-drop button { display: block; width: 100%; text-align: left; padding: 8px 16px; font: inherit; color: #374151; background: none; border: 0; cursor: pointer; }
.more-drop button:hover { background: #f6f8fa; }
@media (max-width: 900px) {
  .md { grid-template-columns: 1fr; }
  .md.has-detail .md-list { display: none; }
  .md:not(.has-detail) .md-detail { display: none; }
  .md-detail { position: static; }
  .md-list { position: static; max-height: none; padding: 6px; }
  .crow { min-height: 54px; }
  .crow + .crow { border-top: 1px solid var(--line-soft); border-radius: 0; }
}

/* nastavení: sekce vlevo, obsah, náhled PDF */
.settings { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
/* menu nastavení = stejná karta jako levý seznam kroků průvodce (.wlist / .wl-item) */
.snav .grp { border: 0; background: none; border-radius: 0; margin: 0; font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .08em; padding: 8px 8px 4px; text-transform: uppercase; }
.snav .wl-head + .grp { padding-top: 2px; }
.snav .sico { border-color: #dde2e8; color: var(--brand-dark); }
.snav .wl-item.on .sico { background: var(--side); border-color: var(--side); color: #fff; }
.snav .sring span { color: var(--side); }
.snav .wl-head b { display: block; }
.snav .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatches { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer; }
.swatch.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 90px; border: 1px dashed color-mix(in srgb, var(--brand) 55%, #fff); border-radius: 10px; background: color-mix(in srgb, var(--brand) 5%, #fff); color: var(--brand-dark); cursor: pointer; padding: 10px; text-align: center; }
.dropzone img { max-height: 70px; max-width: 100%; object-fit: contain; }
@media (max-width: 1180px) { .settings { grid-template-columns: 250px minmax(0, 1fr); } }
@media (max-width: 767px) {
  .settings { display: flex; flex-direction: column; gap: 12px; }
  .wlist.snav { display: flex; min-width: 0; max-width: 100%; position: static; max-height: none; flex-direction: row; overflow-x: auto; gap: 6px; padding: 0 0 2px; background: none; box-shadow: none; scrollbar-width: none; }
  .settings > div { width: 100%; }
  .snav .grp, .snav .wl-head, .snav .wl-note, .snav .sico { display: none; }
  .snav .wl-item { display: flex; white-space: nowrap; background: #fff; min-height: 44px; padding: 0 14px; box-shadow: var(--shadow); }
  .snav .wl-item.on { background: color-mix(in srgb, var(--brand) 10%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 42%, #fff); }
}

/* tabulky */
.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table th { font-size: 12px; font-weight: 500; color: var(--muted); }
.table tr:hover td { background: #fafbfc; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--brand-dark); border-bottom-color: var(--brand); }

/* dialogy a toasty */
.dialog { border: 0; border-radius: 12px; padding: 20px; max-width: 440px; width: calc(100% - 32px); box-shadow: 0 20px 60px #0004; }
.dialog.wide { max-width: 860px; }
.dialog::backdrop { background: #0006; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dialog-body { max-height: 70vh; overflow: auto; }
#toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: 80px; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: #1b1f1c; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); transition: opacity .4s; font-size: 14px; }
.toast.err { background: var(--danger); }
.toast.warn { background: var(--warn); }
.toast.out { opacity: 0; }

/* náhled PDF */
.pdf-preview { background: #d8dce2; padding: 16px; border-radius: var(--radius); overflow: auto; max-height: 75vh; }
.pdf-preview .pg { box-shadow: 0 2px 10px #0003; margin: 0 auto 16px; transform-origin: top center; }
.progress { height: 6px; background: #e2e6eb; border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); width: 0; transition: width .2s; }

/* mobil: rozcestník protokolu */
.hub { display: flex; flex-direction: column; gap: 10px; }
.hub-head { display: flex; gap: 12px; align-items: center; }
.hub-head b { display: block; font-size: 19px; }
.hub-cover { width: 56px; height: 56px; border-radius: 10px; background: #d9dee3; overflow: hidden; flex: none; }
.hub-cover img { width: 100%; height: 100%; object-fit: cover; }
.hub-prog { display: flex; gap: 10px; align-items: center; }
.hub-prog .pbar { flex: 1; width: auto; }
.hub-label { font-size: 11px; letter-spacing: .08em; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.hub-next { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--side); color: #fff;
  border-radius: var(--radius); padding: 14px; text-decoration: none; font-size: 18px; }
.hub-next .ci { width: 32px; height: 32px; background: rgba(255,255,255,.2); border: 0; color: #fff; }
.hub-next .wl-text b { font-size: 15px; }
.hub-next .wl-text span { font-size: 12px; color: rgba(255,255,255,.85); }
.hub-list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 6px; }
.hub-list .wl-item { min-height: 54px; }
.hub-list .wl-item + .wl-item { border-top: 1px solid var(--line-soft); border-radius: 0; }
.hub-go { color: #9ca3af; font-size: 18px; }

/* předplatné */
.sub-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center; font-size: 13px; padding: 7px 12px; border-bottom: 1px solid #f3dfb6; background: #fff7e6; color: #7a4a00; }
.sub-bar[hidden] { display: none; }
.sub-bar.bad { background: #fde2df; color: #8a1c12; border-color: #f5b8b0; }
.sub-bar a { color: inherit; text-decoration: underline; }
.sub-bar .sub-sent { font-weight: 700; }
.sub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.sub-box { border: 1px solid var(--line-soft, #e5e7eb); border-radius: 10px; padding: 10px 12px; }
.sub-box span { display: block; font-size: 12px; color: var(--muted); }
.sub-box b { font-size: 18px; }
.sub-meter { height: 6px; border-radius: 99px; background: #e5e7eb; margin-top: 6px; overflow: hidden; }
.sub-meter i { display: block; height: 100%; background: var(--brand); }

/* průvodce — formuláře a fotky */
.req { color: var(--danger); font-style: normal; }
.field-err { color: var(--danger); font-size: 13px; margin-top: 4px; }
input[aria-invalid="true"] { border-color: var(--danger) !important; box-shadow: 0 0 0 3px #dc262622; }
.grp { border: 1px solid var(--line); border-radius: 10px; margin: 14px 0 0; background: #fff; }
.grp > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; min-height: 44px; box-sizing: border-box; }
.grp > summary::-webkit-details-marker { display: none; }
.grp > summary::after { content: "▾"; color: var(--muted); margin-left: 6px; }
.grp[open] > summary::after { content: "▴"; }
.grp > summary b { margin-right: auto; }
.grp-body { padding: 0 14px 14px; }
.field .seg { --ctl: 44px; display: inline-flex; }
.seg-opt { position: relative; display: flex; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: flex; align-items: center; padding: 0 18px; border-radius: 6px; cursor: pointer; color: #374151; }
.seg-opt input:checked + span { background: var(--side); color: #fff; font-weight: 600; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--brand); }
.seg.small { --ctl: 36px; height: 36px; flex: none; }
.seg.small button { padding: 0 10px; font-size: 13px; }
.count-x { width: 70px; text-align: center; color: var(--muted); }
.defect-row .count { width: 70px; }
.typeahead-list .ta-note { padding: 8px 12px; font-size: 13px; color: var(--muted); }
.label-like { font-weight: 600; }
/* krok 4: seznam defektů */
.dlist { display: flex; flex-direction: column; gap: 8px; }
.dl-group { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 10px 0 0; }
.dl-group:first-child { margin-top: 0; }
.dl-row { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.dl-row.open { border-color: var(--brand); }
.dl-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 52px; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.dl-name { flex: 1; min-width: 0; font-weight: 600; }
.dl-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.dl-count.warn { color: #b45309; font-weight: 600; }
.dl-chev { color: var(--muted); }
.dl-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.dl-body > .btn { align-self: flex-start; }
/* dlaždice fotek: velké cíle, stav nahrávání */
.photo.pick img { cursor: pointer; }
.photo:not(.selected).pick img { opacity: .55; }
.photo .del { top: auto; bottom: 4px; right: 4px; width: 40px; height: 40px; font-size: 20px; }
.photo .sel { width: 24px; height: 24px; }
.photo .badge { top: 6px; bottom: auto; left: 6px; font-size: 12px; padding: 2px 7px; background: var(--brand); }
.photo .sel + .badge { left: 36px; }
.photo .up-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #0003; display: none; }
.photo.uploading .up-bar { display: block; }
.photo .up-bar > div { height: 100%; background: var(--brand); width: 0; transition: width .2s; }
.photo.uploading img { opacity: .75; }
.photo.upload-error { border-color: var(--danger); }
.photo .up-msg { position: absolute; top: 6px; right: 6px; font-size: 11px; color: #fff; background: #000a; border-radius: 4px; padding: 1px 5px; }
.photo .up-msg:empty { display: none; }
.progress[data-label]:not([data-label=""]) { margin-bottom: 22px; overflow: visible; position: relative; }
.progress[data-label]:not([data-label=""])::after { content: attr(data-label); position: absolute; top: 9px; left: 0; font-size: 12px; color: var(--muted); }
/* krok 8 */
.gen-sum { margin: 0 0 12px; font-weight: 600; }
.gen-warn { background: #fff7e6; border: 1px solid #f3dfb6; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.gen-warn ul { margin: 6px 0 0; padding-left: 18px; }
.pdf-done { display: flex; align-items: center; gap: 12px; background: color-mix(in srgb, var(--brand) 10%, #fff); border: 1px solid color-mix(in srgb, var(--brand) 28%, #fff); border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; }
.pdf-done > div { flex: 1; }
/* stav ukládání v liště kroku (mobil) */
.sb-save { display: none; font-size: 11px; margin-left: 6px; }
.sb-save::before { content: "●"; margin-right: 3px; }
.sb-save[data-s="ok"] { color: var(--brand); }
.sb-save[data-s="busy"] { color: #b45309; }
.sb-save[data-s="bad"] { color: var(--danger); }
@media (max-width: 767px) {
  .sb-save:not(:empty) { display: inline; }
  .grp-body { padding: 0 12px 12px; }
  body:has(.view.wizard) .top { position: static; }
  body:has(.view.wizard) .step-bar { top: 0; }
  .label-like { display: block; }
}
@media (pointer: coarse) {
  .check { padding: 12px 0; min-height: 44px; box-sizing: border-box; }
}
@media (max-width: 767px) { .psub.mob-only { display: block; } }
@media (max-width: 767px) {
  .defect-row .name { flex: 1 1 100%; }
  .defect-row > .icon-btn { margin-left: auto; width: 44px; height: 44px; }
  .defect-row .count { height: 40px; }
  .sb-save { text-transform: none; letter-spacing: 0; font-weight: 500; }
  .pdf-done { flex-wrap: wrap; }
}
.defect-row .seg, .field .seg { order: 0; flex: none; }

/* jednotné rozvržení: menší okraje, průvodce přes celou šířku, lišta kroku = nadpis kroku, akce v zelené liště */
.top { min-height: 73px; padding: 10px 24px; }
.main { padding: 16px 24px 40px; }
.main.wide { max-width: none; }
.card { padding: 18px; }
.page-head { margin-bottom: 12px; }
.wizard { grid-template-columns: 280px minmax(0, 1fr); gap: 16px; }
.wlist { top: calc(var(--top-h, 60px) + 16px); max-height: calc(100vh - var(--top-h, 60px) - 32px); padding: 12px; }
.wl-item { padding: 7px 8px; }
.step-bar { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 10px 0; margin: -16px 0 12px; }
.step-bar .sb-where { align-items: flex-start; text-align: left; }
.step-bar .sb-where h2 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sb-desc { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.step-bar .sb-back, .step-bar .sb-next { justify-self: auto; }
.step-card { padding: 20px; }
.step-card h3:first-child { margin-top: 0; }
.btn.icon-only { width: 40px; padding: 0; font-size: 20px; line-height: 1; }
.more-menu .umenu-drop { min-width: 190px; }
.umenu-drop .danger-text { color: var(--danger); border-top: 1px solid var(--line-soft); margin-top: 4px; padding-top: 10px; }
.top-actions .desk-only { display: inline-flex; }
.umenu-drop .mob-only { display: none; }
@media (max-width: 1180px) { .wizard { grid-template-columns: 240px minmax(0, 1fr); } }
@media (max-width: 767px) {
  .top { padding: 10px 14px; }
  .main { padding: 12px 12px calc(90px + env(safe-area-inset-bottom)); }
  .top-actions .desk-only { display: none; }
  .wizard { grid-template-columns: minmax(0, 1fr); }
  .top-actions:has(.more-menu) { order: 0; flex-basis: auto; }
  .umenu-drop .mob-only { display: block; }
  .step-bar { grid-template-columns: auto minmax(0, 1fr) auto; margin: -12px -12px 12px; padding: 8px 12px; }
  .step-bar .sb-back { order: 0; } .step-bar .sb-where { order: 1; align-items: center; text-align: center; } .step-bar .sb-next { order: 2; }
  .step-bar .sb-where h2 { font-size: 15px; }
  .step-card { padding: 14px; }
}

/* krok 2 — technologie jako karty (počítač) / řádky s přepínačem (mobil) */
.tech-head { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.th-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.chip { height: 34px; padding: 0 12px; border: 1px solid #dde2e8; border-radius: 99px; background: #fff; font: inherit; font-size: 13px; color: inherit; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: #b7c1cb; }
.chip.on { border-color: color-mix(in srgb, var(--brand) 42%, #fff); background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--side); font-weight: 600; }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tech-card { position: relative; display: flex; gap: 10px; padding: 12px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px #dde2e8; cursor: pointer; }
.tech-card:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 42%, #fff); }
.tech-card.on { background: color-mix(in srgb, var(--brand) 5%, #fff); box-shadow: inset 0 0 0 2px var(--brand); }
.tech-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tech-card:has(input:focus-visible) { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
.tc-box { width: 22px; height: 22px; flex: none; box-sizing: border-box; border-radius: 6px; border: 2px solid #c8cfd7; background: #fff; display: grid; place-items: center; }
.tech-card.on .tc-box { background: var(--brand); border-color: var(--brand); }
.tech-card.on .tc-box::after { content: "✓"; color: #fff; font-size: 13px; font-weight: 700; }
.tc-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tc-dev { font-size: 12px; color: #374151; }
.tc-desc { font-size: 12px; color: var(--muted); line-height: 1.35; }
.tc-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tc-meta.on { color: var(--brand-dark); font-weight: 700; }
.tech-foot { margin: 12px 0 0; }
@media (max-width: 767px) {
  .th-quick { margin-left: 0; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .chip { height: 36px; }
  .tech-grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0 -14px; border-top: 1px solid var(--line-soft); }
  .tech-card { flex-direction: row-reverse; align-items: center; min-height: 60px; padding: 8px 14px; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--line-soft); }
  .tech-card.on { background: #fff; box-shadow: none; }
  .tc-text { flex: 1; }
  .tc-desc, .tc-meta { display: none; }
  .tc-dev { color: var(--muted); }
  .tc-box { width: 46px; height: 28px; border: 0; border-radius: 99px; background: #d1d5db; position: relative; transition: background .15s; }
  .tc-box::before { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; }
  .tech-card.on .tc-box { background: var(--brand); }
  .tech-card.on .tc-box::before { left: 21px; }
  .tech-card.on .tc-box::after { content: none; }
}

/* krok 1 — základní údaje: fotka vlevo, hlavní údaje vpravo, převzetí z minulého protokolu, nabídky z číselníků */
.ico { display: inline-flex; flex: none; }
.take-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 16px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 10%, #fff); border: 1px solid color-mix(in srgb, var(--brand) 28%, #fff); color: color-mix(in srgb, var(--brand-dark) 80%, #000); }
.take-bar > .ico { color: var(--brand-dark); }
.tb-text { flex: 1; min-width: 0; font-size: 14px; }
.take-bar .btn { flex: none; }
.intro-main { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 0 20px; align-items: start; }
.intro-cover { margin: 0; }
.cover-pick { display: flex; flex-direction: column; gap: 8px; }
.cover-pick .cover { position: relative; max-width: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); font: inherit; }
.cover-pick .cover:hover { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.cover-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; }
.cover-badge { position: absolute; left: 8px; bottom: 8px; background: #374151cc; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; }
.cover-acts { display: flex; gap: 8px; }
.cover-acts .btn:first-child { flex: 1; }
.cover-acts .icon-del { color: var(--danger); width: 40px; padding: 0; }
.flabel { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; }
.field > .flabel::after { content: none; }
.ftag { font-style: normal; font-size: 11px; font-weight: 700; color: var(--brand-dark); background: color-mix(in srgb, var(--brand) 10%, #fff); border-radius: 99px; padding: 1px 8px; white-space: nowrap; }
.ftag.soft { font-weight: 600; color: var(--muted); background: #f1f3f6; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fchips .chip { height: 32px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mat-field { display: flex; align-items: center; gap: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.mat-text { flex: 0 1 260px; }
.mat-text .flabel { font-size: 13px; font-weight: 600; color: var(--ink); }
.mat-text .hint { margin-top: 2px; }
.mat-seg { flex: 1; --ctl: 44px; }
.mat-seg button { flex: 1; font-weight: 600; }
.grp > summary { gap: 12px; }
.grp-t { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex: 1; }
.grp-t b { margin: 0; flex: none; }
.grp-miss { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; margin-left: auto; }
.grp-n { flex: none; font-size: 12px; font-weight: 600; background: #f1f3f6; color: #374151; border-radius: 99px; padding: 2px 9px; }
.grp-n.full { background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand-dark); }
.grp-body .grid3 { gap: 0 16px; }
@media (max-width: 1100px) { .grp-body .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 767px) {
  .take-bar { padding: 10px 12px; gap: 10px; }
  .tb-text { font-size: 13px; }
  .take-bar .btn { min-height: 44px; }
  .intro-main { grid-template-columns: minmax(0, 1fr); }
  .cover-pick .cover { aspect-ratio: 16/9; }
  .cover-acts .btn { min-height: 44px; }
  .cover-acts .icon-del { width: 44px; }
  .intro-fields .grid2 { grid-template-columns: 1fr 1fr; gap: 0 10px; }
  .intro-fields .grid2:first-child { grid-template-columns: 1fr; }
  .fchips .chip { height: 40px; }
  .ftag.soft { display: none; }
  .mat-field { flex-direction: column; align-items: stretch; gap: 8px; }
  .mat-text { flex: none; display: flex; flex-direction: column-reverse; }
  .mat-text .hint { order: -1; }
  .grp > summary { min-height: 56px; }
  .grp-t { flex-direction: column; align-items: flex-start; gap: 1px; }
  .grp-miss { margin-left: 0; max-width: 100%; }
  .grp-body .grid3 { grid-template-columns: minmax(0, 1fr); }
  .field input, .field select { min-height: 44px; }
}

/* krok 3 — plochy a defekty */
.bl-sum { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 12px; }
.bl-sum > b { font-size: 15px; }
.bl-crit { color: var(--danger); font-weight: 600; }
.bl-mat { margin-left: auto; }
.bl-mat u { color: var(--brand-dark); text-underline-offset: 2px; }
.blk { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 12px; }
.blk-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.blk:not(.collapsed) .blk-head { border-bottom: 1px solid var(--line-soft); }
.blk-thumb { position: relative; flex: none; width: 96px; aspect-ratio: 4/3; border: 0; padding: 0; border-radius: 8px; background: #e5e9ee; overflow: hidden; cursor: pointer; }
.blk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blk-cam { position: absolute; right: 5px; bottom: 5px; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #374151; display: grid; place-items: center; box-shadow: 0 1px 3px #0003; }
.blk-f { margin: 0; flex: 1 1 200px; min-width: 0; }
.blk-date { flex: 0 1 170px; }
.blk-stats { display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; white-space: nowrap; min-width: 84px; }
.blk-tog, .blk-more > .icon-btn { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #dde2e8; border-radius: 8px; background: #fff; color: #374151; padding: 0; }
.blk-tog.btn { width: auto; padding: 0 12px; display: inline-flex; }
.blk-sumbtn { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.blk-meta { font-size: 13px; color: var(--muted); }
.blk-line { font-size: 13px; color: #374151; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk.collapsed .blk-thumb { width: 72px; }
.blk-body { padding: 4px 14px 14px; }
.dtable { --cols: 64px minmax(0, 1fr) 96px 176px 118px 52px 40px; }
.dt-head, .drow { display: grid; grid-template-columns: var(--cols); grid-template-areas: "code name sev seg cnt ph del"; align-items: center; gap: 10px; }
.dt-head { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.dt-head .dt-vy { grid-column: span 2; }
.dt-empty { margin: 10px 0; }
.drow { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.dr-meta, .dr-ctl { display: contents; }
.dr-code { grid-area: code; font-size: 13px; font-weight: 700; color: #374151; }
.dr-code.none { color: var(--muted); font-weight: 400; }
.dr-name { grid-area: name; min-width: 0; }
.dr-sev { grid-area: sev; }
.dr-seg { grid-area: seg; justify-self: start; }
.dr-cnt { grid-area: cnt; }
.dr-ph { grid-area: ph; }
.dr-del { grid-area: del; width: 40px; height: 40px; display: grid; place-items: center; }
.sevp { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 99px; background: #f1f3f6; color: #4b5563; white-space: nowrap; }
.sevp.krit { background: #fde8e6; color: var(--danger); }
.sevp.zav { background: #fdf0dc; color: #a15c07; }
.sevp.str { background: #eef0f3; color: #4b5563; }
.sevp.drob { background: #f4f5f7; color: var(--muted); font-weight: 500; }
.sevp.own { background: #fff; box-shadow: inset 0 0 0 1px #d4dae1; color: #4b5563; }
.dr-seg.seg.small { height: 36px; }
.stepper { display: inline-flex; align-items: stretch; height: 36px; border: 1px solid #dde2e8; border-radius: 8px; overflow: hidden; background: #fff; }
.stepper button { width: 34px; border: 0; background: #fff; font: inherit; font-size: 16px; cursor: pointer; color: #374151; }
.stepper button:hover:not(:disabled) { background: #f1f4f7; }
.stepper button:disabled { color: #c2c8cf; cursor: default; }
.stepper input { width: 46px; min-height: 0; height: 100%; border: 0; border-left: 1px solid #eceef1; border-right: 1px solid #eceef1; border-radius: 0; padding: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.dr-unk { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.dr-unk .xmark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: #f1f3f6; border: 1px solid #dde2e8; color: var(--ink); font-size: 15px; font-weight: 800; }
@media (max-width: 767px) { .dr-unk .xmark { width: 44px; height: 44px; } }
.dr-ph { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--brand-dark); text-decoration: none; padding: 4px 2px; }
.dr-ph.none { color: #b45309; }
.dr-ph:hover { text-decoration: underline; }
.blk-add { display: flex; gap: 10px; margin-top: 12px; }
.blk-search { flex: 1; display: flex; align-items: center; }
.blk-search > .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); z-index: 1; color: var(--muted); pointer-events: none; }
.blk-search > .ta2 { top: 100%; }
.blk-search input { padding-left: 36px; min-height: 42px; }
.ta2 { margin-top: 4px; max-height: 340px; }
.ta2 .ta-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.ta-code { font-size: 12px; font-weight: 700; color: #374151; }
.ta-name { font-weight: 400; }
.ta-name b { font-weight: 700; }
.ta-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ta-enter { font-size: 12px; font-weight: 700; color: var(--brand-dark); display: none; }
.ta-row.hl .ta-enter { display: inline; }
.ta2 .ta-custom { display: flex; align-items: center; gap: 8px; color: var(--brand-dark); border-top: 1px solid var(--line-soft) !important; }
.ta2 .ta-custom .muted { font-weight: 400; }
.blk-browse { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; max-height: 220px; overflow: auto; }
.freq { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; }
.freq-l { font-size: 13px; color: var(--muted); }
.freq .chip, .blk-browse .chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.freq .chip b, .blk-browse .chip b { font-weight: 700; }
.blk-new { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border: 1.5px dashed color-mix(in srgb, var(--brand) 42%, #fff); border-radius: var(--radius); background: color-mix(in srgb, var(--brand) 5%, #fff); color: var(--brand-dark); font: inherit; font-weight: 700; cursor: pointer; }
.blk-new:hover { background: color-mix(in srgb, var(--brand) 10%, #fff); }
.blk-foot { margin: 12px 0 0; }
/* užší obsah (tablet, menší notebook): ovládání výskytu na druhý řádek pod název, ať tabulka nepřetéká */
@media (max-width: 1279px) and (min-width: 768px) {
  .dtable { --cols: 52px minmax(0, 1fr) 84px 44px 36px; }
  .dt-head { grid-template-areas: "code name sev ph del"; }
  .dt-head .dt-vy { display: none; }
  .drow { grid-template-areas: "code name sev ph del" ". ctl ctl ctl ."; row-gap: 8px; }
  .drow .dr-ctl { grid-area: ctl; display: flex; align-items: center; gap: 10px; }
}
@media (max-width: 767px) {
  .bl-sum { margin-bottom: 10px; }
  .bl-mat { height: 32px; }
  .blk { margin: 0 -2px 10px; }
  .blk-head { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; grid-template-areas: "th name tog more" "th date date date"; gap: 6px 10px; padding: 12px; }
  .blk.collapsed .blk-head { grid-template-areas: "th sum tog more"; align-items: center; }
  .blk-thumb, .blk.collapsed .blk-thumb { grid-area: th; width: 64px; height: 64px; aspect-ratio: auto; }
  .blk-f { grid-area: name; }
  .blk-f > span { display: none; }
  .blk-date { grid-area: date; }
  .blk-date input { min-height: 40px; }
  .blk-stats { display: none; }
  .blk-tog { grid-area: tog; width: 44px; height: 44px; }
  .blk-tog.btn { width: 44px; padding: 0; }
  .blk-more { grid-area: more; }
  .blk-more > .icon-btn { width: 44px; height: 44px; }
  .blk-sumbtn { grid-area: sum; }
  .blk-body { padding: 0 12px 12px; }
  .dt-head { display: none; }
  .drow { grid-template-columns: minmax(0, 1fr) 44px; grid-template-areas: "name del" "meta meta" "ctl ctl"; gap: 4px 8px; padding: 12px 0; }
  .dr-name { font-size: 15px; }
  .dr-meta { grid-area: meta; display: flex; align-items: center; gap: 8px; font-size: 13px; }
  .dr-code.none { display: none; }
  .dr-ctl { grid-area: ctl; display: flex; align-items: center; gap: 10px; margin-top: 6px; }
  .dr-ctl .seg { order: 0; flex: none; }
  .dr-ctl .dr-cnt { order: 1; }
  .dr-del { width: 44px; height: 44px; margin-top: -8px; }
  .dr-seg.seg.small { height: 44px; flex: none; }
  .dr-seg.seg button { padding: 0 14px; }
  .stepper { height: 44px; }
  .stepper button { width: 44px; font-size: 18px; }
  .stepper input { width: 52px; }
  .dr-ph { min-height: 32px; }
  .blk-add { flex-wrap: wrap; }
  .blk-browse-btn { display: none; }
  .blk-search input { min-height: 46px; }
  .ta2 .ta-row { grid-template-columns: 52px minmax(0, 1fr); padding: 12px; }
  .ta-meta, .ta-enter, .ta-row.hl .ta-enter { display: none; }
  .ta2 .ta-custom { padding: 12px; }
  .freq .chip { height: 40px; }
  .freq-l { flex-basis: 100%; }
  .blk-new { min-height: 56px; }
}
/* plocha v úzkém místě (tablet, telefon na šířku, menší okno vedle seznamu kroků): stejné rozložení jako na mobilu,
   podle šířky plochy, ne okna */
.blk { container-type: inline-size; }
@container (max-width: 600px) {
  .blk-head { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; grid-template-areas: "th name tog more" "th date date date"; gap: 6px 10px; padding: 12px; }
  .blk.collapsed .blk-head { grid-template-areas: "th sum tog more"; align-items: center; }
  .blk-thumb, .blk.collapsed .blk-thumb { grid-area: th; width: 64px; height: 64px; aspect-ratio: auto; }
  .blk-f { grid-area: name; }
  .blk-f > span { display: none; }
  .blk-date { grid-area: date; }
  .blk-date input { min-height: 40px; }
  .blk-stats { display: none; }
  .blk-tog { grid-area: tog; width: 44px; height: 44px; }
  .blk-tog.btn { width: 44px; padding: 0; }
  .blk-more { grid-area: more; }
  .blk-more > .icon-btn { width: 44px; height: 44px; }
  .blk-sumbtn { grid-area: sum; }
  .blk-body { padding: 0 12px 12px; }
  .dt-head { display: none; }
  .drow { grid-template-columns: minmax(0, 1fr) 44px; grid-template-areas: "name del" "meta meta" "ctl ctl"; gap: 4px 8px; padding: 12px 0; }
  .dr-name { font-size: 15px; }
  .dr-meta { grid-area: meta; display: flex; align-items: center; gap: 8px; font-size: 13px; }
  .dr-code.none { display: none; }
  .dr-ctl { grid-area: ctl; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
  .dr-ctl .seg { order: 0; flex: none; }
  .dr-ctl .dr-cnt { order: 1; }
  .dr-del { width: 44px; height: 44px; margin-top: -8px; }
  .dr-seg.seg.small { height: 44px; flex: none; }
  .dr-seg.seg button { padding: 0 14px; }
  .stepper { height: 44px; }
  .stepper button { width: 44px; font-size: 18px; }
  .stepper input { width: 52px; }
  .dr-ph { min-height: 32px; }
  .blk-add { flex-wrap: wrap; }
  .blk-browse-btn { display: none; }
  .blk-search input { min-height: 46px; }
  .ta2 .ta-row { grid-template-columns: 52px minmax(0, 1fr); padding: 12px; }
  .ta-meta, .ta-enter, .ta-row.hl .ta-enter { display: none; }
  .ta2 .ta-custom { padding: 12px; }
  .freq .chip { height: 40px; }
  .freq-l { flex-basis: 100%; }
  .blk-new { min-height: 56px; }
}

/* krok 4 — fotky k defektům */
.ph-sum { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; background: #fff; }
.ph-sum-main { flex: 1; min-width: 0; }
.ph-sum-t { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.ph-sum .pbar { width: 100%; margin-top: 8px; }
.ph-up { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #374151; margin-left: auto; }
.ph-next { background: #fff7e6; color: #9a4d06; border: 1px solid #f3cf8e; max-width: 46%; }
.ph-next:hover { background: #fdeccb; }
.ph-next span { overflow: hidden; text-overflow: ellipsis; }
.dl-row { scroll-margin-top: 90px; }
.dl-row.bare:not(.open) { background: #fffaf0; border-color: #f3dfb6; }
.dl-head .ci { flex: none; }
.dl-code { flex: none; width: 64px; font-size: 13px; font-weight: 700; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-name { display: flex; align-items: baseline; gap: 0; flex-wrap: wrap; font-weight: 400; }
.dl-name b { font-weight: 600; }
.dl-sub { font-size: 13px; color: var(--muted); }
.dl-sub::before { content: "\00a0·\00a0"; }
.dl-sub-code { display: none; }
.dl-thumbs { display: flex; gap: 4px; flex: none; }
.dl-thumbs img { width: 34px; height: 26px; object-fit: cover; border-radius: 4px; background: #e5e9ee; display: block; }
.dl-count b { color: var(--ink); }
.dl-count.warn { color: #b45309; }
.dl-chev { display: grid; place-items: center; width: 24px; }
.dl-row.open { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.dl-row.open > .dl-head .dl-name b { color: var(--brand-dark); }
.dl-row.dropping { outline: 2px dashed var(--brand); outline-offset: 2px; background: color-mix(in srgb, var(--brand) 5%, #fff); }
.ph-pick { gap: 10px; }
.ph-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); padding: 10px; border: 1.5px dashed color-mix(in srgb, var(--brand) 30%, #fff); border-radius: 10px; }
.ptile { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ptile[draggable="true"] { cursor: grab; }
.ptile.dragging { opacity: .4; }
.ptile.drop-to .photo { box-shadow: -4px 0 0 var(--brand-dark); }
.ptile .photo .badge.off { background: #fff; color: var(--muted); box-shadow: 0 0 0 1px #d4dae1; }
.ptile .photo.waiting { border-color: #d97706; }
.pt-cap { font-size: 12px; color: var(--muted); }
.pt-cap.on { color: var(--brand-dark); font-weight: 700; }
.pt-sort { display: flex; gap: 6px; }
.pt-sort .btn { flex: 1; min-height: 44px; padding: 0; }
.ph-grid.sorting .photo img { opacity: 1; }
.ph-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.ph-foot p { margin: 0; flex: 1 1 260px; }
.ph-next-sticky { display: none; }
@media (max-width: 767px) {
  .ph-sum { padding: 12px; }
  .ph-sum-t b { font-size: 15px; }
  .dl-code { display: none; }
  .dl-name { flex-direction: column; align-items: flex-start; }
  .dl-sub::before { content: none; }
  .dl-sub-code { display: inline; }
  .dl-thumbs img { width: 30px; height: 30px; }
  .dl-head { min-height: 60px; gap: 8px; }
  .ph-pick .btn { flex: 1; min-height: 48px; }
  .ph-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px; }
  .ph-grid .photo .del { width: 36px; height: 36px; }
  .ph-sort { min-height: 44px; }
  .ph-next-sticky { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 19; min-height: 50px;
    background: #fff7e6; color: #9a4d06; border: 1px solid #f3cf8e; box-shadow: 0 4px 14px #0002; }
  .ph-next-sticky span { overflow: hidden; text-overflow: ellipsis; }
  .ph-next-sticky[hidden] { display: none; }
  .step-card:has(.ph-next-sticky:not([hidden])) { padding-bottom: 76px; }
}
.mat-field .mat-seg { flex: 1; max-width: 560px; display: flex; }

/* spodní panel (mobil) / dialog (počítač), prohlížeč fotky, přepínač */
dialog.sheet { border: 0; padding: 0; border-radius: 14px; width: min(520px, calc(100vw - 32px)); max-height: min(80vh, 720px); background: #fff; color: inherit; box-shadow: 0 10px 40px #0003; overflow: hidden; display: none; flex-direction: column; }
dialog.sheet[open] { display: flex; }
dialog.sheet::backdrop, dialog.pviewer::backdrop { background: #0006; }
.sheet-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line-soft); }
.sheet-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 15px; }
.sheet-t small { display: block; font-size: 12px; }
.sheet-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-x { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; margin: -6px -8px 0 0; color: #374151; }
.sheet-body { padding: 12px 16px 16px; overflow: auto; }
.sheet-act { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; border: 0; border-top: 1px solid var(--line-soft); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 0 2px; }
.sheet-act > span:nth-child(2) { flex: 1; }
.sheet-act.danger-text { color: var(--danger); }
.switch { position: relative; display: inline-flex; flex: none; width: 46px; height: 28px; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; width: 100%; height: 100%; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #d1d5db; transition: background .15s; }
.switch i::before { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #0003; transition: left .15s; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::before { left: 21px; }
.switch input:focus-visible + i { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; cursor: pointer; }
dialog.pviewer { border: 0; padding: 0; margin: auto; width: min(1100px, 100vw - 48px); height: min(860px, 100vh - 48px); max-width: none; max-height: none; border-radius: 14px; background: #111; color: #fff; display: none; flex-direction: column; overflow: hidden; }
dialog.pviewer[open] { display: flex; }
.pv-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 16px; }
.pv-x { color: #fff; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; }
.pv-x:hover { background: #ffffff1a; }
.pv-img { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 12px; }
.pv-img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; border-radius: 4px; }
.pv-plan .pv-img img { background: #fff; }
.pv-panel { background: #fff; color: var(--ink); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 4px; }
.pv-panel:not(:has(> *)) { display: none; }
.pv-cap { margin: 0 0 4px; }
.pv-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-acts:empty { display: none; }
.pv-acts .btn { flex: 1; min-height: 44px; }
.btn.danger-text { color: var(--danger); }
@media (max-width: 767px) {
  dialog.sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 16px 16px 0 0; max-height: 86vh; padding-bottom: env(safe-area-inset-bottom); }
  dialog.pviewer { width: 100vw; height: 100dvh; border-radius: 0; margin: 0; }
}

/* krok 5 — fotodokumentace */
.fd-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 12px; }
.fd-count { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.fd-count > b { font-size: 15px; }
.fd-chips { display: flex; gap: 6px; }
.fd-pick { display: flex; gap: 8px; margin-left: auto; }
.fd-pick .btn { gap: 8px; }
.fd-box { border-radius: 10px; }
.fd-box.dropping { outline: 2px dashed var(--brand); outline-offset: 4px; background: color-mix(in srgb, var(--brand) 5%, #fff); }
.fd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.fd-tile { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-width: 0; }
.fd-tile[draggable="true"] { cursor: grab; }
.fd-tile.dragging { opacity: .4; }
.fd-tile.drop-to { box-shadow: -4px 0 0 var(--brand-dark); }
.fd-media { position: relative; }
.fd-media .photo { aspect-ratio: 4/3; border: 0; }
.fd-media .photo img { cursor: zoom-in; }
.fd-tile.off .fd-media .photo img { opacity: .45; }
.fd-num { position: absolute; left: 8px; top: 8px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; background: var(--side); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; pointer-events: none; box-shadow: 0 0 0 2px #fff; }
.fd-offlbl { position: absolute; left: 6px; right: 34px; top: 8px; font-size: 12px; font-weight: 600; color: #374151; background: #ffffffd9; border-radius: 6px; padding: 2px 6px; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-grip { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 6px; background: #fff; color: #4b5563; display: grid; place-items: center; box-shadow: 0 1px 2px #0002; cursor: grab; }
.fd-acts { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.fd-act { width: 32px; height: 32px; border: 0; border-radius: 6px; background: #fff; color: #374151; display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 2px #0002; padding: 0; }
.fd-act:hover { background: #f1f4f7; color: var(--ink); }
.fd-media .photo .up-msg { top: auto; bottom: 44px; right: 6px; }
.fd-cap { min-height: 36px; padding: 6px 9px; font-size: 13px; }
.fd-inc { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 28px; }
.fd-inc input { width: 18px; height: 18px; }
.fd-tile.off .fd-inc { color: var(--muted); font-weight: 500; }
.fd-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 180px; border: 1.5px dashed color-mix(in srgb, var(--brand) 30%, #fff); border-radius: 10px; background: #f8fbff; color: var(--brand-dark); text-align: center; cursor: pointer; padding: 10px; }
.fd-add:hover { background: color-mix(in srgb, var(--brand) 7%, #fff); }
.fd-add span { font-size: 12px; color: var(--muted); }
.fd-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; border: 1.5px dashed color-mix(in srgb, var(--brand) 20%, #fff); border-radius: 10px; text-align: center; color: #374151; }
.fd-empty > .ico { color: var(--brand-dark); }
.fd-hint { margin: 10px 0 0; }
.fd-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.fd-note .field { margin: 0; }
.fd-note .flabel { font-size: 13px; font-weight: 600; color: var(--ink); }
.fd-pdf { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.fd-pdf-h { display: flex; justify-content: space-between; align-items: baseline; }
.fd-pages { display: flex; gap: 8px; flex-wrap: wrap; }
.fd-mini { width: 62px; aspect-ratio: 210/297; border: 1px solid #d8dde3; border-radius: 3px; background: #fff; padding: 5px; display: flex; flex-direction: column; gap: 4px; }
.fd-mini-h { display: block; height: 3px; width: 60%; background: #374151; border-radius: 2px; }
.fd-mini-g { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.fd-mini-g i { aspect-ratio: 1; background: #d4dae1; border-radius: 1px; }
.fd-open { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.fd-none { margin: 12px 0; }
@media (max-width: 767px) {
  .fd-head { gap: 8px; }
  .fd-chips { order: -1; flex-basis: 100%; overflow-x: auto; }
  .fd-chips .chip { height: 40px; }
  .fd-count { flex: 1; min-width: 0; }
  .fd-count .fd-est { margin-left: auto; }
  .fd-sort { min-height: 40px; }
  .fd-rows { margin: 0 -14px; border-top: 1px solid var(--line-soft); }
  .fd-row { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line-soft); min-height: 76px; }
  .fd-thumb { position: relative; flex: none; width: 64px; height: 64px; border: 0; padding: 0; background: none; cursor: pointer; }
  .fd-thumb .photo { width: 64px; height: 64px; aspect-ratio: auto; border: 0; border-radius: 8px; }
  .fd-thumb .photo .up-msg { display: none; }
  .fd-thumb .fd-num { left: 4px; top: 4px; min-width: 22px; height: 22px; font-size: 11px; }
  .fd-row.off .fd-thumb img { opacity: .45; }
  .fd-rtext { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: none; padding: 6px 0; font: inherit; color: inherit; text-align: left; cursor: pointer; min-height: 44px; }
  .fd-rtext b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fd-rtext b.none, .fd-row.off .fd-rtext b { color: var(--muted); font-weight: 600; }
  .fd-rtext span { font-size: 12px; color: var(--muted); }
  .fd-row .switch { width: 52px; height: 44px; }
  .fd-row .switch i { top: 6px; bottom: 6px; }
  .fd-row .switch i::before { width: 26px; height: 26px; }
  .fd-row .switch input:checked + i::before { left: 23px; }
  .fd-updown { display: flex; gap: 6px; }
  .fd-updown .btn { width: 44px; min-height: 44px; padding: 0; }
  .fd-bottom { grid-template-columns: minmax(0, 1fr); }
  .fd-pick { position: fixed; left: 12px; right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 19; margin: 0; padding: 8px; background: #fff; border-radius: 12px; box-shadow: 0 4px 18px #0002; }
  .fd-pick .btn { flex: 1; min-height: 50px; font-size: 15px; }
  .step-card:has(.fd-pick) { padding-bottom: 92px; }
}

/* krok 6 — přílohy */
.pa-sum { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.pa-sum-t { flex: 0 1 320px; display: flex; flex-direction: column; gap: 3px; }
.pa-sum-t b { font-size: 15px; }
.pa-strip { flex: 1; display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 4px; justify-content: flex-end; }
.pa-chip { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: #4b5563; cursor: pointer; width: 92px; }
.pa-chip b { color: var(--ink); font-size: 12px; margin-top: 4px; }
.pa-chip span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pa-shape { display: block; width: 60px; height: 84px; border: 1px solid #d4dae1; border-radius: 3px; background: #fff; padding: 4px; box-shadow: 0 1px 2px #0001; overflow: hidden; }
.pa-shape.l { width: 88px; height: 62px; margin-top: 22px; }
.pa-shape img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pa-chip:hover .pa-shape { border-color: var(--brand); }
.pa-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.pa-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pa-card.dropping { outline: 2px dashed var(--brand); outline-offset: 2px; background: color-mix(in srgb, var(--brand) 5%, #fff); }
.pa-head { display: flex; align-items: center; gap: 10px; }
.pa-ico { width: 36px; height: 36px; flex: none; border-radius: 8px; background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand-dark); display: grid; place-items: center; }
.pa-ht { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pa-ht b { font-size: 15px; display: flex; align-items: center; gap: 6px; }
.pa-cnt { font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand-dark); border-radius: 99px; padding: 0 8px; }
.pa-pill { flex: none; font-size: 12px; font-weight: 600; border-radius: 99px; padding: 2px 9px; background: #f1f3f6; color: var(--muted); }
.pa-pill.on { background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand-dark); }
.pa-up { flex: none; }
.pa-hint { margin: 0; }
.pa-items { display: flex; flex-direction: column; gap: 8px; }
.pa-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; background: #f6f8fa; min-width: 0; }
.pa-thumb { flex: none; width: 76px; height: 76px; border: 0; padding: 0; background: none; cursor: zoom-in; display: grid; place-items: center; }
.pa-thumb .photo { width: 58px; height: 80px; aspect-ratio: auto; border: 1px solid #d4dae1; border-radius: 3px; background: #fff; }
.pa-thumb.l .photo { width: 80px; height: 58px; }
.pa-thumb .photo img { object-fit: contain; }
.pa-thumb .photo .up-msg { display: none; }
.pa-thumb.ghost, .pa-busy .pa-thumb { width: 58px; height: 76px; border-radius: 3px; background: #e5e9ee; display: block; }
.pa-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pa-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pa-num { font-size: 12px; font-weight: 700; color: var(--brand-dark); background: color-mix(in srgb, var(--brand) 10%, #fff); border-radius: 99px; padding: 2px 9px; }
.pa-orient.seg.small { --ctl: 30px; height: 30px; padding: 2px; }
.pa-orient.seg.small button { padding: 0 8px; font-size: 12px; }
.pa-auto { font-weight: 400; opacity: .8; }
.pa-cap { min-height: 34px; padding: 5px 9px; font-size: 13px; }
.pa-acts { display: flex; flex-direction: column; gap: 6px; }
.pa-act { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid #dde2e8; background: #fff; color: #374151; }
.pa-busy { gap: 12px; }
.pa-busy-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pa-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 12px; border: 1.5px dashed color-mix(in srgb, var(--brand) 30%, #fff); border-radius: 10px; background: #f8fbff; color: var(--brand-dark); font: inherit; cursor: pointer; text-align: center; }
.pa-drop:hover { background: color-mix(in srgb, var(--brand) 7%, #fff); }
.pa-drop span { font-size: 12px; color: var(--muted); }
.pa-foot { margin: 12px 0 0; }
.pa-sheet .field { margin: 0 0 10px; }
.pa-sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; border-top: 1px solid var(--line-soft); }
.pa-sheet-row .pa-orient.seg.small { --ctl: 40px; height: 40px; }
.pa-sheet-row .pa-orient.seg.small button { padding: 0 12px; font-size: 13px; }
@media (max-width: 1100px) { .pa-cards { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  .pa-sum { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  .pa-sum-t { flex: none; }
  .pa-strip { justify-content: flex-start; }
  .pa-cards { gap: 10px; }
  .pa-card { padding: 12px; gap: 8px; }
  .pa-up { min-height: 44px; }
  .pa-item { background: none; padding: 8px 0 0; border-top: 1px solid var(--line-soft); border-radius: 0; gap: 10px; }
  .pa-thumb { width: 64px; height: 64px; }
  .pa-thumb .photo { width: 46px; height: 64px; }
  .pa-thumb.l .photo { width: 64px; height: 46px; }
  .pa-mtext { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: none; padding: 6px 0; font: inherit; color: inherit; text-align: left; cursor: pointer; min-height: 44px; }
  .pa-mtext b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pa-mtext span { font-size: 12px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pa-more { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; }
  .pa-busy .pa-thumb, .pa-thumb.ghost { width: 46px; height: 64px; }
}

/* krok 7 — závěr a doporučení */
.zv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.zv-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.zv-sec + .zv-sec { padding-top: 18px; border-top: 1px solid var(--line-soft); }
.zv-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 10px; }
.zv-head h3 { margin: 0; font-size: 16px; }
.zv-head2 { justify-content: space-between; }
.zv-head2 > div:first-child { display: flex; flex-direction: column; }
.zv-badge { font-size: 12px; font-weight: 600; border-radius: 99px; padding: 2px 10px; display: inline-flex; align-items: center; gap: 4px; }
.zv-badge:empty { display: none; }
.zv-badge.warn { background: #fdf0dc; color: #a15c07; box-shadow: inset 0 0 0 1px #f3cf8e; }
.zv-badge.ok { background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand-dark); }
.zv-check { margin-left: auto; }
.zv-typ { --ctl: 40px; }
.zv-typ button { padding: 0 18px; font-weight: 600; }
.zv-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-top: 8px; }
.zv-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.zv-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.zv-legend i.def { background: #fff8e6; box-shadow: inset 0 0 0 1px #f3dfb6; }
.zv-legend i.new { background: color-mix(in srgb, var(--brand) 7%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 28%, #fff); margin-left: 8px; }
.zv-reset { flex: none; font-size: 13px; font-weight: 600; color: var(--brand-dark); white-space: nowrap; }
.zv-undo { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--brand-dark); background: color-mix(in srgb, var(--brand) 7%, #fff); border: 1px solid color-mix(in srgb, var(--brand) 28%, #fff); border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; }
.zv-undo span { font-weight: 600; }
.zv-undo-b { font-weight: 700; color: var(--brand-dark); min-height: 32px; }
.rte .rte-default { background: #fff8e6; box-shadow: -10px 0 0 #fff8e6, 10px 0 0 #fff8e6; }
.rte .rte-new { background: color-mix(in srgb, var(--brand) 7%, #fff); box-shadow: -10px 0 0 color-mix(in srgb, var(--brand) 7%, #fff), 10px 0 0 color-mix(in srgb, var(--brand) 7%, #fff), inset 3px 0 0 var(--brand); padding-left: 6px; }
.rte p.rte-pb { position: relative; font-size: 0; color: transparent; height: 26px; margin: 10px 0; user-select: none; cursor: default;
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 42%, #fff) 50%, transparent 50%) 0 50% / 10px 1.5px repeat-x; }
.rte p.rte-pb::before { content: "Nová strana v PDF"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 12px; font-weight: 700; color: var(--brand-dark); background: #fff; padding: 0 10px; white-space: nowrap; }
.rte p.rte-pb::after { content: "×"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; display: grid; place-items: center; font-size: 18px; color: #6b7280; background: #fff; border-radius: 50%; box-shadow: inset 0 0 0 1px #dde2e8; cursor: pointer; }
.rte-bar { flex-wrap: wrap; align-items: center; }
.rte-bar .rte-pbbtn { display: inline-flex; align-items: center; gap: 5px; color: var(--brand-dark); font-weight: 600; font-size: 13px; margin-left: auto; }
.zv-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--top-h, 60px) + 70px); }
.zv-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.zv-card-h { font-size: 14px; }
.zv-sum { display: flex; flex-direction: column; gap: 8px; }
.zv-sev { display: flex; gap: 8px; align-items: flex-start; }
.zv-sev > div { display: flex; flex-direction: column; min-width: 0; }
.zv-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 6px; background: #9ca3af; }
.zv-dot.krit { background: var(--danger); } .zv-dot.zav { background: #d97706; } .zv-dot.str { background: #6b7280; } .zv-dot.drob { background: #c2c8cf; }
.zv-opt { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; min-height: 28px; }
.zv-opt input { width: 18px; height: 18px; }
.zv-done { color: var(--brand-dark); background: color-mix(in srgb, var(--brand) 7%, #fff) !important; border-color: color-mix(in srgb, var(--brand) 28%, #fff); }
.zv-done:disabled { opacity: 1; }
.zv-snips { display: flex; flex-direction: column; }
.zv-snip { display: flex; align-items: flex-start; gap: 8px; text-align: left; border: 0; border-top: 1px solid var(--line-soft); background: none; font: inherit; font-size: 13px; color: inherit; padding: 8px 0; cursor: pointer; min-height: 40px; }
.zv-snip:first-child { border-top: 0; }
.zv-snip:hover { color: var(--brand-dark); }
.zv-plus { flex: none; width: 22px; height: 22px; border-radius: 6px; background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand-dark); display: grid; place-items: center; }
.zv-manage { font-weight: 600; }
.zv-snip-foot { margin: 8px 0 0; }
.zv-pre { border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.zv-pre.warn { background: #fffaf0; border: 1px solid #f3dfb6; }
.zv-pre.warn > b { color: #9a4d06; }
.zv-pre.ok { background: color-mix(in srgb, var(--brand) 5%, #fff); border: 1px solid color-mix(in srgb, var(--brand) 28%, #fff); }
.zv-pre.ok > b { color: var(--brand-dark); }
.zv-line { display: flex; align-items: flex-start; gap: 8px; }
.zv-line .ico { margin-top: 1px; }
.zv-line.ok .ico { color: var(--brand-dark); }
.zv-line.bad { color: #9a4d06; }
.zv-notice { display: flex; flex-direction: column; gap: 10px; background: #fffaf0; border: 1px solid #f3dfb6; border-radius: 10px; padding: 12px; }
.zv-n-t { display: flex; gap: 8px; font-size: 14px; }
.zv-n-t .ico { color: #b45309; margin-top: 1px; }
.zv-n-t b { color: #9a4d06; }
.zv-notice .zv-check { margin: 0; width: 100%; min-height: 44px; }
.zv-mbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.zv-mbtns .btn { min-height: 48px; }
.zv-sumbtn { background: color-mix(in srgb, var(--brand) 7%, #fff); color: var(--brand-dark); border: 1px solid color-mix(in srgb, var(--brand) 28%, #fff); }
.zv-sumbtn:hover { background: color-mix(in srgb, var(--brand) 12%, #fff); }
@media (max-width: 1180px) { .zv-grid { grid-template-columns: minmax(0, 1fr) 240px; } }
@media (max-width: 767px) {
  .zv-grid { grid-template-columns: minmax(0, 1fr); }
  .zv-main { gap: 14px; }
  .zv-head { margin-bottom: 8px; }
  .zv-head .zv-pages { margin-left: auto; }
  .zv-typ { width: 100%; --ctl: 44px; }
  .zv-typ button { flex: 1; }
  .zv-foot { flex-direction: column; }
  .zv-reset { min-height: 44px; }
  .rte-bar button { min-width: 44px; min-height: 44px; }
  .rte-bar .rte-pbbtn { padding: 0 10px; }
  .rte-wrap:has(.rte-pbbtn) .rte-bar .rte-opt { display: none; }
  .zv-snip { min-height: 52px; font-size: 15px; align-items: center; padding: 10px 0; }
  .zv-sum .btn { min-height: 48px; }
  .zv-opt { min-height: 44px; font-size: 15px; }
}

/* seznam protokolů (R3): číslo · protokol · postup (8 dílků + co chybí) · upraveno · akce; mobil = karty */
.top-search { flex: none; width: clamp(200px, 26vw, 340px); max-width: none; }
.top-search .ico { color: rgba(255,255,255,.85); }
.top-search input { height: 42px; min-height: 42px; padding: 0 12px 0 36px; background: rgba(255,255,255,.16); border: 1px solid transparent; color: #fff; }
.top-search input::placeholder { color: rgba(255,255,255,.78); }
.top-search input:focus { background: rgba(255,255,255,.24); outline: 2px solid rgba(255,255,255,.5); border-color: transparent; }
.top-actions .btn.on-top .ico { margin-left: -2px; }
.plist-bar { justify-content: space-between; }
.pchips { display: flex; gap: 8px; flex-wrap: wrap; }
.pchip { height: 40px; padding: 0 14px; border: 1px solid #d8dde3; border-radius: 99px; background: #fff; font: inherit; font-weight: 500; color: #374151; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pchip:hover { background: #f4f6f8; }
.pchip.on { background: color-mix(in srgb, var(--brand) 10%, #fff); border-color: color-mix(in srgb, var(--brand) 50%, #fff); color: var(--brand-dark); font-weight: 600; }
.pchip-n { font-variant-numeric: tabular-nums; }
.psort-wrap { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #374151; }
.plist-bar .psort { width: auto; padding: 0 32px 0 12px; }
.top-actions:has(.top-search) { flex-wrap: nowrap; }
.plist .prow { grid-template-columns: 116px minmax(0, 1.5fr) minmax(210px, 1.25fr) minmax(130px, .9fr) 268px; gap: 16px; padding: 12px 16px; cursor: pointer; }
.plist .prow.head { cursor: default; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #4b5563; background: #f6f8fa; padding-top: 11px; padding-bottom: 11px; }
.plist .prow > .pnum { display: block; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plist .prow > .pmain { display: block; min-width: 0; }
.plist .prow > .pprog { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.plist .prow > .pdate { display: block; color: #374151; }
.plist .prow > .pgo { display: flex; gap: 8px; color: inherit; font-weight: 600; justify-content: flex-end; }
.plist .prow > .pextra { display: none; }
.plist .prow .pgo-h { text-align: right; }
.plist .ptitle { display: block; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; }
.plist .ptitle:hover { text-decoration: underline; }
.plist .psub { color: #4b5563; }
.pseg-row { display: flex; align-items: center; gap: 10px; }
.pseg { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; width: 128px; flex: none; }
.pseg i { height: 5px; border-radius: 99px; background: #e5e7eb; }
.pseg i.d { background: var(--brand); }
.pseg i.c { background: color-mix(in srgb, var(--brand) 42%, #fff); }
.pprog:has(.pdone) .pseg { width: 190px; max-width: 100%; }
.pprog:has(.pdone) .pseg i { background: var(--side); }
.pstepn { font-size: 12px; color: #374151; white-space: nowrap; }
.pnote { font-size: 13px; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pnote.warn { color: var(--warn); font-weight: 600; }
.plist .pdone { align-self: flex-start; background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand-dark); border: 1px solid color-mix(in srgb, var(--brand) 28%, #fff); border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.plist .pgo .btn { min-height: 38px; }
.plist .pgo .btn .ico { margin-left: -2px; }
.plist .pcont { min-width: 126px; }
.plist .picon { width: 38px; padding: 0; opacity: 1; }
.plist .pdanger { color: var(--danger); }
.plist .pdanger:hover { background: #fdf1f0; }
.plist .pmore, .plist .pdf-mob { display: none; }
.plist-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 44px 20px; }
.plist-empty p { margin: 0 0 6px; max-width: 360px; }
.plist-empty b { font-size: 16px; }
.pe-ico { width: 56px; height: 56px; border-radius: 50%; background: #eef2f6; color: var(--brand-dark); display: grid; place-items: center; }
.plist-more { display: block; width: 100%; border: 0; border-top: 1px solid var(--line-soft); background: #fff; padding: 14px; font: inherit; font-weight: 600; color: var(--brand-dark); text-decoration: underline; cursor: pointer; min-height: 48px; }
.plist-more:hover { background: #f9fafc; }
.plist-new { display: none; }
.toast-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.toast-undo { border: 0; background: none; color: color-mix(in srgb, var(--brand) 45%, #fff); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 4px 2px; min-height: 32px; white-space: nowrap; }
.toast-undo:disabled { opacity: .6; }
@media (max-width: 1100px) {
  .plist .prow { grid-template-columns: 80px minmax(0, 1.3fr) minmax(170px, 1fr) 268px; }
  .plist .prow > .pdate, .plist .prow.head > :nth-child(4) { display: none; }
  .plist .prow.head > :nth-child(2) { display: block; } /* obecné pravidlo pro ≤ 1000 px by schovalo nadpis „Protokol“ */
}
@media (max-width: 767px) {
  .top-search { flex: 1 1 100%; width: auto; max-width: none; }
  .top-search input { height: 44px; min-height: 44px; font-size: 16px; }
  .plist-bar { gap: 8px; padding: 10px 0; }
  .pchips { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .pchip { height: 44px; flex: none; }
  .psort-wrap { width: 100%; }
  .plist-bar .psort { flex: 1; height: 44px; min-height: 44px; }
  .plist { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
  .plist .prows { display: flex; flex-direction: column; gap: 12px; }
  .plist .prow.head { display: none; }
  .plist .prow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main num" "prog prog" "date date" "go go" "extra extra";
    gap: 8px 10px; padding: 14px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border-top: 0; }
  .plist .prow:hover { background: #fff; }
  .plist .prow > .pnum { grid-area: num; font-weight: 500; color: #374151; font-size: 13px; }
  .plist .prow > .pmain { grid-area: main; }
  .plist .prow > .pprog { grid-area: prog; }
  .plist .prow > .pdate { grid-area: date; display: block; font-size: 13px; color: #4b5563; }
  .plist .prow > .pgo { grid-area: go; }
  .plist .prow > .pextra { grid-area: extra; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
  .plist .prow > .pextra[hidden] { display: none; }
  .plist .ptitle { font-size: 16px; white-space: normal; }
  .plist .psub { white-space: normal; }
  .pseg { flex: 1; width: auto; }
  .pprog:has(.pdone) .pseg { width: 100%; }
  .pnote { white-space: normal; }
  .plist .pgo .btn { min-height: 48px; }
  .plist .pcont, .plist .pdf-mob { flex: 1; display: inline-flex; }
  .plist .picon, .plist .popen, .plist .pdf-desk { display: none; }
  .plist .pmore { display: inline-flex; width: 48px; padding: 0; flex: none; }
  .plist .prow.xopen .pmore { background: color-mix(in srgb, var(--brand) 10%, #fff); border-color: color-mix(in srgb, var(--brand) 42%, #fff); }
  .plist .pextra .btn { min-height: 48px; }
  .plist-more { background: none; border: 0; }
  .plist-new { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 19; min-height: 52px; font-size: 16px; box-shadow: 0 6px 18px #0c6e5133; }
  .plist-view { padding-bottom: 68px; }
  body:has(.plist-new) #toasts, body:has(.hub-actions) #toasts, body:has(.gen-sticky) #toasts { bottom: calc(132px + env(safe-area-inset-bottom)); }
  .toast-undo { min-height: 44px; }
}

/* mobil: rozcestník protokolu (R3) — karta protokolu, Pokračovat na konkrétní chybějící věc, kroky, synchronizace */
.hub-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.hub-cover { display: grid; place-items: center; color: #9ca3af; }
.hub-id { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.hub-id b { font-size: 17px; line-height: 1.25; }
.hub-id span { overflow-wrap: anywhere; }
.hub-next { grid-template-columns: 38px minmax(0, 1fr) auto; min-height: 76px; }
.hub-next .ci { width: 38px; height: 38px; font-size: 16px; }
.hub-next .wl-text small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.hub-next .wl-text b { font-size: 17px; }
.hub-next .wl-text span { font-size: 13px; white-space: normal; }
.hub-next .ico { color: rgba(255,255,255,.9); }
.hub-list .wl-item { grid-template-columns: 28px minmax(0, 1fr) auto; min-height: 58px; }
.hub-list .wl-item.is-warn { background: #fffaf0; }
.hub-list .ci { width: 28px; height: 28px; }
.hub-list .wl-note { white-space: normal; }
.hub-sync { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 2px 4px; }
.hub-sync.ok .ico { color: var(--brand-dark); }
.hub-sync.wait { color: var(--warn); font-weight: 600; }
.hub-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.hub-actions .btn { min-height: 50px; font-size: 15px; }
@media (max-width: 767px) {
  .hub { padding-bottom: 76px; }
  .hub-actions { position: fixed; left: 0; right: 0; bottom: calc(57px + env(safe-area-inset-bottom)); z-index: 19; margin: 0; padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); }
}

/* krok 8 — generování (R3): souhrn, upozornění s Doplnit, výstup, náhled se stránkami, uložené PDF */
.gen-grid { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.gen-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.gen-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fff; min-width: 0; }
.gen-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.gen-card-h > b, .gen-prev-t b { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #374151; }
.gen-card-h > b.gen-wcount { color: var(--warn); }
.gen-pages { font-size: 13px; color: #374151; }
.gen-tiles { display: flex; flex-wrap: wrap; gap: 6px; }
.gen-tile { background: #f1f3f6; border: 1px solid var(--line); border-radius: 99px; padding: 3px 11px; font-size: 13px; font-weight: 600; }
.gen-checks .gen-card-h { margin-bottom: 4px; }
.gen-warn-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; min-height: 48px; }
.gen-warn-row:first-of-type { border-top: 0; }
.gen-warn-row:hover .gen-fix { color: var(--side); }
.gen-wi { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--warn); background: #fff7e6; border: 1.5px solid #e9a23b; }
.gen-wt { display: flex; flex-direction: column; min-width: 0; }
.gen-wt small { font-size: 12px; color: var(--muted); }
.gen-wt b { font-weight: 600; }
.gen-fix { font-weight: 700; color: var(--brand-dark); text-decoration: underline; white-space: nowrap; font-size: 13px; }
.gen-ok-row { display: flex; align-items: flex-start; gap: 8px; padding-top: 9px; border-top: 1px solid var(--line-soft); font-size: 13px; color: #374151; }
.gen-checks:not(.has-warn) .gen-ok-row { border-top: 0; padding-top: 2px; }
.gen-oki { width: 22px; height: 22px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand-dark); display: grid; place-items: center; }
.gen-out { display: flex; flex-direction: column; gap: 8px; }
.gen-out .btn { width: 100%; min-height: 48px; font-size: 15px; }
.gen-hint { margin: 0; }
.gen-out .progress { margin-top: 4px; }
.gen-done-wrap:empty { display: none; }
.gen-done { display: flex; align-items: center; gap: 12px; background: color-mix(in srgb, var(--brand) 10%, #fff); border: 1px solid color-mix(in srgb, var(--brand) 28%, #fff); border-radius: 10px; padding: 14px; flex-wrap: wrap; }
.gen-ok { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; }
.gen-done-t { flex: 1 1 180px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gen-done-t b { color: var(--brand-dark); }
.gen-done-t .small { color: #374151; }
.gen-done-b { display: flex; gap: 8px; flex-wrap: wrap; }
.gen-side { position: sticky; top: calc(var(--top-h, 60px) + 70px); min-width: 0; }
.gen-prev .gen-card-h { flex-wrap: wrap; }
.gen-prev-t { display: flex; align-items: baseline; gap: 8px; }
.gen-pageno { margin-left: auto; font-size: 13px; color: #374151; font-variant-numeric: tabular-nums; }
.gen-open { display: none; }
.gen-prev-body { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 10px; height: max(420px, calc(100vh - var(--top-h, 60px) - 190px)); }
.gen-thumbs { position: relative; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 2px 4px 2px 2px; }
.gen-thumb { position: relative; flex: none; width: 100%; background: none; border: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.gen-mini { display: block; position: relative; width: 100%; aspect-ratio: 210 / 297; background: #fff; border: 1px solid #d4d9df; border-radius: 3px; overflow: hidden; }
.gen-mini .pdf-mini { position: absolute; left: 0; top: 0; }
.gen-thumb:hover .gen-mini { border-color: var(--brand); }
.gen-thumb.on .gen-mini { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.gen-thumb:focus-visible { outline: none; } .gen-thumb:focus-visible .gen-mini { outline: 2px solid var(--brand); outline-offset: 1px; }
.gen-thumb-n { position: absolute; right: 4px; top: 4px; min-width: 18px; padding: 1px 4px; border-radius: 9px; background: #374151; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; }
.gen-thumb.on .gen-thumb-n { background: var(--brand); }
.gen-thumb-t { font-size: 10.5px; line-height: 1.25; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; }
.gen-thumb.on .gen-thumb-t { color: var(--brand); font-weight: 600; }
.gen-prev-body .pdf-preview { max-height: none; height: 100%; min-height: 0; padding: 12px; }
.gen-sticky { display: none; }
@media (max-width: 1180px) { .gen-grid { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); } }
@media (max-width: 960px) and (min-width: 768px) {
  .gen-grid { grid-template-columns: minmax(0, 1fr); }
  .gen-side { position: static; }
}
@media (max-width: 767px) {
  .gen-grid { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .gen-main, .gen-side { display: contents; }
  .gen-sum { order: 1; } .gen-checks { order: 2; } .gen-out { order: 3; } .gen-prev { order: 4; } .gen-done-wrap { order: 5; } .rc-slot { order: 6; }
  .gen-card-h > b { font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--ink); }
  .gen-card-h > b.gen-wcount { color: var(--warn); }
  .gen-out { border: 0; padding: 0; background: none; }
  .gen-out .gen-card-h, .gen-go-main { display: none; }
  .gen-out .btn.gen-concept { background: #fff; }
  .gen-warn-row { min-height: 60px; }
  .gen-fix { text-decoration: none; font-size: 14px; }
  .gen-prev-t { flex-direction: column; gap: 0; }
  .gen-prev-t b { font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); }
  .gen-open { display: inline-flex; min-height: 44px; padding: 0 16px; }
  .gen-pageno { display: none; }
  .gen-prev.open .gen-pageno { display: inline; }
  .gen-prev-body { display: block; height: auto; }
  .gen-thumbs { display: none; }
  .gen-prev:not(.open) .pdf-preview { max-height: 210px; overflow: hidden; pointer-events: none; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
  .gen-prev.open .pdf-preview { max-height: 75vh; overflow: auto; }
  .gen-done-b { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .gen-done-b .btn { min-height: 48px; }
  .gen-sticky { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 19; min-height: 52px; font-size: 16px; box-shadow: 0 6px 18px #0c6e5133; }
  .step-card:has(.gen-sticky) { padding-bottom: 80px; }
}

/* nastavení: editor hlavičky a patičky PDF — každá část = vlastní náhled okraje stránky + její volby */
.hf-part { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.hf-head { display: flex; align-items: baseline; gap: 10px; }
.hf-sec { font-size: 15px; font-weight: 700; }
.hf-lab { font-size: 12px; color: var(--muted); }
.hf-part .seg { width: max-content; max-width: 100%; overflow-x: auto; }
.hf-part .field { margin-bottom: 2px; }
.hf-part textarea { max-width: 640px; }
.hf-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.hf-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 10px; min-width: 104px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 13px; color: #374151; cursor: pointer; }
.hf-tile:hover { border-color: color-mix(in srgb, var(--brand) 42%, #fff); }
.hf-tile.on { border-color: var(--side); box-shadow: inset 0 0 0 1px var(--side); background: color-mix(in srgb, var(--brand) 5%, #fff); color: var(--side); font-weight: 600; }
.hf-pic svg { display: block; }
.hf-tiles.sw .hf-tile { flex-direction: row; min-width: 0; padding: 0 14px; height: 40px; }
.hf-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.hf-dot.none { background: linear-gradient(135deg, transparent 45%, #b42318 45%, #b42318 55%, transparent 55%), #fff; box-shadow: inset 0 0 0 1px #c8cfd7; }
.hf-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hf-cols[hidden], .hf-part .field[hidden] { display: none; }
.hf-cols textarea { font-size: 13px; }
.hf-prev { background: #eef0f2; border-radius: 8px; padding: 10px; }
.hf-clip { position: relative; overflow: hidden; background: #fff; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.hf-doc { position: absolute; left: 0; top: 0; width: 210mm; transform-origin: 0 0; color: #000; line-height: 1.5; font-size: 16px; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; }
.hf-doc .page { box-shadow: none; }
/* podmnožina pravidel z pdf.css, která jsou jinak omezená na #pdf-content */
.hf-doc * { box-sizing: border-box; }
.hf-doc .grid { display: grid; } .hf-doc .grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hf-doc .text-xs { font-size: .75rem; line-height: 1rem; } .hf-doc .text-center { text-align: center; } .hf-doc .text-gray-500 { color: #6b7280; }
@media (max-width: 767px) { .hf-cols { grid-template-columns: 1fr; gap: 4px; } .hf-tile { min-width: 0; flex: 1; padding: 8px 4px; } .hf-tiles:not(.sw) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); } .hf-tiles:not(.sw) .hf-tile > span:last-child { text-align: center; line-height: 1.2; overflow-wrap: anywhere; } .hf-pic svg { width: 72px; height: 36px; max-width: 100%; } .hf-tiles.sw .hf-tile { padding: 0 6px; gap: 6px; white-space: nowrap; font-size: 12px; } .hf-part { padding: 10px; } .hf-prev { padding: 6px; } }

/* nastavení: číselníky — seznam číselníků + editor položek */
.lx { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.lx-nav { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--top-h, 60px) + 16px); }
.lx-nav .sico { font-size: 11px; font-weight: 700; }
.lx-editor { margin: 0; }
.lx-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.lx-status { font-size: 12px; color: var(--muted); white-space: nowrap; }
.lx-status.ok { color: var(--brand-dark); } .lx-status.err { color: var(--danger); }
.lx-add { display: flex; gap: 8px; }
.lx-add input { flex: 1; min-width: 0; }
.lx-tools { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: 10px 0 8px; }
.lx-items { display: flex; flex-direction: column; gap: 4px; }
.lx-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) 36px; gap: 4px; align-items: center; background: #fff; border: 1px solid var(--line-soft); border-radius: 8px; padding: 2px 4px; transition: transform .12s; }
.lx-row:hover { border-color: var(--line); }
.lx-row.dragging { transition: none; z-index: 2; position: relative; box-shadow: 0 6px 18px rgba(0,0,0,.14); border-color: color-mix(in srgb, var(--brand) 42%, #fff); }
.lx-grip { height: 36px; border: 0; background: none; color: #9ca3af; cursor: grab; touch-action: none; display: grid; place-items: center; border-radius: 6px; }
.lx-grip:hover, .lx-grip:focus-visible { color: var(--brand-dark); background: #f1f4f7; }
.lx-in { border: 0 !important; background: transparent; height: 36px; padding: 0 6px; font: inherit; min-width: 0; border-radius: 6px; box-shadow: none !important; }
.lx-in:focus { background: color-mix(in srgb, var(--brand) 5%, #fff); outline: 1px solid color-mix(in srgb, var(--brand) 42%, #fff); }
.lx-del { height: 36px; border: 0; background: none; color: #9ca3af; font-size: 20px; cursor: pointer; border-radius: 6px; }
.lx-del:hover { color: var(--danger); background: #fef2f2; }
.lx-empty { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }
.lx-back { font-weight: 600; text-decoration: none; white-space: nowrap; }
@media (max-width: 1180px) { .lx { grid-template-columns: 220px minmax(0, 1fr); } }
@media (max-width: 767px) {
  .lx { grid-template-columns: 1fr; }
  .lx-nav { position: static; }
  .lx-nav .crow { min-height: 54px; }
  .lx-head { flex-wrap: wrap; }
  .lx-row { grid-template-columns: 40px minmax(0, 1fr) 44px; min-height: 46px; }
  .lx-grip, .lx-del, .lx-in { height: 44px; }
  .lx-tools { flex-direction: column; align-items: flex-start; }
}

/* paleta barvy čáry v hlavičce/patičce */
.hf-swrow { gap: 8px; }
.hf-sw.none { background: linear-gradient(135deg, transparent 45%, #b42318 45%, #b42318 55%, transparent 55%), #fff; box-shadow: inset 0 0 0 1px #c8cfd7; }
.hf-swrow input[type=color] { width: 36px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.hf-swrow input[type=color].on { outline: 2px solid var(--ink); outline-offset: 2px; }
.hf-swcap { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* symbol firmy: boční panel a mobilní lišta — na bílém čtverečku, aby byl vidět na jakékoli barvě firmy */
.side-logo.sym { background: #fff; padding: 4px; box-sizing: border-box; }
.side-logo.sym img { background: transparent; }
.top-sym { display: none; }
@media (max-width: 767px) {
  .top-sym { display: grid; place-items: center; width: 34px; height: 34px; flex: none; background: #fff; border-radius: 8px; padding: 4px; box-sizing: border-box; }
  .top-sym img { max-width: 100%; max-height: 100%; object-fit: contain; }
}
.dropzone img { background: repeating-conic-gradient(#eef0f2 0 25%, #fff 0 50%) 0 0 / 12px 12px; }

/* světlé (bílé) logo na průhledném pozadí: tmavý podklad v aplikaci i v náhledu nahraného obrázku */
.side-logo.sym.tone-light, .top-sym.tone-light { background: rgba(0,0,0,.28); }
.dropzone.tone-light img { background: repeating-conic-gradient(#3a4147 0 25%, #2F353A 0 50%) 0 0 / 12px 12px; }

/* štítky v katalogu (podtyp materiálu, detekční metoda) — štítky uvnitř pole */
.tagbox { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: var(--ctl, 40px); box-sizing: border-box; padding: 5px 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: text; }
.tagbox:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.tagbox .tag-in { flex: 1; min-width: 80px; border: 0 !important; box-shadow: none !important; outline: 0; height: 28px; padding: 0 2px; background: transparent; font: inherit; }
.tchip { display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 4px 0 10px; border-radius: 99px; background: color-mix(in srgb, var(--brand) 10%, #fff); border: 1px solid color-mix(in srgb, var(--brand) 42%, #fff); color: var(--brand-dark); font-size: 13px; font-weight: 600; white-space: nowrap; }
.tchip button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--brand-dark); font-size: 15px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.tchip button:hover { background: color-mix(in srgb, var(--brand) 21%, #fff); }
@media (max-width: 767px) { .tchip { height: 32px; } .tchip button { width: 28px; height: 28px; } }
.tagbox .tag-in::-webkit-calendar-picker-indicator { display: none !important; }

/* kostry při načítání (skeleton.js) */
.sk { display: block; max-width: 100%; border-radius: 6px; background: linear-gradient(90deg, #eceef1 25%, #f6f7f9 37%, #eceef1 63%); background-size: 400% 100%; animation: sk-shine 1.4s ease infinite; }
.sk.mt { margin-top: 7px; }
.sk.btnsk { border-radius: 8px; margin-left: auto; }
.sk.on-dark { background: linear-gradient(90deg, rgba(255,255,255,.22) 25%, rgba(255,255,255,.36) 37%, rgba(255,255,255,.22) 63%); background-size: 400% 100%; display: inline-block; vertical-align: middle; }
.top-sub .sk.on-dark { margin-top: 6px; }
@keyframes sk-shine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.prow.skel { cursor: default; pointer-events: none; }
.prow.skel:hover { background: none; }
.pchip.skel { pointer-events: none; }
.pchip-n .sk { display: inline-block; vertical-align: middle; }
.wl-item.skel { pointer-events: none; }
.wl-item.skel .ci { border-color: #e5e9ee; }
.skel-card { display: flex; flex-direction: column; }
.skel-card > .sk:first-child { margin-bottom: 8px; }
.skel-bar { padding: 10px 0 12px; margin: -16px 0 12px; border-bottom: 1px solid var(--line); }

/* barevné motivy v nastavení */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.theme { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; font-size: 13px; color: var(--ink); text-align: left; }
.theme:hover { border-color: #c8cfd7; }
.theme.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); font-weight: 600; }
.theme-pic { display: flex; width: 30px; height: 30px; border-radius: 7px; overflow: hidden; flex: none; }
.theme-pic i { flex: 1; }

/* našeptávač (číselníky v polích průvodce) */
.sugg-wrap { position: relative; }
.sugg { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 12; max-height: 264px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(16,24,40,.14); padding: 4px; }
.sugg-item { padding: 9px 10px; border-radius: 7px; cursor: pointer; font-size: 14px; line-height: 1.35; color: var(--ink); }
.sugg-item:hover, .sugg-item.on { background: color-mix(in srgb, var(--brand) 10%, #fff); }
.sugg-item.sel { font-weight: 600; color: var(--brand-dark); }
.sugg-item mark { background: none; color: var(--brand-dark); font-weight: 700; }
@media (max-width: 767px) { .sugg-item { padding: 12px 12px; font-size: 15px; } .sugg { max-height: 300px; } }

/* výběr data (js/datepicker.js) */
.date-picker { position: relative; display: block; }
.date-picker .date-display { width: 100%; cursor: pointer; padding-right: 36px; caret-color: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='17' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.date-picker.open .date-display { border-color: var(--brand); outline: 2px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.date-popover { position: absolute; top: calc(100% + 6px); left: 0; z-index: 12; width: 288px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16,24,40,.16); }
.date-popover.right { left: auto; right: 0; }
.date-popover.up { top: auto; bottom: calc(100% + 6px); }
.date-popover[hidden] { display: none; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-title { font: inherit; font-weight: 700; font-size: 15px; text-transform: capitalize; border: 0; background: none; color: var(--ink); padding: 6px 10px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.dp-title:not(:disabled)::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); opacity: .55; }
.dp-title:hover:not(:disabled) { background: color-mix(in srgb, var(--brand) 8%, #fff); color: var(--brand-dark); }
.dp-title:disabled { cursor: default; }
.date-popover:not([data-mode="days"]) .dp-days { display: none; }
.date-popover:not([data-mode="days"]) .dp-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dp-cell { min-height: 48px; padding: 0 4px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.dp-cell:hover:not(.selected) { background: color-mix(in srgb, var(--brand) 8%, #fff); }
.dp-cell.today { color: var(--brand-dark); font-weight: 700; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 45%, transparent); }
.dp-cell.selected { background: var(--brand); color: #fff; font-weight: 600; }
.dp-nav { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--brand-dark); font-size: 20px; line-height: 1; cursor: pointer; }
.dp-nav:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); }
.dp-days, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-days { margin-bottom: 4px; text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dp-day { aspect-ratio: 1; min-height: 34px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.dp-day:hover:not(:disabled):not(.selected) { background: color-mix(in srgb, var(--brand) 8%, #fff); }
.dp-day.weekend { color: var(--muted); }
.dp-day.outside { opacity: .35; }
.dp-day.today { color: var(--brand-dark); font-weight: 700; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 45%, transparent); }
.dp-day.focus:not(.selected) { box-shadow: inset 0 0 0 2px var(--brand); }
.dp-day.selected, .dp-day.selected:hover { background: var(--brand); color: #fff; font-weight: 600; }
.dp-day:disabled { opacity: .2; cursor: not-allowed; }
.dp-quick { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.dp-quick button { flex: 1 1 auto; min-height: 34px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 99px; background: none; color: var(--brand-dark); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.dp-quick button:hover:not(:disabled) { border-color: var(--brand); }
.dp-quick button:disabled { opacity: .35; cursor: not-allowed; }
@media (max-width: 767px) { .date-popover { width: min(320px, calc(100vw - 24px)); } .dp-day { min-height: 40px; font-size: 15px; } }

/* střední šířky (tablet, telefon na šířku, malý notebook): boční panel jen s ikonami, kroky průvodce jako úzký sloupec
   stavových koleček, lišta kroku s krátkými popisky — obsah tak dostane místo */
@media (min-width: 768px) and (max-width: 1199px) {
  .side { width: 72px; padding: 16px 10px 12px; align-items: stretch; }
  .side-brand { justify-content: center; padding: 0; }
  .side-brand > span:not(.side-logo) { display: none; }
  .side-nav a { font-size: 0; justify-content: center; padding: 10px; }
  .side-user > .umenu-btn { justify-content: center; padding: 6px; }
  .side-user > .umenu-btn > :not(.avatar) { display: none; }
  .side-user .umenu-drop { min-width: 200px; }
  .top { padding-left: 20px; padding-right: 20px; }
  .wizard { grid-template-columns: 60px minmax(0, 1fr); gap: 14px; }
  .wizard > .wlist { padding: 8px 6px; }
  .wizard > .wlist .wl-head, .wizard > .wlist .wl-text, .wizard > .wlist .wl-hist { display: none; }
  .wizard > .wlist .wl-item { justify-content: center; padding: 8px 0; }
  .step-bar .desk-only { display: none; }
  .step-bar .mob-only { display: inline; }
  .step-bar .sb-desc { display: none; }
  /* katalog: seznam vlevo zůstává i při otevřené položce (pravidla pro ≤ 900 px by ho schovala) */
  .md { grid-template-columns: 240px minmax(0, 1fr); }
  .md.has-detail .md-list, .md:not(.has-detail) .md-detail { display: block; }
  .md-list { position: sticky; max-height: calc(100vh - var(--top-h, 60px) - 92px); }
  .md-detail { position: sticky; }
  .md-detail .grid2, .md-detail .grid3 { grid-template-columns: minmax(0, 1fr); }
  /* nastavení: sekce jako posuvné záložky nahoře (jako na mobilu), obsah na celou šířku */
  .settings { display: flex; flex-direction: column; gap: 12px; }
  .settings > div { width: 100%; }
  .wlist.snav { display: flex; min-width: 0; max-width: 100%; position: static; max-height: none; flex-direction: row; overflow-x: auto; gap: 6px; padding: 0 0 2px; background: none; box-shadow: none; scrollbar-width: none; }
  .snav .grp, .snav .wl-head, .snav .wl-note, .snav .sico { display: none; }
  .snav .wl-item { display: flex; white-space: nowrap; background: #fff; min-height: 44px; padding: 0 14px; box-shadow: var(--shadow); }
  .snav .wl-item.on { background: color-mix(in srgb, var(--brand) 10%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 42%, #fff); }
}

/* pole pro fotky defektu (krok 4) */
.ph-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 168px; padding: 20px; border: 2px dashed color-mix(in srgb, var(--brand) 38%, #fff); border-radius: 12px; background: color-mix(in srgb, var(--brand) 4%, #fff); text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.ph-drop:hover, .dl-row.dropping .ph-drop { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); }
.ph-drop-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--brand-dark); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 28%, #fff); }
.ph-drop-txt { display: flex; flex-direction: column; gap: 2px; }
.ph-drop-txt b { font-size: 15px; }
.ph-drop-txt span { font-size: 13px; color: var(--muted); }
.ph-drop .ph-pick { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ph-drop.has { flex-direction: row; justify-content: space-between; min-height: 0; padding: 10px 12px 10px 16px; text-align: left; }
.ph-drop.has .ph-drop-txt b { font-size: 14px; }
.dl-row.dropping { outline: 0; background: none; }
@media (pointer: coarse) { .ph-drop { cursor: default; min-height: 0; } .ph-drop.has { flex-direction: column; align-items: stretch; text-align: center; } .ph-drop .ph-pick { width: 100%; } .ph-drop .ph-pick .btn { flex: 1; min-height: 48px; } }

/* krok 7: souhrn a textové bloky jako přepínače (vložit / odebrat) */
.zv-snip { align-items: center; border-radius: 8px; padding: 8px 6px; margin: 0 -6px; border-top-color: transparent; }
.zv-snip + .zv-snip { box-shadow: 0 -1px 0 var(--line-soft); }
.zv-snip:hover { background: color-mix(in srgb, var(--brand) 6%, #fff); }
.zv-snip-t { flex: 1; min-width: 0; }
.zv-snip.on { background: color-mix(in srgb, var(--brand) 9%, #fff); color: var(--ink); box-shadow: none; }
.zv-snip.on + .zv-snip { box-shadow: none; }
.zv-snip.on .zv-plus { background: var(--brand); color: #fff; }
.zv-snip-rm { flex: none; font-size: 12px; font-weight: 600; color: var(--danger); opacity: 0; transition: opacity .15s; }
.zv-snip.on:hover .zv-snip-rm, .zv-snip.on:focus-visible .zv-snip-rm { opacity: 1; }
@media (pointer: coarse) { .zv-snip-rm { opacity: 1; } }
.zv-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.zv-sum-on { display: flex; flex-direction: column; gap: 8px; }
.zv-sum-st { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 8px; background: color-mix(in srgb, var(--brand) 8%, #fff); color: var(--brand-dark); font-weight: 600; font-size: 13px; }
.zv-sum-act { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.zv-rm { color: var(--danger); }
.zv-rm:hover { border-color: var(--danger); }

/* ---------------------------------------------------------------- zákazníci */
@media (max-width: 767px) { .snav .wl-item.mob-only { display: grid; } .snav .grp.mob-only { display: block; } .bottomnav a { padding: 4px 4px; font-size: 11px; } }
.cust-av { font-size: 10px; font-weight: 700; letter-spacing: -.02em; }
.cust-av.virt, .cust-big.virt { border-style: dashed; }
.cust-rev { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cust-empty { display: grid; justify-items: center; gap: 4px; }
.cust-empty .ico { color: var(--brand); opacity: .7; }
.cust-empty p { margin: 0; max-width: 360px; }
.cust-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.cust-big { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 18px;
  background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand-dark); border: 1px solid color-mix(in srgb, var(--brand) 30%, #fff); }
.cust-title { flex: 1; min-width: 0; }
.cust-title h2 { margin: 0 0 2px; font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.cust-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.qa { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; }
.qa .ico { color: var(--brand); }
.qa:hover { border-color: color-mix(in srgb, var(--brand) 45%, #fff); background: color-mix(in srgb, var(--brand) 5%, #fff); }
.cust-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 16px; }
.cust-stats > div { background: #f6f8fa; border-radius: 10px; padding: 10px 12px; display: grid; gap: 1px; min-width: 0; }
.cust-stats span { font-size: 12px; color: var(--muted); }
.cust-stats b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-stats small { font-size: 11px; color: var(--muted); }
.cust-nocard { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px; margin-bottom: 16px; border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 7%, #fff); border: 1px dashed color-mix(in srgb, var(--brand) 40%, #fff); font-size: 14px; }
.cust-info { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 6px 14px; margin: 0 0 14px; font-size: 14px; }
.cust-info dt { color: var(--muted); }
.cust-info dd { margin: 0; overflow-wrap: anywhere; }
.cust-note { background: #fffbeb; border: 1px solid #f3e3b5; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.cust-note span { font-size: 12px; color: #8a6d1a; font-weight: 600; }
.cust-note p { margin: 2px 0 0; white-space: pre-wrap; font-size: 14px; }
.cust-actions { margin-bottom: 6px; }
.cust-h3 { font-size: 15px; margin: 18px 0 8px; }
.cust-orders { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ord { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 12px; }
.ord + .ord { border-top: 1px solid var(--line-soft, #eef0f3); }
.ord-main { display: grid; gap: 2px; min-width: 0; color: inherit; text-decoration: none; }
.ord-meta { display: flex; gap: 8px; align-items: center; min-width: 0; font-size: 12px; color: var(--muted); }
.ord-num { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-typ { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.ord-main:hover b { color: var(--brand-dark); text-decoration: underline; }
.ord-st { flex: none; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: #fff4e0; color: #8a5a00; white-space: nowrap; }
.ord-st.done { background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand-dark); }
.price { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.price-in { width: 92px; height: 32px; min-height: 32px; text-align: right; padding: 0 8px; font: inherit; font-size: 14px; color: var(--ink); }
.price-in.busy { opacity: .5; }
.price-in.err { border-color: var(--danger); }
.ord-total { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: #f6f8fa; border-top: 1px solid var(--line); font-size: 14px; }
.ord-total > span { font-weight: 600; }
.ord-total .muted { font-weight: 400; font-size: 12px; }
.cust-ares { display: flex; gap: 10px; align-items: end; }
.cust-ares .field { flex: 1; max-width: 240px; }
.cust-ares .btn { margin-bottom: 14px; height: var(--ctl, 40px); }
@media (max-width: 767px) {
  .cust-head .md-close { align-self: flex-start; }
  .qa { flex: 1 1 calc(33% - 8px); justify-content: center; padding: 0 8px; }
  .cust-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-in { width: 80px; }
  .cust-info { grid-template-columns: 1fr; gap: 0; }
  .cust-info dd { margin-bottom: 8px; }
  .cust-nocard { flex-direction: column; align-items: stretch; }
  .cust-ares .field { max-width: none; }
}

/* štítek protokolu převzatého z jiné firmy (data.snap.label, např. „DPS“) */
.src-tag { display: inline-block; vertical-align: 1px; margin-right: 6px; padding: 1px 6px; border-radius: 5px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  line-height: 1.5; background: #eef0f3; color: #4b5563; border: 1px solid #d8dde3; }
.src-tag.on-dark { margin: 0 0 0 8px; background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.35); }

/* krok 3: „Přidat plochu“ zůstává při dlouhém seznamu ploch přilepené dole v okně (nová plocha přibývá na konec) */
.blk-new { position: sticky; bottom: 14px; z-index: 6; box-shadow: 0 6px 20px rgba(16, 24, 40, .10); }
@media (max-width: 767px) { .blk-new { bottom: calc(70px + env(safe-area-inset-bottom)); } }

/* řazení kliknutím na záhlaví seznamu protokolů */
.phsort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.phsort i { font-style: normal; font-size: 11px; color: #9aa3ad; letter-spacing: 0; }
.phsort:hover, .phsort.on { color: var(--ink); }
.phsort.on i { color: var(--brand-dark); }
.phdate { display: flex; gap: 10px; flex-wrap: wrap; letter-spacing: .03em; row-gap: 2px; }
.phdate .phsort:not(.on) { color: #9aa3ad; }
.pdl { color: var(--muted); }

/* ---------------------------------------------------------------- zákazníci: tabulka + panel / spodní list */
.cust-bar { flex-wrap: wrap; }
.cchips { display: flex; gap: 6px; flex-wrap: wrap; }
.cchip-n { font-weight: 500; opacity: .75; }
.cview { position: relative; }
.cview > summary { list-style: none; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; height: var(--ctl, 40px); }
.cview > summary::-webkit-details-marker { display: none; }
.cview-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 270px; padding: 6px 14px 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(16,24,40,.16); display: grid; gap: 4px; }
.cview-pop fieldset { border: 0; margin: 0; padding: 8px 0 4px; display: grid; gap: 2px; }
.cview-pop fieldset + fieldset { border-top: 1px solid var(--line-soft); }
.cview-pop legend { padding: 0; margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #4b5563; }
.cview-pop select { width: 100%; height: 38px; }
.cview-pop .cv-opt { display: flex; gap: 8px; align-items: center; min-height: 30px; margin: 0; padding: 0; font-size: 14px; font-weight: 400; color: var(--ink); cursor: pointer; }
.cview-pop .cv-opt input { margin: 0; }
.ctable-box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: clip; }
.ctable-box.hscroll { overflow-x: auto; } /* fitScroll: posouvání jen když se tabulka nevejde (pak hlavička nevisí) */
.ctable { min-width: 720px; }
.ctable .crow { display: grid; grid-template-columns: var(--cgrid); gap: 14px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line-soft); cursor: pointer; }
.ctable .crow:hover { background: #f9fafc; }
.ctable .crow.on { background: color-mix(in srgb, var(--brand) 7%, #fff); box-shadow: inset 3px 0 0 var(--brand); }
.chead { border-top: 0; cursor: default; background: #f6f8fa; padding-top: 8px; padding-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #4b5563; }
.chead:hover { background: #f6f8fa; }
.chead .num { text-align: right; }
.csort { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; text-transform: inherit; letter-spacing: inherit; white-space: nowrap; }
.chead > span { white-space: nowrap; }
.csort.num { justify-content: flex-end; }
.csort:hover, .csort.on { color: var(--ink); }
.csort:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.csort-i { font-size: 12px; opacity: .55; }
.csort.on .csort-i { opacity: 1; color: var(--brand-dark); }
.ctable.compact .crow:not(.chead) { padding-top: 5px; padding-bottom: 5px; }
.ctable.compact .cav { width: 26px; height: 26px; border-radius: 7px; }
.ctable.compact .c-sub, .ctable.compact .c-l2 { display: none; }
.cc { min-width: 0; font-size: 13px; color: #374151; }
.cc.num { text-align: right; font-weight: 600; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc-name { display: flex; gap: 10px; align-items: center; }
.cav { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 11%, #fff);
  color: var(--brand-dark); border: 1px solid color-mix(in srgb, var(--brand) 26%, #fff); }
.c-txt { display: grid; min-width: 0; }
.c-name { color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-name:hover { color: var(--brand-dark); text-decoration: underline; }
.c-sub, .c-l2 { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-mob { display: none; font-size: 12px; color: var(--muted); }
.cc-kontakt { display: grid; }
.c-l1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-wip { display: block; font-size: 11px; font-weight: 600; color: #8a5a00; }
.cc-akce { display: flex; gap: 6px; justify-content: flex-end; }
.cact { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--brand-dark); background: #fff; }
.cact:hover { border-color: color-mix(in srgb, var(--brand) 45%, #fff); background: color-mix(in srgb, var(--brand) 6%, #fff); }
.cact.off { visibility: hidden; }
.ctable.compact .cact { width: 30px; height: 30px; }
.cempty { padding: 28px 16px; text-align: center; color: var(--muted); border-top: 1px solid var(--line-soft); }
.ccount { text-align: center; margin-top: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cust-hbtn { display: flex; gap: 10px; align-items: center; align-self: flex-start; }
.cust-x { width: 36px; height: 36px; border: 0; border-radius: 8px; background: #f3f4f6; font: inherit; font-size: 20px; line-height: 1; cursor: pointer; color: #374151; }
.cust-x:hover { background: #e5e7eb; }
.cust-back { display: inline-block; margin-bottom: 12px; font-weight: 600; text-decoration: none; }
.cust-full .cust-card, .cust-full .cust-form { max-width: 960px; }

.cdrawer-bg { position: fixed; inset: var(--top-h, 72px) 0 0 0; z-index: 18; background: rgba(15, 37, 61, .14); }
.cdrawer { position: fixed; top: var(--top-h, 72px); right: 0; bottom: 0; z-index: 19; width: min(480px, 100vw); background: #fff; overflow-y: auto;
  box-shadow: -12px 0 32px rgba(15, 37, 61, .18); animation: cdrawer-in .16s ease-out; }
.cdrawer-body > .card { margin: 0; border-radius: 0; box-shadow: none; }
.cdrawer-load { padding: 40px 20px; text-align: center; color: var(--muted); }
.cdrawer-grip { display: none; }
@keyframes cdrawer-in { from { transform: translateX(24px); opacity: .4; } }
.cdrawer .cust-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cdrawer .cust-stats b { font-size: 17px; }
.cdrawer .cust-info { grid-template-columns: 110px minmax(0, 1fr); }

@media (max-width: 767px) {
  .cust-bar .searchbox { order: 0; flex: 1 1 0; }
  .cust-bar .push { order: 1; margin-left: 0; flex: none; }
  .cview-pop .cv-desk { display: none; }
  .cview-pop fieldset.cv-desk + fieldset { border-top: 0; }
  .cust-bar .cchips { order: 2; width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .cust-bar .cchips .chip { flex: none; }
  .cview > summary > span:not(.ico) { display: none; }
  .cview > summary { padding: 0; width: var(--ctl, 40px); justify-content: center; }
  .ctable-box { overflow: hidden; }
  .ctable { min-width: 0; }
  .chead { display: none; }
  .ctable .crow { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 12px; }
  .ctable .crow > .cc:not(.cc-name):not(.cc-akce) { display: none; }
  .ctable .c-sub { display: none; }
  .ctable .c-mob { display: block; }
  .cact { width: 44px; height: 44px; border-radius: 12px; border: 0; background: color-mix(in srgb, var(--brand) 11%, #fff); }
  .cact-mail { display: none; }
  .ctable.compact .cact { width: 40px; height: 40px; }
  .cdrawer-bg { inset: 0; z-index: 40; background: rgba(15, 37, 61, .38); }
  .cdrawer { top: auto; left: 0; width: auto; max-height: 88vh; z-index: 41; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -10px 30px rgba(15, 37, 61, .22); animation-name: csheet-in; }
  .cdrawer-grip { display: block; width: 40px; height: 5px; border-radius: 99px; background: #d1d5db; margin: 8px auto 0; }
  .cdrawer .cust-info { grid-template-columns: 1fr; }
  .cdrawer .cust-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.cdrawer-on, html.cdrawer-on body { overflow: hidden; }
}
@keyframes csheet-in { from { transform: translateY(40px); opacity: .4; } }

/* uživatelé firmy na mobilu: bez sloupce „Poslední přihlášení“, dlouhé e-maily se zalomí */
@media (max-width: 767px) {
  .users-table th:nth-child(3), .users-table td:nth-child(3) { display: none; }
  .users-table th, .users-table td { padding: 9px 6px; }
  .users-table td:first-child { overflow-wrap: anywhere; }
  .users-table td:last-child .row { flex-direction: column; align-items: stretch; gap: 6px; }
}

/* přilepené hlavičky tabulek: drží se těsně pod lištou a přilepeným panelem nástrojů (--toolbar-h měří app.js);
   předek nesmí mít overflow auto/hidden (proto overflow: clip a fitScroll), z-index pod menu (30), panelem detailu (18/19) a spodní navigací (20) */
:root { --stick-top: calc(var(--top-h, 72px) + var(--toolbar-h, 0px)); }
.plist .prow.head, .chead { position: sticky; top: var(--stick-top); z-index: 5; }
.users-table th { position: sticky; top: var(--stick-top); z-index: 5; background: var(--surface); border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line-soft); }
.plist .prow.head.stuck, .chead.stuck { box-shadow: 0 1px 0 var(--line), 0 8px 12px -10px rgba(15, 37, 61, .35); }
.users-table thead.stuck th { box-shadow: inset 0 -1px 0 var(--line), 0 8px 12px -10px rgba(15, 37, 61, .35); }

/* ---- r3 list+login ---- */
/* veřejné stránky (přihlášení, registrace, heslo, ceník): vycentrovaný sloupec, značka nahoře, výchozí barvy (bez motivu firmy) */
.auth { place-items: stretch; padding: 0; display: block; }
.pub-wrap { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px 16px; }
.pub-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.pub-logo strong { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.pub-sym { display: inline-flex; }
.pub-sym img { height: 38px; width: auto; }
.pub-links { margin: 0; font-size: 14px; color: #374151; text-align: center; }
.pub-links a { font-weight: 600; }
.pub-hint { margin: -10px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.auth-card { width: 100%; max-width: 420px; padding: 28px; border-radius: 16px; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 12px 32px rgba(16,24,40,.08); display: flex; flex-direction: column; gap: 18px; }
.auth-h { display: flex; flex-direction: column; gap: 4px; }
.auth-h.center { text-align: center; }
.auth-card h1 { margin: 0; font-size: 22px; }
.auth-sub { margin: 0; color: #4b5563; font-size: 14px; }
.auth-card form { margin: 0; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .field { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.auth-card .field > span, .auth-lrow { font-size: 13px; font-weight: 600; color: #374151; }
.auth-card .field > .auth-lrow { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.auth-lrow a { font-weight: 600; }
.auth-card input { min-height: 48px; font-size: 15px; border-radius: 10px; }
.auth-card input:disabled { background: #f3f4f6; color: #374151; }
.auth-card input.ok { border-color: var(--ok); }
.auth-card input[aria-invalid=true] { border-color: var(--danger); }
.auth-card .field > .ico-msg { font-size: 13px; font-weight: 400; color: var(--muted); line-height: 1.45; display: block; }
.auth-card .field > .ico-msg.ok { display: flex; gap: 6px; align-items: flex-start; }
.auth-card .field > .ico-msg.ok { color: #05663f; font-weight: 500; }
.auth-card .field > .ico-msg.bad { color: var(--danger); font-weight: 500; }
.auth-card .field > .ico-msg.warn { color: var(--warn); font-weight: 500; }
.ico-msg .auth-ico { margin-top: 1px; }
.auth-submit { min-height: 50px; border-radius: 10px; font-weight: 700; font-size: 15px; margin-top: 4px; }
.auth-submit:disabled { background: #9aa4b2; cursor: not-allowed; }
.auth-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.auth-foot { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line-soft); padding-top: 14px; font-size: 13px; color: #374151; }
.auth-ico { display: inline-flex; flex: none; }
.auth-sent { display: flex; gap: 10px; padding: 14px; border-radius: var(--radius); font-size: 13px;
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 35%, #fff); color: var(--brand-dark); }
.auth-warn { margin: 0; font-size: 13px; color: var(--warn); }

/* ceník #/cenik: kalkulačka podle počtu lidí, karty tarifů s přepínačem Měsíčně/Ročně, otázky */
.pricing .pub-wrap { justify-content: flex-start; gap: 24px; padding-top: 32px; }
.pc-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 640px; }
.pc-head h1 { font-size: 30px; letter-spacing: -.02em; line-height: 1.15; }
.pc-head h2 { font-size: 26px; margin: 0; letter-spacing: -.02em; }
.pc-head p { margin: 0; color: #4b5563; font-size: 15px; }
.pc-head.second { margin-top: 16px; }
.pc-calc { width: 100%; max-width: 640px; background: var(--surface); border-radius: 20px; box-shadow: 0 12px 32px rgba(16,24,40,.08); padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.pc-counter { display: flex; align-items: center; justify-content: center; gap: 18px; }
.pc-step { width: 52px; height: 52px; border-radius: 50%; border: 1px solid #d0d5dd; background: #fff; font: inherit; font-size: 24px; font-weight: 600; color: var(--ink); cursor: pointer; }
.pc-step:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-dark); }
.pc-step:disabled { opacity: .4; cursor: default; }
.pc-n-wrap { display: flex; flex-direction: column; align-items: center; min-width: 140px; color: #4b5563; }
.pc-n { font-size: 54px; line-height: 1; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.pc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 8px; }
.pc-tile { border-radius: 12px; padding: 12px 8px; text-align: center; background: #f6f8fa; border: 1px solid var(--line); color: #374151; font-size: 12px; }
.pc-tile b { display: block; font-size: 14px; color: var(--ink); }
.pc-tile.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pc-tile.on b { color: var(--brand-ink); }
.pc-sum { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-top: 18px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.pc-sum-t { display: flex; flex-direction: column; gap: 4px; color: #4b5563; min-width: 0; }
.pc-big { font-size: 32px; letter-spacing: -.02em; color: var(--ink); }
.pc-big small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.pc-big.ask { font-size: 26px; }
.pc-cta { min-height: 50px; padding: 0 24px; border-radius: 12px; font-size: 15px; font-weight: 700; }
.pc-all { margin: 0; font-size: 13px; color: #4b5563; text-align: center; max-width: 640px; }
.pc-toggle { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-radius: 10px; padding: 4px; margin-top: 6px; box-shadow: var(--shadow); }
.pc-toggle button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 8px; font: inherit; font-weight: 700; background: transparent; color: #374151; cursor: pointer; white-space: nowrap; }
.pc-toggle button.on { background: var(--side); color: var(--side-ink); }
.pc-toggle button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; width: 100%; max-width: 980px; align-items: stretch; }
.pc-card { background: var(--surface); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); min-width: 0; }
.pc-card.rec { box-shadow: 0 0 0 2px var(--brand), 0 18px 40px color-mix(in srgb, var(--brand) 16%, transparent); }
.pc-card-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pc-card-h b { font-size: 18px; }
.pc-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--brand); color: var(--brand-ink); white-space: nowrap; }
.pc-who { margin: 0; font-size: 13px; color: #4b5563; min-height: 38px; }
.pc-price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.pc-price small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.pc-price.ask { font-size: 22px; color: #374151; }
.pc-btn { min-height: 46px; border-radius: 10px; font-weight: 700; }
.pc-feats { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: #374151; }
.pc-feats li { display: flex; gap: 8px; }
.pc-ico { display: inline-flex; flex: none; color: var(--brand); margin-top: 1px; }
.pc-faq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; width: 100%; max-width: 980px; font-size: 13px; color: #374151; }
.pc-faq b { display: block; margin-bottom: 4px; color: var(--ink); }
@media (max-width: 767px) {
  .pc-head h1 { font-size: 24px; }
  .pc-calc { padding: 20px 16px; border-radius: 16px; }
  .pc-n { font-size: 44px; }
  .pc-n-wrap { min-width: 100px; }
  .pc-cta { width: 100%; }
  .pc-cards, .pc-faq { grid-template-columns: minmax(0, 1fr); }
  .pc-toggle button { padding: 0 12px; }
  .pc-who { min-height: 0; }
}

/* Předplatné během zkoušky (Nastavení) a widget zkoušky v bočním panelu — barvy motivu firmy */
.st-page { display: flex; flex-direction: column; gap: 16px; max-width: 980px; }
.st-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; }
.st-tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st-tile > span { font-size: 12px; color: var(--muted); }
.st-tile > b { font-size: 22px; }
.st-tile > small { font-size: 12px; color: #4b5563; }
.set-meter.limit i { background: var(--warn); }
.st-note { padding: 12px 16px; border-radius: 12px; background: #fff7e8; border: 1px solid #f3d7a8; font-size: 13px; color: #6b4304; }
.st-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.st-head h2 { margin: 0; }
.st-toggle .pc-toggle { margin: 0; }
.st-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.st-cards .pc-card { padding: 18px; gap: 10px; border-radius: 14px; }
.pc-card.compact .pc-card-h b { font-size: 15px; }
.pc-card.compact .pc-badge { background: none; color: var(--brand-dark); padding: 0; }
.pc-card.compact .pc-price { font-size: 22px; }
.pc-card.compact .pc-price.ask { font-size: 18px; }
.pc-card.compact .pc-who { min-height: 0; }
.pc-card.compact .btn { margin-top: auto; min-height: 42px; border-radius: 10px; white-space: normal; }
.st-foot { margin: 0; }
@media (max-width: 767px) {
  .st-stats { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .st-cards { grid-template-columns: minmax(0, 1fr); }
}
.side-trial { margin-top: auto; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.side-trial[hidden] { display: none; }
.side-trial b { font-size: 13px; }
.side-trial-m { height: 6px; border-radius: 99px; background: rgba(255,255,255,.18); overflow: hidden; }
.side-trial-m i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.side-trial.limit .side-trial-m i { background: #f5b04c; }
.side-trial-n { color: rgba(255,255,255,.8); }
.side-trial a { color: #fff; font-weight: 700; }
.side-trial:not([hidden]) + .side-user { margin-top: 0; }
.limit-card { max-width: 560px; }
.limit-card .row { gap: 10px; flex-wrap: wrap; }
/* ---- r3 catalogs ---- */
/* katalog defektů a technologií: tabulka vlevo, panel úprav vpravo (počítač); seznam + celoobrazovkový sheet (mobil) */
.cat .toolbar .push { order: 2; }
.cat-filters { order: 3; flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; }
.cat-n { margin-left: 6px; font-size: 12px; font-variant-numeric: tabular-nums; opacity: .65; }
.cat-n:empty { display: none; }
.seg button.on .cat-n { opacity: .85; }

.cat-md { grid-template-columns: minmax(0, 1fr) minmax(380px, 36%); }
.cat-list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: clip; }
.cat-def { --cat-cols: 76px minmax(0, 1fr) 64px 92px 64px; }
.cat-tech { --cat-cols: minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 1.4fr) 64px; }
.cat-head, .cat-row { display: grid; grid-template-columns: var(--cat-cols); gap: 12px; align-items: center; padding: 0 16px; }
.cat-head { position: sticky; top: var(--stick-top); z-index: 5; background: var(--surface); height: 40px; box-shadow: inset 0 -1px 0 var(--line-soft);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cat-head span:last-child, .cat-used { text-align: right; }
.cat-row { min-height: 52px; padding-block: 8px; border-top: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.cat-row:first-child { border-top: 0; }
.cat-row:hover { background: #f9fafc; }
.cat-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.cat-row.on { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.cat-code { font-weight: 700; font-size: 13px; color: var(--brand-dark); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cat-name { display: flex; flex-direction: column; min-width: 0; }
.cat-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-sub { display: none; font-size: 12px; color: var(--muted); }
.cat-mat, .cat-dev { font-size: 13px; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-desc { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-used { font-weight: 600; font-variant-numeric: tabular-nums; }
.cat-used.zero { color: var(--muted); font-weight: 400; }
.cat-sev { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: #eef0f3; color: #4b5563; }
.cat-sev.s1 { background: color-mix(in srgb, var(--danger) 12%, #fff); color: var(--danger); }
.cat-sev.s2 { background: color-mix(in srgb, var(--warn) 14%, #fff); color: var(--warn); }
.cat-rows .empty { padding: 32px 16px; }
.cat-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 12px 16px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }
.cat-mob-io, .cat-mob-new { display: none; }

/* panel úprav */
.cat-panel { top: calc(var(--stick-top) + 4px); max-height: calc(100vh - var(--stick-top) - 20px); overflow-y: auto; border-radius: var(--radius); }
.cat-card { display: flex; flex-direction: column; padding: 18px 20px 0; }
.cat-card .detail-head { margin-bottom: 12px; align-items: flex-start; }
.cat-title { flex: 1; min-width: 0; }
.cat-title small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-dark); margin-bottom: 2px; }
.cat-title h2 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.cat-x { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin: -4px -6px 0 0; border-radius: 50%;
  font-size: 24px; line-height: 1; color: var(--muted); text-decoration: none; }
.cat-x:hover { background: #f1f4f7; color: var(--ink); }
.cat-x:focus-visible { outline: 2px solid var(--brand); }
.cat-usage { margin: -6px 0 14px; font-size: 13px; color: #374151; }
.cat-usage:empty { display: none; }
.cat-fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.cat-grid { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0 12px; }
.cat-mats { gap: 18px; min-height: 40px; align-items: center; }
.cat-mats .check { align-items: center; }
.cat-mats .check input { min-height: 0; margin: 0; }
.cat-codehint { margin: -8px 0 12px; }
.cat-sevseg { display: flex; flex-wrap: wrap; height: auto; width: 100%; }
.cat-sevseg .seg-opt { flex: 1 1 auto; }
.cat-sevseg .seg-opt span { flex: 1; justify-content: center; min-height: 36px; padding: 0 10px; font-size: 13px; }
.cat-more { margin: 4px 0 8px; border-top: 1px solid var(--line-soft); padding-top: 6px; }
.cat-more > summary { cursor: pointer; font-weight: 600; min-height: 40px; display: flex; align-items: center; gap: 4px; }
.cat-more > summary .muted { font-weight: 400; font-size: 13px; }
.cat-actions { order: 1; display: flex; gap: 8px; position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 14px; margin-top: 4px; z-index: 2; }
.cat-danger { order: 2; border-top: 1px solid var(--line-soft); padding: 12px 0 16px; }
.cat-danger .hint { margin: 6px 0 0; }
.cat-del { border: 0; background: none; padding: 0; min-height: 36px; font: inherit; font-weight: 600; color: var(--danger); cursor: pointer; }
.cat-del:hover { text-decoration: underline; }
.cat-danger .hint { font-size: 12px; color: var(--muted); }
.cat-usedin { list-style: none; margin: 0; padding: 0; }
.cat-usedin li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.cat-usedin li:first-child { border-top: 0; }

@media (max-width: 1180px) {
  .cat-md { grid-template-columns: minmax(0, 1fr) 360px; }
  .cat-def { --cat-cols: 70px minmax(0, 1fr) 84px 52px; }
  .cat-def .cat-mat, .cat-def .cat-head span:nth-child(3) { display: none; }
  .cat-tech { --cat-cols: minmax(0, 1fr) minmax(0, .8fr) 52px; }
  .cat-tech .cat-desc, .cat-tech .cat-head span:nth-child(3) { display: none; }
}
@media (max-width: 900px) {
  .cat-md { grid-template-columns: 1fr; }
  .cat-md.has-detail .cat-list { display: none; }
  .cat-head { display: none; }
  .cat-row { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 60px; padding: 10px 14px; gap: 12px; }
  .cat-tech .cat-row { grid-template-columns: minmax(0, 1fr); }
  .cat-sub { display: block; }
  .cat-row .cat-mat, .cat-row .cat-used, .cat-row .cat-dev, .cat-row .cat-desc { display: none; }
  .cat-code { min-width: 44px; }
  /* detail = celoobrazovkový sheet s hlavičkou nahoře a tlačítky dole */
  .cat-md.has-detail .cat-panel { display: block; position: fixed; inset: 0; z-index: 60; max-height: none; border-radius: 0; background: var(--surface);
    overflow-y: auto; overscroll-behavior: contain; }
  .cat-panel .cat-card { min-height: 100%; border-radius: 0; box-shadow: none; padding: 0 16px; margin: 0; }
  .cat-card .detail-head { position: sticky; top: 0; z-index: 3; background: var(--surface); margin: 0 -16px 8px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    border-bottom: 1px solid var(--line-soft); align-items: center; }
  .cat-x { width: 44px; height: 44px; margin: 0 -8px 0 0; }
  .cat-danger { order: 2; border-top: 0; padding: 4px 0 16px; }
  .cat-del { min-height: 44px; }
  .cat-actions { order: 3; margin: auto -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft);
    flex-direction: row-reverse; }
  .cat-actions .btn { flex: 1; min-height: 48px; }
  .cat-sevseg .seg-opt span { min-height: 44px; }
  .cat-mats .check { min-height: 44px; }
  .cat-more > summary { min-height: 44px; }
}
@media (max-width: 767px) {
  .top-actions:has(.cat-head-acts) { display: none; }
  .cat .toolbar { --ctl: 44px; }
  .cat-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cat-filters::-webkit-scrollbar { display: none; }
  .cat-filters .seg { order: 0; flex: none; }
  .cat-filters .seg button { flex: none; padding: 0 12px; }
  .cat-mob-io { display: flex; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid var(--line-soft); }
  .cat-mob-io .btn { flex: 1; min-height: 44px; }
  .cat-mob-new { display: block; position: fixed; left: 14px; right: 14px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 19; }
  .cat-mob-new .btn { width: 100%; min-height: 48px; box-shadow: 0 4px 14px rgba(16, 24, 40, .18); }
  .main:has(.cat-mob-new) { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
}
.cat-codehint { font-size: 12px; color: var(--muted); }
@media (max-width: 767px) { .cat .toolbar select.push { flex: 0 1 auto; min-width: 0; max-width: 48%; } }
/* ---- r3 settings ---- */
/* společné: štítky stavu, ukazatel (pruh) */
.pill.ok { background: color-mix(in srgb, var(--ok) 12%, #fff); color: #047857; }
.pill.warn { background: #fff4e0; color: var(--warn); }
.pill.bad { background: #fde2df; color: var(--danger); }
.pill.brand { background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand-dark); }
.set-meter { height: 6px; border-radius: 99px; background: #e5e7eb; overflow: hidden; }
.set-meter.lg { height: 8px; margin-top: 14px; }
.set-meter i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.u-sticky { display: none; }

/* mobil: odkaz zpět na rozcestník místo vodorovného pásu sekcí */
.set-back { display: none; }
@media (max-width: 767px) {
  .settings .wlist.snav { display: none; }
  .settings .set-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; align-self: flex-start; font-weight: 600; text-decoration: none; color: var(--brand-dark); margin: -6px 0 -6px -4px; padding: 0 4px; }
  .u-sticky { display: block; position: fixed; left: 12px; right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 19; }
  .u-sticky .btn { min-height: 52px; font-size: 16px; box-shadow: 0 6px 18px rgba(16, 24, 40, .18); }
  .settings:has(.u-sticky) { padding-bottom: 68px; }
  body:has(.u-sticky) #toasts { bottom: calc(132px + env(safe-area-inset-bottom)); }
}

/* mobilní rozcestník nastavení */
.set-hub { display: flex; flex-direction: column; gap: 12px; }
.set-trial { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius);
  background: #fff8ec; border: 1px solid #f3dfb6; color: var(--ink); text-decoration: none; }
.set-trial.bad { background: #fdf0ee; border-color: #f5c2bb; }
.set-trial-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.set-trial-t b { color: var(--warn); font-size: 15px; }
.set-trial.bad .set-trial-t b { color: var(--danger); }
.set-trial-t > span:not(.set-meter) { font-size: 13px; color: #4b5563; }
.set-trial .set-meter { margin-top: 4px; background: #f3e3c4; }
.set-trial .set-meter i { background: var(--warn); }
.set-trial > .ico { color: var(--warn); }
.set-hub-list { padding: 4px 8px; }
.set-hub-list .wl-item { grid-template-columns: 40px minmax(0, 1fr) auto; min-height: 64px; gap: 12px; }
.set-hub-list .wl-text b { font-size: 15px; }
.set-hub-list .wl-note { white-space: normal; font-size: 13px; }
.set-hub-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand-dark); }
.set-logout { align-self: center; min-height: 44px; padding: 0 20px; border: 0; background: none; font: inherit; font-weight: 700; color: var(--danger); cursor: pointer; margin-top: 8px; }
.set-ver { text-align: center; font-size: 12px; color: var(--muted); margin: 0 0 8px; }

/* Firma a vzhled PDF: živý náhled nahoře, Údaje firmy a Vzhled vedle sebe, když je místo */
.firm { container-type: inline-size; }
.firm-prev-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 12px; }
.firm-prev-head h2 { margin: 0; font-size: 16px; }
.pill.live { background: color-mix(in srgb, var(--ok) 12%, #fff); color: #047857; border: 1px solid color-mix(in srgb, var(--ok) 35%, #fff); }
.firm-prev-note { margin-left: auto; }
.firm-prev-page { max-width: 794px; margin: 0 auto; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; box-shadow: 0 2px 10px rgba(16, 24, 40, .08); background: #fff; }
.firm-prev-page .hf-clip { border: 0; border-radius: 0; box-shadow: none; }
.firm-prev-cut { height: 10px; background: repeating-linear-gradient(90deg, #dde2e8 0 6px, transparent 6px 12px) center / 100% 1px no-repeat, #f8f9fb; }
.firm-cols { display: grid; gap: 0 16px; }
@container (min-width: 760px) { .firm-cols { grid-template-columns: 1fr 1fr; align-items: start; } .firm-cols .grid2 { grid-template-columns: 1fr; } }
@container (min-width: 1100px) { .firm-cols .grid2 { grid-template-columns: 1fr 1fr; } }
.img-acts { display: flex; gap: 8px; margin-top: 8px; }
.img-acts[hidden] { display: none; }
.img-acts .btn { min-height: 36px; }
.img-acts .img-del, .u-danger { color: var(--danger); }
@media (max-width: 767px) {
  .firm-prev { display: none; }
  .img-acts .btn { min-height: 44px; flex: 1; }
}

/* Výchozí texty: štítek výchozí / upraveno, počet znaků, Vrátit výchozí */
.tx-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 2px 0 12px; }
.tx-title h2 { margin: 0; font-size: 18px; }
.tx-grid { display: grid; gap: 0 16px; }
@media (min-width: 1280px) { .tx-grid { grid-template-columns: 1fr 1fr; } }
.tx-card { display: flex; flex-direction: column; border: 1px solid transparent; }
.tx-card.changed { border-color: #f3dfb6; }
.tx-card .rte { min-height: 110px; }
.tx-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tx-head h3 { margin: 0; }
.tx-where { margin: 4px 0 10px; }
.tx-badge.changed { background: #fff4e0; color: var(--warn); }
.tx-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; min-height: 32px; }
.tx-reset { text-decoration: none; font-weight: 700; color: var(--brand-dark); min-height: 44px; padding: 0 2px; }
.tx-reset:hover { text-decoration: underline; }

/* Uživatelé */
.u-page { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1200px) { .u-page { grid-template-columns: minmax(0, 1fr) 300px; } }
.u-main { min-width: 0; }
.u-seats { display: grid; grid-template-columns: auto minmax(120px, 1fr) minmax(0, 1.2fr); gap: 8px 20px; align-items: center; }
.u-seats p { margin: 0; }
.u-seats-n b { display: block; font-size: 22px; line-height: 1.2; }
.u-seats-n span { font-size: 13px; color: var(--muted); }
.u-team { padding: 0; overflow: clip; }
.u-team-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 20px 12px; }
.u-team-h h2 { margin: 0; }
.u-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.urow { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(110px, .8fr) minmax(0, 1.1fr) auto; gap: 12px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line-soft); }
.urow.uhead { background: #f8f9fb; font-size: 12px; color: var(--muted); font-weight: 500; padding-top: 8px; padding-bottom: 8px; }
.urow.is-pending { background: #fffaf0; }
.urow.is-off { opacity: .7; }
.u-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.u-av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: var(--side); }
.is-pending .u-av { background: #fde7c2; color: var(--warn); }
.u-id { display: flex; flex-direction: column; min-width: 0; }
.u-id > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-role-sel { min-height: 36px; max-width: 100%; }
.u-st { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.u-gone { color: var(--danger); }
.u-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.u-link { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 12px; align-items: center; background: color-mix(in srgb, var(--brand) 5%, #fff); border: 1px solid color-mix(in srgb, var(--brand) 30%, #fff); }
.u-link p { margin: 0; }
.u-link-ic { color: var(--brand-dark); }
.u-side { position: sticky; top: calc(var(--top-h, 72px) + 24px); border: 1px solid color-mix(in srgb, var(--brand) 30%, #fff); }
.u-invite h2 { margin: 0 0 2px; }
.u-invite > p { margin: 0 0 12px; }
.u-invite .seg.u-role { --ctl: 44px; display: grid; grid-template-columns: 1fr 1fr; }
.u-invite .btn.full { min-height: 44px; }
.u-roles { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.u-roles-t { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.u-role-help { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
@media (max-width: 1199px) and (min-width: 768px) { .u-side { position: static; } }
@media (max-width: 900px) { .u-seats { grid-template-columns: auto minmax(0, 1fr); } .u-seats p { grid-column: 1 / -1; } .u-link { grid-template-columns: auto minmax(0, 1fr); } .u-link input { grid-column: 1 / -1; } }
@media (max-width: 767px) {
  .u-team { background: none; box-shadow: none; overflow: visible; }
  .u-team-h { padding: 4px 2px 10px; }
  .urow.uhead { display: none; }
  .ulist { display: flex; flex-direction: column; gap: 10px; }
  .urow { grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "who who who" "role st st" "acts acts acts"; gap: 10px 8px; background: #fff; border: 1px solid transparent; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
  .urow.is-pending { border-color: #f3dfb6; }
  .u-who { grid-area: who; } .u-role-c { grid-area: role; } .u-st { grid-area: st; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px; }
  .u-acts { grid-area: acts; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .u-acts:empty { display: none; }
  .u-acts .btn { min-height: 44px; }
  .u-role-sel { min-height: 44px; }
  .u-av { width: 44px; height: 44px; }
}

/* Předplatné */
.sub-page { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1200px) { .sub-page { grid-template-columns: minmax(0, 1fr) 320px; } }
.sub-main { min-width: 0; }
.sub-hero { border: 1px solid var(--line-soft); }
.sub-hero.warn { border-color: #f3dfb6; }
.sub-hero.bad { border-color: #f5c2bb; }
.sub-hero-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.sub-big { font-size: 22px; line-height: 1.2; }
.sub-hero.warn .set-meter.lg i { background: var(--warn); }
.sub-prog-l { display: flex; justify-content: space-between; margin-top: 6px; }
.sub-hero .sub-grid { margin-bottom: 0; }
.sub-hero .sub-box { background: #f8f9fb; border-color: transparent; display: flex; flex-direction: column; gap: 2px; }
.sub-box small { font-size: 12px; color: var(--muted); }
.sub-box .set-meter { margin-top: 6px; }
.sub-tl { list-style: none; margin: 4px 0 0; padding: 0; }
.sub-tl li { position: relative; padding: 0 0 16px 26px; display: flex; flex-direction: column; gap: 2px; }
.sub-tl li:last-child { padding-bottom: 0; }
.sub-tl li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); }
.sub-tl li:not(:last-child)::after { content: ""; position: absolute; left: 7px; top: 21px; bottom: 4px; width: 2px; background: var(--line); }
.sub-tl li.warn::before { background: var(--warn); }
.sub-tl li.bad::before { background: var(--danger); }
.sub-tl li.now::before { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, #fff); }
.sub-tl li b { display: flex; align-items: center; gap: 8px; }
.sub-tl li > span { color: #4b5563; }
.sub-cta { border: 1px solid color-mix(in srgb, var(--brand) 30%, #fff); background: color-mix(in srgb, var(--brand) 4%, #fff); }
.sub-cta h2 { margin-top: 0; }
.sub-cta .btn.full { min-height: 44px; margin: 4px 0 8px; }
.sub-cta.done b { color: #047857; }
.sub-cta.done p { margin: 6px 0 0; }
@media (max-width: 767px) { .sub-page:has(.u-sticky) { padding-bottom: 68px; } .sub-big { font-size: 20px; } }
/* úzký seznam (počítač s formulářem vpravo): dva řádky — kdo + akce, role + stav */
.u-team { container-type: inline-size; }
@media (min-width: 768px) { @container (max-width: 640px) {
  .urow:not(.uhead) { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who acts" "role st"; row-gap: 6px; }
  .urow.uhead { display: none; }
  .u-who { grid-area: who; } .u-acts { grid-area: acts; } .u-role-c { grid-area: role; padding-left: 50px; } .u-st { grid-area: st; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: flex-end; }
} }
/* ---- r3 wizard ---- */
/* krok 1: jednotky v poli, poloha u adresy, čipy „Vložit:“, štítek známého zákazníka */
.unit-wrap, .geo-wrap { position: relative; display: block; }
.unit-wrap input { padding-right: 46px; }
.unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); pointer-events: none; }
.geo-wrap input { padding-right: 48px; }
.geo-btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; padding: 0; display: grid; place-items: center; color: var(--brand-dark); z-index: 1; }
.geo-btn:disabled { opacity: .5; cursor: progress; }
.geo-btn.busy .ico { animation: geo-pulse 1s ease-in-out infinite; }
@keyframes geo-pulse { 50% { opacity: .35; } }
.ins-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.ins-l { font-size: 12px; color: var(--muted); }
.ins-chips .chip { height: 32px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ftag.known[hidden] { display: none; }
/* skupiny: šipka vlevo, počet hned za názvem, co chybí vpravo; sbalený Úvod ukazuje začátek textu */
@media (min-width: 768px) {
  .grp > summary { flex-wrap: wrap; justify-content: flex-start; }
  .grp > summary::after, .grp[open] > summary::after { content: none; }
  .grp > summary::before { content: ""; flex: none; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(-45deg); margin: 0 4px 0 2px; transition: transform .15s; }
  .grp[open] > summary::before { transform: rotate(45deg); margin-top: -4px; }
  .grp > summary .grp-t { display: contents; }
  .grp > summary .grp-t b { order: 1; font-size: 15px; margin-right: 0; }
  .grp > summary .grp-n { order: 2; }
  .grp > summary .grp-miss { order: 3; margin-left: auto; max-width: 55%; }
  .grp-prev { order: 4; flex-basis: 100%; padding-left: 21px; font-size: 13px; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .grp[open] .grp-prev { display: none; }
}
@media (max-width: 767px) {
  .grp-prev { display: none; }
  .intro-foot { margin: 12px 2px 0; }
  .mat-field .mat-seg, .mat-field .seg.mat-seg { flex: none; height: 48px; --ctl: 48px; }
  .mat-seg button { min-height: 0; }
  /* úvodní fotka: s fotkou nízký pruh s akcemi přes obrázek */
  .cover-pick.has { position: relative; }
  .cover-pick.has .cover { aspect-ratio: 16/8; }
  .cover-pick.has .cover-acts { position: absolute; right: 10px; bottom: 10px; }
  .cover-pick.has .cover-acts .btn { background: #fff; box-shadow: 0 1px 4px #0003; }
  .cover-pick.has .cover-badge { top: 8px; bottom: auto; }
  .geo-btn { width: 44px; height: 44px; }
}
/* krok 3: výskyt jako úzký přepínač Počet | X, víc místa pro název defektu */
@media (min-width: 1280px) { .dtable { --cols: 64px minmax(0, 1fr) 96px 104px 118px 52px 40px; } }
.dr-seg.seg button.dr-x { font-weight: 800; min-width: 34px; }
.dr-unk { font-size: 13px; color: var(--muted); }
@media (max-width: 767px) {
  .dr-ctl { flex-wrap: nowrap; }
  .dr-seg.seg button { padding: 0 12px; }
  .dr-seg.seg button.dr-x { min-width: 44px; }
  /* hlavička plochy: název přes celou šířku, datum a sbalení na druhém řádku */
  .blk-head { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "th name more" "th date tog"; }
  .blk.collapsed .blk-head { grid-template-columns: 64px minmax(0, 1fr) auto auto; grid-template-areas: "th sum tog more"; }
  .blk-name { font-weight: 600; }
}
/* krok 4: rychlé „Přidat fotky“ u defektu bez fotky (počítač), nepřiřazené fotky */
.dl-row:not(.open) { position: relative; }
.dl-quick { position: absolute; right: 132px; top: 50%; transform: translateY(-50%); gap: 6px; background: #fff; color: #b45309; border-color: #f3dfb6; }
.dl-quick:hover { background: #fff7ea; }
.ph-free { gap: 6px; }
.un-hint { margin: 0 0 12px; }
.un-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-bottom: 14px; }
.un-tile { position: relative; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #eef0f3; cursor: pointer; }
.un-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.un-tile.on { border-color: var(--brand); }
.un-check { position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%; background: #fffc; color: transparent; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px #9ca3af; }
.un-tile.on .un-check { background: var(--brand); color: #fff; box-shadow: none; }
.un-sheet .btn.full { width: 100%; min-height: 48px; }
@media (max-width: 767px) { .ph-free { flex-basis: 100%; min-height: 48px; } }
/* krok 6: název druhu přílohy se nezalamuje do úzkého sloupce */
.pa-ht { flex: 1 1 0; }
.pa-ht b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.pa-ht > span { overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 768px) { .pa-head { gap: 8px; } .pa-head .pa-up { padding: 0 12px; } .pa-pill { padding: 2px 8px; } }

/* Funkce mimo tarif: zámeček v menu a stránka s nabídkou vyššího tarifu */
.side-nav a.locked, .bottomnav a.locked { opacity: .6; }
.side-nav a.locked::after { content: '🔒'; margin-left: auto; font-size: 11px; opacity: .8; }
.upsell-card { max-width: 560px; margin: 24px auto; padding: 28px 24px; background: #fff; border: 1px solid var(--line); border-radius: 14px; text-align: center; }
.upsell-card h2 { font-size: 20px; margin: 8px 0; }
.upsell-card p { color: var(--muted); margin: 0 0 12px; }
.upsell-card ul { text-align: left; display: inline-block; margin: 0 0 16px; padding-left: 20px; }
.upsell-lock { font-size: 28px; }
.upsell-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Ceník: srovnání funkcí podle tarifu */
.pc-cmp-wrap { width: 100%; max-width: 980px; overflow-x: auto; background: var(--surface); border-radius: 16px; box-shadow: 0 12px 32px rgba(16,24,40,.06); }
.pc-cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.pc-cmp th, .pc-cmp td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: center; }
.pc-cmp tbody th { text-align: left; font-weight: 500; }
.pc-cmp thead th { font-size: 15px; }
.pc-cmp thead th.rec { color: var(--brand); }
.pc-cmp tr:last-child th, .pc-cmp tr:last-child td { border-bottom: 0; }
.pc-yes { color: var(--brand); display: inline-flex; }
.pc-no { color: var(--muted); }
.pc-soon { color: var(--muted); font-weight: 400; }
@media (max-width: 640px) { .pc-cmp th, .pc-cmp td { padding: 8px; font-size: 13px; } }

/* ---------------------------------------------------------------- opakované kontroly (Pro+) */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #e8590c; color: #fff;
  font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; }
.side-nav a { position: relative; }
@media (min-width: 768px) and (max-width: 1199px) { .side-nav .nav-badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; } }
.bottomnav a { position: relative; }
.bottomnav .nav-badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; margin: 0; }
.rc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.rc-tile { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; box-shadow: inset 0 3px 0 var(--brand), var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.rc-tile span { font-size: 12px; color: var(--muted); }
.rc-tile b { font-size: 24px; line-height: 1.25; }
.rc-tile small { font-size: 12px; color: #4b5563; }
.rc-tile.bad { box-shadow: inset 0 3px 0 #d92d20, var(--shadow); }
.rc-tile.bad b { color: var(--danger); }
.rc-tile.warn { box-shadow: inset 0 3px 0 #e8590c, var(--shadow); }
.rc-bulk { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff7e6; border: 1px solid #f3dfb6; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.rc-bulk .btn { margin-left: auto; }
.rc-table { min-width: 940px; --cgrid: minmax(0, 1.5fr) minmax(0, 1.1fr) 100px 100px 150px 290px; }
.rc-table .crow { cursor: default; }
.rc-table .crow > span { min-width: 0; }
.rc-obj { display: flex; flex-direction: column; }
.rc-obj .c-name { font-weight: 600; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-obj .c-name:hover { text-decoration: underline; }
.rc-obj .c-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-cust, .rc-last, .rc-int { font-size: 13px; color: #374151; overflow: hidden; text-overflow: ellipsis; }
.rc-act { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.chead .rc-act { justify-content: flex-end; }
.rc-act .btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.rc-act .icon-only { width: 34px; min-height: 34px; font-size: 18px; }
.rc-due { display: inline-flex; flex-direction: column; padding: 3px 10px; border-radius: 10px; line-height: 1.25; }
.rc-due b { font-size: 13px; }
.rc-due small { font-size: 11px; font-weight: 600; }
.rc-due.bad { background: #fdecea; color: #b42318; }
.rc-due.warn { background: #fff1dc; color: #8a4b06; }
.rc-due.later { background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand-dark); }
.rc-sent { display: inline-flex; flex-direction: column; font-size: 12px; line-height: 1.25; color: #047857; white-space: nowrap; }
.rc-sent b { font-weight: 600; }
.rc-noemail { color: var(--muted); white-space: nowrap; }
.rc-unset .rc-obj .c-name { font-weight: 500; }
.rc-foot { margin-top: 10px; }
.rc-bar .searchbox { flex: 0 1 340px; }
.rc-empty { text-align: center; padding: 32px 24px; max-width: 720px; margin: 0 auto 16px; }
.rc-empty p { color: #4b5563; max-width: 560px; margin: 0 auto 16px; }
.rc-empty-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--brand-soft); color: var(--brand-dark); margin-bottom: 10px; }
.rc-empty-act { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rc-pick .rc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-pick .rc-date { margin-top: 8px; max-width: 220px; }
.rc-state { margin: 8px 0 0; }
.rc-card .gen-card-h a { font-weight: 600; }
.rc-locked p { margin: 0; }
.zv-side .rc-card { border: 0; box-shadow: var(--shadow); }
.zv-grid > .rc-card { grid-column: 1 / -1; }
.rc-mail { width: 100%; font: inherit; font-size: 14px; line-height: 1.5; border: 1px solid #dde2e8; border-radius: 8px; padding: 10px 12px; resize: vertical; }
.rc-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0 0 12px; font-size: 14px; }
.rc-meta dt { color: var(--muted); }
.rc-meta dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 767px) {
  .rc-tiles { gap: 8px; }
  .rc-tile { padding: 10px 12px; }
  .rc-tile b { font-size: 20px; }
  .rc-tile small { display: none; }
  .rc-bar .searchbox { flex: 1 1 100%; }
  .rc-bar .cchips { width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .rc-bar .chip { flex: none; }
  .rc-table { min-width: 0; }
  .rc-table .crow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "obj next" "cust next" "act act"; gap: 4px 10px; padding: 12px; }
  .rc-table .rc-obj { grid-area: obj; }
  .rc-table .rc-cust { grid-area: cust; font-size: 12px; color: var(--muted); }
  .rc-table .rc-obj .c-sub { display: block; }
  .rc-table .rc-last, .rc-table .rc-int { display: none; }
  .rc-table .rc-next { grid-area: next; align-self: start; }
  .rc-table .rc-act { grid-area: act; justify-content: flex-start; margin-top: 6px; }
  .rc-table .rc-act .btn.small { min-height: 40px; }
  .rc-table .rc-act .btn:first-child { flex: 1; }
  .rc-table .chead { display: none; }
  .rc-bulk .btn { margin-left: 0; width: 100%; }
}
.zv-side .rc-pick .chip { height: 30px; padding: 0 10px; font-size: 12px; }
.rc-h3 { margin: 4px 0 10px; font-size: 15px; }
.auth-card .consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: #374151; cursor: pointer; }
.auth-card .consent input { min-height: 0; width: 20px; height: 20px; flex: none; margin: 1px 0 0; }
.pub-legal { font-size: 12px; }

/* ---------------------------------------------------------------- tablet (768–1199 px): ikonový panel z bloku výše,
   tady jen věci, které se do úzkého panelu nebo na výšku tabletu nevešly */
@media (min-width: 768px) and (max-width: 1199px) {
  .main { padding-left: 20px; padding-right: 20px; }
  /* zkušební box v 72px panelu: jen dny a odkaz, bez proužku a počtu (text jinak přetékal z panelu) */
  .side-trial { padding: 8px 2px; align-items: center; text-align: center; gap: 6px; }
  .side-trial .side-trial-m, .side-trial .side-trial-n { display: none; }
  .side-trial b, .side-trial a { font-size: 10.5px; line-height: 1.25; }
}
/* tablet na výšku (iPad 768–834 px): seznam protokolů ve dvou řádcích (název nad postupem), zákazníci jako seznam karet */
@media (min-width: 768px) and (max-width: 900px) {
  .plist .prow { grid-template-columns: 72px minmax(0, 1fr) 268px; grid-template-areas: "num main go" "num prog go"; gap: 6px 14px; }
  .plist .prow.head { grid-template-areas: "num main go"; }
  .plist .prow > .pnum, .plist .prow.head > :nth-child(1) { grid-area: num; }
  .plist .prow > .pmain, .plist .prow.head > :nth-child(2) { grid-area: main; }
  .plist .prow > .pprog { grid-area: prog; }
  .plist .prow > .pgo, .plist .prow.head > :nth-child(5) { grid-area: go; }
  .plist .prow > .pdate, .plist .prow.head > :nth-child(3), .plist .prow.head > :nth-child(4) { display: none; }
  .ctable-box { overflow: hidden; }
  .ctable { min-width: 0; }
  .ctable .chead { display: none; }
  .ctable .crow { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 16px; }
  .ctable .crow > .cc:not(.cc-name):not(.cc-akce) { display: none; }
  .ctable .c-mob { display: block; }
}
/* dotykové tablety: ovládací prvky aspoň 40–44 px (myš na desktopu zůstává u menších) */
@media (min-width: 768px) and (pointer: coarse) {
  .toolbar { --ctl: 44px; }
  .btn { min-height: 44px; }
  .btn.small { min-height: 40px; padding: 6px 12px; }
  .chip { height: 40px; }
  .rte-bar button { min-width: 36px; min-height: 36px; }
  .cact { width: 40px; height: 40px; }
  .side-nav a { min-height: 44px; }
}
/* iPad mini na výšku (600–767 px) má mobilní rozvržení: karty protokolů ve dvou sloupcích místo roztažených přes celou šířku */
@media (min-width: 600px) and (max-width: 767px) {
  .plist .prows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
/* Předplatné — doživotní tarif */
.sub-page.sub-life { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.sub-life .sub-main { display: grid; gap: 16px; }
.sub-feats { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 6px; }
.sub-feats li { position: relative; padding-left: 24px; }
.sub-feats li::before { content: "✓"; position: absolute; left: 2px; color: var(--ok); font-weight: 700; }

/* ---- Pro+: poslat zákazníkovi (krok 8) ---- */
.sh-slot:empty { display: none; }
.sh-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-status { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; color: #374151; }
.sh-status:empty { display: none; }
.sh-opened { color: #05663f; font-weight: 600; }
.sh-modal { max-width: 560px; }
.sh-dlg { display: flex; flex-direction: column; gap: 12px; }
.sh-dlg .field { margin: 0; }
.sh-text { min-height: 120px; }
.sh-what { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.sh-what legend { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #4b5563; margin-bottom: 6px; padding: 0; }
.sh-check { display: flex; gap: 8px; align-items: flex-start; }
.sh-check input { width: auto; min-height: 0; margin-top: 3px; }
.sh-check.off { color: var(--muted); }
.sh-days-f select { max-width: 180px; }
.sh-link { display: flex; gap: 8px; align-items: center; padding: 8px 10px 8px 12px; border-radius: 10px; background: #f6f8fa; font-size: 13px; }
.sh-link-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #374151; }
.sh-go { min-height: 46px; font-size: 15px; }
.sh-left { margin: -4px 0 0; }
.sh-hist { display: flex; flex-direction: column; gap: 4px; font-size: 13px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.sh-hist:empty { display: none; }
.sh-hist-h { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #4b5563; }
.sh-revoke { align-self: flex-start; color: var(--danger); margin-top: 4px; }

/* ---- Pro+: nabídky na opravu ---- */
.qt-table { --cgrid: 130px minmax(0, 1.6fr) 150px 120px 120px 120px; min-width: 820px; }
.qt-table .crow { text-decoration: none; color: inherit; }
.qt-table .crow > span { min-width: 0; display: grid; }
.qt-st { justify-items: start; gap: 2px; }
.qt-sum { margin: 10px 4px 0; }
.qe-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.qe-main { padding: 0; overflow: hidden; }
.qe-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 90px 76px 110px 120px 32px; gap: 10px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line-soft); }
.qe-row.qe-head { border-top: 0; background: #f6f8fa; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #4b5563; }
.qe-row .num, .qe-row input.num { text-align: right; }
.qe-row input, .qe-row select { min-height: 36px; padding: 6px 8px; }
.qe-row .qe-on { width: 18px; min-height: 0; }
.qe-row.off > :not(.qe-on):not(.qe-del) { opacity: .45; }
.qe-row.crit .qe-name small { color: var(--danger); }
.qe-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qe-name input { font-weight: 600; border-color: transparent; background: transparent; padding-left: 6px; }
.qe-name input:hover:not(:disabled), .qe-name input:focus { border-color: #dde2e8; background: #fff; }
.qe-name small { padding-left: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qe-nums { display: contents; }
.qe-tot { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qe-add { padding: 12px 14px; border-top: 1px solid var(--line-soft); }
.qe-addbtn { border-style: dashed; }
.qe-empty { padding: 0 14px 12px; }
.qe-side { display: flex; flex-direction: column; gap: 12px; }
.qe-side .card { margin: 0; }
.qe-sums { display: flex; flex-direction: column; gap: 8px; }
.qe-sum { display: flex; justify-content: space-between; gap: 10px; }
.qe-sum span:first-child { color: #4b5563; }
.qe-sum.total { border-top: 1px solid var(--line); padding-top: 10px; font-size: 18px; }
.qe-vat { margin-top: 12px; max-width: 120px; }
.qe-h { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #4b5563; margin-bottom: 8px; }
.qe-state { display: flex; flex-direction: column; gap: 8px; }
.qe-state p { margin: 0; }
.qe-st { display: flex; gap: 8px; align-items: center; }
.qe-acc { color: #05663f; font-weight: 600; }
.warn-t { color: var(--warn); }
.qe-st-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.qe-st-btns:empty { display: none; }
.qe-rm { align-self: flex-start; color: var(--danger); }
.qe-note { min-height: 90px; }
.qe-crumb a { color: inherit; }
.qe-save { margin-left: 6px; color: rgba(255,255,255,.75); }
.cat-repair-g { display: grid; grid-template-columns: minmax(0, 1fr) 84px 190px; gap: 8px; }
.cat-repair-p { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.cat-repair-p input { text-align: right; }
@media (max-width: 1100px) { .qe-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .qt-table { min-width: 0; }
  .qt-table .crow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "obj tot" "no st"; gap: 4px 10px; padding: 12px; }
  .qt-table .chead, .qt-sent, .qt-net { display: none !important; }
  .qt-table .crow > .qt-tot { display: block; }
  .qt-obj { grid-area: obj; } .qt-tot { grid-area: tot; } .qt-no { grid-area: no; } .qt-st { grid-area: st; justify-items: end; }
}
@media (max-width: 767px) {
  .qe-row.qe-head { display: none; }
  .qe-row { grid-template-columns: 24px minmax(0, 1fr) 32px; grid-template-areas: "on name del" ". qty qty" ". tot tot"; padding: 12px; gap: 6px 8px; }
  .qe-row .qe-on { grid-area: on; align-self: start; margin-top: 10px; }
  .qe-name { grid-area: name; } .qe-del { grid-area: del; align-self: start; }
  .qe-row .qe-tot { grid-area: tot; }
  .qe-row .qe-nums { grid-area: qty; display: grid; grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1.3fr); gap: 6px; }
  .cat-repair-g { grid-template-columns: 1fr 80px; }
  .cat-repair-t { grid-column: 1 / -1; }
}
.sh-linkbox:empty { display: none; }
.sh-linkopts { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 0 26px; padding-left: 12px; border-left: 2px solid var(--line); }
.sh-sender { margin: 0; }
.sh-nopdf { margin: 0; color: var(--warn); }
.sh-up { margin: 8px 0 0; }

/* ---- zlatý tarif (Premium): zlatý rámeček, přejíždějící lesk, třpytky ---- */
.pc-card.gold { position: relative; overflow: hidden; isolation: isolate; border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, #b8860b, #f7d774 30%, #fff3c4 45%, #d4a017 60%, #8a6a14) border-box;
  box-shadow: 0 18px 40px rgba(184, 134, 11, .22); }
.pc-card.gold.rec { box-shadow: 0 0 0 2px var(--brand), 0 18px 40px rgba(184, 134, 11, .22); }
.pc-card.gold .pc-card-h b { background: linear-gradient(90deg, #8a6a14, #d4a017, #8a6a14); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pc-badge.gold { background: linear-gradient(135deg, #f7d774, #d4a017); color: #3d2e05; }
.pc-gold-fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; overflow: hidden; }
.pc-gold-fx::before { content: ''; position: absolute; top: -40%; bottom: -40%; width: 38%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 236, 160, .55), rgba(255, 255, 255, .8), rgba(255, 236, 160, .55), transparent);
  transform: skewX(-18deg); animation: pc-shine 4.5s ease-in-out infinite; }
.pc-gold-fx i { position: absolute; width: 10px; height: 10px; opacity: 0;
  background: radial-gradient(circle, #fff 0 18%, #ffe27a 30%, transparent 62%);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); animation: pc-twinkle 2.6s ease-in-out infinite; }
.pc-gold-fx .s1 { top: 14px; right: 22px; animation-delay: .2s; }
.pc-gold-fx .s2 { top: 46%; right: 12px; width: 7px; height: 7px; animation-delay: 1.1s; }
.pc-gold-fx .s3 { bottom: 18px; left: 16px; animation-delay: 1.7s; }
.pc-gold-fx .s4 { top: 22%; left: 10px; width: 6px; height: 6px; animation-delay: .7s; }
@keyframes pc-shine { 0% { left: -60%; } 55%, 100% { left: 130%; } }
@keyframes pc-twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 45% { opacity: 1; transform: scale(1) rotate(45deg); } }
@media (prefers-reduced-motion: reduce) { .pc-gold-fx::before, .pc-gold-fx i { animation: none; } .pc-gold-fx i { opacity: .8; } }
