/* ════════════════════════════════════════════════════════
   HINST CRM — liquid glass, šedo-červená
   Tmavý grafitový podklad, skleněné vrstvy, červená z loga hinst.cz.
   ════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;
  --bg: #0c0c0d;
  --ink: #f3f2f0;
  --ink-2: rgba(243, 242, 240, .74);
  --muted: rgba(243, 242, 240, .54);
  --faint: rgba(243, 242, 240, .08);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --red: #e2313d;
  --red-2: #ff6b74;
  --red-d: #be1622;
  --red-glow: rgba(226, 49, 61, .55);
  --steel: #b9bcc2;
  --steel-2: #8b8f97;
  --ok: #7fd9a4;
  --warn: #ffc26e;
  --info: #9cc3ff;
  --dark: #121213;
  --blur: blur(26px) saturate(160%);
  --r-xl: 30px;
  --r-lg: 22px;
  --side: 248px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Urbanist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--font); font-feature-settings: "tnum"; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.01em; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
a:not([class]):hover { color: var(--red-2); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red-2); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--red); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; }
.skip:focus { top: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.late { color: var(--red-2) !important; font-weight: 600; }
.inline { display: inline; }
.pad { padding: 0 22px 20px; }
.pad-x { padding: 0 22px 16px; }
.pad-lg { padding: 24px 26px; }
code { font: .86em ui-monospace, Menlo, monospace; background: var(--faint); padding: .1em .4em; border-radius: 6px; }

/* ─── Ikony (Material Symbols) ──────────────────────── */
.ms { font-family: "Material Symbols Outlined"; font-weight: 300; font-style: normal; font-size: 20px; line-height: 1; display: inline-block;
  text-transform: none; letter-spacing: normal; white-space: nowrap; direction: ltr; flex: none; user-select: none; vertical-align: middle;
  font-feature-settings: "liga"; font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24; -webkit-font-smoothing: antialiased; }
.ms--xs { font-size: 15px; margin-right: 3px; }
.h-ic { font-size: 30px; color: var(--red-2); margin-right: 8px; vertical-align: -5px; }

