/* SABAIA CRM 2.0 – tokeny, generováno z docs/design/design-system/tokens.json (scripts/build_tokens.py). Needitovat ručně. */
:root {
  --bg: #f6f3f3;
  --surface: #ffffff;
  --surface-2: #f3efef;
  --raised: #e9e3e3;
  --line: #e5dede;
  --ink: #141111;
  --ink-2: #3b3333;
  --muted: #6b5f5f;
  --accent: #d4001a;
  --accent-strong: #a50014;
  --accent-ink: #ffffff;
  --accent-tint: #fde6e8;
  --ok: #15803d;
  --ok-tint: #dcf5e6;
  --warn: #9a5a06;
  --warn-tint: #fdf0d5;
  --danger: #7a0f12;
  --danger-tint: #f4dcdc;
  --pending: #5b3fd0;
  --pending-tint: #ece8fd;
  --unknown: #7a6f6f;
  --focus: #141111;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.14), 0 6px 18px rgba(0,0,0,0.10);
  --shadow-hard: 3px 3px 0 #141111;
  --shadow-sheet: 0 -12px 40px rgba(0,0,0,0.25);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-pill: 999px;
  --touch: 44px;
  --nav-height: 64px;
  --bar: 6px;
  --content-max: 1200px;
  --font-sans: -apple-system, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

/* Komponenty design systému SABAIA CRM (kopie bundle.css bez externích fontů – CSP). */
/* SABAIA CRM – komponenty (třídy s-*), postavené jen na tokenech z tokens.css */

.s-root, .s-root * { box-sizing: border-box; }
.s-root { font-family: var(--font-sans); color: var(--ink); background: var(--bg); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
.s-num { font-variant-numeric: tabular-nums; }
.s-code { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--ink-2); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Button */
.s-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--touch); min-width: var(--touch); padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid transparent; font: 600 15px/1 var(--font-sans); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
.s-btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-hard); }
.s-btn--primary:active { transform: translate(3px,3px); box-shadow: none; }
.s-btn--primary:hover { background: var(--accent-strong); }
.s-btn--secondary { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.s-btn--secondary:hover { background: var(--raised); }
.s-btn--ghost { background: transparent; color: var(--accent); }
.s-btn--danger { background: var(--danger-tint); color: var(--danger); border-color: var(--danger); }
.s-btn--block { width: 100%; }
.s-btn--sm { min-height: 36px; padding: 0 var(--space-3); font-size: 13px; border-radius: var(--radius-sm); }
.s-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* StatusPill */
.s-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-pill); font: 600 12px/1 var(--font-sans); white-space: nowrap; border: 1px solid transparent; }
.s-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-pill--ok { background: var(--ok-tint); color: var(--ok); }
.s-pill--pending { background: var(--pending-tint); color: var(--pending); }
.s-pill--warn { background: var(--warn-tint); color: var(--warn); }
.s-pill--danger { background: var(--danger-tint); color: var(--danger); }
.s-pill--unknown { background: transparent; color: var(--muted); border: 1px dashed var(--unknown); }
.s-pill--draft { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }

/* KpiTile */
.s-kpi { display: grid; gap: var(--space-2); padding: var(--space-3) var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); min-width: 0; box-shadow: var(--shadow-card); border-color: transparent; }
.s-kpi__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); }
.s-kpi__name { font: 600 12px/16px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.s-kpi__pct { font: 700 15px/1 var(--font-sans); color: var(--ink); }
.s-kpi__value { font: 650 20px/24px var(--font-sans); letter-spacing: -.01em; }
.s-kpi__meta { font: 400 13px/18px var(--font-sans); color: var(--muted); }
.s-bar { height: var(--bar); border-radius: var(--radius-pill); background: var(--raised); overflow: hidden; position: relative; }
.s-bar__fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--accent); }
.s-bar__gate { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); }
.s-kpi--warn .s-kpi__pct { color: var(--warn); } .s-kpi--warn .s-bar__fill { background: var(--warn); }
.s-kpi--ok .s-kpi__pct { color: var(--ok); }
.s-kpi--unknown { border-style: dashed; border-color: var(--unknown); }
.s-kpi--unknown .s-kpi__value, .s-kpi--unknown .s-kpi__pct { color: var(--muted); }

/* SaleCard */
.s-sale { display: grid; gap: 4px; padding: var(--space-3) var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); color: inherit; text-decoration: none; box-shadow: var(--shadow-card); border-color: transparent; }
.s-sale__row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); min-width: 0; }
.s-sale__service { font: 650 15px/20px var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-sale__amount { font: 650 17px/20px var(--font-sans); white-space: nowrap; }
.s-sale__amount--pending { color: var(--pending); }
.s-sale__amount--storno { color: var(--muted); text-decoration: line-through; }
.s-sale__meta { font: 400 13px/18px var(--font-sans); color: var(--muted); display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.s-copy { min-width: 32px; min-height: 32px; border: 0; background: transparent; color: var(--muted); border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; }

/* ContactCard */
.s-contact { display: grid; gap: var(--space-2); padding: var(--space-3) var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); border-color: transparent; }
.s-contact--overdue { border-color: var(--danger); border-left: 4px solid var(--danger); }
.s-contact__top { display: flex; justify-content: space-between; gap: var(--space-2); align-items: baseline; }
.s-contact__name { font: 650 16px/22px var(--font-sans); }
.s-contact__when { font: 600 13px/18px var(--font-sans); color: var(--ink-2); white-space: nowrap; }
.s-contact--overdue .s-contact__when { color: var(--danger); }
.s-contact__note { font: 400 13px/18px var(--font-sans); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.s-contact__actions { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-2); }

/* BottomNav */
.s-nav { box-shadow: 0 -1px 0 var(--line), 0 -6px 18px rgba(0,0,0,0.08); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: var(--nav-height); padding: 0 var(--space-2); background: var(--surface); border-top: 1px solid var(--line); }
.s-nav__item { display: grid; justify-items: center; gap: 2px; min-height: var(--touch); padding-top: 6px; color: var(--muted); font: 600 11px/14px var(--font-sans); text-decoration: none; position: relative; }
.s-nav__item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.s-nav__item[aria-current="page"] { color: var(--accent); }
.s-nav__badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-ink); font: 700 11px/18px var(--font-sans); text-align: center; }
.s-nav__plus { justify-self: center; width: 52px; height: 52px; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-ink); border: 2px solid var(--ink); box-shadow: var(--shadow-hard); display: grid; place-items: center; cursor: pointer; }
.s-nav__plus svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 2.4; fill: none; }

/* ActionSheet */
.s-sheet { background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-sheet); padding: var(--space-2) var(--space-4) var(--space-6); display: grid; gap: var(--space-2); }
.s-sheet__grip { justify-self: center; width: 36px; height: 4px; border-radius: var(--radius-pill); background: var(--raised); margin-bottom: var(--space-2); }
.s-sheet__title { font: 650 16px/22px var(--font-sans); margin: 0 0 var(--space-1); }
.s-sheet__option { display: grid; grid-template-columns: 40px 1fr; gap: var(--space-3); align-items: center; min-height: 56px; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); text-align: left; font: 600 15px/20px var(--font-sans); cursor: pointer; }
.s-sheet__option small { display: block; font: 400 13px/18px var(--font-sans); color: var(--muted); }
.s-sheet__icon { width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.s-sheet__icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Field */
.s-field { display: grid; gap: 6px; }
.s-field__label { font: 600 13px/18px var(--font-sans); color: var(--ink-2); }
.s-field__input { min-height: var(--touch); padding: 0 var(--space-3); border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 400 16px/22px var(--font-sans); width: 100%; }
.s-field__input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-tint); }
.s-field__hint { font: 400 13px/18px var(--font-sans); color: var(--muted); }
.s-field--error .s-field__input { border-color: var(--danger); }
.s-field--error .s-field__hint { color: var(--danger); }
.s-chips { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.s-chip { min-height: 36px; padding: 0 var(--space-3); border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 600 13px/1 var(--font-sans); cursor: pointer; }
.s-chip[aria-pressed="true"] { background: var(--accent-tint); border-color: var(--accent); color: var(--accent); }

/* Counter */
.s-counter { display: grid; grid-template-columns: var(--touch) 1fr var(--touch); align-items: center; gap: var(--space-2); padding: var(--space-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-card); border-color: transparent; }
.s-counter__btn { width: var(--touch); height: var(--touch); border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 600 22px/1 var(--font-sans); cursor: pointer; }
.s-counter__mid { text-align: center; }
.s-counter__value { font: 700 22px/26px var(--font-sans); }
.s-counter__label { font: 400 13px/18px var(--font-sans); color: var(--muted); }

/* Notice */
.s-notice { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); font: 400 14px/20px var(--font-sans); }
.s-notice strong { display: block; font-weight: 650; }
.s-notice__mark { width: 8px; border-radius: var(--radius-pill); }
.s-notice--info .s-notice__mark { background: var(--accent); }
.s-notice--warn { background: var(--warn-tint); border-color: transparent; } .s-notice--warn .s-notice__mark { background: var(--warn); }
.s-notice--danger { background: var(--danger-tint); border-color: transparent; } .s-notice--danger .s-notice__mark { background: var(--danger); }
.s-notice a { color: var(--accent); font-weight: 600; }

@media (prefers-reduced-motion: reduce) { .s-root *, .s-btn { transition: none !important; animation: none !important; } }

/* SABAIA CRM 2.0 – rozložení aplikace (mobil: hlavička + obsah + spodní lišta; desktop ≥ 960 px: levá lišta). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.crm2 { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 15px/22px var(--font-sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
.crm2 a { color: var(--accent); }
.crm2 h1, .crm2 h2, .crm2 h3, .crm2 p { margin: 0; }
.crm2 img { max-width: 100%; }
.crm2 button, .crm2 input, .crm2 select, .crm2 textarea { font: inherit; color: inherit; }
.crm2 input, .crm2 select, .crm2 textarea { font-size: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* shell */
.c2-shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.c2-side { display: none; }
.c2-main { min-width: 0; display: flex; flex-direction: column; }
.c2-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.c2-top__title { display: grid; gap: 2px; min-width: 0; }
.c2-top__title strong { font: 700 20px/24px var(--font-sans); }
.c2-top__title span { font: 400 13px/16px var(--font-sans); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c2-top__actions { display: flex; gap: 6px; flex: none; }
.c2-icon { position: relative; display: inline-grid; place-items: center; width: var(--touch); height: var(--touch); border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; cursor: pointer; }
.c2-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.c2-icon .c2-dot { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: 700 11px/18px var(--font-sans); text-align: center; }
.c2-content { flex: 1; width: 100%; max-width: var(--content-max); margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 32px) max(16px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 16px; }
.c2-content > * { min-width: 0; max-width: 100%; }
.c2-content :where(.table-wrap, .bulk-table-wrap, .roster-grid-wrap, .schedule-scroll) { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* spodní lišta */
.c2-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px); }
.c2-nav .s-nav__item { background: none; border: 0; cursor: pointer; color: var(--muted); font: 600 11px/14px var(--font-sans); }
.c2-nav .s-nav__item[aria-current="page"] { color: var(--accent); }

/* listy (popover) */
.c2-sheet[popover] { margin: auto 0 0; width: 100%; max-width: 100%; border: 0; padding: 0; background: transparent; }
.c2-sheet[popover]::backdrop { background: rgba(20, 17, 17, .45); }
.c2-sheet .s-sheet { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); }
.c2-sheet a.s-sheet__option { text-decoration: none; }

/* bloky obsahu */
.c2-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 16px; display: grid; gap: 12px; }
.c2-section { display: grid; gap: 10px; }
.c2-section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.c2-section__head h2 { font: 650 16px/22px var(--font-sans); }
.c2-section__head small, .c2-muted { font: 400 13px/18px var(--font-sans); color: var(--muted); }
.c2-label { font: 600 12px/16px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.c2-figure-xl { font: 700 48px/52px var(--font-sans); letter-spacing: -.02em; }
.c2-figure-lg { font: 700 22px/26px var(--font-sans); }
.c2-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.c2-split > div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.c2-split b { display: block; font: 650 17px/22px var(--font-sans); }
.c2-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.c2-row + .c2-row { border-top: 1px solid var(--line); padding-top: 12px; }
.c2-strip { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
.c2-strip::-webkit-scrollbar { display: none; }
.c2-strip .s-kpi { flex: 0 0 140px; padding: 10px 12px; gap: 6px; }
.c2-strip .s-kpi b { font: 650 18px/22px var(--font-sans); }
.c2-strip .s-kpi small { font: 400 12px/16px var(--font-sans); color: var(--muted); }
.c2-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.c2-empty { padding: 14px 16px; border-radius: var(--radius-lg); border: 1px dashed var(--unknown); color: var(--muted); font: 400 14px/20px var(--font-sans); }
.c2-form-inline { display: contents; }

/* desktop */
@media (min-width: 960px) {
  .c2-shell { grid-template-columns: 240px minmax(0, 1fr); }
  .c2-side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--surface); box-shadow: 1px 0 0 var(--line); padding: 20px 12px; }
  .c2-brand { display: flex; align-items: center; gap: 10px; padding: 0 12px 18px; font: 700 17px/20px var(--font-sans); color: var(--ink); text-decoration: none; }
  .c2-brand i { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); box-shadow: var(--shadow-hard); }
  .c2-side a.c2-link { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font: 500 14px/20px var(--font-sans); }
  .c2-side a.c2-link[aria-current="page"] { background: var(--accent-tint); color: var(--accent); font-weight: 650; }
  .c2-side .c2-group { font: 600 11px/14px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 16px 12px 6px; }
  .c2-nav { display: none; }
  .c2-content { padding-bottom: 48px; }
  .c2-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* šířky progress barů (CSP nepovoluje inline style) */
