/* oc-panel · Aneta — světlý vzhled se Google Material Design
   Styl „framed sheet“ s Material Design barvami a typografií:
   boční panel a horní lišta tvoří jeden tónovaný rám,
   obsah leží na bílém listu s 1px okrajem, 16px rohy a bez stínu.
   Barva jen na datech, na výběru a na jedné akci.
   Používá Google Roboto jako systémové písmo.

   Obsah:  1 písma · 2 tokeny · 3 základ · 4 rám · 5 ovládací prvky · 6 karty · 7 části obrazovky
           8 nastavení · 9 tablet (≤1100) · 10 telefon (≤720) · 11 omezený pohyb

   Mřížka (1440 px): boční panel 228 + list (1440 − 228 − 8 vpravo) = 1204; vnitřní okraj 24 → obsah 1156.
   Řádek 2/3 + 1/3: (1156 − 24) / 3 = 377,3 → sloupce 754,7 a 377,3, obě karty končí na pravé hraně listu. */

/* 1 ---------- písma (IBM Plex + Google Roboto) */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url(/static/vendor/fonts/plex-sans-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url(/static/vendor/fonts/plex-sans-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(https://fonts.gstatic.com/s/roboto/v33/S6UWxBJ7K3iLTeHuS_fVSbmyfont2.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/vendor/fonts/plex-mono-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/vendor/fonts/plex-mono-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* 2 ---------- tokeny: všechno níže používá jen tyto proměnné */
:root {
  color-scheme: light;
  /* plochy */
  --frame: #f2f6f5;            /* rám: boční panel + horní lišta */
  --surface: #ffffff;          /* list a karty */
  --raised: #f4f7f7;           /* vnořená plocha, hover řádku */
  --active: #e6eeec;           /* aktivní položka navigace */
  --border: #e3e8e7;           /* okraj listu a karet */
  --rule: #eef1f1;             /* čáry v tabulkách a seznamech */
  --control: #c9cfce;          /* okraj vstupů a sekundárních tlačítek */
  /* text */
  --text: #212121;             /* Google Darkest: 212121 pro Roboto M3 přístupnost */
  --muted: #666666;            /* 6,4:1 na bílé */
  /* barvy data a stavů (Google Material) */
  --accent: #1976d2;           /* Anetina barva nahrazená Google Blue 500 */
  --chart-1: #1976d2;          /* Google Blue hlavní řada grafu */
  --chart-2: #1565c0;          /* druhá řada (RAM) */
  --chart-3: #0d47a1;
  --chart-muted: #78909c;
  --grid: #e8eaf6; --axis-ink: #666666; --ink: var(--text); --chart-span: .06;
  --positive: #008399; --negative: #d32f2f; --warning: #f57c00;
  --pill-positive-bg: #c8e6c9; --pill-positive-ink: #1b5e20;
  --pill-negative-bg: #ffcdd2; --pill-negative-ink: #b71c1c;
  --pill-warning-bg: #fff3e0; --pill-warning-ink: #e65100;
  --pill-neutral-bg: #e3e2fd; --pill-neutral-ink: #3700b3;
  --primary: #212121; --primary-ink: #ffffff;
  /* terminál */
  --term-bg: #fafafa; --term-ink: #212121; --term-select: #c8e6c9;
  /* tvar a rozměry */
  --radius-sheet: 16px; --radius-card: 8px; --radius-control: 6px;
  --sheet-inset: 8px;
  --sidebar: 228px; --topbar: 48px;
  --gap: 24px; --pad: 24px; --card-pad: 20px;
  --control-height: 32px; --row-height: 48px;
  /* písmo */
  --font: "Roboto", "IBM Plex Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --fs-title: 22px; --fs-section: 16px; --fs-kpi: 28px; --fs-body: 14px; --fs-small: 12px;
  /* pohyb */
  --ease: cubic-bezier(.22, 1, .36, 1); --t-fast: 120ms; --t-ui: 160ms;
}

/* 3 ---------- základ */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--frame); }
body { margin: 0; min-height: 100vh; background: var(--frame); color: var(--text); font: 400 var(--fs-body)/1.5 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
h1, h2, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code, kbd { font-family: var(--mono); font-size: 12px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--term-select); }
.sprite { position: absolute; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; z-index: 30; }
.skip:focus { left: 16px; top: 8px; background: var(--primary); color: var(--primary-ink); padding: 6px 12px; border-radius: var(--radius-control); }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 12px; height: 12px; }