/* ─── Pozadí: aurora ─────────────────────────────────── */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background:
  radial-gradient(110% 80% at 0% 0%, #2a1013 0%, transparent 55%),
  radial-gradient(90% 70% at 100% 100%, #1d1e22 0%, transparent 60%),
  linear-gradient(180deg, #111113, #0b0b0c); }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); }
.aurora i:nth-child(1) { width: 50vw; height: 50vw; left: -14vw; top: -22vw; background: radial-gradient(circle, #7d1219, transparent 65%); opacity: .6; animation: drift 28s var(--ease) infinite alternate; }
.aurora i:nth-child(2) { width: 42vw; height: 42vw; right: -12vw; bottom: -20vw; background: radial-gradient(circle, #3b3e46, transparent 65%); opacity: .55; animation: drift 34s var(--ease) infinite alternate-reverse; }
.aurora i:nth-child(3) { width: 26vw; height: 26vw; left: 46vw; top: 28vh; background: radial-gradient(circle, #4a161b, transparent 70%); opacity: .35; }
@keyframes drift { to { transform: translate3d(6vw, 4vh, 0) scale(1.08); } }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ─── Liquid glass ───────────────────────────────────── */
.sidebar, .card, .kpi, .lcard, .dialog, .menu__list, .picker__list, .quick, .toast, .tpl, .profile, .lhead, .doced__bar, .week, .login__card, .mini, .kind-chip {
  position: relative;
  background: linear-gradient(150deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,.025) 38%, rgba(255,255,255,.015) 62%, rgba(255,255,255,.045) 100%);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), inset 0 -1px 0 rgba(0,0,0,.35), inset 0 0 22px rgba(255,255,255,.02), 0 24px 60px -28px rgba(0,0,0,.8);
}
/* lom světla na hraně */
.sidebar::before, .card::before, .kpi::before, .lcard::before, .dialog::before, .tpl::before, .profile::before, .lhead::before, .login__card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: linear-gradient(140deg, rgba(255,255,255,.3), rgba(255,255,255,.05) 30%, rgba(255,255,255,.02) 60%, rgba(255,255,255,.12));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.menu__list, .picker__list, .quick, .dialog, .toast { background: rgba(24, 24, 26, .94); }

/* ─── Kostra ────────────────────────────────────────── */
.sidebar { position: fixed; z-index: 30; left: 14px; top: 14px; bottom: 14px; width: var(--side); border-radius: var(--r-xl); display: flex; flex-direction: column; padding: 24px 14px 14px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 28px; }
.brand img { width: 150px; height: auto; }
.brand__crm { font-size: 10px; font-weight: 800; letter-spacing: .2em; color: #fff; background: linear-gradient(135deg, var(--red-2), var(--red-d)); border-radius: 6px; padding: 3px 6px 2px; box-shadow: 0 6px 16px -6px var(--red-glow); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav__item { position: relative; display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 14px; border-radius: 16px; color: var(--ink-2); font-weight: 500; transition: background .25s var(--ease), color .25s var(--ease); }
.nav__item .ms { font-size: 23px; }
.nav__item:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.nav__item.is-active { color: #fff; background: radial-gradient(120% 140% at 30% 0%, #ff7880, var(--red) 55%, var(--red-d));
  box-shadow: 0 12px 28px -10px var(--red-glow), inset 0 1px 0 rgba(255,255,255,.4), inset 0 -2px 6px rgba(0,0,0,.18); }
.nav__item.is-active .ms { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
.nav__badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--red); color: #fff; }
.nav__item.is-active .nav__badge { background: #fff; color: var(--red-d); }
.sidebar__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 20px; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1px var(--line); }
.me__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; flex: 1; }
.me__text strong { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me__text small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.shell { margin-left: calc(var(--side) + 28px); padding: 22px 28px 60px 14px; min-height: 100dvh; max-width: 1720px; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.topbar__logo { display: none; }
.topbar__actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.main:focus { outline: none; }

/* hledání */
.search { position: relative; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; border-radius: 999px; width: min(520px, 100%);
  background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.025)); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 0 1px rgba(255,255,255,.07), 0 10px 30px -18px rgba(0,0,0,.8); }
.search:focus-within { box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 0 1px rgba(226,49,61,.6), 0 0 0 4px rgba(226,49,61,.14); }
.search .ms { color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }
.search kbd { font: 600 11px var(--font); color: var(--muted); padding: 3px 8px; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--line-2); }
.quick { position: absolute; top: calc(100% + 8px); left: 0; right: 0; border-radius: 18px; overflow: hidden; z-index: 40; padding: 6px; }

/* ─── Tlačítka ──────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border: 0; border-radius: 999px;
  font-weight: 600; font-size: 14.5px; white-space: nowrap; transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease); }
.btn:active { transform: scale(.97); }
.btn .ms { font-size: 20px; }
.btn--primary { color: #fff; background: radial-gradient(120% 160% at 30% 0%, #ff7880, var(--red) 55%, var(--red-d));
  box-shadow: 0 12px 30px -12px var(--red-glow), inset 0 1px 0 rgba(255,255,255,.4), inset 0 -2px 6px rgba(0,0,0,.18); }
.btn--primary:hover { box-shadow: 0 16px 38px -12px rgba(226,49,61,.75), inset 0 1px 0 rgba(255,255,255,.4); }
.btn--ghost, .btn--light { color: var(--ink); background: linear-gradient(160deg, rgba(255,255,255,.11), rgba(255,255,255,.035));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1px rgba(255,255,255,.08); }
.btn--ghost:hover, .btn--light:hover { background: linear-gradient(160deg, rgba(255,255,255,.17), rgba(255,255,255,.06)); }
.btn--danger { color: var(--red-2); background: rgba(226,49,61,.1); box-shadow: inset 0 0 0 1px rgba(226,49,61,.3); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13.5px; gap: 6px; }
.btn--sm .ms { font-size: 18px; }
.btn--block { width: 100%; height: 50px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; border: 0; color: var(--ink-2);
  background: linear-gradient(160deg, rgba(255,255,255,.1), rgba(255,255,255,.03)); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1px rgba(255,255,255,.07);
  transition: background .2s, transform .2s var(--ease), color .2s; }
.icon-btn:hover { color: var(--ink); background: linear-gradient(160deg, rgba(255,255,255,.17), rgba(255,255,255,.06)); }
.icon-btn:active { transform: scale(.94); }
.icon-btn--sm { width: 34px; height: 34px; }
.icon-btn--sm .ms { font-size: 18px; }
.icon-btn--dark { width: 34px; height: 34px; }
.icon-btn--call:hover { color: var(--ok); }
.icon-btn--mail:hover { color: var(--info); }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--red-2); font-weight: 600; font-size: 14px; }
.link .ms { font-size: 17px; transition: transform .2s var(--ease); }
.link:hover .ms { transform: translateX(3px); }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.crumb .ms { font-size: 17px; }
.crumb:hover { color: var(--ink); }

/* menu „Nový“ */
.menu { position: relative; }
.menu__list { position: absolute; right: 0; top: calc(100% + 8px); border-radius: 20px; padding: 6px; min-width: 230px; z-index: 40; display: flex; flex-direction: column; }
.menu__list > * { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 0; background: none; border-radius: 14px; text-align: left; font-weight: 500; color: var(--ink); }
.menu__list > *:hover, .menu__list > *:focus-visible { background: rgba(255,255,255,.07); }
.menu__list .ms { color: var(--red-2); }

/* ─── Karty a hlavičky ──────────────────────────────── */
.card { border-radius: var(--r-xl); margin-bottom: 18px; min-width: 0; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; flex-wrap: wrap; }
.card__head h2, .h2 { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 500; }
.card__head h2 > .ms:first-child, .h2 > .ms:first-child { width: 34px; height: 34px; border-radius: 12px; display: inline-grid; place-items: center; font-size: 19px; color: #ffb3b8;
  background: linear-gradient(150deg, rgba(226,49,61,.3), rgba(226,49,61,.08)); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 0 1px rgba(226,49,61,.22); }
.h2 { margin-bottom: 16px; }
.sub { display: flex; align-items: center; gap: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; padding: 0 22px; margin: 2px 0 6px; font-weight: 600; }
.sub--warn { color: var(--red-2); }
.count { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--faint); border-radius: 99px; padding: 2px 9px; vertical-align: middle; letter-spacing: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(34px, 3.4vw, 52px); font-weight: 300; letter-spacing: -.035em; line-height: 1.05; }
.page-head h1 .count { font-size: 14px; vertical-align: 10px; }
.page-head p { margin-top: 6px; color: var(--muted); }
.page-head__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 600; }
.lead { font-size: 16px; color: var(--ink-2); margin-bottom: 20px; }

.cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cols--detail { grid-template-columns: minmax(0, 1fr) 370px; }
.cols--detail .col--side { order: 2; }
.cols--detail:has(.col--side:first-child) { grid-template-columns: 350px minmax(0, 1fr); }
.cols--detail:has(.col--side:first-child) .col--side { order: 0; }
.col { min-width: 0; }

/* ─── Přehled ───────────────────────────────────────── */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-radius: var(--r-xl); padding: 30px 32px; margin-bottom: 18px; position: relative; overflow: hidden;
  background: linear-gradient(150deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,.025) 38%, rgba(255,255,255,.015) 62%, rgba(255,255,255,.045) 100%);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), inset 0 -1px 0 rgba(0,0,0,.35), inset 0 0 22px rgba(255,255,255,.02), 0 24px 60px -28px rgba(0,0,0,.8); }
.hero::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: linear-gradient(140deg, rgba(255,255,255,.3), rgba(255,255,255,.05) 30%, rgba(255,255,255,.02) 60%, rgba(255,255,255,.12));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.hero::after { content: ""; position: absolute; right: -50px; top: -70px; width: 300px; height: 300px; background: url(/assets/favicon.png) center / contain no-repeat; opacity: .06; filter: grayscale(1) brightness(2); transform: rotate(-10deg); pointer-events: none; }
.hero__title { font-size: clamp(28px, 2.8vw, 42px); font-weight: 300; letter-spacing: -.03em; margin-top: 8px; max-width: 820px; line-height: 1.1; }
.hero__title span { color: var(--muted); }
.hero__actions { display: flex; gap: 10px; position: relative; z-index: 3; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 2px; min-width: 0; transition: transform .25s var(--ease); }
.kpi:hover { transform: translateY(-3px); }
.kpi__ic { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: rgba(255,255,255,.07); color: var(--steel); margin-bottom: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.kpi b { font-size: 40px; font-weight: 300; letter-spacing: -.04em; line-height: 1; }
.kpi > span:last-child { color: var(--muted); font-size: 13.5px; }
.kpi--accent { background: linear-gradient(150deg, rgba(226,49,61,.35), rgba(226,49,61,.08)); }
.kpi--accent .kpi__ic { background: radial-gradient(120% 140% at 30% 0%, #ff7880, var(--red)); color: #fff; box-shadow: 0 8px 20px -8px var(--red-glow); }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 36px 20px; color: var(--muted); }
.empty > .ms { font-size: 30px; width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; background: var(--faint); color: var(--steel); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 4px; }
.empty strong { color: var(--ink); font-size: 17px; font-weight: 600; }
.empty p { max-width: 400px; }
.empty .btn { margin-top: 8px; }

/* agenda / úkoly */
.agenda { list-style: none; margin: 0; padding: 0 12px 12px; }
.agenda__day { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 12px 10px 4px; }
.task { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; transition: background .2s; }
.task:hover { background: rgba(255,255,255,.05); }
.task__check { flex: none; }
.check-btn { width: 26px; height: 26px; border-radius: 9px; border: 0; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); display: grid; place-items: center; padding: 0; }
.check-btn .ms { font-size: 17px; opacity: 0; color: #fff; }
.check-btn:hover { box-shadow: inset 0 0 0 1.5px var(--ok); }
.check-btn:hover .ms { opacity: .6; color: var(--ok); }
.task.is-done .check-btn { background: #2f8a5a; box-shadow: none; }
.task.is-done .check-btn .ms { opacity: 1; color: #fff; }
.task.is-done .task__txt strong { text-decoration: line-through; color: var(--muted); }
.task__kind { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.06); color: var(--steel); box-shadow: inset 0 0 0 1px var(--line); }
.task__kind .ms { font-size: 19px; }
.task__kind--viewing { background: rgba(226,49,61,.18); color: #ffadb3; }
.task__kind--call { background: rgba(127,217,164,.12); color: var(--ok); }
.task__kind--meeting { background: rgba(156,195,255,.12); color: var(--info); }
.task__kind--deadline { background: rgba(255,194,110,.12); color: var(--warn); }
.task__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.task__txt strong { font-weight: 600; }
.task__txt .muted { font-size: 13px; }
.task__txt a { color: var(--ink-2); }
.task__txt a:hover { color: var(--red-2); }
.task__note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.task.is-late .task__txt > .muted > span:first-child { color: var(--red-2); font-weight: 600; }

/* lidé, feed */
.people { list-style: none; margin: 0; padding: 0 12px 12px; }
.people li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 18px; transition: background .2s; }
.people li:hover { background: rgba(255,255,255,.05); }
.people__name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 600; }
.people__name small { color: var(--muted); font-weight: 400; font-size: 12.5px; }
a.people__name:hover { color: var(--red-2); }
.people--stages select { max-width: 160px; }
.doc-ic { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; flex: none; background: rgba(226,49,61,.16); color: #ffadb3; box-shadow: inset 0 0 0 1px rgba(226,49,61,.2); }
.feed { list-style: none; margin: 0; padding: 0 22px 16px; }
.feed li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; }
.feed__ic { width: 34px; height: 34px; border-radius: 12px; background: rgba(255,255,255,.06); display: grid; place-items: center; color: var(--steel); flex: none; }
.feed__ic .ms { font-size: 18px; }
.feed__ic--call { background: rgba(127,217,164,.12); color: var(--ok); }
.feed__ic--viewing, .feed__ic--document { background: rgba(226,49,61,.16); color: #ffadb3; }
.feed__ic--email, .feed__ic--sms { background: rgba(156,195,255,.12); color: var(--info); }
.feed p { font-size: 13.5px; color: var(--ink-2); }
.feed strong a:hover { color: var(--red-2); }

/* shody na přehledu */
.matches { list-style: none; margin: 0; padding: 0 12px 12px; }
.matches li { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 18px; transition: background .2s; }
.matches li:hover { background: rgba(255,255,255,.05); }
.matches__txt { display: flex; flex-direction: column; min-width: 0; }
.matches__txt strong { font-weight: 600; }
.matches__txt a:hover strong { color: var(--red-2); }
.matches__txt .muted { font-size: 13px; }
.matches__l { display: flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600; color: var(--red-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.matches__l .ms { font-size: 17px; }

.minis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px 16px; }
.mini { display: flex; gap: 12px; padding: 7px; border-radius: 18px; align-items: center; min-width: 0; transition: transform .2s var(--ease); }
.mini:hover { transform: translateY(-2px); }
.mini__img { width: 80px; height: 60px; object-fit: cover; border-radius: 12px; flex: none; background: rgba(255,255,255,.05); }
.mini__img--empty { display: grid; place-items: center; color: var(--steel-2); }
.mini__txt { display: flex; flex-direction: column; min-width: 0; font-size: 13px; gap: 1px; }
.mini__txt strong { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini__txt > span:not(.mini__meta) { color: var(--red-2); font-weight: 600; }
.mini__meta { display: flex; gap: 8px; align-items: center; margin-top: 3px; }

/* skóre */
.ring { --s: 44px; position: relative; width: var(--s); height: var(--s); flex: none; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring__bg { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 4; }
.ring__fg { fill: none; stroke-width: 4; stroke-linecap: round; }
.ring--hi .ring__fg { stroke: var(--red-2); filter: drop-shadow(0 0 4px rgba(226,49,61,.6)); }
.ring--mid .ring__fg { stroke: var(--steel); }
.ring--lo .ring__fg { stroke: var(--steel-2); }
.ring b { font-size: 13px; font-weight: 700; position: relative; }

/* ─── Čipy, štítky, avatary ─────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; border-radius: 99px; padding: 4px 10px 4px 8px; white-space: nowrap; background: rgba(255,255,255,.07); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.chip .ms { font-size: 15px; }
.chip--ok { background: rgba(127,217,164,.12); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(127,217,164,.2); }
.chip--warn { background: rgba(255,194,110,.12); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(255,194,110,.22); }
.chip--done { background: rgba(185,188,194,.14); color: var(--steel); }
.chip--muted { background: rgba(255,255,255,.05); color: var(--muted); }
.tag { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; border-radius: 8px; padding: 2px 8px; margin: 1px 4px 1px 0; background: rgba(255,255,255,.06); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.tag--kupujici { color: var(--info); background: rgba(156,195,255,.1); }
.tag--prodavajici { color: #ffadb3; background: rgba(226,49,61,.14); }
.tag--najemce { color: var(--ok); background: rgba(127,217,164,.1); }
.tag--pronajimatel { color: var(--warn); background: rgba(255,194,110,.1); }
.badge { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 8px; border-radius: 99px; background: radial-gradient(120% 140% at 30% 0%, #ff7880, var(--red)); color: #fff; font-weight: 700; font-size: 12.5px; box-shadow: 0 6px 14px -6px var(--red-glow); }
.avatar { --h: 0; width: 40px; height: 40px; border-radius: 14px; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; color: #fff;
  background: linear-gradient(150deg, hsl(var(--h) 22% 34% / .9), hsl(var(--h) 18% 18% / .9)); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 0 0 1px rgba(255,255,255,.08); }
.avatar--sm { width: 36px; height: 36px; font-size: 12px; border-radius: 12px; }
.avatar--lg { width: 72px; height: 72px; font-size: 24px; border-radius: 24px; }
.sidebar .avatar { background: radial-gradient(120% 140% at 30% 0%, #ff7880, var(--red)); }
.star { color: #ffc94d; font-size: 16px; font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 20; }

/* ─── Filtry, záložky ───────────────────────────────── */
.tabs { display: inline-flex; gap: 2px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; padding: 4px; border-radius: 999px;
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), inset 0 0 0 1px rgba(255,255,255,.06); }
.tabs__item { height: 38px; padding: 0 16px; border-radius: 999px; font-weight: 500; font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s; }
.tabs__item:hover { color: var(--ink); }
.tabs__item.is-active { background: var(--ink); color: var(--dark); box-shadow: 0 6px 16px -8px rgba(0,0,0,.6); }
.tabs__item.is-active .count { background: rgba(0,0,0,.1); color: var(--dark); }
.tabs__sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 6px; }
.tabs--inline { margin: 0; }
.tabs--inline .tabs__item { height: 32px; padding: 0 12px; font-size: 13px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.filters__search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 999px; flex: 1 1 280px;
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), inset 0 0 0 1px rgba(255,255,255,.07); }
.filters__search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; height: 100%; }
.filters__search input::placeholder { color: var(--muted); }
.filters__search .ms { color: var(--muted); }
.filters select { height: 46px; padding: 0 38px 0 18px; border-radius: 999px; border: 0; appearance: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23aaa' stroke-width='1.6'/%3E%3C/svg%3E") right 16px center no-repeat, linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), inset 0 0 0 1px rgba(255,255,255,.07); }
select option { background: #1b1b1d; color: var(--ink); }
.range { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink-2); }
.range input { accent-color: var(--red); }
.range output { font-weight: 700; color: var(--ink); min-width: 2ch; }

/* ─── Výpisy (tabulky) ──────────────────────────────── */
.table-wrap { overflow-x: auto; padding: 6px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 14px 16px 12px; white-space: nowrap; }
.table td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: rgba(255,255,255,.045); }
.table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.table .num { text-align: right; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who > span:not(.avatar):not(.kind-ic) { display: flex; flex-direction: column; min-width: 0; }
.who strong { font-weight: 600; }
.who small { color: var(--muted); font-size: 12.5px; }
.who:hover strong { color: var(--red-2); }
.kind-ic { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #ffadb3;
  background: linear-gradient(150deg, rgba(226,49,61,.24), rgba(226,49,61,.06)); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), inset 0 0 0 1px rgba(226,49,61,.18); }
.contact { white-space: nowrap; }
.contact__row { display: flex; align-items: center; gap: 8px; }
.contact__row + .contact__row { margin-top: 4px; }
.contact__row a:not(.icon-btn) { font-size: 13.5px; color: var(--ink-2); }
.contact__row a:not(.icon-btn):hover { color: var(--ink); }
.contact .noconsent { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.25); }
.contact .icon-btn--sm { width: 28px; height: 28px; }
.contact .icon-btn--sm .ms { font-size: 16px; }
.row-actions { text-align: right; width: 1%; white-space: nowrap; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 24px; }
.kind-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.kind-chip { display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px 8px 8px; border-radius: 16px; font-weight: 500; font-size: 14px; transition: transform .2s var(--ease); }
.kind-chip .ms { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: rgba(226,49,61,.18); color: #ffadb3; }
.kind-chip b { font-weight: 700; margin-left: 2px; }
.kind-chip:hover { transform: translateY(-2px); }
.kind-chip.is-active { box-shadow: inset 0 0 0 1.5px var(--red), 0 10px 26px -12px var(--red-glow); }

/* karty nabídek */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.lcard { border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s; }
.lcard:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 30px 60px -24px rgba(0,0,0,.9), 0 0 0 1px rgba(226,49,61,.35); }
.lcard__img { position: relative; aspect-ratio: 9 / 5; background: rgba(255,255,255,.04); margin: 7px 7px 0; border-radius: 17px; overflow: hidden; }
.lcard__photo { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.lcard:hover .lcard__photo { transform: scale(1.04); }
.lcard__photo--empty { display: grid; place-items: center; color: var(--steel-2); }
.lcard__photo--empty .ms { font-size: 48px; }
.lcard__state { position: absolute; left: 10px; top: 10px; }
.lcard__state .chip { background: rgba(14,14,15,.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lcard__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.lcard__ref { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.lcard__title { font-size: 15.5px; font-weight: 600; line-height: 1.35; }
.lcard__price { font-weight: 700; font-size: 17px; color: var(--red-2); }
.lcard__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }
.lcard__meta span { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; color: var(--ink-2); padding: 3px 9px 3px 7px; border-radius: 99px; background: rgba(255,255,255,.06); }
.lcard__meta .ms { color: var(--steel-2); margin: 0; }

/* hlavička nabídky */
.lhead { display: grid; grid-template-columns: 380px 1fr; overflow: hidden; border-radius: var(--r-xl); margin-bottom: 18px; }
.lhead__img { min-height: 230px; margin: 8px; border-radius: 22px; overflow: hidden; background: rgba(255,255,255,.04); }
.lhead__photo { width: 100%; height: 100%; object-fit: cover; }
.lhead__photo--empty { display: grid; place-items: center; color: var(--steel-2); height: 100%; }
.lhead__photo--empty .ms { font-size: 64px; }
.lhead__txt { padding: 20px 26px 22px 18px; display: flex; flex-direction: column; gap: 4px; }
.lhead__txt h1 { font-size: clamp(24px, 2.2vw, 34px); font-weight: 400; letter-spacing: -.02em; }
.lhead__price { font-size: 26px; font-weight: 600; color: var(--red-2); margin-top: 6px; }
.lhead__price small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.lhead__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.select-chip { height: 36px; border: 0; border-radius: 99px; padding: 0 14px; font-weight: 600; font-size: 13.5px; cursor: pointer; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px var(--line-2); }
.select-chip--ok { background: rgba(127,217,164,.14); color: var(--ok); }
.select-chip--warn { background: rgba(255,194,110,.14); color: var(--warn); }
.select-chip--done { background: rgba(185,188,194,.16); color: var(--steel); }
.owner { display: flex; align-items: center; gap: 12px; }
.owner a:first-of-type { flex: 1; font-weight: 600; }
.prose { color: var(--ink-2); line-height: 1.7; max-width: 78ch; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; padding: 0 22px 18px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.facts dd a { color: var(--ink); }
.facts dd a:hover { color: var(--red-2); }
.facts--params { grid-template-columns: 1fr 1fr; }
.note-box { margin: 0 22px 18px; padding: 12px 14px; border-radius: 16px; font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; background: rgba(255,194,110,.07); box-shadow: inset 0 0 0 1px rgba(255,194,110,.16); }
.hint { display: flex; gap: 8px; align-items: flex-start; margin: 0 22px 16px; font-size: 13px; color: var(--ink-2); border-radius: 14px; padding: 10px 12px; background: rgba(156,195,255,.08); box-shadow: inset 0 0 0 1px rgba(156,195,255,.16); }
.hint .ms { font-size: 18px; color: var(--info); }
.doc-buttons { display: flex; flex-direction: column; gap: 8px; }
.doc-btn { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 16px; font-weight: 600; font-size: 14px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s, box-shadow .2s; }
.doc-btn .ms { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(226,49,61,.16); color: #ffadb3; font-size: 19px; }
.doc-btn:hover { background: rgba(226,49,61,.1); box-shadow: inset 0 0 0 1px rgba(226,49,61,.35); }

/* shody (řádky) */
.mlist { list-style: none; margin: 0; padding: 0 12px 12px; }
.mrow { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-radius: 18px; transition: background .2s; }
.mrow + .mrow { border-top: 1px solid var(--line); border-radius: 0; }
.mrow:hover { background: rgba(255,255,255,.04); }
.mrow.is-offered, .mrow.is-dismissed { opacity: .6; }
.mrow__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.mrow__who strong { font-weight: 600; }
.mrow__who a:hover strong { color: var(--red-2); }
.mrow__who .muted { font-size: 13px; }
.mrow__who .muted a { color: var(--ink-2); }
.mrow__listing a { display: flex; align-items: center; gap: 12px; }
.mrow__listing a > span { display: flex; flex-direction: column; }
.mrow__listing small { color: var(--muted); }
.mrow__img { width: 72px; height: 48px; object-fit: cover; border-radius: 12px; flex: none; }
.mrow__img--empty { display: grid; place-items: center; background: rgba(255,255,255,.05); color: var(--steel-2); }
.mrow__why { display: flex; flex-wrap: wrap; gap: 5px; }
.why { display: inline-flex; align-items: center; font-size: 12px; padding: 2px 9px 2px 6px; border-radius: 99px; background: rgba(127,217,164,.1); color: var(--ok); font-weight: 500; }
.why--miss { background: rgba(255,255,255,.05); color: var(--muted); }
.mrow__actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.mgroup__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px 10px; }
.mgroup__l { display: flex; gap: 16px; align-items: center; min-width: 0; }
.mgroup__l > span { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.mgroup__l strong { font-size: 17px; font-weight: 600; }
.mgroup__l:hover strong { color: var(--red-2); }
.mgroup__img { width: 120px; height: 72px; object-fit: cover; border-radius: 16px; flex: none; }
.mgroup__img--empty { display: grid; place-items: center; background: rgba(255,255,255,.05); color: var(--steel-2); }

/* ─── Karta klienta ─────────────────────────────────── */
.profile { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 26px; flex-wrap: wrap; border-radius: var(--r-xl); margin-bottom: 18px; }
.profile__main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.profile__id h1 { font-size: clamp(28px, 2.6vw, 40px); font-weight: 300; letter-spacing: -.03em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.profile__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.star-btn { border: 0; background: none; color: rgba(255,255,255,.25); padding: 2px; display: grid; }
.star-btn .ms { font-size: 26px; }
.star-btn.is-on .ms { color: #ffc94d; font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
.quick-days { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 22px 18px; }
.pill-btn { height: 32px; border: 0; border-radius: 99px; padding: 0 13px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); transition: all .2s; }
.pill-btn:hover { color: #fff; background: rgba(226,49,61,.25); box-shadow: inset 0 0 0 1px rgba(226,49,61,.5); }
.pill-btn--x { padding: 0 8px; display: inline-grid; place-items: center; }
.pill-btn--x .ms { font-size: 17px; }
.newdoc { display: flex; gap: 8px; }
.newdoc select { flex: 1; min-width: 0; height: 36px; border: 0; border-radius: 12px; padding: 0 10px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; }
.demand { padding: 14px 22px; border-top: 1px solid var(--line); }
.demand:first-of-type { border-top: 0; padding-top: 2px; }
.demand__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.demand__head strong { font-weight: 600; font-size: 16px; }
.demand__head a:hover strong { color: var(--red-2); }
.demand__head .muted { font-size: 13px; flex: 1; }
.demand__txt { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.demand__matches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.mchip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 3px 11px 3px 3px; border-radius: 99px; font-weight: 500; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); }
.mchip b { background: radial-gradient(120% 140% at 30% 0%, #ff7880, var(--red)); color: #fff; border-radius: 99px; padding: 2px 7px; font-size: 11.5px; }
.mchip:hover { box-shadow: inset 0 0 0 1px rgba(226,49,61,.5); }
.mchip.is-offered b { background: #2f8a5a; }
.mchip.is-dismissed { opacity: .5; }
.links { list-style: none; margin: 0; padding: 0 12px 12px; }
.links li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 18px; flex-wrap: wrap; transition: background .2s; }
.links li:hover { background: rgba(255,255,255,.05); }
.links__txt { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.links__txt strong { font-weight: 600; }
.links__txt a:hover strong { color: var(--red-2); }
.links__txt .muted { font-size: 12.5px; }
.links .mini__img { width: 72px; height: 50px; }
.stage-form select { height: 34px; padding: 0 10px; border-radius: 11px; border: 0; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13px; }
.link-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.link-form .field { flex: 1 1 200px; margin: 0; }
.quicknote { margin: 0 22px 8px; padding: 14px; border-radius: 20px; background: rgba(0,0,0,.22); box-shadow: inset 0 0 0 1px var(--line); }
.quicknote textarea { width: 100%; border: 0; border-radius: 14px; padding: 11px 13px; resize: vertical; margin-top: 10px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line-2); }
.quicknote textarea:focus { outline: none; box-shadow: inset 0 0 0 1px rgba(226,49,61,.6), 0 0 0 4px rgba(226,49,61,.12); }
.quicknote__types { display: flex; flex-wrap: wrap; gap: 6px; }
.quicknote__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.quicknote__foot select { border: 0; border-radius: 10px; padding: 5px 8px; background: rgba(255,255,255,.07); }
.timeline { list-style: none; margin: 0; padding: 12px 22px 18px; }
.timeline__item { display: flex; gap: 14px; padding: 9px 0; position: relative; }
.timeline__item::before { content: ""; position: absolute; left: 18px; top: 46px; bottom: -9px; width: 1px; background: linear-gradient(var(--line-2), transparent); }
.timeline__item:last-child::before { display: none; }
.timeline__ic { width: 37px; height: 37px; border-radius: 13px; background: rgba(255,255,255,.06); color: var(--steel); display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1px var(--line); }
.timeline__ic .ms { font-size: 18px; }
.timeline__item--call .timeline__ic { background: rgba(127,217,164,.12); color: var(--ok); }
.timeline__item--viewing .timeline__ic, .timeline__item--document .timeline__ic { background: rgba(226,49,61,.16); color: #ffadb3; }
.timeline__item--email .timeline__ic, .timeline__item--sms .timeline__ic { background: rgba(156,195,255,.12); color: var(--info); }
.timeline__item--meeting .timeline__ic { background: rgba(255,194,110,.12); color: var(--warn); }
.timeline__body { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; color: var(--ink-2); }
.timeline__meta { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.timeline__meta strong { color: var(--ink); font-weight: 600; }
.timeline__del { opacity: 0; transition: opacity .15s; }
.timeline__item:hover .timeline__del, .timeline__del:focus-within { opacity: 1; }
.danger-zone { display: flex; gap: 8px; justify-content: flex-end; }

/* ─── Formuláře ─────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { min-height: 44px; border: 0; border-radius: 14px; padding: 10px 14px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .2s; }
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 1px rgba(226,49,61,.7), 0 0 0 4px rgba(226,49,61,.13); }
.field input::placeholder, .field textarea::placeholder { color: rgba(243,242,240,.35); }
input[type=date], input[type=time] { color-scheme: dark; }
.grid { display: grid; gap: 0 14px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 14px; cursor: pointer; color: var(--ink-2); }
.check input, .roles input { accent-color: var(--red); }
fieldset.roles { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
fieldset.roles legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.pill > span { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); transition: all .2s; }
.pill > span .ms { font-size: 18px; }
.pill:hover > span { color: var(--ink); background: rgba(255,255,255,.1); }
.pill input:checked + span { color: #fff; background: radial-gradient(120% 160% at 30% 0%, #ff7880, var(--red) 60%, var(--red-d)); box-shadow: 0 8px 20px -10px var(--red-glow), inset 0 1px 0 rgba(255,255,255,.35); }
.pill input:focus-visible + span { outline: 2px solid var(--red-2); outline-offset: 2px; }
.pill--sm > span { height: 32px; padding: 0 12px; font-size: 13px; }
details.more { margin: 0 0 14px; border-radius: 18px; padding: 12px 16px 2px; background: rgba(0,0,0,.2); box-shadow: inset 0 0 0 1px var(--line); }
details.more summary { cursor: pointer; font-weight: 600; font-size: 14px; margin-bottom: 12px; }
details.more summary small { font-weight: 400; color: var(--muted); }
details.more:not([open]) { padding-bottom: 0; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.form-page { max-width: 940px; }
.form-narrow { max-width: 660px; }

/* našeptávač */
.picker { position: relative; }
.picker__list { position: absolute; left: 0; right: 0; top: 100%; margin-top: 6px; border-radius: 18px; z-index: 50; max-height: 290px; overflow-y: auto; padding: 6px; }
.picker__opt, .quick__opt { display: flex; flex-direction: column; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: 12px; color: var(--ink); }
.picker__opt small, .quick__opt small { color: var(--muted); font-size: 12.5px; }
.picker__opt:hover, .picker__opt.is-active, .quick__opt:hover, .quick__opt.is-active { background: rgba(255,255,255,.08); }
.picker__none { padding: 10px 12px; color: var(--muted); font-size: 13.5px; }
.picker input[data-picker-q].is-set { box-shadow: inset 0 0 0 1px rgba(127,217,164,.55); }

/* ─── Dialogy, toast ────────────────────────────────── */
.dialog { border: 0; border-radius: 28px; padding: 0; width: min(660px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); color: var(--ink); overflow: visible; }
.dialog--wide { width: min(900px, calc(100vw - 24px)); }
.dialog::backdrop { background: rgba(5,5,6,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dialog[open] { animation: pop .3s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 40px); }
.dialog__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 14px; }
.dialog__head h2 { font-size: 22px; font-weight: 400; display: flex; align-items: center; gap: 10px; }
.dialog__head h2 .ms { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(226,49,61,.2); color: #ffadb3; font-size: 20px; }
.dialog__body { padding: 6px 24px 8px; overflow-y: auto; }
.dialog__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid var(--line); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; align-items: center; gap: 10px; max-width: 470px; border-radius: 18px; padding: 14px 18px; animation: toast 5s forwards; }
.toast .ms { color: var(--ok); }
.toast--err .ms { color: var(--red-2); }
.toast--warn .ms { color: var(--warn); }
@keyframes toast { 0% { opacity: 0; transform: translateY(10px); } 6%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(10px); visibility: hidden; } }

/* ─── Smlouvy ───────────────────────────────────────── */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 22px; }
.tpl { padding: 20px; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 6px; transition: transform .25s var(--ease); }
.tpl:hover { transform: translateY(-3px); }
.tpl__ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 6px; color: #fff;
  background: radial-gradient(120% 140% at 30% 0%, #ff7880, var(--red) 60%, var(--red-d)); box-shadow: 0 10px 24px -10px var(--red-glow), inset 0 1px 0 rgba(255,255,255,.35); }
.tpl__ic .ms { font-size: 23px; }
.tpl h2 { font-size: 17px; font-weight: 600; }
.tpl p { font-size: 13px; }
.tpl__meta { color: var(--ink-2); font-size: 12.5px !important; margin-top: auto !important; padding-top: 8px; }
.tpl__actions { display: flex; gap: 6px; margin-top: 10px; }

.doced__bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; flex-wrap: wrap; position: sticky; top: 12px; z-index: 12; border-radius: 999px; margin-bottom: 18px; }
.doced__bar .crumb { margin: 0; }
.doced__title { flex: 1 1 260px; border: 0; border-radius: 12px; padding: 7px 10px; font-weight: 600; font-size: 16px; min-width: 0; background: transparent; }
.doced__title:hover, .doced__title:focus { background: rgba(255,255,255,.06); outline: none; }
.doced__tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.doced__cols { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 18px; align-items: start; }
.doced__fields { padding: 18px; position: sticky; top: 90px; max-height: calc(100dvh - 110px); overflow-y: auto; margin: 0; }
.doced__parties { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 14px; border-radius: 16px; margin-bottom: 14px; font-size: 13.5px; background: rgba(0,0,0,.22); box-shadow: inset 0 0 0 1px var(--line); }
.doced__parties a { font-weight: 600; color: var(--red-2); }
.fgroup { border: 0; padding: 0; margin: 0 0 10px; }
.fgroup legend { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--red-2); padding: 10px 0 8px; }
.fgroup .field { margin-bottom: 10px; }
.fgroup .field input, .fgroup .field textarea { min-height: 38px; padding: 8px 12px; font-size: 14px; border-radius: 12px; }
.fgroup .field.is-empty input, .fgroup .field.is-empty textarea { box-shadow: inset 0 0 0 1px rgba(226,49,61,.45); background: rgba(226,49,61,.06); }
.fgroup .field.is-focus label { color: var(--red-2); }
.bind { color: var(--info); }
.hint-s { color: var(--muted); font-size: 12px; }
.doced.only-empty .fgroup .field:not(.is-empty) { display: none; }
.doced__preview { min-width: 0; }
.sheet { background: #fdfcfa; color: #111; border-radius: 10px; box-shadow: 0 30px 70px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.08); padding: 52px 60px; max-width: 840px; margin: 0 auto; }
.doced__foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.doc { font-family: "Source Serif 4", "Times New Roman", serif; font-size: 15px; line-height: 1.6; color: #111; }
.doc h1 { font-size: 20px; text-align: center; margin: 18px 0 12px; letter-spacing: .02em; font-weight: 600; }
.doc h2 { font-size: 16px; margin: 18px 0 6px; font-weight: 600; }
.doc h3 { font-size: 15px; margin: 12px 0 4px; font-weight: 600; }
.doc p { margin: 0 0 9px; text-align: justify; }
.doc ol, .doc ul { margin: 0 0 9px 22px; padding: 0; }
.doc li { margin: 0 0 5px; text-align: justify; }
.doc .c { text-align: center; }
.doc .r { text-align: right; }
.doc .small { font-size: 13px; }
.doc .box { border: 1px solid #444; padding: 8px 12px; margin: 0 0 10px; }
.doc table { border-collapse: collapse; width: 100%; margin: 0 0 10px; }
.doc td { vertical-align: top; padding: 3px 5px; }
.doc table.sign { margin-top: 24px; }
.doc table.sign td { width: 50%; text-align: center; }
.doc table.sign tr:last-child td { padding-top: 60px; }
.doc table.sign tr:last-child td::before { content: ""; display: block; width: 75%; margin: 0 auto 5px; border-top: 1px dotted #111; }
.doc .pb { margin-top: 36px; padding-top: 24px; border-top: 2px dashed #ccc; }
.doc a { color: inherit; }
.fld { background: #fff1c2; border-radius: 3px; padding: 0 2px; cursor: pointer; box-shadow: inset 0 -1px 0 #e6c95e; }
.fld:hover { background: #ffe387; }
.fld--empty { background: #fde0e2; color: #be1622; box-shadow: inset 0 -1px 0 #f0a6ad; }
.fld.is-hl { outline: 2px solid #e2313d; }

/* ─── Cenové hodnocení ──────────────────────────────── */
/* pod trhem = modrá, nad trhem = červená, v trhu = šedá (ověřeno i pro barvoslepé, vždy s číslem a šipkou) */
:root { --under: #4a90f0; --over: #e8454f; }
.pchip { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 3px 9px 3px 6px; white-space: nowrap; vertical-align: middle; letter-spacing: 0; }
.pchip .ms { font-size: 15px; }
.pchip--under, .pchip--under2 { background: rgba(74,144,240,.16); color: #a9cbff; box-shadow: inset 0 0 0 1px rgba(74,144,240,.35); }
.pchip--fair { background: rgba(255,255,255,.08); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.pchip--over, .pchip--over2 { background: rgba(232,69,79,.16); color: #ffb0b5; box-shadow: inset 0 0 0 1px rgba(232,69,79,.4); }
.lhead__price .pchip { font-size: 13px; margin-left: 6px; }
.lcard__price .pchip { margin-left: 4px; }
.pval__head { margin-bottom: 6px; }
.pval__head .pchip { font-size: 14px; padding: 5px 12px 5px 8px; }
.prange { width: 100%; height: auto; margin: 4px 0 8px; overflow: visible; }
.prange__axis { stroke: rgba(255,255,255,.12); stroke-width: 2; stroke-linecap: round; }
.prange__band { fill: rgba(185,188,194,.22); }
.prange__med { stroke: var(--steel); stroke-width: 2; stroke-linecap: round; }
.prange__own { stroke: #1a1a1c; stroke-width: 2; fill: var(--steel); }
.prange--under .prange__own, .prange--under2 .prange__own { fill: var(--under); }
.prange--over .prange__own, .prange--over2 .prange__own { fill: var(--over); }
.prange__lbl { fill: var(--muted); font: 500 11px var(--font); }
.prange__lbl--own { fill: var(--ink); font-weight: 700; }
.facts--tight { padding: 0 0 10px; }
.hint--warn { margin: 8px 0 0; background: rgba(255,194,110,.08); box-shadow: inset 0 0 0 1px rgba(255,194,110,.2); }
.hint--warn .ms { color: var(--warn); }
.comps { margin: 0 22px 18px; border-radius: 16px; background: rgba(0,0,0,.2); box-shadow: inset 0 0 0 1px var(--line); }
.comps summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 13.5px; }
.comps ul { list-style: none; margin: 0; padding: 0 6px 6px; max-height: 340px; overflow-y: auto; }
.comps a { display: flex; justify-content: space-between; gap: 10px; padding: 8px; border-radius: 12px; font-size: 13px; }
.comps a:hover { background: rgba(255,255,255,.06); }
.comps a > span { display: flex; flex-direction: column; min-width: 0; }
.comps small { color: var(--muted); font-size: 12px; }
.comps__p { text-align: right; white-space: nowrap; font-weight: 600; }
.kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi__ic--under { background: rgba(74,144,240,.18); color: #a9cbff; }
.kpi__ic--over { background: rgba(232,69,79,.18); color: #ffb0b5; }
.dlegend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); }
.dlegend span { display: inline-flex; align-items: center; gap: 6px; }
.dlegend i { width: 14px; height: 10px; border-radius: 3px; }
.dlegend__under { background: var(--under); }
.dlegend__over { background: var(--over); }
.table--prices .dcol { width: 34%; min-width: 220px; }
.table--prices .who .mrow__img { width: 64px; height: 44px; }
.dbar { position: relative; height: 22px; border-radius: 6px; background: rgba(255,255,255,.03); }
.dbar__axis { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line-2); }
.dbar__fill { position: absolute; top: 4px; bottom: 4px; min-width: 3px; }
.dbar__fill--under { background: var(--under); border-radius: 4px 0 0 4px; }
.dbar__fill--over { background: var(--over); border-radius: 0 4px 4px 0; }
.dbar__fill.is-capped.dbar__fill--over { -webkit-mask: linear-gradient(90deg, #000 85%, transparent); mask: linear-gradient(90deg, #000 85%, transparent); }
.dbar__fill.is-capped.dbar__fill--under { -webkit-mask: linear-gradient(270deg, #000 85%, transparent); mask: linear-gradient(270deg, #000 85%, transparent); }
.dval { display: block; margin-top: 6px; }
.dwarn { display: block; color: var(--warn); font-size: 12px; margin-top: 3px; }
@media (max-width: 920px) { .kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .table--prices .dcol { width: auto; min-width: 0; } .dlegend { display: none; } }

/* ─── Týdenní pás ───────────────────────────────────── */
.week { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); padding: 8px; gap: 4px; border-radius: var(--r-lg); margin-bottom: 18px; }
.week__day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; border-radius: 16px; }
.week__day b { font-size: 20px; font-weight: 400; }
.week__dn { font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 600; letter-spacing: .06em; }
.week__day.is-weekend { background: rgba(255,255,255,.025); }
.week__day.is-today { background: radial-gradient(120% 140% at 30% 0%, #ff7880, var(--red) 55%, var(--red-d)); box-shadow: 0 10px 24px -10px var(--red-glow); }
.week__day.is-today .week__dn { color: rgba(255,255,255,.8); }
.week__dots { display: flex; gap: 3px; height: 6px; }
.week__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--steel-2); }
.week__dots i.v { background: var(--red-2); box-shadow: 0 0 6px var(--red-glow); }
.week__day.is-today .week__dots i { background: #fff; }

/* ─── Přihlášení ────────────────────────────────────── */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login__card { border-radius: 32px; padding: 38px 34px 28px; width: min(420px, 100%); }
.login__logo { width: 210px; height: auto; margin-bottom: 18px; }
.login__lead { color: var(--muted); margin-bottom: 24px; }
.login__err { background: rgba(226,49,61,.14); color: var(--red-2); padding: 10px 14px; border-radius: 14px; margin-bottom: 16px; font-weight: 600; font-size: 14px; }
.login__foot { margin-top: 20px; text-align: center; color: var(--muted); font-size: 12.5px; }

.tabbar { display: none; }

/* ─── Responzivita ──────────────────────────────────── */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols, .cols--detail, .cols--detail:has(.col--side:first-child) { grid-template-columns: minmax(0, 1fr); }
  .cols--detail .col--side { order: 0; }
  .doced__cols { grid-template-columns: 340px minmax(0, 1fr); }
}
@media (max-width: 920px) {
  .sidebar { display: none; }
  .shell { margin-left: 0; padding: 12px 14px 100px; }
  .topbar { gap: 10px; margin-bottom: 16px; }
  .topbar__logo { display: block; flex: none; }
  .topbar__logo img { width: 34px; height: 34px; }
  .search { height: 44px; }
  .search kbd { display: none; }
  .topbar .btn--primary > span:not(.ms) { display: none; }
  .topbar .btn--primary { width: 44px; height: 44px; padding: 0; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 25; padding: 6px; border-radius: 26px;
    background: rgba(22,22,24,.85); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 0 1px rgba(255,255,255,.07), 0 20px 40px -10px rgba(0,0,0,.8); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--muted); font-size: 11px; font-weight: 600; padding: 7px 0; border-radius: 20px; }
  .tabbar a.is-active { color: #fff; background: radial-gradient(120% 140% at 30% 0%, #ff7880, var(--red) 60%, var(--red-d)); }
  .tabbar a.is-active .ms { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
  .toast { left: 14px; right: 14px; bottom: 96px; }
  .hero { padding: 22px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi b { font-size: 32px; }
  .kpi--accent { grid-column: span 2; }
  .minis { grid-template-columns: 1fr; }
  .lhead { grid-template-columns: 1fr; }
  .lhead__img { min-height: 0; aspect-ratio: 9 / 5; }
  .lhead__txt { padding: 6px 18px 20px; }
  .doced__cols { grid-template-columns: 1fr; }
  .doced__fields { position: static; max-height: none; }
  .doced__bar { position: static; border-radius: 24px; }
  .sheet { padding: 24px 18px; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 .span-3 { grid-column: span 2; }
  .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .grid--2 .span-2 { grid-column: auto; }
  .week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .week__day:nth-child(n+8) { display: none; }
  .mrow { flex-wrap: wrap; }
  .mrow__actions { width: 100%; justify-content: flex-start; padding-left: 58px; }
  .facts--params { grid-template-columns: max-content 1fr; }
  .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs__item { flex: none; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 12px 14px; border-top: 1px solid var(--line); position: relative; }
  .table tr:first-child { border-top: 0; }
  .table td { border: 0; padding: 3px 0; }
  .table tbody tr:hover td:first-child { box-shadow: none; }
  .table td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12.5px; }
  .table td.contact::before { display: none !important; }
  .table .num { text-align: left; }
  .table .row-actions { position: absolute; right: 12px; top: 14px; width: auto; }
  .profile__actions { width: 100%; }
  .page-head h1 { font-size: 34px; }
}
@media (max-width: 540px) {
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .grid--4 .span-2, .grid--4 .span-3 { grid-column: auto; }
  .hero__actions { display: none; }
  .filters select { flex: 1 1 45%; }
  .doced__parties { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; } }
@media print { .sidebar, .topbar, .tabbar, .doced__bar, .doced__fields, .doced__foot, .aurora { display: none !important; } .shell { margin: 0; } body { background: #fff; } }