.w0{width:0%}.w5{width:5%}.w10{width:10%}.w15{width:15%}.w20{width:20%}.w25{width:25%}.w30{width:30%}.w35{width:35%}.w40{width:40%}.w45{width:45%}.w50{width:50%}.w55{width:55%}.w60{width:60%}.w65{width:65%}.w70{width:70%}.w75{width:75%}.w80{width:80%}.w85{width:85%}.w90{width:90%}.w95{width:95%}.w100{width:100%}

/* převzaté bloky v1 uvnitř CRM 2.0 (dočasně, dokud nedostanou vlastní šablonu) */
.crm2 .location-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 600 13px/18px var(--font-sans); color: var(--ink-2); }
.crm2 .location-switch select { min-height: var(--touch); padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); }
.crm2 .location-switch button { min-height: var(--touch); padding: 0 14px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; cursor: pointer; }
.crm2 .pending-order-alert { display: grid; gap: 6px; padding: 12px 16px; border-radius: var(--radius-md); background: var(--pending-tint); color: var(--ink); }
.crm2 .pending-order-alert p { color: var(--ink-2); font-size: 13px; line-height: 18px; }
.crm2 .c2-legacy h2 { font: 650 16px/22px var(--font-sans); }
.crm2 .c2-legacy ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.crm2 .c2-legacy a, .crm2 .pending-order-alert a { font-weight: 600; }