/* 4 ---------- rám: boční panel + horní lišta + list */
.frame { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); grid-template-rows: var(--topbar) 1fr; min-height: 100vh; }
.sidebar { grid-row: 1 / -1; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 12px 12px 16px; background: var(--frame); z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px; margin-bottom: 16px; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--chart-1); flex: none; }
.brand-mark svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-weight: 600; }
.brand-text span { color: var(--muted); font-size: var(--fs-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--radius-control); color: var(--muted); text-decoration: none; font-weight: 500; transition: background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease); }
.nav a:hover { background: var(--active); color: var(--text); }
.nav a[aria-current] { background: var(--active); color: var(--text); }
.nav-count { margin-left: auto; color: var(--muted); font-size: var(--fs-small); font-weight: 400; }
.sidebar-foot { margin-top: auto; padding: 0 10px; color: var(--muted); font-size: var(--fs-small); }
.icon-btn.menu-close, .icon-btn.menu-open, .icon-btn.phone-only { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(19, 20, 22, .32); z-index: 15; }

.topbar { display: flex; align-items: center; gap: 16px; padding: 0 calc(var(--sheet-inset) + 16px) 0 8px; }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); white-space: nowrap; flex: 1 1 0; min-width: 0; }
.crumb-here { color: var(--text); font-weight: 500; }
.search { display: flex; align-items: center; gap: 8px; width: min(460px, 40vw); height: var(--control-height); padding: 0 8px 0 10px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.search kbd { padding: 0 6px; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); line-height: 18px; }
.topbar-end { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 1 1 0; }
.stamp { color: var(--muted); font-size: var(--fs-small); white-space: nowrap; }

.sheet { grid-column: 2; min-width: 0; margin: 0 var(--sheet-inset) var(--sheet-inset) 0; padding: var(--pad); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sheet); display: flex; flex-direction: column; gap: var(--gap); outline: 0; }
.block { display: flex; flex-direction: column; gap: var(--gap); scroll-margin-top: 16px; }
.grid { display: grid; gap: var(--gap); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }

/* 5 ---------- ovládací prvky */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-height); padding: 0 14px; border-radius: var(--radius-control); border: 1px solid transparent; background: none; cursor: pointer; white-space: nowrap; font-weight: 500; transition: background-color var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease), transform var(--t-fast) var(--ease); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover:not(:disabled) { background: #2b2d30; }
.btn-secondary { border-color: var(--control); background: var(--surface); }
.btn-secondary:hover:not(:disabled) { background: var(--raised); border-color: #aeb5b4; }
.btn-danger { border-color: var(--control); background: var(--surface); color: var(--negative); }
.btn-danger:hover:not(:disabled) { border-color: var(--negative); }
.btn-danger.is-armed, .btn.is-armed { border-color: var(--negative); background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: var(--raised); color: var(--text); }
.btn-sm { height: 28px; padding: 0 10px; gap: 6px; font-size: 13px; }
.icon-btn { display: inline-grid; place-items: center; width: var(--control-height); height: var(--control-height); border: 0; border-radius: var(--radius-control); background: none; color: var(--muted); cursor: pointer; transition: background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease); }
.icon-btn:hover { background: var(--active); color: var(--text); }
.icon-btn:active .i { transform: rotate(-60deg); transition: transform var(--t-ui) var(--ease); }

.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: var(--fs-small); font-weight: 500; white-space: nowrap; }
.pill-positive { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.pill-negative { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.pill-warning { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.pill-neutral { background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); }
.setting-row { margin: 12px 0; display: flex; flex-wrap: wrap; align-items: center; }
.setting-label { flex: 0 0 140px; font-weight: 500; color: var(--muted); font-size: var(--fs-small); }
.setting-value { flex: 1; min-width: 200px; }
.skill-item { margin: 4px 0; display: flex; flex-direction: column; }
.skill-name { font-weight: 500; color: var(--text); font-size: var(--fs-small); }
.skill-desc { color: var(--muted); font-size: var(--fs-xsmall); margin: 2px 0 4px 0; }
.skill-category { color: var(--muted); font-size: var(--fs-xxsmall); }
.mcp-item { margin: 4px 0; display: flex; align-items: baseline; }
.mcp-item strong { color: var(--text); font-size: var(--fs-small); }
.mcp-item a { color: var(--accent); font-size: var(--fs-xsmall); text-decoration: underline; }

.select { height: var(--control-height); width: 100%; max-width: 360px; min-width: 0; padding: 0 32px 0 12px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%235b5f60' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center / 12px; appearance: none; cursor: pointer; text-overflow: ellipsis; }
.select:hover { border-color: #aeb5b4; }
textarea { width: 100%; min-height: 60px; max-height: 200px; resize: vertical; padding: 9px 12px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); line-height: 1.45; }
textarea::placeholder { color: var(--muted); }
textarea:hover { border-color: #aeb5b4; }
textarea:focus-visible { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* posuvník: jedna barva (Anetina) na vyplněné části, palec bílý s okrajem */
input[type="range"] { --fill: 50%; width: 100%; height: 24px; margin: 0; background: none; appearance: none; cursor: pointer; accent-color: var(--chart-1); }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--chart-1) var(--fill), var(--active) var(--fill)); /* taste-skill-ignore: vyplnění posuvníku, ne dekorace */ }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--active); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--chart-1); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--surface); border: 2px solid var(--chart-1); transition: transform var(--t-fast) var(--ease); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--chart-1); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }

