/* SPCSS Cloud Services – konzole: horní lišta, pod ní pohledy. Tlumené grafitové neutrály, petrolejový akcent. */
/* SPCSS Cloud Services – vizuální styl podle Design systému gov.cz (DIA): Roboto, primární modrá #00469b,
   neutrální šedá, sémantické barvy success/warning/error, focus #007bff. Rozvržení: modrá lišta, pod ní pohledy. */
:root {
  --bg: #f6f6f6; --panel: #ffffff; --ink: #262626; --muted: #5d5d5d; --line: #d1d1d1; --soft: #f2f6fc;
  --accent: #00469b; --accent-hover: #0e3578; --accent-ink: #ffffff; --accent-soft: #e2eef8;
  --head-bg: #00469b; --head-ink: #ffffff; --head-active: #fbc342;
  --ok: #2e7d32; --warn: #af7a00; --bad: #d70c0f; --off: #6d6d6d; --focus: #007bff; --visited: #67329e;
  --c1: #00469b; --c2: #fab413; --c3: #2e7d32; --c4: #689cd1; --c5: #b50817; --c6: #af7a00; --c7: #9ec8e9; --c8: #6d6d6d;
  --f-sans: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --f-mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 4px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #091129; --panel: #0c1838; --ink: #f6f6f6; --muted: #b0b0b0; --line: #102657; --soft: #102657;
  --accent: #9ec8e9; --accent-hover: #cee3f4; --accent-ink: #060b1b; --accent-soft: #0e3578;
  --head-bg: #060b1b; --head-ink: #ffffff; --head-active: #fbc342;
  --ok: #67c16b; --warn: #fbc342; --bad: #ed7a73; --off: #888888; --focus: #6caef4; --visited: #c4a7e6;
  --c1: #689cd1; --c2: #fbc342; --c3: #67c16b; --c4: #cee3f4; --c5: #ed7a73; --c6: #ffcf74; --c7: #3771b8; --c8: #b0b0b0;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #091129; --panel: #0c1838; --ink: #f6f6f6; --muted: #b0b0b0; --line: #102657; --soft: #102657;
  --accent: #9ec8e9; --accent-hover: #cee3f4; --accent-ink: #060b1b; --accent-soft: #0e3578;
  --head-bg: #060b1b; --head-ink: #ffffff; --head-active: #fbc342;
  --ok: #67c16b; --warn: #fbc342; --bad: #ed7a73; --off: #888888; --focus: #6caef4; --visited: #c4a7e6;
  --c1: #689cd1; --c2: #fbc342; --c3: #67c16b; --c4: #cee3f4; --c5: #ed7a73; --c6: #ffcf74; --c7: #3771b8; --c8: #b0b0b0;
  color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-sans); font-size: 16px; line-height: 1.5; font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
a:visited { color: var(--visited); }
.nav a:visited, .btn:visited, .brand:visited { color: inherit; }
.mono { font-family: var(--f-mono); font-size: 13px; }
.muted { color: var(--muted); }

/* lišta */
.top { background: var(--head-bg); color: var(--head-ink); border-bottom: 0; position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top, 0px); }
.top-in { max-width: 1280px; margin: 0 auto; display: flex; gap: 4px 24px; align-items: center; flex-wrap: wrap; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--head-ink); text-decoration: none; font-size: 18px; font-weight: 400; }
.brand b { font-weight: 700; color: var(--head-ink); }
.logo { width: 36px; height: 36px; border-radius: var(--r); background: #ffffff; display: grid; place-items: center; flex: none; }
.logo img { width: 28px; height: 28px; display: block; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { color: var(--head-ink); text-decoration: none; padding: 10px 12px 8px; font-weight: 500; font-size: 15px; border-bottom: 3px solid transparent; opacity: .9; }
.nav a:hover { opacity: 1; border-bottom-color: rgb(255 255 255 / .5); }
.nav a[aria-current="page"] { opacity: 1; border-bottom-color: var(--head-active); }
.demo-badge { margin-left: auto; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; color: #3d2b00; background: #fbc342; border-radius: var(--r); padding: 2px 8px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
.view { display: grid; gap: 18px; }
h1 { margin: 0; font-size: 2rem; line-height: 1.25; font-weight: 700; text-wrap: balance; }
h2 { margin: 0; font-size: 1.25rem; line-height: 1.4; font-weight: 700; }
h3 { margin: 0; font-size: 0.875rem; font-weight: 700; color: var(--ink); }
.head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: end; justify-content: space-between; }
.head p { margin: 4px 0 0; color: var(--muted); max-width: 75ch; }
.lead { margin: 0; color: var(--muted); max-width: 80ch; }

.btn { font: inherit; font-size: 15px; font-weight: 500; border-radius: var(--r); border: 1px solid var(--accent); background: var(--panel); color: var(--accent); padding: 8px 16px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; min-height: 40px; text-decoration: none; }
.btn:visited { color: var(--accent); }
.btn:hover { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-hover); }
.btn.primary, .btn.primary:visited { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 10%, var(--panel)); color: var(--bad); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.actions, .tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
input, select, textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--panel); border: 1px solid var(--off); border-radius: var(--r); padding: 8px 10px; min-height: 40px; width: 100%; }
input:hover, select:hover, textarea:hover { border-color: var(--ink); }
select.auto, input.auto { width: auto; }
textarea { min-height: 64px; resize: vertical; }
label.lbl { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.card-h { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.card-b { padding: 16px; display: grid; gap: 12px; min-width: 0; }
.note { font-size: 12.5px; border-radius: 6px; padding: 10px 12px; background: var(--soft); border: 1px solid var(--line); }
.note.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.note.bad { border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); color: var(--bad); }
.note ul { margin: 6px 0 0; padding-left: 18px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--r); padding: 12px 16px; display: grid; gap: 4px; align-content: start; }
.kpi .l { font-size: 14px; color: var(--muted); }
.kpi .v { font-size: 1.75rem; font-weight: 700; line-height: 1.2; color: var(--accent); }
.kpi .s { font-size: 13px; color: var(--muted); }
.up { color: var(--warn); } .down { color: var(--ok); }

/* graf */
.chart { position: relative; min-height: 300px; }
.chart svg { display: block; width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 6px 24px rgb(0 0 0 / .14); padding: 6px 10px; font-size: 12px; min-width: 12rem; z-index: 3; }
.tip .d { color: var(--muted); margin-bottom: 2px; }
.tip .r { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; }

/* tabulky */
.tbl-wrap { overflow: auto; max-height: 32rem; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 7px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
th.t, td.t { text-align: left; }
td.wrap { white-space: normal; min-width: 16rem; padding: 7px 10px; max-width: none; margin: 0; }
th { position: sticky; top: 0; background: var(--soft); color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--accent); cursor: pointer; user-select: none; z-index: 1; }
th[aria-sort="ascending"]::after { content: " ▲"; } th[aria-sort="descending"]::after { content: " ▼"; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--soft); }
tbody tr.sel td { background: var(--accent-soft); font-weight: 500; }
tfoot td { font-weight: 600; border-bottom: 0; }
.bar { display: inline-block; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 45%, transparent); vertical-align: middle; margin-right: 6px; }
@media (max-width: 700px) { .hide-n { display: none; } }