/* Kontakty na mobilu: řádek tabulky → kompaktní karta (jméno + termín, poznámka, telefon, akce) */
@media (max-width: 650px) {
  .c2-content .pipeline-table tr { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px !important; }
  .c2-content .pipeline-table td { display: block; padding: 0 !important; border: 0 !important; }
  .c2-content .pipeline-table td[data-label]::before { content: none !important; }
  .c2-content .pipeline-table td.sheet-number,
  .c2-content .pipeline-table td[data-label="Fáze"],
  .c2-content .pipeline-table td[data-label="Prodejna"],
  .c2-content .pipeline-table td[data-label="Připomínka"] { display: none !important; }
  .c2-content .pipeline-table td.lead-person { grid-column: 1; grid-row: 1; font: 650 16px/22px var(--font-sans); }
  .c2-content .pipeline-table td.pipeline-date { grid-column: 2; grid-row: 1; font: 600 13px/22px var(--font-sans); color: var(--ink-2); text-align: right; white-space: nowrap; }
  .c2-content .pipeline-table td.lead-type { grid-column: 1 / -1; font: 600 12px/16px var(--font-sans); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .c2-content .pipeline-table td.pipeline-purpose { grid-column: 1 / -1; color: var(--muted); font-size: 13px; line-height: 18px; display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .c2-content .pipeline-table td.lead-phone-cell { grid-column: 1 / -1; }
  .c2-content .pipeline-table td.lead-phone-cell a { font-weight: 600; text-decoration: none; }
  .c2-content .pipeline-table td[data-label="Další krok"] { grid-column: 1 / -1; display: flex !important; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
  .c2-content .pipeline-table td[data-label="Další krok"] :where(a, button, summary) { min-height: 40px; }
}
@media (max-width: 650px) {
  .c2-content .pipeline-table .lead-kpi::before { content: " · "; }
  .c2-content .pipeline-table td[data-label="Další krok"] > *, .c2-content .pipeline-table td[data-label="Další krok"] form { display: contents; }
  .c2-content .pipeline-table td[data-label="Další krok"] :where(a.secondary, a.primary, button) { flex: 0 0 auto; }
}

/* Prodeje na mobilu: zápis → kompaktní karta (podle skutečného HTML sales_ledger.html) */
@media (max-width: 650px) {
  .c2-content .sales-sheet table { display: block; width: 100%; min-width: 0 !important; table-layout: auto; }
  .c2-content .sales-sheet thead { display: none; }
  .c2-content .sales-sheet tbody { display: grid; gap: 10px; }
  .c2-content .sales-sheet tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px;
    padding: 12px 14px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
  .c2-content .sales-sheet tbody td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; }
  .c2-content .sales-sheet td[data-label]::before { content: none !important; }
  .c2-content .sales-sheet :where(td.sheet-number, td.sheet-type, td.sheet-quantity, td.sheet-status, td.sheet-kind, td.sale-gk-cell, td.ledger-note) { display: none !important; }
  .c2-content .sales-sheet td.sale-service-cell { grid-column: 1; grid-row: 1 / span 2; display: flex !important; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
  .c2-content .sales-sheet td.sale-service-cell strong { flex-basis: 100%; font: 650 15px/20px var(--font-sans); }
  .c2-content .sales-sheet td.sale-service-cell strong a { color: var(--ink); text-decoration: none; }
  .c2-content .sales-sheet td.sale-service-cell small { font: 400 12px/16px var(--font-sans); color: var(--muted); }
  .c2-content .sales-sheet td.sale-service-cell .crm-status { font: 600 12px/16px var(--font-sans); }
  .c2-content .sales-sheet .crm-status.status-active { color: var(--ok); }
  .c2-content .sales-sheet .crm-status.status-pending { color: var(--pending); }
  .c2-content .sales-sheet .crm-status.status-storno { color: var(--danger); }
  .c2-content .sales-sheet td.sale-amount41 { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; }
  .c2-content .sales-sheet td.sale-amount41 strong { font: 650 16px/20px var(--font-sans); }
  .c2-content .sales-sheet td.sale-amount41 small { display: block; font: 400 12px/16px var(--font-sans); color: var(--muted); }
  .c2-content .sales-sheet td.sale-date-cell { grid-column: 2; grid-row: 2; text-align: right; font: 400 12px/16px var(--font-sans); color: var(--muted); white-space: nowrap; }
  .c2-content .sales-sheet td.sale-activation41, .c2-content .sales-sheet td.sheet-order-number { grid-column: 1 / -1; font: 400 13px/18px var(--font-sans); color: var(--muted); display: flex !important; gap: 8px; align-items: center; flex-wrap: wrap; }
  .c2-content .sales-sheet td.sheet-order-number .sheet-order-value { font-family: var(--font-mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
  .c2-content .sales-sheet td.sheet-order-number button { min-height: 32px; padding: 0 10px; font-size: 12px; }
  .c2-content .sales-sheet td.sale-actions41 { grid-column: 1 / -1; display: flex !important; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 4px; }
  .c2-content .sales-sheet td.sale-actions41 > .crm-status { display: none; }
  .c2-content .sales-sheet td.sale-empty41 { display: none !important; }
  .c2-content .sales-hero40 h1, .c2-content .sales-hero40 h1 + p { display: none; }
  .c2-content .crm-filters { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: end; }
  .c2-content .crm-filters > :where(button, .secondary, .primary, p, div:last-child) { grid-column: 1 / -1; }
}

/* odkazy v panelech bez podtržení, čísla jako odznaky; Výsledky na mobilu jako posuvná tabulka */
.c2-content :where(.panel, .day-team-links, .c2-card) a:not(.primary):not(.secondary) { text-decoration: none; font-weight: 600; }
.c2-content .day-team-links a { padding: 0 4px; border-bottom: 1px solid var(--line); }
.c2-content .day-team-links a strong { min-width: 28px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 13px/24px var(--font-sans); text-align: center; }
.c2-content .day-team-done { color: var(--ok); font-weight: 600; }
@media (max-width: 650px) {
  .c2-content .target-table { display: table !important; min-width: 640px; table-layout: auto !important; }
  .c2-content .target-table :where(thead) { display: table-header-group !important; position: static !important; width: auto !important; height: auto !important; clip-path: none !important; }
  .c2-content .target-table :where(tbody) { display: table-row-group !important; }
  .c2-content .target-table :where(tr) { display: table-row !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; }
  .c2-content .target-table :where(td, th) { display: table-cell !important; white-space: nowrap; }
}
@media (min-width: 960px) {
  .c2-content .day-dashboard-grid, .c2-content .day-agenda { max-width: none; }
}
@media (min-width: 960px) {
  .c2-content .day-dashboard-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .c2-content .day-agenda { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .c2-content .day-agenda > :where(.day-dashboard-hero, .day-attention, .pending-order-alert) { grid-column: 1 / -1; }
}

/* odkazy ve tvaru tlačítka: text v barvě tlačítka, ne odkazu (jinak rudé na rudém) */
.crm2 a.s-btn { text-decoration: none; }
.crm2 a.s-btn--primary, .crm2 a.s-btn--primary:visited { color: var(--accent-ink); }

/* ===== TABULKOVÝ STANDARD CRM 2.0 (c2-table) – jako tabulky CRM 1, ve vzhledu CRM 2 =====
   Všechny seznamy (zápisy, kontakty, směny, lidé, účetní, výsledky týmu) používají tuto tabulku:
   stejná výška řádků, ohraničené sloupce, lepivá hlavička i první sloupec, střídání řádků.
   Použití:
     <div class="c2-table-wrap"><table class="c2-table [c2-table--dense] [c2-table--pin1]">
       <thead><tr><th>Den</th><th class="num">Hodiny</th>…</tr></thead>
       <tbody><tr class="[is-today|is-weekend|is-holiday|is-overdue]"><td>…</td><td class="num">8</td>…</tr></tbody>
       <tfoot><tr><td>Celkem</td><td class="num">160</td></tr></tfoot>
     </table></div>
   Buňky: .num (čísla vpravo), .c2-cell-muted (šedý text), .c2-cell-wrap (výjimečně zalomit), .c2-cell-actions (tlačítka).
   Text se nezalamuje – co se nevejde, končí „…“ (celý text v title nebo v detailu). */
.c2-table-wrap { position: relative; max-width: 100%; overflow: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card); -webkit-overflow-scrolling: touch; }
.c2-table-wrap--tall { max-height: calc(100vh - 220px); }
.c2-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; table-layout: auto;
  font: 400 14px/20px var(--font-sans); font-variant-numeric: tabular-nums; color: var(--ink); }
.c2-table th, .c2-table td { height: 40px; padding: 0 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  text-align: left; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.c2-table th:last-child, .c2-table td:last-child { border-right: 0; }
.c2-table thead th { position: sticky; top: 0; z-index: 2; height: 36px; background: var(--surface-2);
  font: 650 12px/16px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.c2-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.c2-table tbody tr:nth-child(odd) td { background: var(--surface); }
.c2-table tbody tr:hover td { background: var(--accent-tint); }
.c2-table tbody tr:last-child td { border-bottom: 0; }
.c2-table tfoot td, .c2-table tfoot th { position: sticky; bottom: 0; z-index: 2; background: var(--surface-2); font-weight: 650;
  border-top: 2px solid var(--line); border-bottom: 0; }
.c2-table .num { text-align: right; }
.c2-table .c2-cell-muted { color: var(--muted); }
.c2-table .c2-cell-wrap { white-space: normal; }
.c2-table td a { text-decoration: none; font-weight: 600; }
.c2-table .c2-cell-actions { width: 1%; padding: 0 6px; }
.c2-table .c2-cell-actions > * + * { margin-left: 4px; }
.c2-table .c2-cell-actions .s-btn, .c2-table .c2-cell-actions button { min-height: 30px; padding: 0 10px; font-size: 13px; }
/* první sloupec přilepený (jméno / den) */
.c2-table--pin1 tbody td:first-child, .c2-table--pin1 thead th:first-child, .c2-table--pin1 tfoot td:first-child {
  position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--line); }
.c2-table--pin1 thead th:first-child, .c2-table--pin1 tfoot td:first-child { z-index: 3; }
/* hustá varianta (rozpisy směn, docházka) */
.c2-table--dense th, .c2-table--dense td { height: 32px; padding: 0 8px; font-size: 13px; }
.c2-table--dense thead th { height: 30px; font-size: 11px; }
/* stavy řádků */
.c2-table tr.is-today td:first-child { box-shadow: inset 4px 0 0 var(--accent); font-weight: 650; }
.c2-table tr.is-weekend td { background: var(--warn-tint) !important; }
.c2-table tr.is-holiday td { background: var(--danger-tint) !important; }
.c2-table tr.is-overdue td:first-child { color: var(--danger); font-weight: 650; }
.c2-table tr.is-muted td { color: var(--muted); }
/* stav v buňce */
.c2-table .c2-tag { display: inline-block; padding: 0 8px; border-radius: var(--radius-pill); font: 600 12px/20px var(--font-sans);
  background: var(--surface-2); color: var(--ink-2); }
.c2-table .c2-tag--ok { background: var(--ok-tint); color: var(--ok); }
.c2-table .c2-tag--warn { background: var(--warn-tint); color: var(--warn); }
.c2-table .c2-tag--pending { background: var(--pending-tint); color: var(--pending); }
.c2-table .c2-tag--danger { background: var(--danger-tint); color: var(--danger); }
/* panel nad tabulkou: filtry v jednom řádku */
.c2-table-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.c2-table-bar .c2-spacer { flex: 1; }
@media (max-width: 959px) {
  .c2-table th, .c2-table td { height: 40px; padding: 0 10px; max-width: 220px; }
  .c2-table-wrap { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
}

/* nástroje tabulky (crm2-table.js): hledat · sloupce · export */
.c2-table-tools { margin-bottom: 8px; }
.c2-table-search { min-height: 36px; width: min(260px, 100%); padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.c2-table-cols { position: relative; }
.c2-table-cols > summary { list-style: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); font: 600 13px/1 var(--font-sans); cursor: pointer; }
.c2-table-cols > summary::-webkit-details-marker { display: none; }
.c2-table-cols__list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 10; display: grid; gap: 6px; min-width: 200px; max-height: 320px; overflow: auto;
  padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sheet); font-size: 13px; }
.c2-table th.c2-sortable { cursor: pointer; user-select: none; }
.c2-table th.c2-sortable::after { content: ' ↕'; opacity: .35; }
.c2-table th[aria-sort="ascending"]::after { content: ' ↑'; opacity: 1; color: var(--accent); }
.c2-table th[aria-sort="descending"]::after { content: ' ↓'; opacity: 1; color: var(--accent); }
.c2-table tr[hidden], .c2-table [hidden] { display: none; }

@media (max-width: 959px) { .c2-card .c2-table-wrap, .panel .c2-table-wrap { margin: 0; border-radius: var(--radius-md); border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }

/* štítky v tabulce se nezalamují – řádek musí zůstat stejně vysoký */
.c2-table .c2-tag, .c2-table [class*="tag"] { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.c2-table td > * { white-space: nowrap; }
/* první sloupec (jméno / den) v tabulkách s připnutím – jména se neořezávají */
.c2-table--pin1 tbody td:first-child, .c2-table--pin1 thead th:first-child { min-width: 160px; }
.c2-table--dense.c2-table--pin1 tbody td:first-child, .c2-table--dense.c2-table--pin1 thead th:first-child { min-width: 96px; }
/* tlačítko v levé liště (Chat otevírá panel) vypadá stejně jako odkazy */
@media (min-width: 960px) {
  .c2-side button.c2-link { display: flex; justify-content: space-between; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none;
    color: var(--ink-2); font: 500 14px/20px var(--font-sans); text-align: left; cursor: pointer; }
  .c2-side button.c2-link:hover { background: var(--surface-2); }
}

/* přebít obecné pravidlo ze sections.css (:where(table) fixed 100%) – c2-table má přirozenou šířku a posun */
.c2-content table.c2-table { width: max-content; min-width: 100%; table-layout: auto; border-collapse: separate; }
.c2-table td:first-child small { margin-left: 6px; color: var(--muted); font-size: 12px; }

/* viditelná sekundární tlačítka a čipy (přání vlastníka): obrys v rudém tónu, primární beze změny (černý stín) */
.crm2 :is(.s-btn--secondary, .s-chip, button.secondary, a.secondary, .c2-table-cols > summary, .schedule-tool, .c2-table-bar a, .e7-chips a) {
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent); background: var(--surface); }
.crm2 :is(.s-btn--secondary, .s-chip, button.secondary, a.secondary, .c2-table-cols > summary, .schedule-tool, .c2-table-bar a, .e7-chips a):hover {
  border-color: var(--accent); background: var(--accent-tint); }
.crm2 :is(.s-chip, .e7-chips a, .c2-table-bar a)[aria-current], .crm2 .s-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-tint); font-weight: 650; }
.crm2 :is(button, a, summary, input, select):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* dvě desetinná místa (rozhodnutí vlastníka #276): velká čísla a procenta se nesmí lámat */
.c2-figure-xl { font-size: clamp(34px, 11vw, 48px); line-height: 1.05; white-space: nowrap; }
.c2-figure-lg, .s-kpi__pct, .s-kpi__value, .c2-split b { white-space: nowrap; }
.s-kpi__head { gap: 6px; align-items: baseline; }
.s-kpi__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-kpi__pct { flex: none; font-size: 13px; }

/* DEMO přepínač rolí (jen testovací server, master účet) */
.c2-demo-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px max(16px, env(safe-area-inset-left, 0px));
  background: var(--ink); color: var(--surface); font: 600 12px/16px var(--font-sans); }
.c2-demo-switch > span { margin-right: 4px; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.c2-demo-switch button { min-height: 30px; padding: 0 10px; border: 1px solid rgba(255,255,255,.35); border-radius: var(--radius-pill);
  background: transparent; color: var(--surface); font: 600 12px/1 var(--font-sans); cursor: pointer; }
.c2-demo-switch button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.crm2 .dev-feedback-tools { z-index: 40; }

/* Feedback (demo) nesmí překrývat obsah: malá pilulka vlevo dole nad spodní lištou */
.crm2 .dev-feedback-tools { position: fixed !important; left: 12px !important; right: auto !important; top: auto !important;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 12px) !important; transform: none !important; opacity: .85; }
@media (min-width: 960px) { .crm2 .dev-feedback-tools { bottom: 12px !important; left: 252px !important; } }
/* rychlé akce v levé liště – nenápadně, primární akce jsou na obrazovkách */
.c2-side .c2-side-plus { width: 100%; justify-content: flex-start; margin: 6px 0; min-height: 36px; font-size: 14px; }

/* Sdílené prvky pracovních přehledů, formulářů a tabulek. */
.c2-content :where(.workspace,.quick-sale,.pipeline-page,.commission-policy,.work-grid,.field,.narrow) { display:grid; gap:var(--space-4); min-width:0; }
.c2-content :where(.panel,.crm-filters,.sales-overview,.contacts-controls,.commission-policy-section,.quick-sale form) { padding:var(--space-4); background:var(--surface); border-radius:var(--radius-lg); box-shadow:var(--shadow-card); min-width:0; }
.c2-content :where(.panel,.panel form,.commission-policy-grid,.mapping-services,.sale-form-grid) { display:grid; gap:var(--space-3); min-width:0; }
.c2-content :where(.page-heading,.section-heading,.crm-actions,.form-actions,.view-tabs,.sales-status40,.sales-month40,.crm-filters,.sales-hero40,.member) { display:flex; flex-wrap:wrap; gap:var(--space-3); align-items:center; }
.c2-content :where(.page-heading,.sales-hero40,.section-heading,.member) { justify-content:space-between; }
.c2-content .member { padding-block:var(--space-3); border-bottom:1px solid var(--line); }
.c2-content :where(small,.help,.muted,.eyebrow) { color:var(--muted); }
.c2-content .eyebrow { font-weight:650; letter-spacing:.06em; font-size:.8rem; }
.c2-content :where(.member small,.field label) { display:block; }
.c2-content :where(h1,h2,h3) { line-height:1.2; }
.c2-content :where(.primary,.secondary,button,.view-tabs a,.sales-status40 a,summary) { display:inline-flex; align-items:center; justify-content:center; gap:var(--space-2); min-height:var(--touch); padding:var(--space-2) var(--space-3); border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--surface-2); color:var(--ink); text-decoration:none; font-weight:600; cursor:pointer; }
.c2-content :where(.primary,button.primary) { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); box-shadow:var(--shadow-hard); }
.c2-content :where(.crm-actions,.view-tabs,.sales-status40) [aria-current=page] { background:var(--accent-tint); color:var(--accent-strong); border-color:var(--accent); }
.c2-content button:disabled { opacity:.55; cursor:default; }
.c2-content :where(input,select,textarea):not([type=checkbox],[type=radio],[type=hidden]) { width:100%; max-width:100%; min-width:0; min-height:var(--touch); border:1px solid var(--line); border-radius:var(--radius-sm); padding:var(--space-2); background:var(--surface); font-size:16px; }
.c2-content :where(label,fieldset,td,th,article,section) { min-width:0; overflow-wrap:anywhere; }
.c2-content :where(.target-warning,.errorlist,.form-errors) { background:var(--warn-tint); color:var(--warn); border-radius:var(--radius-sm); padding:var(--space-3); }
.c2-content :where(table) { width:100%; table-layout:fixed; border-collapse:collapse; }
.c2-content :where(th,td) { text-align:start; padding:var(--space-2); border-bottom:1px solid var(--line); vertical-align:top; }
.c2-content thead { background:var(--surface-2); }
.c2-content :where(.table-wrap,.bulk-table-wrap,.roster-grid-wrap) { max-width:100%; overflow:auto; }
.c2-content [hidden], .crm2 [hidden] { display:none!important; }
@media(min-width:960px) {
  .c2-content :where(.work-grid,.commission-policy-grid) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
}
@media(max-width:650px) {
  .c2-content :where(.pipeline-table,.sales-ledger-table) :where(tbody,tr,td) { display:block; }
  .c2-content :where(.pipeline-table,.sales-ledger-table) thead { position:absolute; width:1px; height:1px; clip-path:inset(100%); }
  .c2-content :where(.pipeline-table,.sales-ledger-table) tr { margin-block:var(--space-3); padding:var(--space-3); border-radius:var(--radius-md); box-shadow:var(--shadow-card); background:var(--surface); }
  .c2-content :where(.pipeline-table,.sales-ledger-table) td[data-label]::before { content:attr(data-label) " "; color:var(--muted); font-size:.8rem; }
  .c2-content :where(.table-wrap,.bulk-table-wrap) > table:not(.pipeline-table,.sales-ledger-table) { min-width:34rem; }
  .c2-sheet { max-height:85dvh; overflow-y:auto; }
}
.crm2 .c2-content a.primary,.crm2 .c2-content button.primary { color:var(--accent-ink); }
.c2-content .sales-summary42 { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr)); gap:var(--space-3); }
.sales-summary42 article { display:grid; align-content:start; gap:var(--space-2); padding:var(--space-4); background:var(--surface); border-radius:var(--radius-lg); box-shadow:var(--shadow-card); }
.sales-summary42 article h2 { font-size:1rem; }
.sales-summary42 article strong { font-size:1.4rem; }
.schedule-main,.schedule-shell { min-width:0; display:grid; gap:var(--space-3); }
.schedule-scroll { overflow:auto; max-width:100%; }
.schedule-scroll .schedule-grid { width:max-content; min-width:100%; table-layout:auto; }
.schedule-sidebar { display:none; }
.c2-content :where(.schedule-toolbar,.schedule-month,.schedule-selection,.day-quick-actions) { display:flex; gap:var(--space-2); align-items:center; flex-wrap:wrap; }
.c2-content :where(.day-agenda,.day-dashboard-grid,.schedule-header,.day-team-links) { display:grid; gap:var(--space-3); min-width:0; }
@media(min-width:960px) {
  .day-dashboard-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .chat-layout { display:grid; grid-template-columns:minmax(14rem,1fr) minmax(0,3fr); gap:var(--space-4); }
}
.c2-sheet .c2-link { display:flex; align-items:center; min-height:var(--touch); padding-inline:var(--space-4); }
@media(max-width:650px) { .schedule-grid .mobile-person-hidden { display:none; } }
.day-team-links a { display:flex; gap:var(--space-2); align-items:center; justify-content:space-between; min-height:var(--touch); }
.schedule-legend,.schedule-quick,.schedule-display { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-2); }
.schedule-legend span { padding:var(--space-1) var(--space-2); border-radius:var(--radius-sm); background:var(--surface); }
.schedule-cell[aria-selected=true],.schedule-cell.selected { outline:2px solid var(--focus); }
.schedule-grid .kind-work { background:var(--ok-tint); }
.schedule-grid .kind-leave { background:var(--warn-tint); }
.schedule-grid .kind-mgmt { background:var(--pending-tint); }