/* přepínač */
.switch { position: relative; display: inline-flex; width: 40px; height: 24px; cursor: pointer; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch-track { width: 100%; height: 100%; border-radius: 999px; background: var(--control); transition: background-color var(--t-ui) var(--ease); }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); transition: transform var(--t-ui) var(--ease); }
.switch input:checked + .switch-track { background: var(--chart-1); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 6 ---------- karty */
.card { min-width: 0; padding: var(--card-pad); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--control-height); margin-bottom: 12px; }
.card-title { font-size: var(--fs-section); font-weight: 600; line-height: 1.3; }
.card-note { color: var(--muted); font-size: var(--fs-small); }
.head-actions { display: flex; align-items: center; gap: 8px; }
.empty, .table .empty td { color: var(--muted); }

/* 7 ---------- části obrazovky */
/* titulek */
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.title-line { display: flex; align-items: center; gap: 12px; }
h1 { font-size: var(--fs-title); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.finding { margin-top: 4px; }
.finding strong { font-weight: 600; }
.title-actions { display: flex; gap: 8px; flex: none; }

/* právě teď */
.now { display: flex; flex-direction: column; }
.field-inline { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 360px; }
.field-inline label { color: var(--muted); font-size: var(--fs-small); }
.now-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.now-session { font-size: 16px; font-weight: 600; line-height: 1.35; }
.now-meta { margin-top: 4px; color: var(--muted); }
.now-meta code { color: var(--text); }
.cells { display: grid; grid-template-columns: repeat(4, minmax(0, max-content)); }
.cells > div { padding: 0 24px; border-left: 1px solid var(--border); }
.cells > div:first-child { padding-left: 0; border-left: 0; }
.cells dt { color: var(--muted); font-size: var(--fs-small); margin-bottom: 2px; white-space: nowrap; }
.cells dd { font-weight: 500; white-space: nowrap; }
.composer { margin-top: 20px; }
.composer > label { display: block; margin-bottom: 6px; color: var(--muted); font-size: var(--fs-small); }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.composer-row .btn { height: 36px; }
.hint { margin-top: 4px; color: var(--muted); font-size: var(--fs-small); }
.now-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; }
.cmd-list { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.cmd { height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--raised); font-family: var(--mono); font-size: 12px; cursor: pointer; transition: border-color var(--t-ui) var(--ease), background-color var(--t-ui) var(--ease), transform var(--t-fast) var(--ease); }
.cmd:hover:not(:disabled) { border-color: var(--control); background: var(--surface); }
.cmd:active:not(:disabled) { transform: scale(.97); }
.cmd:disabled { opacity: .45; cursor: not-allowed; }

/* tým */
.team-list li + li { border-top: 1px solid var(--rule); }
.member { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 4px 6px; margin: 0 -6px; width: calc(100% + 12px); border: 0; border-radius: var(--radius-control); background: none; text-align: left; cursor: pointer; transition: background-color var(--t-ui) var(--ease); }
.member:hover { background: var(--raised); }
.member[aria-pressed="true"] { background: var(--active); }
.member-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--active); }
.member-dot.is-busy { background: var(--chart-1); }
.member-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-name { font-weight: 500; }
.is-lead .member-name { font-weight: 600; }
.member-role { margin-left: 8px; color: var(--muted); }
.member-meta { color: var(--muted); font-size: var(--fs-small); white-space: nowrap; }
.member-meta .is-busy { color: var(--accent); font-weight: 500; }