/* připojení */
.provs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; }
.pv { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 6px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.pv[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pv-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.pv-n { font-size: 24px; font-weight: 500; line-height: 1; }
.pv-s { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.code { font-family: var(--f-mono); font-size: 12px; font-weight: 500; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--muted); background: var(--soft); white-space: nowrap; }
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 940px) { .split { grid-template-columns: minmax(0, 1fr); } }
.row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--soft); }
.row[aria-current="true"] { background: var(--accent-soft); }
.row .t { font-weight: 500; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.row .s { grid-column: 2 / 4; font-size: 12px; color: var(--muted); display: flex; gap: 4px 14px; flex-wrap: wrap; }
.row .s span { overflow-wrap: anywhere; }
.dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; background: var(--off); }
.dot.ready { background: var(--ok); } .dot.incomplete { background: var(--warn); } .dot.failed { background: var(--bad); }
.pill { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: var(--r); border: 1px solid currentColor; white-space: nowrap; background: color-mix(in srgb, currentColor 8%, transparent); }
.pill.ready { color: var(--ok); } .pill.incomplete { color: var(--warn); } .pill.off { color: var(--off); } .pill.failed { color: var(--bad); }
.tag { font-size: 11px; color: var(--muted); border: 1px dashed var(--line); border-radius: 4px; padding: 0 5px; }
.empty { padding: 32px 16px; color: var(--muted); text-align: center; }
.editor { position: sticky; top: 72px; }
@media (max-width: 940px) { .editor { position: static; } }
.form { padding: 16px; display: grid; gap: 18px; }
.sec { display: grid; gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px 12px; }
.f { display: grid; gap: 4px; min-width: 0; }
.f > label { font-size: 12.5px; font-weight: 500; }
.f .req { color: var(--bad); margin-left: 2px; }
.f .help { font-size: 11.5px; color: var(--muted); }
.f .err { font-size: 11.5px; color: var(--bad); }
.f.bad input, .f.bad select, .f.bad textarea { border-color: var(--bad); }
input.mono, textarea.mono { font-family: var(--f-mono); font-size: 13px; }
.switch { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.switch input { width: auto; min-height: 0; }
.foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.meta { font-size: 11.5px; color: var(--muted); }
pre.block { margin: 0; padding: 12px 14px; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; overflow: auto; font-family: var(--f-mono); font-size: 12px; }
.overlay { position: fixed; inset: 0; background: rgb(0 0 0 / .45); display: grid; place-items: center; padding: 16px; z-index: 20; }
.dlg { width: min(100%, 760px); max-height: 85vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.dlg pre { border: 0; border-radius: 0; }

.toast-host { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: 6px; z-index: 30; }
.toast { background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: var(--r); font-size: 13px; }
.skel { background: linear-gradient(90deg, var(--soft), var(--line), var(--soft)); background-size: 200% 100%; border-radius: 6px; min-height: 1.2em; }
@media (prefers-reduced-motion: no-preference) { .skel { animation: sk 1.4s ease-in-out infinite; } @keyframes sk { to { background-position: -200% 0; } } }

/* --- review: lišta, stav načítání --- */
.top-meta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.top-meta .demo-badge { margin-left: 0; }
.freshness { font-size: 13px; color: var(--head-ink); opacity: .85; white-space: nowrap; }
@media (max-width: 760px) {
  .nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; order: 3; scrollbar-width: none; }
  .nav a { white-space: nowrap; }
  .freshness { display: none; }
}
.view.busy .card, .view.busy .kpis { opacity: .55; transition: opacity .2s; }
th[tabindex]:focus-visible { outline-offset: -2px; }

/* --- segmentový přepínač --- */
.seg { display: inline-flex; border: 1px solid var(--accent); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.seg button { font: inherit; font-size: 15px; font-weight: 500; border: 0; background: transparent; color: var(--accent); padding: 8px 16px; cursor: pointer; min-height: 40px; }
.seg button + button { border-left: 1px solid var(--accent); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* --- kontingenční tabulky --- */
.builder { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px 18px; }
.builder .blk { display: grid; gap: 8px; align-content: start; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); background: var(--soft); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 12.5px; }
.chip button { font: inherit; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px 5px; border-radius: 999px; min-width: 22px; }
.chip button:hover { background: var(--line); color: var(--ink); }
.checks { display: grid; gap: 4px; }
.checks label { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.checks input { width: auto; min-height: 0; }
details.ms { border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
details.ms summary { cursor: pointer; padding: 8px 10px; font-size: 14px; list-style: none; display: flex; gap: 8px; align-items: center; }
details.ms summary::after { content: "▾"; color: var(--muted); }
details.ms[open] summary { border-bottom: 1px solid var(--line); }
details.ms .ms-body { max-height: 14rem; overflow: auto; padding: 8px 10px; display: grid; gap: 4px; }
details.ms .ms-body label { display: flex; gap: 8px; align-items: center; font-size: 12.5px; }
details.ms .ms-body input { width: auto; min-height: 0; }
.pivot td.rh, .pivot th.rh { text-align: left; }
.pivot td.rh { color: var(--ink); }
.pivot td.rh.rep { color: transparent; }
.pivot tr.sub td { background: var(--soft); font-weight: 600; }
.pivot tr.grand td { font-weight: 700; border-top: 2px solid var(--line); background: var(--panel); position: sticky; bottom: 0; }
.pivot td.tot, .pivot th.tot { border-left: 2px solid var(--line); }
.pivot thead tr:nth-child(2) th { top: 37px; }
.pivot .na { color: var(--muted); }

/* --- billing dokument --- */
.doc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(18px, 4vw, 40px); display: grid; gap: 22px; position: relative; max-width: 960px; }
.doc .wm { position: absolute; top: 18px; right: 22px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--warn); border: 1px solid currentColor; border-radius: 4px; padding: 2px 8px; }
.doc .wm.cancelled { color: var(--bad); }
.doc-h { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: start; }
.doc-h h1 { font-size: 20px; }
.doc .parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.doc .party { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; font-size: 13px; display: grid; gap: 2px; }
.doc .party h3 { margin-bottom: 4px; }
.doc .kv { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; font-size: 13px; }
.doc .kv dt { color: var(--muted); } .doc .kv dd { margin: 0; }
.doc table td, .doc table th { white-space: normal; }
.doc table th { position: static; cursor: default; }
.doc tr.grp td { font-weight: 600; background: var(--soft); }
.totals { justify-self: end; width: min(100%, 360px); display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; font-size: 13.5px; }
.totals .g { font-weight: 700; font-size: 16px; border-top: 2px solid var(--line); padding-top: 6px; }
.doc .fine { font-size: 12px; color: var(--muted); white-space: pre-wrap; }
.miss { color: var(--warn); }

@media print {
  .top, .no-print, .toast-host { display: none !important; }
  body { background: #fff; color: #000; }
  .wrap { padding: 0; max-width: none; }
  .doc { border: 0; padding: 0; max-width: none; }
  .view:not(#view-billing) { display: none !important; }
  :root { --panel: #fff; --soft: #f3f3f3; --line: #ccc; --ink: #000; --muted: #555; }
}
details.ms summary .muted { margin-left: auto; }
.row .code, .row .pill { align-self: start; }

/* --- přepínač motivu --- */
.theme-btn { font: inherit; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; color: var(--head-ink); background: transparent; border: 1px solid rgb(255 255 255 / .55); border-radius: var(--r); padding: 4px 10px; min-height: 32px; cursor: pointer; }
.theme-btn:hover { background: rgb(255 255 255 / .12); border-color: #ffffff; }
.theme-btn svg { width: 16px; height: 16px; }
@media print { :root, :root[data-theme="dark"] { color-scheme: light; --bg: #fff; --panel: #fff; --ink: #000; --muted: #555; --line: #ccc; --soft: #f3f3f3; --accent: #00469b; --accent-soft: #e2eef8; } }
.kpi { min-width: 0; }
.kpi .v { font-size: clamp(1.25rem, 4.6vw, 1.75rem); overflow-wrap: anywhere; }
@media (max-width: 420px) { .theme-btn span { display: none; } }

/* --- CMDB --- */
.cmdb-grid { display: grid; grid-template-columns: minmax(200px, 250px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .cmdb-grid { grid-template-columns: minmax(0, 1fr); } }
.cmdb-nav { padding: 10px; display: grid; gap: 8px; position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow: auto; }
@media (max-width: 900px) { .cmdb-nav { position: static; max-height: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); } }
.cmdb-grp { display: grid; gap: 2px; }
.cmdb-grp h3 { padding: 6px 8px 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cmdb-cls { font: inherit; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; text-align: left; border: 0; background: transparent; color: var(--ink); padding: 6px 8px; border-radius: var(--r); cursor: pointer; }
.cmdb-cls:hover { background: var(--soft); }
.cmdb-cls[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.cmdb-cls .n { font-variant-numeric: tabular-nums; opacity: .8; }
.cmdb-attrs { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.kv2 { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 14px; }
.kv2 dt { color: var(--muted); } .kv2 dd { margin: 0; overflow-wrap: anywhere; }
.crumbs { font-size: 14px; color: var(--muted); }
.path { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 0; }
.path .node { display: grid; gap: 2px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r); padding: 6px 10px; background: var(--panel); min-width: 0; }
.path .node .mono { font-size: 12px; color: var(--muted); }
.path .arr { color: var(--muted); font-size: 18px; }
.rels { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.rel ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; } .rel li { margin: 2px 0; }

/* --- nápověda a průvodce --- */
.help-q { max-width: 420px; }
.help-body { display: grid; gap: 16px; }
details.acc { border-bottom: 1px solid var(--line); }
details.acc summary { cursor: pointer; padding: 10px 0; font-weight: 500; color: var(--accent); }
details.acc .acc-b { padding: 0 0 12px; max-width: 80ch; } details.acc p { margin: 0 0 8px; }
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; max-width: 80ch; }
dl.gloss { display: grid; grid-template-columns: minmax(140px, max-content) minmax(0, 1fr); gap: 8px 20px; margin: 0; }
dl.gloss dt { font-weight: 700; } dl.gloss dd { margin: 0; }
@media (max-width: 600px) { dl.gloss { grid-template-columns: minmax(0, 1fr); } dl.gloss dd { margin-bottom: 6px; } }
.tour { position: fixed; z-index: 40; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(440px, calc(100vw - 32px)); background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--r); box-shadow: 0 12px 40px rgb(0 0 0 / .25); padding: 18px 20px; display: grid; gap: 10px; }
.tour h2 { font-size: 1.25rem; } .tour p { margin: 0; }
.tour-steps { display: flex; gap: 6px; } .tour-steps span { height: 4px; flex: 1; border-radius: 2px; background: var(--line); } .tour-steps .on { background: var(--accent); } .tour-steps .done { background: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.btn.link { border-color: transparent; background: transparent; padding-inline: 4px; }
.btn.link:hover { background: transparent; text-decoration: underline; }
.nav a.nav-hl { border-bottom-color: var(--head-active); opacity: 1; box-shadow: inset 0 -3px 0 var(--head-active); }
@media print { .tour { display: none !important; } }
.nav a { padding-inline: 10px; font-size: 14.5px; }
@media (max-width: 1500px) { .freshness { display: none; } }
@media (min-width: 761px) and (max-width: 1300px) { .brand span:last-child { font-size: 16px; } }

/* ---------- CMDB: mapa závislostí ---------- */
:root { --c-application: #00469b; --c-database: #8e24aa; --c-container: #00897b; --c-compute: #455a64; --c-virtualization: #558b2f; --c-cloud: #5c6bc0; --c-storage: #8d6e63; --c-san: #9e9d24; --c-network: #0288d1; }
:root[data-theme="dark"] { --c-application: #9ec8e9; --c-database: #ce93d8; --c-container: #4db6ac; --c-compute: #b0bec5; --c-virtualization: #aed581; --c-cloud: #9fa8da; --c-storage: #bcaaa4; --c-san: #dce775; --c-network: #4fc3f7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c-application: #9ec8e9; --c-database: #ce93d8; --c-container: #4db6ac; --c-compute: #b0bec5; --c-virtualization: #aed581; --c-cloud: #9fa8da; --c-storage: #bcaaa4; --c-san: #dce775; --c-network: #4fc3f7; } }
.c-application { --cat: var(--c-application); } .c-database { --cat: var(--c-database); } .c-container { --cat: var(--c-container); }
.c-compute { --cat: var(--c-compute); } .c-virtualization { --cat: var(--c-virtualization); } .c-cloud { --cat: var(--c-cloud); }
.c-storage { --cat: var(--c-storage); } .c-san { --cat: var(--c-san); } .c-network { --cat: var(--c-network); }
.chk { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; min-height: 40px; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--accent); }
.gm-filters .card-b { padding: 12px 16px; }
.gm-filters input[type=search] { min-width: 260px; }
.gm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .gm-grid { grid-template-columns: minmax(0, 1fr); } }
.gm-main { overflow: hidden; }
.gm-canvas { position: relative; height: calc(100vh - 300px); min-height: 520px; background: var(--bg); background-image: radial-gradient(color-mix(in srgb, var(--line) 70%, transparent) 1px, transparent 1px); background-size: 20px 20px; }
.gm-svg { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; user-select: none; }
.gm-svg:active { cursor: grabbing; }
.gm-svg .e { fill: none; stroke: color-mix(in srgb, var(--muted) 55%, transparent); stroke-width: 1.4; }
.gm-svg .e.via { stroke-dasharray: 2 3; }
.gm-svg .e.mgmt { stroke-dasharray: 6 4; stroke: color-mix(in srgb, var(--muted) 35%, transparent); }
.gm-svg .e.hot-down { stroke: var(--bad); stroke-width: 2.2; }
.gm-svg .e.hot-degraded { stroke: var(--warn); stroke-width: 2; }
.gm-svg .e.dim, .gm-svg .n.dim { opacity: .18; }
.gm-svg .n { cursor: pointer; }
.gm-svg .n .box { fill: var(--panel); stroke: var(--line); stroke-width: 1; }
.gm-svg .n .stripe { fill: var(--cat, var(--accent)); }
.gm-svg .n .t1 { font: 600 13px var(--f-sans); fill: var(--ink); }
.gm-svg .n .t2 { font: 400 11.5px var(--f-sans); fill: var(--muted); }
.gm-svg .n:hover .box { stroke: var(--accent); }
.gm-svg .n:focus { outline: none; }
.gm-svg .n:focus-visible .box, .gm-svg .n.sel .box { stroke: var(--focus); stroke-width: 3; }
.gm-svg .n.c-application .box { stroke-width: 1.5; }
.gm-svg .n.s-down .box { fill: color-mix(in srgb, var(--bad) 14%, var(--panel)); stroke: var(--bad); stroke-width: 2; }
.gm-svg .n.s-degraded .box { fill: color-mix(in srgb, var(--warn) 16%, var(--panel)); stroke: var(--warn); stroke-width: 2; }
.gm-svg .n.failed .box { stroke: var(--bad); stroke-width: 3.5; }
.gm-svg .badge { fill: var(--bad); }
.gm-svg .n.s-degraded:not(.failed) .badge { fill: var(--warn); }
.gm-svg .badge-t { font: 700 11px var(--f-sans); fill: #fff; }
:root[data-theme="dark"] .gm-svg .badge-t { fill: #060b1b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gm-svg .badge-t { fill: #060b1b; } }
.gm-zoom { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.gm-zoom .btn { min-width: 40px; justify-content: center; padding-inline: 10px; }
.gm-legend { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 12px; font-size: 12px; color: var(--muted); background: color-mix(in srgb, var(--panel) 92%, transparent); border-top: 1px solid var(--line); }
.gm-legend .lg { display: inline-flex; gap: 6px; align-items: center; }
.gm-legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--cat); }
.gm-legend b { width: 12px; height: 10px; border-radius: 2px; border: 2px solid var(--bad); background: color-mix(in srgb, var(--bad) 14%, var(--panel)); }
.gm-legend .s-degraded b { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, var(--panel)); }
.gm-legend u { width: 18px; border-top: 2px dashed var(--muted); }
.gm-side { display: grid; gap: 16px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.gm-side h2 { font-size: 18px; margin: 0; overflow-wrap: anywhere; }
.gm-help { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; }
.gm-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.gm-list .btn.link { min-height: 0; padding: 0; font-size: 14px; text-align: left; }
.gm-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gm-kpis > div { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; display: grid; gap: 2px; }
.gm-kpis .v { font-size: 24px; font-weight: 700; color: var(--accent); }
.gm-kpis .v.bad { color: var(--bad); } .gm-kpis .v.warn { color: var(--warn); }
.gm-kpis .l { font-size: 12px; color: var(--muted); }
.gm-impact { border-top: 4px solid var(--bad); }
.gm-mini { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.gm-mini th, .gm-mini td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.gm-mini td + td, .gm-mini th + th { text-align: right; }
.gm-tree-wrap { padding: 16px; height: 100%; overflow: auto; background: var(--panel); }
.gm-tree, .gm-tree ul { list-style: none; margin: 0; padding: 0; }
.gm-tree .row { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px calc(8px + var(--d) * 22px); border-radius: var(--r); font-size: 14px; min-height: 34px; }
.gm-tree .row:hover { background: var(--soft); }
.gm-tree .row.sel { background: var(--accent-soft); outline: 2px solid var(--focus); outline-offset: -2px; }
.gm-tree .row.s-down { background: color-mix(in srgb, var(--bad) 10%, transparent); }
.gm-tree .row.s-degraded { background: color-mix(in srgb, var(--warn) 12%, transparent); }
.gm-tree .tog { width: 24px; height: 24px; flex: none; border: 0; background: none; color: var(--accent); font-size: 14px; cursor: pointer; padding: 0; }
.gm-tree .dot { width: 10px; height: 10px; border-radius: 2px; background: var(--cat); flex: none; }
.gm-tree .nm { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.gm-tree .nm:hover { color: var(--accent); text-decoration: underline; }
.gm-tree .cl, .gm-tree .cu, .gm-tree .rep { font-size: 12.5px; color: var(--muted); }
.gm-tree .cu::before { content: "· "; }

/* ---------- identita v záhlaví ---------- */
.identity { display: inline-flex; align-items: center; gap: 6px; }
.identity .who-l { font-size: 13px; opacity: .85; }
.identity select.persona { width: auto; max-width: 280px; min-height: 32px; padding: 4px 8px; font-size: 13px; background: rgb(255 255 255 / .12); color: var(--head-ink); border-color: rgb(255 255 255 / .5); }
.identity select.persona option { color: #262626; background: #fff; }
.identity .who { font-size: 13px; color: var(--head-ink); padding: 4px 8px; border: 1px solid rgb(255 255 255 / .45); border-radius: var(--r); text-decoration: none; }
.identity .who.ro:hover { background: rgb(255 255 255 / .12); }

/* ---------- obecné rozvržení ---------- */
.stack { display: grid; gap: 16px; }
.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; align-items: start; }
ul.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cmt { margin: 4px 0; font-style: italic; color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 6px; border-radius: 999px; }
.chip button:hover { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.chk.day { min-height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r); }

/* ---------- změny ---------- */
.pick-list { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); display: grid; }
.pick { display: grid; grid-template-columns: 20px minmax(0, auto) 1fr; gap: 10px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.pick:hover { background: var(--soft); }
.pick input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.tl-wrap { overflow-x: auto; }
.tl { width: 100%; min-width: 760px; height: auto; display: block; }
.tl .dl { font: 11px var(--f-sans); fill: var(--muted); }
.tl .rl { font: 12.5px var(--f-sans); fill: var(--ink); }
.tl .rl.strong { font-weight: 700; }
.tl .grid { stroke: var(--line); stroke-width: 1; }
.tl .we { fill: color-mix(in srgb, var(--muted) 7%, transparent); }
.tl .lane { fill: color-mix(in srgb, var(--line) 35%, transparent); }
.tl .bar.win { fill: color-mix(in srgb, var(--accent) 55%, transparent); }
.tl .bar.deg { fill: color-mix(in srgb, var(--warn) 55%, transparent); }
.tl .bar.frz { fill: color-mix(in srgb, var(--bad) 55%, transparent); }
.tl .bar.ok { fill: var(--ok); }
.tl .slot { fill: color-mix(in srgb, var(--focus) 14%, transparent); stroke: var(--focus); stroke-width: 1; stroke-dasharray: 3 2; }
.tl .slot.on { fill: color-mix(in srgb, var(--focus) 28%, transparent); stroke-width: 2; stroke-dasharray: none; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); align-items: center; }
.tl-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend .lg::before { content: ""; width: 14px; height: 10px; border-radius: 2px; background: var(--muted); }
.tl-legend .lg.win::before { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.tl-legend .lg.deg::before { background: color-mix(in srgb, var(--warn) 55%, transparent); }
.tl-legend .lg.frz::before { background: color-mix(in srgb, var(--bad) 55%, transparent); }
.tl-legend .lg.ok::before { background: var(--ok); }
.tl-legend .lg.slot::before { background: color-mix(in srgb, var(--focus) 25%, transparent); border: 1px dashed var(--focus); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.slot-opt { display: grid; grid-template-columns: 20px 1fr; gap: 2px 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.slot-opt .meta { grid-column: 2; }
.slot-opt.on { border-color: var(--focus); box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 35%, transparent); background: color-mix(in srgb, var(--focus) 6%, var(--panel)); }
.slot-opt input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.appr-list { display: grid; gap: 16px; }
.appr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.appr-item { border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: var(--r); padding: 12px; display: grid; gap: 8px; align-content: start; }
.appr-item.approved { border-left-color: var(--ok); }
.appr-item.rejected { border-left-color: var(--bad); }
.appr-item .pill { justify-self: start; }
.card .card-h h2 + a, .appr .card-h a { font-size: 13px; }
ol.log, ol.hist { list-style: none; margin: 0; padding: 12px 16px; display: grid; gap: 10px; }
ol.log li, ol.hist li { border-left: 3px solid var(--line); padding: 2px 0 2px 12px; font-size: 14px; }
ol.hist li.rel { border-left-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
table.diff { border-collapse: collapse; margin: 6px 0 2px; font-size: 13px; }
table.diff th { text-align: left; font-weight: 500; color: var(--muted); padding: 2px 12px 2px 0; }
table.diff td { padding: 2px 6px; font-family: var(--f-mono); font-size: 12.5px; }
table.diff td.old { color: var(--muted); text-decoration: line-through; }
table.diff td.new { color: var(--ok); font-weight: 600; }
table.diff td.arr { color: var(--muted); }
ul.recent { list-style: none; margin: 0; padding: 8px 16px 14px; display: grid; gap: 8px; font-size: 14px; }
.win-wrap { gap: 0; }
.win-svc { padding: 12px 0; border-bottom: 1px solid var(--line); }
.win-svc:last-child { border-bottom: 0; }
.win-h { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.win-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.win-list li { position: relative; padding-right: 140px; }
.win-list .pill { margin-right: 6px; }
.win-act { position: absolute; right: 0; top: 0; display: flex; gap: 4px; }
@media (max-width: 700px) { .win-list li { padding-right: 0; } .win-act { position: static; } }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px; }
.cal-d { min-height: 92px; border: 1px solid var(--line); border-radius: var(--r); padding: 4px; display: grid; gap: 3px; align-content: start; font-size: 12px; background: var(--panel); min-width: 0; }
.cal-d.we { background: var(--soft); }
.cal-d.today { outline: 2px solid var(--focus); outline-offset: -1px; }
.cal-d.frz { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--bad) 7%, var(--panel)) 0 8px, var(--panel) 8px 16px); }
.cal-n { color: var(--muted); font-size: 11.5px; }
.cal-f { color: var(--bad); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-c { display: block; padding: 2px 5px; border-radius: 3px; text-decoration: none; color: var(--ink); background: var(--accent-soft); border-left: 3px solid var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-c.awaiting_approval { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--panel)); }
.cal-c.completed, .cal-c.cancelled { opacity: .65; border-left-color: var(--off); background: var(--soft); }
.cal-c.failed, .cal-c.rejected { border-left-color: var(--bad); }
.tl-legend .lg.cal-l::before { background: var(--accent-soft); border-left: 3px solid var(--accent); }
.tl-legend .lg.cal-l.awaiting_approval::before { border-left-color: var(--warn); }
.tl-legend .lg.cal-l.completed::before { border-left-color: var(--off); }
@media (max-width: 700px) { .cal { grid-template-columns: minmax(0, 1fr); } .cal-h { display: none; } .cal-d { min-height: 0; } }

/* ---------- přístupy a RACI ---------- */
.raci-wrap { max-height: none; }
table.raci-t { border-collapse: collapse; width: 100%; font-size: 14px; }
table.raci-t th, table.raci-t td { border-bottom: 1px solid var(--line); padding: 6px 8px; }
table.raci-t thead th.rot { vertical-align: bottom; height: 150px; width: 54px; padding: 4px; }
table.raci-t thead th.rot span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: 13px; font-weight: 600; }
table.raci-t tr.grp th { background: var(--soft); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.raci-t th.act { text-align: left; font-weight: 400; min-width: 260px; }
table.raci-t tr.warn th.act { box-shadow: inset 4px 0 0 var(--warn); }
td.raci-c { text-align: center; }
td.raci-c input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.raci { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 4px; border-radius: var(--r); font-weight: 700; font-size: 12.5px; color: #fff; }
.raci.R { background: #00469b; } .raci.A, .raci.AR { background: #0c1838; } .raci.C { background: #2e7d32; } .raci.I { background: #6d6d6d; }
:root[data-theme="dark"] .raci.A, :root[data-theme="dark"] .raci.AR { background: #fbc342; color: #060b1b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .raci.A, :root:not([data-theme="light"]) .raci.AR { background: #fbc342; color: #060b1b; } }
select.raci-s { width: 58px; min-height: 30px; padding: 2px 4px; font-weight: 700; text-align: center; }
select.raci-s.R { border-color: #00469b; } select.raci-s.A, select.raci-s.AR { border-color: var(--ink); border-width: 2px; } select.raci-s.C { border-color: var(--ok); }
details.add-role { margin-top: 6px; }
details.add-role summary { cursor: pointer; color: var(--accent); font-size: 13px; }
details.add-role .tools { margin-top: 6px; }
table.diff { width: auto; }
table.diff th, table.diff td { position: static; background: none; border: 0; cursor: auto; white-space: normal; text-align: left; padding: 2px 10px 2px 0; }
table.diff th { font-weight: 500; color: var(--muted); }
table.raci-t th { cursor: auto; }

/* ---------- OS a software ---------- */
.kpi-btn { font: inherit; text-align: left; color: inherit; cursor: pointer; }
.kpi-btn:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 18%, transparent); }
.kpi-btn:disabled { cursor: default; opacity: 1; }
.kpi-btn.bad, .kpi-link { border-top-color: var(--bad); }
.kpi-btn.bad .v, .kpi .v.bad { color: var(--bad); }
.kpi-btn.warn { border-top-color: var(--warn); }
.kpi-btn.warn .v { color: var(--warn); }
.kpi-link { text-decoration: none; color: inherit; }
.kpi-link:hover { box-shadow: 0 2px 8px color-mix(in srgb, var(--bad) 18%, transparent); }
.kpis-7 { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.lc-bar { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--soft); min-width: 80px; gap: 1px; }
.lc-bar span { display: block; min-width: 2px; }
.lc-unsupported { background: var(--bad); } .lc-extended { background: color-mix(in srgb, var(--warn) 85%, var(--bad)); } .lc-ending { background: var(--warn); }
.lc-supported { background: var(--ok); } .lc-unknown { background: var(--off); }
.tl-legend .lg.lc-l::before { background: currentColor; }
.tl-legend .lg.lc-unsupported, .tl-legend .lg.lc-extended, .tl-legend .lg.lc-ending, .tl-legend .lg.lc-supported, .tl-legend .lg.lc-unknown { background: none; }
.tl-legend .lg.lc-unsupported::before { background: var(--bad); } .tl-legend .lg.lc-extended::before { background: color-mix(in srgb, var(--warn) 85%, var(--bad)); }
.tl-legend .lg.lc-ending::before { background: var(--warn); } .tl-legend .lg.lc-supported::before { background: var(--ok); } .tl-legend .lg.lc-unknown::before { background: var(--off); }
.card .card-b > .lc-bar { height: 22px; }
.use { display: inline-flex; align-items: center; gap: 6px; }
.use .trk { display: inline-block; width: 60px; height: 8px; background: var(--soft); border-radius: 2px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.use .trk i { display: block; height: 100%; background: var(--ok); }
.use.mid .trk i { background: var(--warn); } .use.hi .trk i { background: var(--bad); }
.pager { display: flex; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.inv-os.lcrow-unsupported { border-top: 4px solid var(--bad); }
.inv-os.lcrow-extended, .inv-os.lcrow-ending { border-top: 4px solid var(--warn); }
tr.lcrow-unsupported td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
tr.lcrow-extended td:first-child { box-shadow: inset 4px 0 0 color-mix(in srgb, var(--warn) 85%, var(--bad)); }

/* ---------- mobilní zobrazení ---------- */
.head > div { min-width: 0; max-width: 100%; }
.seg { max-width: 100%; }
table.raci-t th.act { position: sticky; left: 0; z-index: 2; background: var(--panel); }
table.raci-t tr.grp th { position: sticky; left: 0; }
@media (max-width: 760px) {
  .top { position: static; }
  .top-in { gap: 8px 10px; padding-top: 8px; padding-bottom: 6px; }
  .top-meta { display: contents; }
  .brand { order: 0; min-width: 0; }
  .theme-btn { order: 1; margin-left: auto; }
  .demo-badge { order: 1; }
  .identity { order: 2; flex: 1 1 100%; min-width: 0; }
  .identity:empty { display: none; }
  .identity select.persona { flex: 1; max-width: none; min-width: 0; }
  .nav { order: 3; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 24px; }
  .nav a { padding: 10px 10px 8px; }
  .wrap { padding-left: 12px; padding-right: 12px; }
  h1 { font-size: 1.6rem; }
  .head { align-items: stretch; }
  .head .actions { width: 100%; }
  .seg { display: flex; overflow-x: auto; scrollbar-width: none; }
  .seg button { white-space: nowrap; flex: 1 0 auto; padding: 8px 12px; }
  .card-h { padding: 12px; }
  .card-h .tools, .card-h > .tools { width: 100%; }
  .card-h .tools input, .card-h .tools select { flex: 1 1 140px; min-width: 0; }
  .tools > input.auto, .tools > select.auto { flex: 1 1 160px; min-width: 0; width: auto; }
  .gm-filters input[type=search] { min-width: 0; }
  .card-b { padding: 12px; }
  th, td { padding: 7px 8px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; }
  .cmdb-nav { max-height: 260px; overflow-y: auto; }
  .gm-canvas { height: 62vh; min-height: 380px; }
  .gm-side { position: static; max-height: none; }
  .gm-zoom .btn { min-width: 36px; min-height: 36px; padding: 4px 8px; }
  .gm-legend { font-size: 11px; gap: 4px 10px; }
  .cal-d:not(.today):not(:has(.cal-c)):not(:has(.cal-f)) { display: none; }
  .slots { grid-template-columns: minmax(0, 1fr); }
  .appr-grid { grid-template-columns: minmax(0, 1fr); }
  .win-list li { padding-right: 0; }
  .tl { min-width: 640px; }
  .pick { grid-template-columns: 20px minmax(0, 1fr); }
  .pick .meta { grid-column: 2; }
  .tour { left: 12px; right: 12px; width: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); padding: 14px 16px; }
  table.diff td, table.diff th { white-space: normal; overflow-wrap: anywhere; }
  .inv-os dl.kv2 { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); }
  .lc-bar { min-width: 60px; }
  .pager { flex-direction: column; align-items: stretch; }
  .pager .actions .btn { flex: 1; justify-content: center; }
}
@media (max-width: 420px) {
  .brand span:last-child { font-size: 16px; }
  .demo-badge { font-size: 10px; padding: 3px 6px; }
  .kpi .v { font-size: 1.3rem; }
}
.view { grid-template-columns: minmax(0, 1fr); }
.head > .actions { min-width: 0; max-width: 100%; }

/* plánování od business služby */
.svc-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; padding: 12px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r); background: var(--soft); }
.svc-info > div { display: grid; gap: 4px; font-size: 14px; }
.svc-tree { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 6px 0; }
.svc-tree .row input { width: 18px; height: 18px; min-height: 0; flex: none; accent-color: var(--accent); margin: 3px; }
.svc-tree .nm { font-weight: 600; }
.appr-item.consult { border-left-color: var(--off); background: color-mix(in srgb, var(--soft) 60%, transparent); }
.appr-item.consult.approved { border-left-color: var(--ok); }
.appr-role { text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }

/* vysoká dostupnost */
.gm-svg .e.grp { stroke: color-mix(in srgb, var(--accent) 60%, transparent); stroke-width: 1.8; }
.gm-legend .lg.grp u { border-top: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.card-b h3.h3 { font-size: 15px; margin: 12px 0 0; }
.ha-verdict { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin: 0 0 12px; }
.ha-groups { margin: 6px 0 10px; padding-left: 18px; display: grid; gap: 6px; }
.ha-groups li { line-height: 1.45; }
.rels .pill.grp { margin-left: 6px; font-size: 12px; }

/* --- hlavní menu se skupinami --- */
.nav { align-items: stretch; }
.nav > a, .nav-btn { color: var(--head-ink); text-decoration: none; padding: 10px 12px 8px; font: 500 15px var(--f-sans); border: 0; border-bottom: 3px solid transparent; opacity: .92; background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nav > a:hover, .nav-btn:hover { opacity: 1; border-bottom-color: rgb(255 255 255 / .5); }
.nav > a[aria-current="page"], .nav-group.active > .nav-btn { opacity: 1; border-bottom-color: var(--head-active); }
.nav-btn::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .8; transition: transform .15s; }
.nav-btn[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.nav-btn:focus-visible, .nav > a:focus-visible, .nav-menu a:focus-visible { outline: 3px solid var(--head-active); outline-offset: -3px; }
.nav-btn.nav-hl { border-bottom-color: var(--head-active); opacity: 1; box-shadow: inset 0 -3px 0 var(--head-active); }
.nav-group { position: relative; display: flex; }
.nav-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 30; min-width: 320px; margin-top: 6px; padding: 6px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px rgb(0 0 0 / .18); }
.nav-btn[aria-expanded="true"] + .nav-menu { display: grid; gap: 2px; }
.nav-menu a { display: grid; gap: 1px; padding: 9px 12px; border-radius: var(--r); color: var(--ink); text-decoration: none; border-left: 3px solid transparent; }
.nav-menu a b { font-weight: 500; font-size: 15px; }
.nav-menu a span { font-size: 13px; color: var(--muted); }
.nav-menu a:hover { background: var(--soft); }
.nav-menu a[aria-current="page"] { border-left-color: var(--accent); background: var(--accent-soft); }
.nav-menu a[aria-current="page"] b { font-weight: 700; }
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; order: 1; margin-left: auto; color: var(--head-ink); background: transparent; border: 1px solid rgb(255 255 255 / .5); border-radius: var(--r); padding: 6px 10px; font: 500 14px var(--f-sans); cursor: pointer; }
  .theme-btn { margin-left: 0; }
  .nav, .top .nav { display: none; order: 4; width: 100%; flex-direction: column; overflow: visible; -webkit-mask-image: none; mask-image: none; padding: 4px 0 8px; max-height: calc(100dvh - 120px); overflow-y: auto; }
  .top.nav-open .nav { display: flex; }
  .nav > a { padding: 10px 4px; border-bottom: 1px solid rgb(255 255 255 / .15); }
  .nav > a[aria-current="page"] { border-bottom-color: rgb(255 255 255 / .15); box-shadow: inset 3px 0 0 var(--head-active); padding-left: 10px; }
  .nav-group { flex-direction: column; }
  .nav-btn { pointer-events: none; padding: 12px 4px 4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .75; border-bottom: 0; }
  .nav-btn::after { display: none; }
  .nav-group.active > .nav-btn { border-bottom: 0; }
  .nav-menu, .nav-btn[aria-expanded="true"] + .nav-menu { display: grid; position: static; min-width: 0; margin: 0; padding: 0 0 6px; background: transparent; border: 0; box-shadow: none; color: var(--head-ink); }
  .nav-menu a { color: var(--head-ink); padding: 8px 10px; }
  .nav-menu a span { color: var(--head-ink); opacity: .7; }
  .nav-menu a:hover { background: rgb(255 255 255 / .08); }
  .nav-menu a[aria-current="page"] { background: rgb(255 255 255 / .12); border-left-color: var(--head-active); }
}
@media (min-width: 761px) and (max-width: 1100px) { .nav > a, .nav-btn { padding-inline: 8px; font-size: 14.5px; } }

/* --- provozní přehled --- */
.kpis-dash { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
a.kpi-dash { color: inherit; text-decoration: none; }
a.kpi-dash:hover { border-color: var(--accent); box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 18%, transparent); }
a.kpi-dash .v { color: var(--ink); }
.kpi-dash.good { border-top-color: var(--ok); } .kpi-dash.warn { border-top-color: var(--warn); } .kpi-dash.bad { border-top-color: var(--bad); }
.kpi-dash.bad .v { color: var(--bad); }
.dash-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; }
.dash-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.dash-list li:last-child { border-bottom: 0; }
.dash-list li > :last-child { text-align: right; }
.meter { display: grid; gap: 6px; margin: 14px 0 4px; }
.meter-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.meter-v { font-size: 14px; white-space: nowrap; }
.meter-bar { height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--muted) 18%, transparent); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 5px; }
.meter-hint { font-size: 13px; color: var(--muted); }
.t-ok { background: var(--ok); } .t-warn { background: var(--warn); } .t-sev { background: color-mix(in srgb, var(--warn) 45%, var(--bad)); } .t-bad { background: var(--bad); } .t-acc { background: var(--accent); }
.stack-bar { display: flex; gap: 2px; height: 16px; border-radius: 4px; overflow: hidden; margin: 4px 0 10px; }
.stack-bar span { min-width: 3px; }
.stack-legend { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.stack-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.dchips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dchip { display: inline-flex; gap: 4px; align-items: baseline; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 14px; background: var(--panel); }
.dchip:hover { border-color: var(--accent); }
.dchip.warn { border-color: var(--warn); }
.dash-up { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.dash-up li { display: grid; grid-template-columns: 120px 1fr; gap: 10px; font-size: 15px; }
.dash-up .when { color: var(--muted); font-size: 14px; }
.dash-freeze { font-size: 14px; margin-bottom: 8px; }
.dash-big { margin: 0 0 12px; } .dash-big b { font-size: 1.6rem; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hbars li { display: grid; grid-template-columns: 70px 1fr 90px; gap: 10px; align-items: center; font-size: 14px; }
.hb-bar { height: 12px; background: color-mix(in srgb, var(--muted) 14%, transparent); border-radius: 0 4px 4px 0; }
.hb-bar span { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.hb-v { text-align: right; color: var(--muted); }
@media (max-width: 760px) { .dash-up li { grid-template-columns: 1fr; gap: 0; } .hbars li { grid-template-columns: 56px 1fr 72px; } }
.tbl-wrap.tbl-full { max-height: none; }
@media (max-width: 760px) { .kpis-dash { grid-template-columns: 1fr 1fr; } .kpis-dash .kpi .s { font-size: 12px; } }

/* ---------- review mobilního zobrazení (22. 10. 2026) ---------- */
/* vodorovně posuvné tabulky: okraj se ztrácí, dokud je co posouvat (třídy nastavuje app.js) */
.tbl-wrap.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.tbl-wrap.more-l { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 36px), transparent); }
.tbl-wrap.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
.dash-svc-list { display: none; }
@media (max-width: 760px) {
  /* kompaktní lišta: logo, název, demo štítek a Menu v jednom řádku; role a motiv až v otevřeném menu */
  .top { position: sticky; top: 0; }
  .top-in { flex-wrap: wrap; gap: 6px 8px; padding-top: 6px; padding-bottom: 6px; min-height: 52px; }
  .brand { font-size: 16px; gap: 8px; flex: 0 1 auto; }
  .brand > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .logo { width: 32px; height: 32px; } .logo img { width: 24px; height: 24px; }
  .demo-badge { order: 1; font-size: 11px; padding: 2px 6px; }
  .nav-toggle { order: 2; min-height: 40px; }
  .identity, .theme-btn { display: none !important; }
  .top.nav-open .identity { display: flex !important; order: 5; flex: 1 1 auto; }
  .top.nav-open .identity:empty { display: none !important; }
  .top.nav-open .theme-btn { display: inline-flex !important; order: 6; margin-left: auto; min-height: 40px; }
  .top.nav-open .theme-btn span { display: inline; }
  .nav, .top .nav { max-height: calc(100dvh - 130px); }
  /* přepínače sekcí: zalomit do mřížky místo skrytého posouvání */
  .seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); overflow: visible; width: 100%; }
  .seg button { white-space: normal; padding: 8px 10px; min-height: 44px; }
  .seg button + button { border-left: 0; }
  .seg button { border-right: 1px solid var(--accent); border-bottom: 1px solid var(--accent); margin: 0 -1px -1px 0; }
  /* čitelnost a dotykové cíle */
  .meta, span.meta, p.meta, div.meta { font-size: 12.5px; }
  .tag { font-size: 12px; }
  .btn { min-height: 44px; }
  .btn.link { min-height: 36px; }
  input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
  label:has(> input[type=checkbox]), label:has(> input[type=radio]) { min-height: 36px; display: flex; align-items: center; gap: 10px; }
  .chip button { min-width: 32px; min-height: 32px; font-size: 16px; }
  .head > div > p:not(.meta) { font-size: 15px; }
  /* RACI: úzký ukotvený sloupec činností, role viditelné vedle */
  table.raci-t th.act { min-width: 0; width: 46vw; max-width: 200px; white-space: normal; }
  table.raci-t th.act .meta { display: none; }
  table.raci-t thead th.rot { height: 120px; width: 40px; }
  table.raci-t thead th.rot span { font-size: 12px; }
  table.raci-t thead th.t { position: sticky; left: 0; z-index: 3; }
  /* provozní přehled: služby jako karty */
  .dash-svc-table { display: none; }
  .dash-svc-list { display: grid; list-style: none; margin: 0; padding: 0; }
  .dash-svc-list li { padding: 12px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
  .dash-svc-list li:last-child { border-bottom: 0; }
  .dash-svc-list .n { font-weight: 500; }
  .dash-svc-list .pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .dash-svc-list .nx { font-size: 14px; }
  /* mapa: legenda pod plátnem, ne přes graf */
  .gm-legend { position: static; border-top: 1px solid var(--line); }
  .gm-canvas { height: 58vh; min-height: 340px; }
}
@media (max-width: 400px) { .brand-sub { display: none; } }
@media (max-width: 760px) { .gm-canvas { display: flex; flex-direction: column; } .gm-canvas .gm-svg { flex: 1 1 auto; min-height: 0; height: auto; } }
@media (max-width: 760px) {
  .cmdb-cls { min-height: 40px; align-items: center; }
  .gm-tree .tog { width: 40px; height: 40px; font-size: 16px; }
  .gm-tree .nm { min-height: 36px; padding: 6px 0; }
}
@media (max-width: 760px) { .seg button:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.dash-sub { font-size: 15px; margin: 14px 0 0; color: var(--ink); }
.gm-svg .e.soft { stroke-dasharray: 1 4; stroke-linecap: round; }
.gm-legend .lg.soft u { border-top: 2px dotted var(--muted); }

/* ikony konfiguračních položek */
.ci-ico { display: inline-flex; flex: none; align-items: center; justify-content: center; color: var(--cat, var(--muted)); vertical-align: -4px; margin-right: 6px; }
.ci-ico svg .ic-s, .ci-ico-g .ic-s { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ci-ico svg .ic-d, .ci-ico-g .ic-d { stroke-dasharray: 2.6 2.2; }
.ci-ico svg .ic-f, .ci-ico-g .ic-f { fill: currentColor; stroke: none; }
.ci-ico-g { color: var(--cat, var(--accent)); }
.ci-name { display: inline-flex; align-items: center; gap: 0; min-width: 0; }
h1.ci-h1 { display: flex; align-items: center; gap: 4px; }
h1.ci-h1 .ci-ico { margin-right: 10px; vertical-align: 0; }
.cmdb-cls .ci-name { gap: 0; }
.rels li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 2px; }
.rels li .ci-ico { align-self: center; }
.gm-tree .row .ci-ico { margin: 0 6px 0 2px; }
.ico-legend { list-style: none; margin: 0; padding: 12px 16px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 16px; }
.ico-legend li { display: flex; align-items: center; font-size: 14px; }

/* --- ITSM, change modely, nastavení --- */
.prio { display: inline-block; min-width: 30px; text-align: center; font-weight: 700; font-size: 12.5px; border-radius: var(--r); padding: 1px 6px; color: #fff; background: var(--off); margin-right: 4px; }
.prio.p1 { background: var(--bad); } .prio.p2 { background: #c75000; } .prio.p3 { background: var(--accent); } .prio.p4 { background: var(--off); }
.sla { font-size: 13px; color: var(--muted); white-space: nowrap; } .sla.bad { color: var(--bad); font-weight: 700; }
tr.row-bad td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.kpi.bad .v { color: var(--bad); } .kpi.bad { border-top-color: var(--bad); }
.prio-calc { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); }
.ci-picker { display: grid; gap: 4px; align-content: start; font-size: 12px; color: var(--muted); }
.ci-picker .lbl-t { font-size: 12px; }
.ci-pick-list { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; }
.ci-pick { display: flex; gap: 8px; align-items: center; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 8px; cursor: pointer; font: inherit; font-size: 14px; color: var(--ink); }
.ci-pick:hover { background: var(--soft); } .ci-pick .meta { margin-left: auto; }
.cat-grid, .model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.cat-item { display: grid; gap: 6px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.cat-item:hover { border-color: var(--accent); box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 18%, transparent); }
.cat-item b { color: var(--accent); font-size: 16px; } .cat-item p { margin: 0; font-size: 14px; color: var(--muted); }
.sec-h { font-size: 1rem; margin: 6px 0 0; }
.model.off { opacity: .6; }
.model-info p { margin: 4px 0; }
.plain-ol { margin: 0; padding-left: 18px; }
ul.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
ul.tasks li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.log li.lk-status b, .log li.lk-assign b { color: var(--accent); }
.lbl.inline { display: inline-flex; align-items: center; gap: 6px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .sw { width: 44px; height: 24px; border-radius: 12px; background: var(--off); position: relative; transition: background .15s; flex: none; }
.switch .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .sw { background: var(--accent); }
.switch input:checked + .sw::after { transform: translateX(20px); }
.switch input:focus-visible + .sw { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch input:disabled + .sw { opacity: .5; }
html[data-mode="prod"] .demo-badge { display: none; }
@media (max-width: 760px) { .ci-pick .meta { display: none; } }

/* ---------------------------------------------------------------- workflow a notifikace */
.pill.info { color: var(--accent); }
.chips-col { display: flex; flex-wrap: wrap; gap: 0 18px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px 12px; }
.grid3 select[multiple] { min-height: 120px; }
.wf-chip { padding: 2px 10px; }
.wf-chip.off { opacity: .55; text-decoration: line-through; }
.wf-form { display: grid; gap: 8px; margin-top: 8px; }
.wf-matrix { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.wf-matrix th, .wf-matrix td { border: 1px solid var(--line); padding: 4px; text-align: center; vertical-align: middle; }
.wf-matrix thead th { position: sticky; top: 0; background: var(--panel); white-space: nowrap; }
.wf-matrix th[scope="row"] { text-align: left; white-space: nowrap; background: var(--panel); position: sticky; left: 0; z-index: 1; }
.wf-matrix .corner { font-weight: 500; color: var(--muted); font-size: 12px; text-align: left; }
.wf-matrix td.self { background: repeating-linear-gradient(45deg, var(--soft), var(--soft) 4px, transparent 4px, transparent 8px); }
.wf-matrix td.sys { background: var(--soft); color: var(--muted); }
.wf-matrix .cell { font: inherit; font-size: 12.5px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: var(--r); padding: 4px 8px; cursor: pointer; min-height: 32px; width: 100%; min-width: 88px; }
.wf-matrix .cell.primary { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.wf-matrix .cell.danger { border-color: var(--bad); color: var(--bad); }
.wf-matrix .cell.add { border-style: dashed; color: var(--muted); background: transparent; min-width: 40px; }
.wf-matrix .cell:hover, .wf-matrix .cell:focus-visible { background: var(--soft); }
.wf-matrix td.off .cell { opacity: .5; text-decoration: line-through; }
.rte { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); background: var(--soft); border-radius: var(--r) var(--r) 0 0; }
.rte-b { font: inherit; font-size: 13px; font-weight: 600; min-width: 34px; min-height: 32px; border: 1px solid transparent; background: transparent; color: var(--ink); border-radius: 4px; cursor: pointer; }
.rte-b:hover, .rte-b:focus-visible { border-color: var(--line); background: var(--panel); }
.rte-sep { width: 1px; background: var(--line); margin: 4px 4px; }
.rte-area { min-height: 220px; padding: 10px 12px; outline: none; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.rte-area:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.rte-area h2 { font-size: 18px; margin: 8px 0 4px; } .rte-area h3 { font-size: 15px; margin: 8px 0 4px; }
.rte-area p { margin: 0 0 8px; } .rte-area blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--muted); }
.rte-src { width: 100%; border: 0; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; padding: 10px; background: var(--panel); color: var(--ink); }
.tpl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
.tpl-params { border: 1px solid var(--line); border-radius: var(--r); padding: 10px; background: var(--soft); max-height: 420px; overflow: auto; }
.param-list { display: grid; gap: 4px; }
.param { display: grid; text-align: left; gap: 0; font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 4px; padding: 4px 8px; cursor: pointer; }
.param code { font-size: 12px; color: var(--accent); } .param span { font-size: 12px; color: var(--muted); }
.param:hover, .param:focus-visible { border-color: var(--accent); }
.prev-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; }
.prev-box { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.prev-subj { padding: 8px 12px; font-weight: 600; border-bottom: 1px solid #d9dee3; color: #1f2933; background: #f5f7f9; font-size: 14px; }
.prev-mail { width: 100%; height: 300px; border: 0; background: #fff; display: block; }
.prev-slack { white-space: pre-wrap; font-size: 13px; border: 1px solid var(--line); border-radius: var(--r); padding: 10px; background: var(--soft); min-height: 120px; margin: 0; overflow-wrap: anywhere; }
.test-send { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.code-block { white-space: pre-wrap; font-size: 13px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; margin: 0; overflow-x: auto; }
ol.steps { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 4px; }
@media (max-width: 860px) { .tpl-grid, .prev-grid { grid-template-columns: minmax(0, 1fr); } .tpl-params { max-height: 260px; } }

/* ---------------------------------------------------------------- SLA */
.kpi.ok .v { color: var(--ok); } .kpi.warn .v { color: var(--warn); } .kpi.bad .v { color: var(--bad); }
.sla-pct.ok { color: var(--ok); font-weight: 600; } .sla-pct.warn { color: var(--warn); font-weight: 600; } .sla-pct.bad { color: var(--bad); font-weight: 600; }
.sla-chart-wrap { overflow-x: auto; }
.sla-chart { width: 100%; max-width: 760px; min-width: 420px; height: auto; display: block; font-size: 11px; }
.sla-chart text { fill: var(--muted); }
.sla-chart .grid { stroke: var(--line); stroke-width: 1; }
.sla-chart .target { stroke: var(--bad); stroke-dasharray: 5 4; stroke-width: 1.5; }
.sla-chart .target-l { fill: var(--bad); }
.sla-chart .b-resp { fill: color-mix(in srgb, var(--accent) 45%, transparent); }
.sla-chart .b-res { fill: var(--accent); }
.lg::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.lg.resp::before { background: color-mix(in srgb, var(--accent) 45%, transparent); } .lg.res::before { background: var(--accent); }
.sla-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 14px; }
.sla-card.off { opacity: .6; }
.sla-card .card-b { display: grid; gap: 8px; }
.sla-mini { border-collapse: collapse; font-size: 13.5px; width: 100%; }
.sla-mini th, .sla-mini td { text-align: left; padding: 3px 6px 3px 0; border-bottom: 1px solid var(--line); }
.sla-mini thead th { font-weight: 500; color: var(--muted); font-size: 12px; }
.sla-targets input[type="number"] { width: 110px; } .sla-targets td { white-space: nowrap; }
.cal-edit input[type="time"] { width: auto; min-width: 110px; } .cal-edit td, .cal-edit th { white-space: nowrap; }
.cal-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.cal-day { border: 1px solid var(--line); border-radius: var(--r); padding: 6px 8px; display: grid; gap: 2px; font-size: 12.5px; background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
.cal-day.off { background: var(--soft); color: var(--muted); }
.cal-day.hol { background: color-mix(in srgb, var(--warn) 12%, var(--panel)); }
.hol-list { columns: 2 260px; font-size: 13px; padding-left: 18px; }