/* Styly obrazovek CRM 2.0: jeden soubor na obrazovku (např. e1-smeny.css). Jen tokeny z tokens.css. */

.crm2.a1-auth {
  display: grid;
  min-height: 100dvh;
  place-items: center;
}

.a1-auth .a1-center {
  max-width: 29rem;
  padding: var(--space-6) var(--space-4);
}

.a1-brand {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 750;
}

.a1-brand i {
  width: var(--space-6);
  height: var(--space-6);
  border-radius: var(--radius-sm);
  background: var(--accent);
  box-shadow: var(--shadow-hard);
}

.a1-auth .a1-card {
  padding: var(--space-6);
}

.a1-auth .a1-test,
.a1-auth .a1-recovery {
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--warn-tint);
  color: var(--ink);
}

.a1-card .mfa-qr {
  justify-self: center;
  width: min(100%, 280px);
  height: auto;
}

.a1-card .mfa-secret {
  display: block;
  padding: var(--space-2);
  overflow-wrap: anywhere;
}

.a1-card .a1-recovery pre {
  max-width: 100%;
  overflow: auto;
}

.c2-content .a1-settings {
  width: min(100%, 44rem);
}

.a1-settings-list > a,
.a1-settings-list > details {
  border-bottom: 1px solid var(--line);
}

.a1-settings-list > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--touch);
  color: var(--ink);
  text-decoration: none;
}

.a1-settings-list > a:hover {
  color: var(--accent);
}

.a1-settings-list > details {
  padding-bottom: var(--space-2);
}

.a1-settings-list > details > summary {
  justify-content: flex-start;
  background: transparent;
  border: 0;
  padding-inline: 0;
}

.a1-settings .field:has(input[type=checkbox]) {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.a1-settings .field input[type=checkbox] {
  grid-area: 1 / 1;
  accent-color: var(--accent);
}

.a1-settings .field:has(input[type=checkbox]) > label {
  grid-area: 1 / 2;
}

.a1-mfa-card form > .primary { width:100%; min-height:var(--touch); }
.a1-switch-account { margin-top:var(--space-4); border-top:1px solid var(--line); }
.a1-switch-account summary { padding-block:var(--space-3); min-height:var(--touch); cursor:pointer; }

.a2-person,.a2-grid { display:grid; gap:var(--space-4); min-width:0; }
.a2-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr)); }
.a2-person dl { display:grid; grid-template-columns:auto 1fr; gap:var(--space-2); }
.a2-person dt { color:var(--muted); }
.a2-person dd { margin:0; text-align:end; overflow-wrap:anywhere; }
.a2-links,.a2-chart { display:flex; gap:var(--space-2); }
.a2-links { flex-wrap:wrap; }
.a2-links a { min-height:var(--touch); display:inline-flex; align-items:center; }
.a2-chart { gap:2px; margin-block:var(--space-3); }
.a2-chart a { display:grid; flex:1; justify-items:center; min-width:0; color:var(--accent); }
.a2-chart svg { width:100%; height:6rem; fill:currentColor; stroke:currentColor; }
.a2-person tr:target td { background:var(--accent-tint); }

.a5-empty {
  display: grid;
  justify-items: start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.a5-empty svg { color: var(--muted); }
.a5-empty p { margin: 0; }

/* Stabilní prostor pro načítaný detail záznamu v přehledu Prodeje. */
.crm2 [data-sales-detail-body] { min-block-size: 12rem; overflow-wrap: anywhere; }
.crm2 [data-sales-detail-body][aria-busy="true"]::after {
  content: "";
  display: block;
  height: calc(3 * var(--space-6));
  margin-block-start: var(--space-4);
  background:
    linear-gradient(var(--raised),var(--raised)) left top / 52% var(--space-3),
    linear-gradient(var(--raised),var(--raised)) left center / 87% var(--space-3),
    linear-gradient(var(--raised),var(--raised)) left bottom / 68% var(--space-3);
  background-repeat: no-repeat;
}

.t2-sales [data-sale-actions][open] {
  min-width: 11rem;
  white-space: normal;
}
.crm2 .t2-sales table[data-c2-table="prodeje"] .c2-cell-actions [data-sale-actions][open] > a {
  display: flex;
  align-items: center;
  min-height: var(--touch);
}
@media (max-width: 959px) {
  .t2-sales table:has([data-sale-actions][open]) tr > :first-child {
    position: static;
  }
}
.sale-mobile-actions:modal {
  box-sizing: border-box;
  inset: auto 0 0;
  margin: 0 auto;
  width: 100%;
  max-width: 32rem;
  max-height: 78dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-4);
  padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--surface);
  color: var(--ink);
}
.sale-mobile-actions::backdrop { background: rgb(20 17 17 / 45%); }
.sale-mobile-actions > strong { display: block; padding: var(--space-2); }
.sale-mobile-actions button {
  display: block;
  width: 100%;
  min-height: var(--touch);
  padding: var(--space-2) var(--space-3);
  text-align: start;
  color: var(--accent);
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 959px) {
  [data-sales-ledger] tbody { -webkit-touch-callout: none; }
}

.crm2 .b1-search {
  width: min(36rem, calc(100% - 2 * var(--space-4)));
  max-height: calc(100dvh - 2 * var(--space-4));
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sheet);
  padding: var(--space-4);
}

.b1-search::backdrop {
  background: rgb(20 17 17 / 35%);
}

.b1-search :is(header, form) {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.b1-search input {
  flex: 1;
  min-width: 0;
  min-height: var(--touch);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: var(--space-2);
}

.b1-search [data-search-status]:empty {
  display: none;
}

.b1-search-results {
  display: grid;
  gap: var(--space-3);
}

.b1-search .b1-search-results section {
  padding-block: var(--space-2);
  border-top: 1px solid var(--line);
}

.b15-results-path ol {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    list-style: none;
    margin: 0;
    padding: 0;
}

.b15-results-path a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
}

.b15-results-path li {
    align-self: center;
    overflow-wrap: anywhere;
}

.crm2 .c1-entry {
  text-align: left;
  cursor: pointer;
}

.crm2 .c2-link.c1-entry {
  border: 0;
  background: transparent;
}

.crm2 .c1-chat [data-chat-panel] {
  position: fixed;
  z-index: 50;
  inset: var(--space-4) var(--space-4) var(--space-4) auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: min(380px, calc(100vw - 2 * var(--space-4)));
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sheet);
}

.c1-chat .section-heading,
.c1-chat [data-chat-form] {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.c1-chat .c1-channels {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

.c1-chat .section-heading {
  justify-content: space-between;
}

.c1-chat .c1-chips {
  display: flex;
  gap: var(--space-1);
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
}

.c1-chat .c1-chips button {
  flex: none;
}

.c1-chat [data-chat-peers] {
  justify-self: start;
  max-width: 100%;
}

.c1-chat .c1-chips button {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c1-chat :is(select, textarea, [data-chat-close], [data-chat-form] button) {
  min-height: var(--touch);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: var(--space-2);
}

.c1-chat [data-chat-close],
.c1-chat [data-chat-form] button {
  min-width: var(--touch);
  cursor: pointer;
}

.c1-chat [data-chat-form] button {
  background: var(--accent);
  color: var(--accent-ink);
}

.c1-chat [data-chat-form] textarea {
  flex: 1;
  min-width: 0;
  resize: vertical;
  max-height: 30dvh;
}

.c1-chat .chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  overscroll-behavior: contain;
}

.c1-chat .chat-message {
  align-self: flex-start;
  max-width: 88%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  overflow-wrap: anywhere;
}

.c1-chat .chat-own {
  align-self: flex-end;
  background: var(--accent-tint);
}

.c1-chat .chat-body,
.c1-news .note {
  white-space: pre-wrap;
}

.c1-chat .help,
.c1-chat .c1-privacy {
  color: var(--muted);
  font-size: .8rem;
}

.c1-chat [data-chat-status]:empty {
  display: none;
}

.c1-news .news-list {
  display: grid;
  gap: var(--space-3);
}

.c1-news .c1-news-badge {
  color: var(--accent-strong);
  font-weight: 700;
}

@media (max-width: 860px) {
  .crm2 .c1-chat [data-chat-panel] {
    inset: 0;
    width: auto;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    padding-block: max(var(--space-4), env(safe-area-inset-top)) max(var(--space-4), env(safe-area-inset-bottom));
  }

  .crm2:has(.c1-chat [data-chat-panel]:not([hidden])) {
    overflow: hidden;
  }
}

.c25-secondary > summary {
  min-height: 44px;
  align-content: center;
  font-weight: 650;
  cursor: pointer;
}

.c26-sales-tools :is(.sheet-filters, .c26-export) > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--accent);
  cursor: pointer;
}
.c26-sales-tools > :is(.sheet-filters, .c26-export)[open] {
  flex-basis: 100%;
}
.c26-sales-tools .c26-formats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.c26-formats a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 959px) {
  .c26-filter-fields label { max-width: 100%; }
}

.k1-contacts .c30-note-trigger {
  display: block;
  max-width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: underline dotted;
  cursor: pointer;
}
.c30-note-panel {
  box-sizing: border-box;
  width: min(28rem, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  background: var(--surface);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.c30-note-panel p { white-space: pre-wrap; }

@media print {
  body:has(.c32-print-report) > :not(.c2-shell),
  .c2-shell:has(.c32-print-report) > :not(.c2-main),
  .c2-main:has(.c32-print-report) > :not(.c2-content),
  .c2-content:has(.c32-print-report) > :not(.c32-print-report),
  .c32-print-report :is(nav, [data-print-report]) { display: none !important; }

  .c2-shell:has(.c32-print-report),
  .c2-main:has(.c32-print-report),
  .c2-content:has(.c32-print-report),
  .c32-print-report,
  .c32-print-report .commission-policy-grid {
    display: block;
    width: auto;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  .c32-print-report .panel { box-shadow: none; break-inside: auto; }
  .c32-print-report table { width: 100%; }
  .c32-print-report thead { display: table-header-group; }
  .c32-print-report :is(h1, h2, dt) { break-after: avoid; }
  .c32-print-report tr { break-inside: avoid; }
}

.e1-week .e1-scroll {
  max-height: 70vh;
}
.e1-week .e1-scroll tbody th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--line);
}
.e1-week .e1-scroll tbody tr > td:last-child {
  text-align: right;
}
.schedule-grid.c2-table tbody td {
  height: auto;
}
.c2-table .d35-sales-total td {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: none;
}
.crm2 .c2-table-wrap:has(> table[data-c2-table]):not(.c2-table-wrap--tall) {
  max-height: max(12rem, calc(100dvh - 220px));
}

.c2-table .c2-copy-cell, .c2-table .c2-copy-row > :not([hidden]) {
  background-color: var(--accent-tint);
}
.c2-table .c2-copy-cell, .c2-table .c2-copy-row > :focus {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.k1-contacts .lead-note summary {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  text-decoration: underline dotted;
}
.k1-contacts .lead-note form {
  display: grid;
  gap: 8px;
  white-space: normal;
}
.k1-contacts .lead-note textarea {
  box-sizing: border-box;
  width: 100%;
  font-size: 16px;
}

.c2-table .c2-layout-pin {
  position: sticky;
  left: var(--c2-pin-offset);
  z-index: 1;
  background-color: var(--surface);
  box-shadow: 1px 0 0 var(--line);
}
.c2-table thead .c2-layout-pin, .c2-table tfoot .c2-layout-pin {
  z-index: 3;
  background-color: var(--surface-2);
}

.c2-table tr.c2-highlight > :not([hidden]) {
  background-color: var(--accent-tint);
}
.c2-table tr.c2-highlight > :first-child {
  border-inline-start: 3px solid var(--accent);
}

.d43-print { margin: var(--space-4); font-family: var(--font-sans); }
@media print {
  @page { size: landscape; margin: 10mm; }
  .d43-print button { display: none; }
  .d43-print .c2-table-wrap { overflow: visible; box-shadow: none; }
  .d43-print .c2-table { width: 100%; min-width: 0; font-size: 9pt; }
  .d43-print .c2-table :is(td,th) { white-space: normal; overflow-wrap: anywhere; padding: 2pt; }
  .d43-print thead { display: table-header-group; }
  .d43-print tr { break-inside: avoid; }
}

.d45-density {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--touch);
  cursor: pointer;
}
.crm2 .schedule-main:has(.d45-density input:not(:checked)) .schedule-day {
  height: calc(var(--touch) + var(--space-2));
}
.e1-week:has(.d45-density input:checked) :is(li, td, th) {
  padding-block: var(--space-1);
}
@media (max-width: 700px) {
  .crm2 .schedule-main:has(.d45-density input:checked) .schedule-day {
    min-height: var(--touch);
  }
}
.crm2 [data-c2-table="dochazka"]:not(.c2-table--dense) tbody :is(th, td) {
  height: calc(var(--touch) + var(--space-2));
}
@media (max-width: 700px) {
  .crm2 [data-c2-table="dochazka"].c2-table--dense tbody :is(th, td) {
    height: var(--touch);
  }
}

.sale-detail, .sale-detail__cards { display: grid; gap: 16px; }
.sale-detail__cards { align-items: start; }
.sale-detail .c2-card { min-width: 0; overflow-wrap: anywhere; }
.sale-detail .crm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sale-detail dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; }
.sale-detail dd { margin: 0; }
.sale-detail .note { white-space: pre-wrap; }
@media (min-width: 960px) {
  .sale-detail__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.e1-week{display:grid;gap:var(--space-4);min-width:0}.e1-week header,.e1-week nav,.e1-week form,.e1-week li{display:flex;align-items:center;gap:var(--space-3);flex-wrap:wrap}.e1-week header,.e1-week li{justify-content:space-between}.e1-week nav a,.e1-week header a,.e1-week button{display:inline-grid;place-items:center;min-height:var(--touch);min-width:var(--touch);padding:0 var(--space-3);border-radius:var(--radius-sm);background:var(--surface);color:var(--ink)}.e1-week select{font-size:16px;min-height:var(--touch)}.e1-week small{display:block;color:var(--muted)}.e1-week ul,.e1-scroll{margin:0;padding:0;background:var(--surface);box-shadow:var(--shadow-card);border-radius:var(--radius-lg)}.e1-week li,.e1-week th,.e1-week td{padding:var(--space-3);border-bottom:1px solid var(--line)}.e1-week li[aria-current]{border-left:4px solid var(--accent);background:var(--accent-tint)}.e1-scroll{max-width:100%;overflow:auto}.e1-week table{width:100%;min-width:48rem;table-layout:fixed;border-collapse:collapse}.e1-cell{display:grid;align-content:center;min-height:var(--touch);text-decoration:none}.e1-week .kind-work{color:var(--ok)}.e1-week .kind-leave,.e1-week aside{background:var(--warn-tint);color:var(--warn)}.e1-week aside{padding:var(--space-3);border-radius:var(--radius-md)}

.e1-week th a,.e1-week nav a{text-decoration:none}
.e1-week nav a[aria-current]{box-shadow:inset 0 0 0 2px var(--accent)}
.e1-week .kind-offline,.e1-week .kind-empty{color:var(--muted)}
.e1-week .e1-draft{border-bottom:2px dashed var(--accent)}
.e1-legend{display:flex;flex-wrap:wrap;gap:var(--space-3);color:var(--muted)}
.e1-legend span::before{content:"";display:inline-block;width:.65em;height:.65em;border-radius:50%;margin-right:.4em;background:var(--muted)}
.e1-legend .work::before{background:var(--ok)}.e1-legend .draft::before{background:var(--accent)}.e1-legend .leave::before{background:var(--warn)}.e1-legend .conflict::before{background:var(--danger)}

.results-page .e2-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: var(--space-3);
}