/* ukazatele */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 16px 0; }
.kpi { padding: 0 var(--card-pad); border-left: 1px solid var(--border); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi dt { color: var(--muted); }
.kpi dd { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.kpi-value { font-size: var(--fs-kpi); font-weight: 400; line-height: 1.2; white-space: nowrap; }
.kpi-unit { color: var(--muted); }
.kpi-sub { margin-top: 2px; color: var(--muted); font-size: var(--fs-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-error { color: var(--negative); }

/* graf */
.legend-slot .chart-legend { margin: 0; }
.chart-finding { margin: -4px 0 8px; color: var(--muted); }
.chart { position: relative; min-height: 220px; }
.chart-canvas { position: relative; }
.chart-empty { display: grid; place-items: center; height: 220px; border: 1px dashed var(--control); border-radius: var(--radius-card); color: var(--muted); padding: 0 24px; text-align: center; }

/* kapacita a hosté */
.capacity { display: flex; flex-direction: column; gap: 14px; }
.cap-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cap-label { font-weight: 500; }
.cap-label code { margin-left: 6px; color: var(--muted); font-weight: 400; }
.cap-value { font-weight: 500; }
.meter { position: relative; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--active); overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--chart-1); }
.meter i.warn { background: #b7791f; }
.meter i.bad { background: var(--negative); }
.cap-sub { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; color: var(--muted); font-size: var(--fs-small); }
.cap.is-error .cap-value { color: var(--negative); }
.cap.is-error .cap-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.guests { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--rule); }
.guest { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 32px; }
.guest + .guest { border-top: 1px solid var(--rule); }
.guest-kind { color: var(--muted); font-size: var(--fs-small); }
.guest-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* terminál */
.terminal-card { display: flex; flex-direction: column; }
.term-where { margin-left: 6px; color: var(--muted); font-weight: 400; }
.term-state { color: var(--muted); font-size: var(--fs-small); margin-right: 4px; white-space: nowrap; }
.term-state.ok { color: var(--accent); font-weight: 500; }
.term-state.bad { color: var(--negative); }
.terminal { flex: 1; min-height: 420px; padding: 10px 6px 6px 12px; background: var(--term-bg); border: 1px solid var(--border); border-radius: var(--radius-control); overflow: hidden; }
.terminal .xterm { height: 100%; }
.terminal .xterm-viewport { background: transparent !important; }

/* akce */
.actions li + li { border-top: 1px solid var(--rule); }
.action { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 6px; margin: 0 -6px; width: calc(100% + 12px); border: 0; border-radius: var(--radius-control); background: none; text-align: left; cursor: pointer; transition: background-color var(--t-ui) var(--ease); }
.action:hover:not(:disabled) { background: var(--raised); }
.action:disabled { cursor: not-allowed; opacity: .5; }
.action-icon { color: var(--muted); }
.action-text { min-width: 0; }
.action-label { display: block; font-weight: 500; }
.action-hint { display: block; color: var(--muted); font-size: var(--fs-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-go { color: var(--muted); font-size: var(--fs-small); white-space: nowrap; }
.action:hover .action-go { color: var(--text); }
.action[aria-busy="true"] .action-go { color: var(--accent); }
.action.is-armed { background: var(--pill-negative-bg); }
.action.is-armed .action-go { color: var(--pill-negative-ink); font-weight: 500; }

/* výstup */
.log { margin: 0; min-height: 72px; max-height: 280px; overflow: auto; padding: 10px 12px; background: var(--raised); border-radius: var(--radius-control); font-family: var(--mono); font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.log.is-empty { font-family: var(--font); font-size: var(--fs-body); color: var(--muted); }
.log.is-error { color: var(--negative); }

/* tabulka session */
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 0 12px 8px 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: var(--fs-small); font-weight: 400; text-align: left; }
.table th.num { text-align: right; }
.table td { height: var(--row-height); padding: 0 12px 0 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table td.title { white-space: normal; font-weight: 500; }
.table td.model, .table td.when { color: var(--muted); }
.table tbody tr { cursor: pointer; transition: background-color var(--t-ui) var(--ease); }
.table tbody tr:hover { background: var(--raised); }
.table tbody tr[aria-selected="true"] td { background: var(--active); }
.table tbody tr[aria-selected="true"] td:first-child { box-shadow: inset 2px 0 0 var(--chart-1); padding-left: 10px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .empty { cursor: default; }
.table .empty td { height: 56px; }

/* 8 ---------- nastavení */
.settings { display: flex; flex-direction: column; }
.settings > .card-note { margin-bottom: 4px; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 420px); gap: 24px; align-items: center; padding: 14px 0; border-top: 1px solid var(--rule); }
.set-label { font-weight: 500; }
.set-help { color: var(--muted); font-size: var(--fs-small); }
.set-control { display: grid; grid-template-columns: minmax(0, 1fr) 64px; align-items: center; column-gap: 12px; }
.set-value { text-align: right; font-weight: 500; white-space: nowrap; }
.set-scale { grid-column: 1; display: flex; justify-content: space-between; color: var(--muted); font-size: var(--fs-small); }
.set-toggle .set-control { grid-template-columns: auto 1fr; }
.set-toggle .set-value { text-align: left; color: var(--muted); font-weight: 400; }

/* 9 ---------- tablet */
@media (max-width: 1100px) {
  :root { --sidebar: 0px; --fs-small: 13px; }
  .frame { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; height: 100vh; transform: translateX(-100%); transition: transform var(--t-ui) var(--ease); }
  .sidebar.is-open { transform: none; box-shadow: 0 12px 32px rgba(19, 20, 22, .16); } /* vysunuté menu opravdu plove */
  .icon-btn.menu-open, .icon-btn.menu-close { display: inline-grid; }
  .menu-close { margin-left: auto; }
  .topbar { padding: 0 16px 0 8px; }
  .sheet { grid-column: 1; margin: 0 var(--sheet-inset) var(--sheet-inset); }
  .grid-2-1 { grid-template-columns: minmax(0, 1fr); }
  .work .stack { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .search { width: min(360px, 44vw); }
  .crumbs > :not(.crumb-here), .crumbs .i { display: none; }
  .crumb-here { font-weight: 600; }
  .table .col-model, .table td.model { display: none; }
}

/* 10 ---------- telefon: rám zmizí, list je obrazovka */
@media (max-width: 720px) {
  :root { --pad: 16px; --gap: 16px; --card-pad: 16px; --fs-title: 20px; --fs-kpi: 24px; --control-height: 40px; --sheet-inset: 0px; }
  .topbar { position: sticky; top: 0; z-index: 10; height: var(--topbar); padding: 0 8px; gap: 4px; background: var(--frame); }
  .search, .stamp { display: none; }
  .crumb-here { font-weight: 600; }
  .icon-btn.phone-only { display: inline-grid; }
  .icon-btn { width: 44px; height: 44px; }
  .sheet { margin: 0; border: 0; border-radius: 0; }
  .title-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .title-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .card-head { flex-wrap: wrap; }
  .field-inline { flex: 1 1 100%; }
  .select { max-width: none; }
  .now-body { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cells { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
  .cells > div, .cells > div:first-child { padding: 0 0 0 12px; border-left: 1px solid var(--border); }
  .cells > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .cells dd { white-space: normal; }
  .composer-row { flex-direction: column; align-items: stretch; }
  .composer-row .btn { height: 44px; }
  .hint { display: none; }
  .now-foot { flex-direction: column; align-items: stretch; }
  .cmd { height: 36px; padding: 0 12px; }
  .btn { height: 44px; }
  .btn-sm { height: 36px; }
  .member, .action { min-height: 48px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .kpi { padding: 0 12px; }
  .kpi:nth-child(odd) { border-left: 0; }
  .kpi-sub { white-space: normal; }
  .work .stack { display: flex; }
  .terminal-card .head-actions { flex-wrap: wrap; width: 100%; }
  .term-state { flex: 1 0 100%; }
  .terminal-card .head-actions .btn { flex: 1; }
  .terminal { min-height: 320px; }
  .set-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  input[type="range"] { height: 36px; }
  /* tabulka → dvouřádkové řádky: název a stav, pod tím agent a čas */
  .table thead { display: none; }
  .table, .table tbody { display: block; }
  .table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { display: block; height: auto; padding: 0; border: 0; }
  .table td.title { grid-column: 1; }
  .table td.state { grid-column: 2; grid-row: 1; text-align: right; }
  .table td.agent, .table td.when { grid-row: 2; color: var(--muted); font-size: var(--fs-small); }
  .table td.agent { grid-column: 1; }
  .table td.when { grid-column: 2; }
  .table tbody tr[aria-selected="true"] td { background: none; }
  .table tbody tr[aria-selected="true"] td:first-child { box-shadow: none; padding-left: 0; color: var(--accent); }
  .table .empty { display: block; }
}


/* historie chatu */
.chat-message { margin: 8px 0; padding: 8px 12px; border-radius: var(--radius-card); background: var(--raised); }
.chat-meta { display: flex; align-items: center; gap: 8px; font-size: var(--fs-small); color: var(--muted); }
.chat-type { font-weight: 500; color: var(--accent); }
.chat-time { color: var(--muted); }
.chat-content { margin-top: 4px; font-size: var(--fs-body); line-height: 1.4; white-space: pre-wrap; word-break: break-word; }

/* prázdný stav */
.chat-empty { padding: 24px; text-align: center; color: var(--muted); font-size: var(--fs-small); }
/* 11 ---------- omezený pohyb */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