.results-page .e2-kpi-grid h3,
.results-page .e2-kpi-grid p {
  margin: 0;
}

.results-page .e2-kpi-grid progress {
  width: 100%;
  height: var(--bar);
  accent-color: var(--accent);
}

.results-page .s-kpi--warn progress {
  accent-color: var(--warn);
}

.results-page .s-kpi--ok progress {
  accent-color: var(--ok);
}

.results-page .e2-score .main-target-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.results-page .e2-score .main-target-summary div {
  display: grid;
  align-content: start;
}

.results-page .e2-score .main-target-total {
  order: -1;
  grid-column: 1 / -1;
}

.results-page .e2-score .main-target-total strong {
  font-size: 1.75rem;
}

.results-page .e2-score .main-target-summary p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.results-page .e2-team-extras td small {
  display: block;
  color: var(--muted);
}

.results-page .e2-detail summary {
  display: list-item;
  cursor: pointer;
  padding-block: var(--space-3);
  min-height: var(--touch);
}

.results-page .e2b-period {
  display: grid;
  grid-template-columns: var(--touch) minmax(0, 1fr) var(--touch);
  align-items: center;
  justify-content: start;
  gap: var(--space-2);
  text-align: center;
  width: min(100%, 22rem);
}

.results-page .e2b-period :is(a, button) {
  justify-content: center;
  min-height: var(--touch);
  font-size: 1.25rem;
}

.results-page .e2b-period button:disabled {
  color: var(--unknown);
  opacity: 0.55;
  cursor: default;
}

.results-page .e2c-manager {
  display: grid;
  gap: var(--space-3);
}

.results-page .e2c-figure {
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 761px) {
  .results-page .e2c-manager {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-page .e4-team {
    overflow-x: auto;
  }

  .results-page .e4-team table {
    table-layout: auto;
  }

  .results-page .e4-team th:first-child {
    width: 1%;
    white-space: nowrap;
  }
}

.results-page .e2b-period small {
  display: block;
  color: var(--muted);
}

.results-page .e2b-scope {
  color: var(--muted);
  margin-block: 0 var(--space-2);
}

.results-page .e2b-filters .crm-filters {
  box-shadow: none;
  padding: 0;
}

@media (max-width: 640px) {
  .results-page .e2-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-page .e2-kpi-grid .s-kpi__head {
    flex-wrap: wrap;
  }
}

/* Varování nese ukazatel a popisek hranice. Číslo používá základní barvu KPI. */
.results-page .e2-kpi-grid .s-kpi--warn .s-kpi__pct {
  color: var(--ink);
}

.c2-content .e3-filters,.e3-month{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap}
.e3-month{flex-wrap:nowrap}.e3-month a{display:grid;place-items:center;min-width:var(--touch);min-height:var(--touch);background:var(--surface-2);border-radius:var(--radius-sm);text-decoration:none}
.e3-filters select{max-width:100%;min-height:var(--touch)}
.c2-content .sales-summary42:has(>article:first-child:nth-last-child(3)){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-2)}
@media(max-width:600px){.sales-summary42 article{min-width:0}.e3-filters select{flex:1 1 9rem}.sale-date-cell{font-variant-numeric:tabular-nums}}
.e3-status{position:relative}.e3-status nav{position:absolute;z-index:2;display:grid;padding:var(--space-2);background:var(--surface);border-radius:var(--radius-md);box-shadow:var(--shadow-card);min-width:max-content}
@media(min-width:760px){.c2-content .e3-filters select{width:auto;max-width:26rem}.e3-filters .e3-month input{width:auto}}
.e3-period{position:relative}.e3-period summary{white-space:nowrap}
.e3-period[open]>label,.e3-period[open]>input{position:absolute;z-index:3;left:0;background:var(--surface)}
.e3-period[open]>label{top:100%;padding:var(--space-1)}.e3-period[open]>input{top:calc(100% + 1.5rem);width:10rem}
.e3-options>a{display:block;min-height:var(--touch);padding:var(--space-2)}
.e3-options>summary{color:var(--muted)}
@media(max-width:600px){
.c2-content .sales-view-tabs{display:flex;flex-wrap:nowrap;gap:0;background:var(--surface-2);border-radius:var(--radius-md)}
.c2-content .sales-view-tabs a{flex:1;padding:var(--space-1);font-size:.82rem;white-space:nowrap}
.c2-content .e3-filters{display:flex;flex-wrap:nowrap;gap:var(--space-1);min-width:0}
.c2-content .e3-filters .e3-month{gap:0;flex:0 0 auto}.e3-period summary,.e3-status summary{padding:var(--space-1);font-size:.8rem}
.c2-content .e3-filters select{flex:1;min-width:0;width:0;padding-inline:var(--space-1);text-overflow:ellipsis}
.e3-status{flex:0 1 auto}.e3-status nav{right:0}
.c2-content .sales-summary42 article{padding:var(--space-2)}
.c2-content .sales-summary42 article strong{font-size:1.05rem;white-space:nowrap}
.sales-summary42 article small{display:none}
}
.e3-shop>span{display:none}
@media(max-width:600px){
.e3-shop{position:relative;flex:1;min-width:0;border:1px solid var(--line);background:var(--surface);border-radius:var(--radius-sm)}
.e3-shop>span{display:grid;align-content:center;padding:var(--space-1);text-align:center;font-size:.78rem;line-height:1.1;min-height:var(--touch);overflow-wrap:anywhere}
.c2-content .e3-shop select{position:absolute;inset:0;width:100%;height:100%;opacity:0}.e3-shop:focus-within{outline:2px solid var(--focus)}
}
@media(max-width:600px){
.c2-content .e3-period summary,.c2-content .e3-status summary{padding-inline:var(--space-1);font-size:.76rem}
.c2-content .e3-month a{padding:0}
.e3-shop>span{display:block;align-content:center;overflow-wrap:normal;font-size:.76rem}
}

.e4-summary,.e4-team{grid-column:1/-1;min-width:0}
.e4-summary{display:grid;gap:var(--space-3);align-items:start}
.e4-summary h2{font-size:1rem;color:var(--muted)}
.e4-summary .e4-score{display:block;font-size:2.4rem;font-weight:700;text-decoration:none;color:var(--ink);font-variant-numeric:tabular-nums}
.e4-team table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.e4-team td,.e4-team th{text-align:right;padding:var(--space-2);border-bottom:1px solid var(--line)}
.e4-team th:first-child{text-align:left}
@media(min-width:960px){.e4-summary{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:959px){
.e4-team thead{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
.e4-team table,.e4-team tbody{display:block}.e4-team tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:var(--space-3) 0}
.e4-team th{grid-column:1/-1}.e4-team td{text-align:left}.e4-team td::before{content:attr(data-label);display:block;font-size:.8rem;color:var(--muted)}
}

.e46-rules {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.e46-rules a { text-decoration: none; }
.e46-rules strong { color: var(--accent); }
.e46-rules span { color: var(--muted); }

.allocation-page [data-target-matrix] {
  min-width: 0;
  max-width: 100%;
  contain: inline-size;
}
.allocation-page [data-matrix-table] {
  max-width: 100%;
  overflow-x: auto;
}
.allocation-page [data-matrix-table] input {
  width: 6rem;
}

.e5-layout{display:grid;grid-template-columns:minmax(10rem,1fr) minmax(0,4fr);gap:var(--space-4);align-items:start}.e5-kpis{display:grid;gap:var(--space-1);padding:var(--space-3);background:var(--surface);border-radius:var(--radius-md);box-shadow:var(--shadow-card)}.e5-kpis button,.e5-modes button{min-height:var(--touch);padding:var(--space-2);border-radius:var(--radius-sm)}.e5-kpis button{justify-content:space-between}.e5-layout button[aria-pressed=true]{background:var(--accent-tint);color:var(--accent-strong);border-color:var(--accent)}.e5-modes{display:flex;gap:var(--space-2);margin:var(--space-2) 0}.e5-detail #allocation-grid table{min-width:32rem}.e5-detail [data-manual-kpi] label{display:grid;grid-template-columns:minmax(0,1fr) minmax(5rem,8rem);align-items:center;padding:var(--space-2);border-bottom:1px solid var(--line)}@media(max-width:700px){.e5-layout{grid-template-columns:minmax(0,1fr)}.e5-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.e5-kpis h2{grid-column:1/-1}}

.e6-policy .crm-filters{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2)}
.e6-policy .policy-values{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.e6-policy .policy-values :is(th,td){text-align:left;padding:var(--space-1)}
.e6-policy .policy-values input{width:100%;min-width:0;min-height:var(--touch);font-size:1rem}
.e6-policy .policy-values button{min-height:var(--touch);min-width:var(--touch);padding:var(--space-1)}
.e6-policy .commission-policy-section{min-width:0}
@media(min-width:1100px){.e6-policy .commission-policy-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.e6-policy .e6-negative,.e6-policy input[value^="−"],.e6-policy input[value^="-"]{color:var(--danger)}
.e6-policy .e6-rates{display:grid;gap:var(--space-3)}
.e6-policy .e6-rates h4{margin:0;color:var(--muted)}
.e6-policy .e6-rates .policy-values input{min-width:4rem}
@media(min-width:1100px){.e6-policy .e6-rates{grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr))}.e6-policy .e6-rates h3{grid-column:1/-1}}
.c2-content .e6-policy .crm-filters>a{width:var(--touch);flex:0 0 var(--touch)}

.e7-chips{display:flex;flex-wrap:wrap;gap:var(--space-2)}
.e7-chips a{display:inline-flex;align-items:center;min-height:var(--touch);padding-inline:var(--space-3);border-radius:var(--radius-pill);background:var(--surface);color:var(--ink);text-decoration:none}
.e7-chips a[aria-current]{background:var(--accent-tint);color:var(--accent-strong)}
.e7-invite form{display:grid;gap:var(--space-3);margin-block:var(--space-3)}
.e7-table{width:100%;border-collapse:collapse}.e7-table th,.e7-table td{text-align:left;padding:var(--space-2);border-bottom:1px solid var(--line)}
@media(min-width:900px){.e7-invite form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.e7-table,.e7-table tbody{display:block}.e7-table thead{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}.e7-table tr{display:grid;grid-template-columns:1fr 1fr;margin-block:var(--space-3);background:var(--surface-2);border-radius:var(--radius-md)}.e7-table th{grid-column:1/-1}.e7-table td[data-label]::before{content:attr(data-label);display:block;color:var(--muted);font-size:.8rem}}
.e7-head{display:flex;align-items:start;justify-content:space-between;gap:var(--space-2)}
.e7-head details[open]{background:var(--surface);padding:var(--space-2);border-radius:var(--radius-md)}

.shop-calendar .store-month,.e8-tiles{display:grid;gap:var(--space-2)}.shop-calendar .store-month{grid-template-columns:repeat(7,minmax(0,1fr))}.store-weekday{color:var(--muted);font-weight:650}.store-day{border:1px solid var(--line);border-radius:var(--radius-md);padding:var(--space-3);background:var(--surface)}.store-day small{display:block;color:var(--muted)}.store-day header{display:flex;justify-content:space-between}.store-day.is-weekend{background:var(--surface-2)}.store-day.is-holiday,.store-day.has-conflict{border-color:var(--warn);background:var(--warn-tint)}.store-day a{display:inline-flex;align-items:center;min-height:var(--touch)}.e8-tiles{grid-template-columns:repeat(4,minmax(0,1fr))}.e8-tiles b{font-size:1.4rem}.e8-payroll table{min-width:42rem}.e8-payroll td,.e8-payroll th{text-align:start}.e8-payroll .table-wrap{overflow:auto}.e8-payroll td:has(.target-warning){min-width:12rem}@media(max-width:700px){.shop-calendar .store-month{grid-template-columns:repeat(2,minmax(0,1fr))}.store-weekday,.store-empty{display:none}.e8-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}

.schedule-grid .f61-generator-row > td {
  padding: var(--space-3);
  text-align: start;
  white-space: normal;
}

.f61-generator {
  position: sticky;
  left: var(--space-2);
  max-width: min(48rem, calc(100vw - 2rem));
}

.f61-generator-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-2);
}

.f61-generator-fields > * {
  min-width: 0;
}

.crm2 .schedule-day:has(.f61-shift-shop) {
  height: auto;
  min-height: 44px;
  grid-template-rows: minmax(26px, auto) auto;
}

.crm2 .schedule-day .f61-shift-shop {
  grid-column: 1 / -1;
  padding: 0 4px 2px;
  font-weight: 400;
  line-height: 1.25;
  white-space: normal;
}

@media (hover: none) {
  .crm2 [data-generator-day] + [data-shift-menu] {
    opacity: 1;
  }
}

.f66-progress dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: var(--space-3);
  margin: 0;
}

.f66-progress dt {
  font-weight: 600;
}

.f66-progress dd {
  margin-inline-start: 0;
}

.f66-progress dd:first-of-type {
  font-size: 1.25rem;
  font-weight: 700;
}

.f66-progress .f66-attention {
  border-inline-start: 2px solid var(--warn);
  padding-inline-start: var(--space-2);
}

.f66-progress a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.crm2 .f67-leave-label {
  grid-column: 1 / -1;
  padding-inline: var(--space-2);
  color: var(--danger);
  font-weight: 650;
  white-space: normal;
}

.crm2 .schedule-day:has(.f67-leave-label) {
  height: auto;
  grid-auto-rows: minmax(24px, auto);
}

.crm2 .schedule-cell.f67-leave-conflict {
  background: var(--danger-tint);
}

.f70-report {
  margin-inline: auto;
  max-width: 90rem;
  padding: var(--space-4);
}

.f70-actions,
.f70-actions form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.f70-metadata {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--space-2);
}

.f70-metadata dt {
  font-weight: 700;
}

.f70-metadata dd {
  margin-inline-start: 0;
}

.f70-table {
  overflow: auto;
}

@page f70-landscape {
  size: A4 landscape;
  margin: 12mm;
}

@media print {
  .f70-report {
    page: f70-landscape;
    padding: 0;
  }

  .f70-document {
    background: var(--surface);
  }

  .f70-actions {
    display: none;
  }

  .f70-table {
    overflow: visible;
  }

  .f70-table .c2-table {
    display: table;
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 8pt;
  }

  .f70-table thead {
    display: table-header-group;
  }

  .f70-table .c2-table :is(th, td) {
    min-width: 0;
    padding: 2mm 1mm;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .f70-table tr, .f70-metadata div {
    break-inside: avoid;
  }

  .f70-report h2 {
    break-after: avoid;
  }
}

.crm2 .f72-tools { position:relative; }
.crm2 .f72-tools summary { cursor:pointer; min-height:var(--touch); align-content:center; }
.crm2 .f72-tools-panel { position:absolute; right:0; z-index:5; width:min(32rem,85vw); max-height:65vh; overflow:auto; }
.crm2 [data-selection-tools][hidden], .crm2 .schedule-selection:has([data-schedule-edit]:disabled):has([role=status]:empty) { display:none; }
.crm2 dialog.f72-generator { margin:auto; max-height:85vh; width:min(48rem,92vw); overflow:auto; padding:var(--space-4); border:1px solid var(--line); border-radius:var(--radius-lg); }
.crm2 .f72-generator::backdrop { background:rgb(0 0 0 / .45); }
.crm2 .f61-generator-fields { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
.crm2 .f61-generator-fields .field { display:grid; gap:var(--space-1); }
.crm2 .f61-generator-fields .field:has(textarea), .crm2 .f61-generator-fields .field:last-of-type, .crm2 .f61-generator-fields button { grid-column:1/-1; }
.crm2 .f61-generator-fields button { justify-self:end; }
@media(max-width:700px) {
  .crm2 .f61-generator-fields { grid-template-columns:1fr; }
  .crm2 .f72-tools-panel { position:static; width:100%; }
}

.crm2 #shift-help:not(:popover-open) { display:none; }
.crm2 #shift-help:popover-open { margin:auto; max-width:min(32rem,90vw); }
.crm2 .schedule-publish-button { order:1; }

/* Published personal roster: one native table column per value. */
.crm2 [data-readonly="true"] .schedule-grid tbody td {
  height: var(--touch);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.crm2 [data-readonly="true"]:has(.d45-density input:not(:checked)) .schedule-grid tbody td {
  height: calc(var(--touch) + var(--space-2));
}
.crm2 [data-readonly="true"] .schedule-grid tfoot :is(td, th) {
  position: static;
}

.g-kpi-bar { display: flex; align-items: center; min-height: 44px; padding-inline: 2px; }
.g-kpi-bar svg { width: 100%; height: 20px; overflow: visible; fill: var(--accent); }
.g-kpi-bar .g-track { fill: var(--line); }
.g-kpi-bar path { stroke: var(--ink); vector-effect: non-scaling-stroke; }
.g-kpi-bar .g-target { stroke-width: 2px; stroke-dasharray: 4 2; }
.results-sheet tr:target { outline: 2px solid var(--accent); outline-offset: -2px; }
.g-day-progress { width: 100%; accent-color: var(--accent); }
.g-shop-bar { display: block; width: 100%; height: 8px; fill: var(--accent); }
.g-commission { width: 100%; height: 28px; margin-block: 12px; fill: var(--accent); }
.g-commission rect { stroke: var(--surface); vector-effect: non-scaling-stroke; }
.g-commission a:nth-child(even) rect { fill: var(--ink); }
.g-windows { display: flex; flex-wrap: wrap; gap: 8px; }
.g-windows [aria-current] { text-decoration: underline; }
.g-trend { width: min(100%, 640px); max-height: 180px; }
.g-spark { display: block; width: 76px; height: 22px; }
:is(.g-spark, .g-trend) polyline { fill: none; stroke: var(--accent); stroke-width: 2px; vector-effect: non-scaling-stroke; }
:is(.g-spark, .g-trend) circle { fill: var(--ink); }
#vyvoj { min-width: 0; }
#vyvoj td { white-space: nowrap; }
#vyvoj .g-heat-1 { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
#vyvoj .g-heat-2 { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
#vyvoj .g-heat-3 { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.g-shares { width: 120px; height: 120px; }
.g-shares circle { stroke: var(--accent); }
.g-shares a:nth-child(even) circle { stroke: var(--ink); }
.g-shares a:nth-child(n+3) circle { opacity: .75; }
.g-shares a:nth-child(n+5) circle { opacity: .55; }

.g82-editor { margin-block-end: var(--space-4); }
.g82-editor summary { width: fit-content; min-height: var(--touch); align-content: center; cursor: pointer; font-weight: 600; }
.g82-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,20rem),1fr)); gap: var(--space-2) var(--space-4); margin-block-end: var(--space-3); }
.g82-option { display: flex; align-items: center; gap: var(--space-1); border-bottom: 1px solid var(--line); }
.g82-option label { display: flex; align-items: center; gap: var(--space-2); min-height: var(--touch); flex: 1; }
.g82-option button { min-width: var(--touch); min-height: var(--touch); }
[data-day-tile][hidden], .g82-editor[hidden] { display: none !important; }

.h84-kpi-ledger {
  min-width: 0;
}

.h84-kpi-ledger .table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.h84-kpi-ledger tr:target {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.e2-detail:has(.h84-kpi-ledger) {
  display: block;
}

@media (max-width: 959px) {
  .crm2 .k1-contacts .c2-table .c2-cell-actions :is(a, button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    vertical-align: middle;
  }
}

@media (max-width: 959px) {
  .crm2 :is([data-sale-form], [data-lead-form]) > .form-actions {
    position: sticky;
    bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
    z-index: 2;
    gap: var(--space-2);
    padding-block: var(--space-2);
    border-top: 1px solid var(--line);
    background: var(--surface);
  }
  .crm2 :is([data-sale-form], [data-lead-form]) :is(input, select, textarea) {
    scroll-margin-bottom: calc(var(--nav-height) + 7rem + env(safe-area-inset-bottom, 0px));
  }
  .crm2 :is([data-sale-form], [data-lead-form]) > .form-actions :is(button, a) {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

.h88-page { min-width: 0; display: grid; gap: var(--space-4); }
.h88-page .work-task { display: grid; gap: var(--space-2); border-block-end: 1px solid var(--line); padding-block: var(--space-3); overflow-wrap: anywhere; }
.h88-page .row-kind { display: block; color: var(--muted); }
.h88-page .commission-total { font-size: 2rem; font-weight: 700; }
.h88-page .commission-heading, .h88-page .commission-month { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.h88-page .commission-heading { justify-content: space-between; }
.h88-page .commission-estimate dd { margin-inline-start: 0; font-variant-numeric: tabular-nums; }
.h88-page .main-target-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(9rem,1fr)); gap: var(--space-3); }
.h88-page .main-target-summary > div { display: grid; align-content: start; gap: var(--space-1); }
.h88-page .main-target-summary > p { grid-column: 1/-1; }
.h88-page .h88-ranking.c2-table--pin1 :is(th,td):first-child { min-width: 0; }

.quick-sale .sale-extra > summary {
  display: list-item;
  align-content: center;
  min-height: var(--touch);
  cursor: pointer;
  color: var(--accent-strong);
}

.k1-snooze { display: inline; }
.k1-result { width: min(90vw, 28rem); max-height: 85vh; overflow: auto; }

.k1-contacts .c2-table { min-width: 62rem; }
.k1-contacts .c2-table th:first-child { width: 10rem; }
.k1-contacts .c2-table th:nth-child(2) { width: 12rem; }
.k1-contacts .c2-table th:nth-child(3) { width: 9rem; }
.k1-contacts .c2-table th:last-child { width: 12rem; }

/* Libela: poznámka nesmí odtlačit akce za okraj */
.k1-contacts .c2-table td:nth-child(6), .k1-contacts .c2-table th:nth-child(6) { max-width: 200px; }
.k1-contacts .c2-table tbody td:nth-child(2) a { color: var(--ink); }

.guided-help {
  box-sizing: border-box;
  max-width: 32rem;
  margin: var(--space-2, .5rem) 0;
  padding: var(--space-3, .75rem);
  color: var(--ink);
  background: var(--surface, var(--panel));
  border: 2px solid var(--accent);
  border-radius: var(--radius-md, .5rem);
}
.guided-help[hidden] { display: none; }
.guided-help button, [data-guide-start], .guide-question summary { min-height: var(--touch, 44px); }
.guide-current { outline: 3px solid var(--accent); outline-offset: 2px; }
[data-guide-menu] nav { display: flex; gap: var(--space-2, .5rem); flex-wrap: wrap; }
.guide-question { margin: var(--space-2, .5rem) 0; }
.guide-question summary { cursor: pointer; width: fit-content; }
.guide-editor fieldset { min-width: 0; margin-block: var(--space-3, .75rem); }
.guide-editor select, .guide-editor textarea { max-width: 100%; }

.seller-sales header, .seller-sales-tabs, .seller-sale {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.seller-sales header, .seller-sale { justify-content: space-between; }
.seller-sales header { flex-wrap: wrap; padding-bottom: var(--space-3); }
.seller-sales header h2, .seller-sales ul { margin: 0; }
.seller-sales ul { list-style: none; padding: 0; }
.seller-sales-tabs { flex-wrap: wrap; }
.seller-sales-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding-inline: var(--space-3);
  border-radius: var(--radius-pill);
  color: var(--ink);
  background: var(--surface-2);
  text-decoration: none;
}
.seller-sales-tabs a[aria-current] { background: var(--accent); color: var(--accent-ink); }
.seller-sale, .seller-sales-empty { border-top: 1px solid var(--line); padding: var(--space-3) var(--space-2); }
.seller-sale { min-height: var(--touch); color: var(--ink); text-decoration: none; }
.seller-sale:hover { background: var(--surface-2); }
.seller-sale > span { display: grid; gap: var(--space-1); min-width: 0; overflow-wrap: anywhere; }
.seller-sale > span:last-child { justify-items: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.seller-sale small:not(.c2-tag) { color: var(--muted); }
.seller-sales-options { min-width: 0; }
.seller-sales-options > summary { cursor: pointer; padding: var(--space-3); min-height: var(--touch); font-weight: 600; }
.seller-order-number { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }

.crm2 .admin-page .admin-tabs,
.crm2 .admin-page .admin-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
.crm2 .admin-page .admin-tabs a,
.crm2 .admin-page .admin-links a {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--touch);
}
.crm2 .admin-page .admin-links { align-items: stretch; flex-direction: column; }
.crm2 .admin-page .admin-metrics,
.crm2 .admin-page .admin-columns {
  display: grid;
  gap: var(--space-4);
  margin-block: var(--space-4);
}
.crm2 .admin-page .admin-metrics article {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.crm2 .admin-page .admin-columns > * { min-width: 0; }
@media (min-width: 800px) {
  .crm2 .admin-page .admin-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .crm2 .admin-page .admin-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* T1 Směny – rozpis z CRM 1 (dny × lidé, Z/K/P/ČH/Typ) ve vzhledu CRM 2.0 (tabulkový standard, docs/design/TABULKY.md).
   Šablona workspace/roster_grid.html a ovládání schedule.js beze změny; tady jen vzhled. */
.crm2 .schedule-shell { display: block; }
.crm2 .schedule-sidebar { display: none; }
.crm2 .schedule-main { padding: 0; display: grid; gap: 12px; min-width: 0; }

/* hlavička: název · ‹ měsíc › · prodejna · zveřejnit – v jednom řádku */
.crm2 .schedule-header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.crm2 .schedule-header h1 { font: 700 22px/28px var(--font-sans); margin: 0 8px 0 0; }
.crm2 .schedule-header h1 span { font-weight: 400; color: var(--muted); }
.crm2 .schedule-month { display: inline-flex; align-items: center; min-height: 40px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.crm2 .schedule-month > a { display: grid; place-items: center; width: 40px; height: 40px; font-size: 22px; text-decoration: none; color: var(--accent); }
.crm2 .schedule-month-label { position: relative; min-width: 150px; text-align: center; font: 650 15px/20px var(--font-sans); text-transform: capitalize; cursor: pointer; margin: 0; }
.crm2 .schedule-month-label input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; }
.crm2 .schedule-shop { display: flex; align-items: center; gap: 6px; margin: 0; }
.crm2 .schedule-shop select { min-height: 40px; max-width: 320px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.crm2 .schedule-shop button { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); font-weight: 600; cursor: pointer; }
.crm2 .schedule-publish-button { margin-left: auto; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 0; border-radius: var(--radius-md);
  background: var(--accent); color: var(--accent-ink); font: 650 14px/1 var(--font-sans); text-decoration: none; box-shadow: var(--shadow-hard); cursor: pointer; }

/* nástroje, zobrazení, legenda – čipy */
.crm2 .schedule-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crm2 .schedule-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crm2 .schedule-quick strong { font: 600 12px/16px var(--font-sans); color: var(--muted); margin-right: 2px; }
.crm2 .schedule-tool { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--ink-2); font: 600 13px/1 var(--font-sans); text-decoration: none; cursor: pointer; }
.crm2 .schedule-tool.is-active { border-color: var(--accent); background: var(--accent-tint); color: var(--accent); }
.crm2 .schedule-display { display: inline-flex; align-items: center; font-size: 12px; color: var(--muted); }
.crm2 .schedule-display > span { margin-right: 6px; }
.crm2 .schedule-display button { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; cursor: pointer; }
.crm2 .schedule-display button:first-of-type { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.crm2 .schedule-display button:last-of-type { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: 0; }
.crm2 .schedule-display button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.crm2 .schedule-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; font-size: 12px; color: var(--muted); }
.crm2 .schedule-legend > span::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; border: 1px solid var(--line); }
.crm2 .weekend-key::before { background: var(--warn-tint); }
.crm2 .holiday-key::before { background: var(--danger-tint); }
.crm2 .leave-key::before { background: var(--pending-tint); }
.crm2 .offline-key::before { background: var(--surface-2); }
.crm2 .management-key::before { background: var(--ok-tint); }
.crm2 .comp-key::before { background: var(--accent-tint); }
.crm2 .schedule-filters { font-size: 13px; color: var(--muted); }
.crm2 .schedule-filters > summary { cursor: pointer; padding: 4px 0; }
.crm2 .schedule-help { font-size: 12px; color: var(--muted); margin: 0; }
.crm2 .schedule-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.crm2 .schedule-selection > span { flex: 1; color: var(--muted); }
.crm2 .schedule-selection button { min-height: 34px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; }
.crm2 .schedule-selection button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.crm2 .schedule-selection button:disabled { opacity: .4; cursor: not-allowed; }
.crm2 .schedule-coverage-warning { padding: 10px 14px; border-radius: var(--radius-md); background: var(--warn-tint); color: var(--ink); font-size: 13px; }
.crm2 .schedule-coverage-warning ul { margin: 4px 0 0; padding-left: 18px; columns: 2; }

/* kolegové na směně (prodejce): kompaktně, ne nekonečný seznam */
.crm2 .schedule-main > .c2-card { max-height: 240px; overflow: auto; gap: 0; padding: 12px 16px; }
.crm2 .schedule-main > .c2-card h2 { font: 650 15px/20px var(--font-sans); margin-bottom: 6px; }
.crm2 .schedule-main > .c2-card > div { display: grid; grid-template-columns: 76px 1fr; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); font-size: 13px; }

/* TABULKA – stejné řádky, mřížka, lepivá hlavička a dny */
.crm2 .schedule-scroll { max-height: calc(100vh - 230px); min-height: 280px; overflow: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.crm2 .schedule-grid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; table-layout: fixed;
  font: 400 13px/1 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--ink); }
.crm2 .schedule-grid th, .crm2 .schedule-grid td { padding: 0; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.crm2 .schedule-grid thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); color: var(--muted); font: 650 11px/14px var(--font-sans); letter-spacing: .03em; }
.crm2 .schedule-grid thead tr:first-child th { height: 44px; }
.crm2 .schedule-grid thead tr:nth-child(2) th { top: 44px; height: 24px; }
.crm2 .schedule-grid .schedule-person { min-width: 260px; padding: 4px 8px; color: var(--ink); font: 650 13px/16px var(--font-sans); text-transform: none; letter-spacing: 0; border-right: 2px solid var(--line); }
.crm2 .schedule-grid .schedule-person a { color: inherit; text-decoration: none; }
.crm2 .schedule-grid .schedule-person small { display: block; margin-top: 2px; font: 400 11px/13px var(--font-sans); color: var(--muted); }
.crm2 .schedule-grid .schedule-fund-warning { color: var(--danger) !important; }
.crm2 .schedule-grid .tone-mint, .crm2 .schedule-grid .tone-yellow, .crm2 .schedule-grid .tone-blue, .crm2 .schedule-grid .tone-purple { box-shadow: inset 0 3px 0 var(--accent); }
.crm2 .schedule-grid .schedule-weekday { position: sticky; left: 0; z-index: 2; width: 40px; min-width: 40px; background: var(--surface); font-weight: 600; }
.crm2 .schedule-grid .schedule-date { position: sticky; left: 41px; z-index: 2; width: 60px; min-width: 60px; background: var(--surface); font-weight: 600; box-shadow: 1px 0 0 var(--line); }
.crm2 .schedule-grid thead .schedule-weekday, .crm2 .schedule-grid thead .schedule-date { z-index: 5; background: var(--surface-2); }
.crm2 .schedule-grid tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.crm2 .schedule-grid tbody tr:hover td, .crm2 .schedule-grid tbody tr:hover th { background: var(--accent-tint); }
.crm2 .schedule-grid .schedule-weekend > th, .crm2 .schedule-grid .schedule-weekend > td { background: var(--warn-tint); }
.crm2 .schedule-grid .schedule-holiday > th, .crm2 .schedule-grid .schedule-holiday > td { background: var(--danger-tint); }
.crm2 .schedule-uncovered-mark { color: var(--danger); font-weight: 700; }

/* buňka dne: Z | K | P | ČH | Typ – pevná výška řádku */
.crm2 .schedule-cell { position: relative; }
.crm2 .schedule-day { display: grid; grid-template-columns: 46px 46px 40px 46px minmax(84px, 1fr); width: 100%; min-width: 260px; height: 32px; min-height: 0;
  padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; align-items: stretch; cursor: pointer; }
.crm2 .schedule-day[disabled] { cursor: default; }
.crm2 .schedule-day > span { display: flex; align-items: center; justify-content: center; padding: 0 2px; border-right: 1px solid var(--line); }
.crm2 .schedule-day > span:last-child { border-right: 0; }
.crm2 .schedule-type { font: 600 12px/1 var(--font-sans); }
.crm2 .kind-work .schedule-type { color: var(--ok); background: var(--ok-tint); }
.crm2 .kind-mgmt .schedule-type { color: var(--ink-2); background: var(--ok-tint); }
.crm2 .kind-offline .schedule-type { color: var(--muted); }
.crm2 .kind-leave .schedule-type { color: var(--pending); background: var(--pending-tint); }
.crm2 .kind-holiday .schedule-type { color: var(--danger); background: var(--danger-tint); }
.crm2 .kind-holiday_comp .schedule-type { color: var(--accent); background: var(--accent-tint); }
.crm2 .kind-sick .schedule-type { color: var(--warn); background: var(--warn-tint); }
.crm2 .kind-empty .schedule-type { color: var(--muted); }
.crm2 .schedule-day[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-tint); position: relative; z-index: 1; }
.crm2 .schedule-day:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.crm2 .schedule-row-menu { position: absolute; right: 2px; top: 4px; min-height: 24px; height: 24px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 12px; opacity: 0; cursor: pointer; }
.crm2 .schedule-cell:hover .schedule-row-menu, .crm2 .schedule-row-menu:focus { opacity: 1; }

/* souhrn dole */
.crm2 .schedule-grid tfoot th, .crm2 .schedule-grid tfoot td { background: var(--surface-2); border-top: 2px solid var(--line); vertical-align: top; }
.crm2 .schedule-grid .schedule-summary-label { position: sticky; left: 0; z-index: 2; min-width: 101px; padding: 8px; font: 650 13px/18px var(--font-sans); text-align: left; }
.crm2 .schedule-totals, .crm2 .schedule-benefit-cell { padding: 6px 10px !important; text-align: left !important; }
.crm2 .schedule-totals dl, .crm2 .schedule-employment-totals { margin: 0; font-size: 12px; }
.crm2 .schedule-totals dl > div, .crm2 .schedule-employment-totals > div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.crm2 .schedule-totals dd, .crm2 .schedule-employment-totals dd { margin: 0; font-weight: 650; }
.crm2 .schedule-totals dt, .crm2 .schedule-employment-totals dt { color: var(--ink-2); }
.crm2 .schedule-benefits-link { font-size: 12px; font-weight: 600; text-decoration: none; }
.crm2 .schedule-employment-label { position: sticky; left: 0; z-index: 2; padding: 8px; text-align: left; font-size: 12px; }

/* souhrnné zobrazení (jen typ + hodiny) */
.crm2 .schedule-summary-mode .schedule-grid .schedule-time { display: none; }
.crm2 .schedule-summary-mode .schedule-day { grid-template-columns: 52px minmax(96px, 1fr); min-width: 148px; }
.crm2 .schedule-summary-mode .schedule-grid .schedule-person { min-width: 148px; }

/* editor (dialog) ve světlém vzhledu */
.crm2 .schedule-dialog { width: min(1100px, 95vw); max-width: 95vw; height: 90vh; padding: 0; overflow: hidden; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sheet); }
.crm2 .schedule-dialog[open] { display: flex; flex-direction: column; }
.crm2 .schedule-dialog::backdrop { background: rgba(20, 17, 17, .45); }
.crm2 .schedule-dialog-heading, .crm2 .schedule-dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.crm2 .schedule-dialog-footer { border-top: 1px solid var(--line); border-bottom: 0; }
.crm2 .schedule-dialog-heading h2 { font: 700 18px/24px var(--font-sans); }
.crm2 .schedule-editor-content { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
.crm2 .schedule-dialog-note { margin: 0; padding: 8px 16px; font-size: 12px; background: var(--surface-2); }

/* mobil: jeden člověk najednou (výběr nad tabulkou), řádky stejně vysoké */
.crm2 .schedule-mobile-person { display: none; }
@media (max-width: 700px) {
  .crm2 .schedule-header h1 { width: 100%; font-size: 20px; }
  .crm2 .schedule-shop { flex: 1 1 100%; }
  .crm2 .schedule-shop select { flex: 1; max-width: none; }
  .crm2 .schedule-legend { margin-left: 0; }
  .crm2 .schedule-mobile-person { display: flex; align-items: center; gap: 10px; font: 600 13px/16px var(--font-sans); }
  .crm2 .schedule-mobile-person select { flex: 1; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
  .crm2 .schedule-grid .mobile-person-hidden { display: none !important; }
  .crm2 .schedule-scroll { max-height: 70vh; margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .crm2 .schedule-grid .schedule-weekday { width: 34px; min-width: 34px; }
  .crm2 .schedule-grid .schedule-date { left: 35px; width: 50px; min-width: 50px; }
  .crm2 .schedule-day { grid-template-columns: repeat(4, minmax(40px, 1fr)) minmax(70px, 1.4fr); min-width: 0; height: 36px; }
  .crm2 .schedule-grid .schedule-person { min-width: 0; }
  .crm2 .schedule-coverage-warning ul { columns: 1; }
  .crm2 .schedule-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
}

/* dlouhý seznam nepokrytých dnů nesmí odtlačit tabulku */
.crm2 .schedule-coverage-warning ul { max-height: 96px; overflow: auto; }
.crm2 .schedule-main > .c2-card { order: 10; }
.crm2 .schedule-main > .schedule-header { order: -1; }
.crm2 .schedule-grid th, .crm2 .schedule-grid td { vertical-align: middle; }
@media (max-width: 700px) {
  .crm2 .schedule-grid { width: 100%; min-width: 0; }
  .crm2 .schedule-grid thead tr:nth-child(2) th { min-width: 0; }
  .crm2 .schedule-day { grid-template-columns: 44px 44px 36px 40px minmax(0, 1fr); }
  .crm2 .schedule-type { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
}

.c2-content .t2-page {
  grid-template-columns: minmax(0, 1fr);
}

.t2-page .sales-list42 {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
}

.t2-page .sales-content42.sales-with-detail42 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
}

@media (min-width: 960px) {
  .t2-page .sales-content42.sales-with-detail42 {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 24%);
  }
}

.t2-sales .t2-service,
.t2-sales .t2-kpi {
  min-width: 8rem;
  max-width: 14rem;
}

.t2-sales :is(.sheet-head-date, .t2-date, .sheet-head-status, .t2-status) {
  min-width: 7rem;
}

.t2-sales :is(.sheet-head-amount, .t2-amount) {
  min-width: 9rem;
}

.t2-sales .t2-order {
  min-width: 11rem;
}

/* Libela: částky se nikdy nezkracují */
.t2-sales td.num, .t2-sales th.num { min-width: 6.5rem; max-width: none; text-overflow: clip; }

.e7-people .c2-table th:first-child { min-width: 10rem; }
.e7-people .e7-chips { flex-wrap: nowrap; overflow-x: auto; }
.e7-people .e7-chips a { white-space: nowrap; }
.t3-reminder:popover-open {
  display: grid;
  gap: var(--space-3);
  box-sizing: border-box;
  width: min(28rem, calc(100% - 2 * var(--space-4)));
  height: fit-content;
  max-height: calc(100dvh - 2 * var(--space-4));
  overflow: auto;
  white-space: normal;
  overflow-wrap: anywhere;
  margin: auto;
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sheet);
}
.t3-reminder :is(h3, p) { margin: 0; }
.t3-reminder button { justify-self: end; }

.e8-payroll .c2-table :is(td, th):first-child { min-width: 160px; max-width: none; }
.e8-payroll .c2-table tbody td:first-child a { color: inherit; }
.e8-payroll .c2-table tbody td:first-child a:is(:hover, :focus-visible) { text-decoration: underline; color: var(--accent); }
.e8-payroll [data-c2-table="ucetni-2"] :is(td, th):last-child { min-width: 200px; white-space: normal; }

.t5-team .c2-table thead th {
  width: 7rem;
}

.t5-team .c2-table thead th:first-child {
  width: 12rem;
}

.c2-table th.c2-sortable[data-sort-priority]::after { content: attr(data-sort-priority); }
.c2-table-tools label[hidden] { display: none; }
.c2-table-tools button[aria-pressed=true] { background: var(--accent-tint); color: var(--accent-strong); }
.c2-table-print { display:none; }
@media print {
  body:has(> .c2-table-print) > :not(.c2-table-print) { display:none !important; }
  body > .c2-table-print { display:block; }
  .c2-table-print table { width:100%; border-collapse:collapse; font-size:9pt; }
  .c2-table-print th,.c2-table-print td { padding:3pt; border:1px solid var(--line); overflow-wrap:anywhere; }
  .c2-table-print thead { display:table-header-group; }
  .c2-table-print tr { break-inside:avoid; }
}

.ux-day-actions{display:flex;flex-wrap:wrap;gap:var(--space-2)}
.ux-day-actions a{flex:1;white-space:nowrap}
.ux-payroll-people,.ux-ledger-switch{display:none}
@media(min-width:761px){
  .sales-sheet .ux-ledger-switch{display:inline-flex;align-items:center;gap:var(--space-2);min-height:var(--touch)}
  .ux-ledger-switch input{width:auto}
  .sales-sheet:has(.ux-ledger-switch input:not(:checked)) :is(.sheet-number,.sheet-head-type,.sheet-type,.sheet-quantity,.sheet-kind,.sheet-order-number,.sale-gk-cell,.ledger-note,.ux-id,[data-label="CA"],[data-label="ID služby"],[data-label="EBS"]){display:none}
  .sales-sheet:has(.ux-ledger-switch input:not(:checked)) .sale-service-cell a .sheet-mobile-only{display:inline}
  .sales-sheet:has(.ux-ledger-switch input:not(:checked)) table{table-layout:auto;min-width:0}
  .sales-sheet:has(.ux-ledger-switch input:checked) table{min-width:68rem}
}
@media(max-width:760px){
  .e8-payroll .ux-payroll-table{display:none}
  .e8-payroll .ux-payroll-people{display:grid;gap:var(--space-2)}
  .ux-payroll-people summary{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);min-height:var(--touch);cursor:pointer}
  .ux-payroll-people summary::after{content:"⌄"}.ux-payroll-people details[open] summary::after{content:"⌃"}
  .ux-payroll-people dl{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-2);padding:var(--space-2)}
  .ux-payroll-people dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}
}

.evening { max-width: 75rem; margin-inline: auto; }
.evening-tools { display: flex; align-items: end; flex-wrap: wrap; gap: var(--space-3); margin-block: var(--space-4); }
.evening-tools label { display: grid; gap: var(--space-1); min-width: 0; max-width: 100%; }
.evening-tools :is(select,input) { max-width: 100%; min-height: 44px; font-size: 1rem; }
.evening-sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); }
.evening-sheet header { border-top: var(--space-1) solid var(--accent); padding-top: var(--space-3); }
.evening-sheet h2 { overflow-wrap:anywhere; }
.evening-sheet h3 { margin-block: var(--space-2); }
.evening-score,.evening-kpis { display: grid; gap: var(--space-3); }
.evening-score { grid-template-columns:repeat(2,minmax(0,1fr)); margin-block:var(--space-4); }
.evening-score > div { background: var(--accent-tint); padding: var(--space-3); border-radius:var(--radius-sm); }
.evening-score strong { display:block; font-size:1.5rem; color:var(--accent-strong); }
.evening-kpis { grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr)); }
.evening-kpis section { border-top:1px solid var(--line); }
.evening-sheet dl {display:grid; grid-template-columns:minmax(0,1fr) auto; gap:var(--space-1) var(--space-2);}
.evening-sheet dd {margin:0; text-align:right; font-variant-numeric:tabular-nums;}
@media print { .evening-tools, .evening > a {display:none;} .evening-kpis section {break-inside:avoid;} }
#evening-preview { width:100%; max-height:78vh; object-fit:contain; object-position:left top; }
#evening-detail > summary { padding-block:var(--space-3); cursor:pointer; }
#evening-screen[open] { position:fixed; inset:0; width:100vw; height:100dvh; max-width:none; max-height:none; margin:0; padding:0; border:none; background:var(--surface); }
#evening-screen img { width:100%; height:100%; object-fit:contain; }
#evening-screen button { position:absolute; top:0; right:0; width:44px; height:44px; border:0; background:var(--surface); color:var(--muted); font-size:1.5rem; }
@media(max-width:650px){ #evening-preview {max-height:none;} }

.crm2 table:is([data-c2-table="kontakty"], [data-c2-table="lide"]):not(.c2-table--dense)
  tbody > tr > :is(th, td) {
  padding-block: var(--space-1);
}

@media (max-width: 959px) {
  .crm2 table:is([data-c2-table="prodeje"], [data-c2-table^="vysledky-"], [data-c2-table="ucetni"])
    tbody > tr > :is(th, td) {
    height: var(--touch);
  }

  .crm2 table.c2-table--dense:is([data-c2-table="prodeje"], [data-c2-table^="vysledky-"], [data-c2-table="ucetni"])
    tbody > tr > :is(th, td) {
    height: var(--space-8);
  }

  .crm2 table[data-c2-table="prodeje"]:not(.c2-table--dense) tbody :is(th, td) {
    height: calc(var(--touch) + var(--space-2));
  }

  .crm2 table[data-c2-table="prodeje"] .c2-cell-actions :is(a, button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--touch);
    min-width: var(--touch);
  }
}

.dev-feedback-tools {
    position: fixed;
    z-index: 45;
    inset-inline: 0;
    bottom: 12px;
    width: max-content;
    margin-inline: auto;
    display: flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid #34535a;
    border-radius: 8px;
    background: #11232d;
}
.dev-feedback-tools > button { min-height: 30px; padding: 3px 8px; font-size: .75rem; background: #172e38; }
.dev-feedback-tools [data-feedback-pick][aria-pressed=true] { color: #ffd3d8; border-color: #ea7279; }
.dev-feedback-hover { outline: 1px dotted #ff8791 !important; outline-offset: -1px; cursor: crosshair !important; }
.dev-feedback-tools [data-feedback-marks] { position: fixed; inset: auto; pointer-events: none; }
.dev-feedback-tools [data-feedback-marks] span {
    position: fixed;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fa6978;
    box-shadow: 0 0 0 1px #07151c;
    pointer-events: none;
}
.dev-feedback-dialog {
    width: min(490px, calc(100vw - 24px));
    max-height: 82dvh;
    padding: 14px;
    border: 1px solid #406873;
    border-radius: 10px;
    background: #132630;
    color: #e8f5f7;
}
.dev-feedback-dialog::backdrop { background: #07141ba3; }
.dev-feedback-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dev-feedback-dialog h2 { margin: 0; font-size: 1.05rem; }
.dev-feedback-dialog [data-feedback-entries] { margin-top: 12px; }
.dev-feedback-dialog ol { padding-left: 20px; }
.dev-feedback-dialog li { margin-block: 12px; overflow-wrap: anywhere; }
.dev-feedback-dialog li p { white-space: pre-wrap; margin-top: 4px; }
@media (max-width: 700px) {
    .dev-feedback-tools { bottom: calc(60px + env(safe-area-inset-bottom)); }
}
