/* ==========================================================================
   Krby DS · Interný systém
   Paleta z webu: Liatina #1C1815 · Žeravá meď #B8552A · Šamot #F7F2EC
   ========================================================================== */
:root {
  --ink: #1c1815;
  --ink-2: #4a423b;
  --ink-3: #6f645a;
  --ink-4: #978a7d;
  --line: #e7dfd5;
  --line-2: #f0eae2;
  --bg: #f6f2ed;
  --surface: #fff;
  --surface-2: #fbf8f4;
  --copper: #b8552a;
  --copper-600: #a04722;
  --copper-700: #833a1b;
  --copper-50: #fbf1eb;
  --copper-100: #f4dccf;
  --cognac: #6f3a1d;
  --good: #1d7548;
  --good-bg: #e6f3eb;
  --warn: #935700;
  --warn-bg: #fcf0db;
  --bad: #b42318;
  --bad-bg: #fcebe9;
  --info: #2a5f9c;
  --info-bg: #e8eff8;
  --violet: #6448b0;
  --violet-bg: #efebf9;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --sh-1: 0 1px 2px rgba(28, 24, 21, 0.05);
  --sh-2: 0 10px 30px -8px rgba(28, 24, 21, 0.18), 0 2px 6px rgba(28, 24, 21, 0.06);
  --sh-3: 0 30px 80px -20px rgba(28, 24, 21, 0.38), 0 6px 18px rgba(28, 24, 21, 0.1);
  --side-w: 248px;
  --top-h: 64px;
  --tap: 38px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}
@media (pointer: coarse) {
  :root {
    --tap: 44px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font: 500 14px/1.45 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01' on;
}
html.has-modal,
html.side-open {
  overflow: hidden;
}
h1,
h2,
h3,
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
button:disabled {
  cursor: not-allowed;
}
img {
  display: block;
  max-width: 100%;
}
small {
  font-size: 12.5px;
}
kbd {
  font: 600 11.5px/1 var(--font);
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--line-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  min-width: 20px;
  display: inline-block;
  text-align: center;
}
:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}
.i {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.grow {
  flex: 1 1 auto;
}
.muted {
  color: var(--ink-3);
}
.block {
  display: block;
}
.mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
small.mono {
  white-space: normal;
}
.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nowrap {
  white-space: nowrap;
}
.r {
  text-align: right;
}
.t-good {
  color: var(--good);
}
.t-bad {
  color: var(--bad);
}
.t-warn {
  color: var(--warn);
}
.t-info {
  color: var(--info);
}
.t-copper {
  color: var(--copper);
}
.t-good .i,
.t-bad .i,
.t-warn .i {
  width: 15px;
  height: 15px;
  vertical-align: -3px;
  margin-right: 3px;
}

/* ---------- Logo ---------- */
.logo {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #f9f3f0;
  color: var(--cognac);
  flex: none;
}
.logo svg {
  width: 26px;
  height: 26px;
}

/* ==========================================================================
   Rozloženie
   ========================================================================== */
.app {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  background: var(--ink);
  color: #cfc2b5;
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.side__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 14px;
}
.side__brand strong {
  display: block;
  color: #fff;
  font: 600 17px/1.1 var(--display);
  letter-spacing: 0.01em;
}
.side__brand small {
  color: #a8998b;
  font-size: 12px;
}
.side .side__close {
  display: none;
  margin-left: auto;
  color: #cfc2b5;
}
.side__nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 12px 12px;
  scrollbar-width: thin;
  scrollbar-color: #3a332d transparent;
}
.nav-group {
  margin-top: 14px;
}
.nav-group:first-child {
  margin-top: 2px;
}
.nav-group__label {
  display: block;
  padding: 0 12px 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #97887a;
  font-weight: 600;
}
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 40px;
  padding: 0 12px;
  border-radius: 9px;
  color: #d2c6b9;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.nav-link .i {
  color: #a8998b;
  transition: color 0.15s;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}
.nav-link.is-active .i {
  color: #e98a5d;
}
.nav-link.is-active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--copper);
}
.nav-n {
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}
.nav-n--bad {
  background: #c2412b;
}
.nav-n--warn {
  background: #8c5a12;
}
.side__foot {
  padding: 10px 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.side__demo {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(184, 85, 42, 0.16);
  color: #f1c6ad;
  font-weight: 600;
  font-size: 13px;
}
.side__demo .i {
  color: #e98a5d;
  margin-top: 1px;
}
.side__demo small {
  display: block;
  font-weight: 500;
  color: #c9a891;
  font-size: 12px;
}
.side-bg {
  display: none;
}
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.top .top__menu,
.top .top__logo {
  display: none;
}
.top__search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  width: min(440px, 42vw);
  padding: 0 8px 0 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-3);
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.top__search:hover {
  border-color: #d9cec1;
  background: #f3eee8;
}
.top__search span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top__bell {
  position: relative;
}
.top__bell b {
  position: absolute;
  top: 1px;
  left: 50%;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--copper);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
}
.top__me {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 8px 0 4px;
  border-radius: 10px;
  text-align: left;
}
.top__me:hover {
  background: var(--bg);
}
.top__me-txt strong {
  display: block;
  font-size: 13.5px;
  line-height: 1.2;
}
.top__me-txt small {
  color: var(--ink-3);
  font-size: 12px;
}
.top__me > .i {
  width: 16px;
  color: var(--ink-3);
}
.content {
  flex: 1;
  padding: 26px 28px 56px;
  width: 100%;
  max-width: 1640px;
}
.view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.view--enter {
  animation: viewIn 0.28s var(--ease);
}
@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}
.tabbar {
  display: none;
}

/* ==========================================================================
   Hlavička stránky
   ========================================================================== */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}
.page-head h1 {
  font: 600 28px/1.15 var(--display);
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.page-head h1 .mono {
  font-family: var(--font);
  font-weight: 700;
  font-size: 24px;
}
.page-head .lead {
  margin-top: 6px;
  color: var(--ink-3);
  max-width: 720px;
  font-size: 14.5px;
}
.page-head .lead b {
  color: var(--ink);
}
.page-head__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.page-head--hello .display {
  font: 500 34px/1.1 var(--display);
  letter-spacing: -0.01em;
}
.eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 6px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: -8px;
  width: max-content;
  min-height: 32px;
}
.back:hover {
  color: var(--copper);
}
.back .i {
  width: 16px;
}

/* ==========================================================================
   Tlačidlá a ovládacie prvky
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--tap);
  padding: 0 15px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
  user-select: none;
  -webkit-user-select: none;
}
.btn:active {
  transform: translateY(1px);
}
.btn .i {
  width: 17px;
  height: 17px;
}
.btn--primary {
  background: var(--copper);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 1px 2px rgba(131, 58, 27, 0.3);
}
.btn--primary:hover {
  background: var(--copper-600);
}
.btn--dark {
  background: var(--ink);
  color: #fff;
}
.btn--dark:hover {
  background: #352e28;
}
.btn--ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: #d6cabd;
  background: var(--surface-2);
}
.btn--ghost:disabled {
  opacity: 0.45;
}
.btn--danger {
  background: var(--bad);
  color: #fff;
}
.btn--danger:hover {
  background: #9a1d14;
}
.btn--danger-text {
  color: var(--bad);
}
.btn--sm {
  height: 34px;
  padding: 0 11px;
  font-size: 13px;
  border-radius: 9px;
}
@media (pointer: coarse) {
  .btn--sm {
    height: 40px;
  }
}
.btn--lg {
  height: 50px;
  font-size: 15px;
}
.btn--block {
  width: 100%;
}
.btn--icon {
  width: var(--tap);
  padding: 0;
}
.btn-group {
  display: inline-flex;
  gap: 6px;
}
.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: 10px;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
  flex: none;
}
.icon-btn:hover {
  background: var(--bg);
  color: var(--ink);
}
.icon-btn--sm {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.icon-btn--sm .i {
  width: 16px;
  height: 16px;
}
@media (pointer: coarse) {
  .icon-btn--sm {
    width: 40px;
    height: 40px;
  }
}
.link {
  color: var(--copper-700);
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--copper-100);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
.link:hover {
  color: var(--copper);
  text-decoration-color: currentColor;
}
.link--strong {
  color: var(--ink);
  text-decoration: none;
}
.link--strong:hover {
  color: var(--copper);
}
.link .i {
  width: 15px;
  vertical-align: -3px;
}

/* odznaky */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--line-2);
  color: var(--ink-2);
  vertical-align: middle;
  font-family: var(--font);
  letter-spacing: 0;
}
.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.badge .i {
  width: 14px;
  height: 14px;
}
.badge--good {
  background: var(--good-bg);
  color: var(--good);
}
.badge--warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.badge--bad {
  background: var(--bad-bg);
  color: var(--bad);
}
.badge--info {
  background: var(--info-bg);
  color: var(--info);
}
.badge--copper {
  background: var(--copper-50);
  color: var(--copper-700);
}
.badge--violet {
  background: var(--violet-bg);
  color: var(--violet);
}
.badge--neutral .badge__dot {
  background: var(--ink-4);
}
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--line-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.src {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.src .i {
  width: 14px;
  height: 14px;
}
.hot,
.hot-dot {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--copper);
  font-weight: 700;
  font-size: 12.5px;
}
.hot .i,
.hot-dot .i {
  width: 15px;
  height: 15px;
  fill: var(--copper-100);
}
.hot-dot {
  margin-left: 6px;
  vertical-align: -2px;
}
.count {
  min-width: 28px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--copper-50);
  color: var(--copper-700);
  font-weight: 800;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

/* avatary */
.av {
  --s: 32px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: none;
  background: var(--av, var(--ink-2));
  color: #fff;
  font-size: calc(var(--s) * 0.38);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  vertical-align: middle;
}
.av--xxs {
  --s: 18px;
  font-size: 8px;
}
.av--xs {
  --s: 24px;
  font-size: 9.5px;
}
.av--sm {
  --s: 30px;
}
.av--lg {
  --s: 44px;
}
.av--xl {
  --s: 60px;
}
.av--client {
  background: var(--copper-50);
  color: var(--copper-700);
}
.av--client .i {
  width: 55%;
  height: 55%;
}
.av--sys {
  background: var(--copper-50);
  color: var(--copper);
}
.av--sys .i {
  width: 14px;
  height: 14px;
}
.avs {
  display: inline-flex;
  flex: none;
}
.avs .av {
  box-shadow: 0 0 0 2px var(--surface);
}
.avs .av + .av {
  margin-left: -6px;
}
.who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.who > .av {
  flex: none;
}

/* priebeh */
.prog {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--line-2);
  overflow: hidden;
  min-width: 60px;
}
.prog i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--copper);
  transition: width 0.4s var(--ease);
}
.prog--good i {
  background: var(--good);
}

/* vyhľadávanie, výber */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 340px;
  min-width: 200px;
}
.search .i {
  position: absolute;
  left: 11px;
  color: var(--ink-3);
  pointer-events: none;
  width: 17px;
}
.search input {
  width: 100%;
  height: var(--tap);
  padding: 0 12px 0 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 500;
}
.search input:focus,
.select select:focus,
.field input:focus,
.field textarea:focus,
.area:focus,
.cell-in:focus,
.next input:focus,
.note-form textarea:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(184, 85, 42, 0.15);
}
.select {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.select select {
  appearance: none;
  -webkit-appearance: none;
  height: var(--tap);
  padding: 0 34px 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  max-width: 100%;
  cursor: pointer;
}
.select > .i {
  position: absolute;
  right: 10px;
  width: 16px;
  color: var(--ink-3);
  pointer-events: none;
}
.select--block {
  display: flex;
  width: 100%;
}
.select--block select,
.select--grow select {
  width: 100%;
}
.select--grow {
  flex: 1;
  min-width: 0;
}
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 11px;
  background: #ece6de;
}
.seg__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: calc(var(--tap) - 6px);
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.seg__btn .i {
  width: 16px;
  height: 16px;
}
.seg__btn:hover {
  color: var(--ink);
}
.seg__btn.is-on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-1), 0 0 0 1px rgba(28, 24, 21, 0.04);
}
.seg--sm .seg__btn {
  height: 28px;
  padding: 0 10px;
  font-size: 12.5px;
}
@media (pointer: coarse) {
  .seg--sm .seg__btn {
    height: 36px;
  }
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
@media (pointer: coarse) {
  .chip {
    height: 40px;
  }
}
.chip .i {
  width: 15px;
  height: 15px;
}
.chip:hover {
  border-color: #d6cabd;
}
.chip.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chip__n {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--line-2);
  color: var(--ink-2);
  font-size: 12px;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}
.chip.is-on .chip__n {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.chip--person {
  padding-left: 5px;
}
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 14px;
  font-weight: 700;
  color: var(--ink-3);
  white-space: nowrap;
}
.tab:hover {
  color: var(--ink);
}
.tab.is-on {
  color: var(--ink);
}
.tab.is-on::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2.5px;
  border-radius: 2px 2px 0 0;
  background: var(--copper);
}
.tab__n {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--line-2);
  font-size: 12px;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Karty, KPI, mriežka
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  min-width: 0;
}
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
}
.card__head h2 {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.005em;
}
.card__head p {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 13px;
}
.card__head p b {
  color: var(--ink);
}
.card__head--line {
  border-top: 1px solid var(--line-2);
  margin-top: 4px;
  padding-top: 18px;
}
.card__body {
  padding: 4px 18px 18px;
}
.card__body--tight {
  padding: 0 18px 12px;
}
.card__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--line-2);
}
.card__note {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 18px 6px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 13px;
}
.card__note .i {
  color: var(--copper);
  width: 16px;
}
.big-pct {
  font: 800 22px/1 var(--font);
  font-variant-numeric: tabular-nums;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.kpis--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s;
  min-width: 0;
}
a.kpi:hover {
  border-color: #d9cdbf;
  box-shadow: var(--sh-2);
  transform: translateY(-1px);
}
.kpi__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.kpi__label {
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 700;
}
.kpi__ic {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--copper-50);
  color: var(--copper);
}
.kpi__value {
  font: 800 25px/1.15 var(--font);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi__sub {
  color: var(--ink-3);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.kpi--warn {
  border-color: #efd3b4;
  background: linear-gradient(180deg, #fffaf4, #fff 60%);
}
.delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 12px;
}
.delta .i {
  width: 13px;
  height: 13px;
}
.delta--good {
  background: var(--good-bg);
  color: var(--good);
}
.delta--bad {
  background: var(--bad-bg);
  color: var(--bad);
}
.stats {
  display: flex;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.stats > div {
  flex: 1 1 160px;
  padding: 14px 18px;
  border-right: 1px solid var(--line-2);
  min-width: 0;
}
.stats > div:last-child {
  border-right: 0;
}
.stats small {
  display: block;
  color: var(--ink-3);
  font-weight: 700;
  font-size: 12.5px;
}
.stats strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stats .is-bad strong {
  color: var(--bad);
}
.stats .is-warn strong {
  color: var(--warn);
}
.stars .i {
  width: 17px;
  height: 17px;
  fill: #e0a33a;
  stroke: #c98a1d;
  vertical-align: -2px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.s-4 {
  grid-column: span 4;
}
.s-6 {
  grid-column: span 6;
}
.s-8 {
  grid-column: span 8;
}
.s-12 {
  grid-column: span 12;
}
.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* prázdny stav */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 28px 16px;
  color: var(--ink-3);
}
.empty__ic {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink-4);
  margin-bottom: 4px;
}
.empty strong {
  color: var(--ink);
  font-size: 14.5px;
}
.empty p {
  font-size: 13px;
  max-width: 300px;
}
.empty .btn {
  margin-top: 8px;
}

/* ==========================================================================
   Zoznamy na prehľade
   ========================================================================== */
.agenda,
.list,
.tasks,
.alerts,
.feed,
.checklist,
.timeline,
.kv {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Program vedľa grafu: výšku určuje graf, program sa posúva vo vnútri */
@media (min-width: 1281px) {
  .card--agenda {
    display: flex;
    flex-direction: column;
  }
  .agenda-scroll {
    flex: 1;
    position: relative;
    min-height: 220px;
  }
  .agenda-scroll > .agenda {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
}
.agenda {
  padding: 0 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ag {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 12px;
  border-radius: 11px;
  text-align: left;
  position: relative;
  transition: background 0.15s;
}
.ag::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: var(--ev);
}
.ag:hover {
  background: var(--surface-2);
}
.ag__time {
  width: 46px;
  flex: none;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.ag__time small {
  display: block;
  color: var(--ink-3);
  font-weight: 600;
  font-size: 12px;
}
.ag__body {
  flex: 1;
  min-width: 0;
}
.ag__body strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ag__body small {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ag__body small .i {
  width: 13px;
  height: 13px;
}
.ag__type {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.ag__type::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--ev);
  margin-right: 6px;
  vertical-align: 1px;
}
.ag.is-done {
  opacity: 0.6;
}
.ag.is-done strong {
  text-decoration: line-through;
  text-decoration-color: var(--ink-4);
}
.agenda--compact .ag {
  padding: 8px 10px 8px 12px;
}
.list {
  padding: 0 8px 8px;
}
.row-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 11px;
  text-align: left;
  transition: background 0.15s;
  min-height: 52px;
}
.row-btn:hover {
  background: var(--surface-2);
}
.row-btn__main {
  flex: 1;
  min-width: 0;
}
.row-btn__main strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-btn__main small {
  display: block;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-btn__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex: none;
}
.row-btn__side small {
  color: var(--ink-3);
}
.row-btn__prog {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  width: 120px;
  flex: none;
}
.row-btn__prog .prog {
  width: 100%;
}
.tasks {
  padding: 0 8px 8px;
}
.task {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px 4px 6px;
  border-radius: 11px;
}
.task:hover {
  background: var(--surface-2);
}
.task__check {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  flex: none;
}
.task__check .i {
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: 7px;
  border: 1.5px solid #cbbfb2;
  color: transparent;
  stroke-width: 3;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.task__check:hover .i {
  border-color: var(--copper);
}
.task.is-done .task__check .i {
  background: var(--good);
  border-color: var(--good);
  color: #fff;
}
.task__main {
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 6px 4px;
}
.task__title {
  display: block;
  font-weight: 700;
}
.task.is-done .task__title {
  text-decoration: line-through;
  color: var(--ink-3);
}
.task__main small {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-3);
  margin-top: 1px;
}
.task__main small .i {
  width: 13px;
  height: 13px;
}
.task__edit {
  opacity: 0;
  transition: opacity 0.15s;
}
.task:hover .task__edit,
.task__edit:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .task__edit {
    opacity: 1;
  }
}
.prio {
  color: var(--copper);
  margin-right: 4px;
}
.prio .i {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  fill: var(--copper-100);
}
.alerts {
  padding: 0 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  transition: border-color 0.15s, background 0.15s;
}
.alert:hover {
  background: var(--surface-2);
  border-color: var(--line);
}
.alert > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.alert strong {
  display: block;
  font-size: 13.5px;
}
.alert small {
  display: block;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alert > .i {
  color: var(--ink-4);
  width: 16px;
}
.alert__ic {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex: none;
}
.alert__ic .i {
  width: 17px;
  height: 17px;
}
.alert--bad .alert__ic,
.notif__ic--bad {
  background: var(--bad-bg);
  color: var(--bad);
}
.alert--warn .alert__ic,
.notif__ic--warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.alert--info .alert__ic,
.notif__ic--info {
  background: var(--info-bg);
  color: var(--info);
}
.feed {
  padding: 0 8px 10px;
}
.feed__item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
}
.feed__item:hover {
  background: var(--surface-2);
}
.feed__text {
  display: block;
  font-size: 13.5px;
  line-height: 1.4;
}
.feed__item small {
  display: block;
  color: var(--ink-3);
  margin-top: 1px;
}

/* ==========================================================================
   Grafy
   ========================================================================== */
.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.cc {
  padding-left: 46px;
}
.cc__plot {
  position: relative;
  height: var(--h);
}
.cc__gl {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid var(--line-2);
}
.cc__gl:first-child {
  border-top-color: #cfc5b9;
}
.cc__gl span {
  position: absolute;
  right: calc(100% + 8px);
  top: -9px;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cc__cols {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
}
.cc__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  justify-content: center;
  border-radius: 8px 8px 0 0;
  outline: none;
  cursor: default;
}
.cc__col:hover,
.cc__col:focus-visible {
  background: rgba(28, 24, 21, 0.035);
}
.cc__bars {
  flex: 0 1 64%;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  max-width: 44px;
}
.cc__bars i {
  flex: 1;
  background: var(--c);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height 0.5s var(--ease), filter 0.15s;
  opacity: 0.82;
}
.cc__bars i.is-zero {
  min-height: 0;
}
.cc__col.is-current .cc__bars i {
  opacity: 1;
}
.cc__col:hover .cc__bars i {
  opacity: 1;
  filter: brightness(0.92);
}
.cc__x {
  display: flex;
  margin-top: 8px;
}
.cc__x span {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}
.cc__x span.is-current {
  color: var(--ink);
  font-weight: 800;
}
.hb {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hb__row {
  display: grid;
  grid-template-columns: minmax(110px, 38%) 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 7px 8px;
  margin: 0 -8px;
  border-radius: 9px;
  outline: none;
}
.hb__row:hover,
.hb__row:focus-visible {
  background: var(--surface-2);
}
.hb__label {
  font-weight: 700;
  font-size: 13.5px;
  min-width: 0;
}
.hb__label small {
  display: block;
  font-weight: 500;
  color: var(--ink-3);
  font-size: 12px;
}
.hb__track {
  height: 10px;
  border-radius: 999px;
  background: var(--line-2);
  overflow: hidden;
}
.hb__track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.5s var(--ease);
}
.hb__val {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
  min-width: 56px;
}
.hb__val small {
  color: var(--ink-3);
  font-weight: 600;
}
.fn {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fn__row {
  display: grid;
  grid-template-columns: 110px 1fr 54px;
  align-items: center;
  gap: 12px;
  outline: none;
  border-radius: 8px;
}
.fn__row:focus-visible {
  box-shadow: 0 0 0 2px var(--copper);
}
.fn__label {
  font-weight: 700;
  font-size: 13.5px;
}
.fn__bar {
  position: relative;
  height: 34px;
  display: flex;
  align-items: center;
}
.fn__bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--copper);
  opacity: 0.9;
}
.fn__row:nth-child(2) .fn__bar i {
  opacity: 0.8;
}
.fn__row:nth-child(3) .fn__bar i {
  opacity: 0.7;
}
.fn__row:nth-child(4) .fn__bar i {
  opacity: 0.6;
}
.fn__row:nth-child(5) .fn__bar i {
  background: var(--good);
  opacity: 1;
}
.fn__bar b {
  position: absolute;
  left: 10px;
  color: #fff;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}
.fn__conv {
  text-align: right;
  color: var(--ink-3);
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.spark {
  width: 100%;
  height: 32px;
}
.tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  pointer-events: none;
  background: var(--ink);
  color: #f1e9e1;
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 12.5px;
  box-shadow: var(--sh-2);
  opacity: 0;
  transition: opacity 0.12s;
  max-width: 280px;
}
.tip.is-on {
  opacity: 1;
}
.tip strong {
  display: block;
  color: #fff;
  font-size: 13px;
  margin-bottom: 2px;
}
.tip span {
  display: block;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Tabuľky
   ========================================================================== */
.table-card {
  overflow: hidden;
}
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table th.r {
  text-align: right;
}
.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table td small {
  color: var(--ink-3);
}
.table tbody tr[data-act] {
  cursor: pointer;
  transition: background 0.12s;
}
.table tbody tr[data-act]:hover {
  background: #fcfaf7;
}
.table tbody tr[data-act]:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: -2px;
}
.table tfoot td {
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  font-weight: 700;
}
.table tfoot .i {
  width: 14px;
  vertical-align: -2px;
}
.table--compact td,
.table--compact th {
  padding: 9px 14px;
}
.th-sort button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  color: inherit;
  min-height: 24px;
}
.th-sort.r button {
  flex-direction: row-reverse;
}
.th-sort__i {
  width: 13px;
  height: 13px;
  opacity: 0;
  transition: opacity 0.15s;
}
.th-sort:hover .th-sort__i {
  opacity: 0.5;
}
.th-sort.is-sorted {
  color: var(--ink);
}
.th-sort.is-sorted .th-sort__i {
  opacity: 1;
  color: var(--copper);
}
.table-more {
  padding: 12px 16px;
  color: var(--ink-3);
  font-size: 13px;
  border-top: 1px solid var(--line-2);
}
.w-prog {
  width: 130px;
}
.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line-2);
  color: var(--ink-3);
  font-weight: 600;
  flex-wrap: wrap;
}
.pager__n {
  min-width: 52px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.cell-client {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cell-prod {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  min-width: 240px;
}
button.cell-prod:hover strong {
  color: var(--copper);
}
.cell-prod--static {
  min-width: 0;
}
.thumb {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  overflow: hidden;
  flex: none;
  background: var(--bg);
  display: inline-grid;
  place-items: center;
  color: var(--ink-4);
  border: 1px solid var(--line-2);
  vertical-align: middle;
  margin-right: 10px;
}
.cell-prod .thumb {
  margin-right: 0;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb .i {
  width: 18px;
}
.stepper-num {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.stepper-num b {
  min-width: 30px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Pipeline (kanban)
   ========================================================================== */
.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(262px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
  scroll-snap-type: x proximity;
  align-items: start;
}
.col {
  background: #efe9e1;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
  scroll-snap-align: start;
  transition: background 0.15s, box-shadow 0.15s;
}
.col--closed {
  background: #f3efea;
}
.col.is-over {
  background: var(--copper-50);
  box-shadow: inset 0 0 0 2px var(--copper);
}
.col--vyhrate.is-over {
  background: var(--good-bg);
  box-shadow: inset 0 0 0 2px var(--good);
}
.col--prehrate.is-over {
  background: var(--bad-bg);
  box-shadow: inset 0 0 0 2px var(--bad);
}
.col__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 0;
}
.col__name {
  font-weight: 800;
  font-size: 13.5px;
}
.col__name small {
  font-weight: 600;
  color: var(--ink-3);
  margin-left: 4px;
}
.col__n {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(28, 24, 21, 0.08);
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.col__sum {
  display: flex;
  justify-content: space-between;
  padding: 0 4px 4px;
  font-size: 12.5px;
  color: var(--ink-3);
  border-bottom: 1px solid rgba(28, 24, 21, 0.07);
  gap: 8px;
}
.col__sum b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.col__sum span {
  text-align: right;
}
.col__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}
.col__empty {
  padding: 18px 8px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  border: 1.5px dashed rgba(28, 24, 21, 0.12);
  border-radius: 10px;
}
.col__add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  border-radius: 10px;
  color: var(--ink-3);
  font-weight: 700;
  font-size: 13px;
}
.col__add:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
}
.dc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px;
  cursor: grab;
  box-shadow: var(--sh-1);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  -webkit-user-select: none;
  user-select: none;
}
.dc:hover {
  border-color: #d9cdbf;
  box-shadow: var(--sh-2);
}
.dc:active {
  cursor: grabbing;
}
.dc.is-drag {
  opacity: 0.4;
  transform: rotate(1deg);
}
.dc.is-late {
  border-left: 3px solid var(--bad);
}
.dc__top {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
}
.dc__top strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.dc__new {
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  background: var(--copper);
  border-radius: 5px;
  padding: 2px 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dc__title {
  color: var(--ink-3);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dc__mid {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dc__mid b {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.src-ic {
  color: var(--ink-4);
}
.src-ic .i {
  width: 16px;
}
.dc__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  margin-top: 2px;
  border-top: 1px solid var(--line-2);
}
.dc__next {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ink-3);
  min-width: 0;
  font-weight: 600;
}
.dc__next span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dc__next .i {
  width: 14px;
  height: 14px;
}
.dc__prog {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.dc__prog .prog {
  flex: 1;
}
.dc__prog small {
  color: var(--ink-3);
  font-weight: 700;
}
.kanban--jobs {
  grid-auto-columns: minmax(250px, 1fr);
}

/* ==========================================================================
   Bočný panel (detail obchodu)
   ========================================================================== */
.drawer-wrap {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}
.drawer-bg {
  position: absolute;
  inset: 0;
  background: rgba(28, 24, 21, 0.32);
  opacity: 0;
  transition: opacity 0.22s;
}
.drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100vw);
  background: var(--surface);
  box-shadow: var(--sh-3);
  transform: translateX(102%);
  transition: transform 0.26s var(--ease);
  display: flex;
  flex-direction: column;
}
.drawer-wrap.is-open {
  pointer-events: auto;
}
.drawer-wrap.is-open .drawer-bg {
  opacity: 1;
}
.drawer-wrap.is-open .drawer {
  transform: none;
}
.drawer__inner {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}
.dp__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 12px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--line-2);
}
.dp__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dp__title {
  padding: 18px 22px 4px;
}
.dp__title h2 {
  font: 600 24px/1.2 var(--display);
}
.dp__title h2 .link {
  color: var(--ink);
  text-decoration: none;
}
.dp__title h2 .link:hover {
  color: var(--copper);
}
.dp__title p {
  color: var(--ink-3);
  margin-top: 4px;
}
.dp__value {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 22px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
}
.dp__value small {
  display: block;
  color: var(--ink-3);
  font-weight: 700;
  font-size: 12px;
}
.dp__value strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.dp__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 22px 0;
}
.dp__sec {
  padding: 18px 22px 0;
}
.dp__sec h3 {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.dp__foot {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 14px 22px;
  background: var(--surface);
  border-top: 1px solid var(--line-2);
}
.dp__foot::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 18px;
  background: linear-gradient(transparent, var(--surface));
  pointer-events: none;
}
.dp__sec:last-of-type {
  padding-bottom: 22px;
}
.next {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.next input {
  height: var(--tap);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--surface);
  min-width: 0;
}
.next input[name='text'] {
  flex: 1 1 200px;
}
.next input[type='date'] {
  flex: 0 0 150px;
}
.next.is-late input {
  border-color: #f0b8b2;
}
.warn-line {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--bad);
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
}
.warn-line .i {
  width: 15px;
}
.wiz {
  border-radius: 14px;
  border: 1px solid #ecd6c8;
  background: linear-gradient(180deg, #fdf6f1, #fff 70%);
  padding: 14px;
}
.wiz__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.wiz__head > .i {
  color: var(--copper);
  margin-top: 2px;
}
.wiz__head > div {
  flex: 1;
}
.wiz__head strong {
  display: block;
}
.wiz__head span {
  font-size: 12.5px;
  color: var(--ink-3);
}
.wiz__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin: 14px 0 0;
}
.wiz__grid dt {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 700;
}
.wiz__grid dd {
  margin: 1px 0 0;
  font-weight: 700;
}
.wiz__est {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e8cdbb;
}
.wiz__est span {
  color: var(--ink-3);
  font-size: 13px;
  flex: 1 1 100%;
}
.wiz__est strong {
  font-size: 18px;
  color: var(--copper-700);
}
.wiz__est small {
  color: var(--ink-3);
}
.wiz blockquote {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  font-style: italic;
  color: var(--ink-2);
}
.kv li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
  align-items: center;
}
.kv li:last-child {
  border-bottom: 0;
}
.kv li > span:first-child {
  color: var(--ink-3);
  font-weight: 600;
  flex: none;
}
.kv li > :last-child {
  text-align: right;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}
.kv a {
  color: var(--copper-700);
}
.kv a:hover {
  text-decoration: underline;
}
.kv--card {
  padding: 2px 18px 8px;
}
.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  flex-wrap: wrap;
}
.mini-card:hover {
  border-color: #d6cabd;
  background: var(--surface-2);
}
.mini-card > .i {
  color: var(--copper);
}
.mini-card > div {
  flex: 1;
  min-width: 140px;
}
.mini-card strong {
  display: block;
}
.mini-card span {
  font-size: 12.5px;
  color: var(--ink-3);
}
.note-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.note-form textarea {
  flex: 1;
  min-height: 44px;
  resize: vertical;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.timeline {
  position: relative;
}
.timeline li {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 0 0 14px;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 0;
  width: 1.5px;
  background: var(--line);
}
.timeline li:last-child::before {
  display: none;
}
.timeline__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2.5px solid var(--ink-4);
  flex: none;
  margin-top: 4px;
}
.timeline li.is-note .timeline__dot {
  border-color: var(--copper);
}
.timeline p,
.timeline .link {
  font-weight: 600;
  line-height: 1.45;
}
.timeline .link {
  color: var(--ink);
  text-decoration: none;
}
.timeline .link:hover {
  color: var(--copper);
}
.timeline small {
  display: block;
  margin-top: 1px;
  color: var(--ink-3);
}
.timeline li > div {
  min-width: 0;
}
.timeline__empty {
  color: var(--ink-3);
}
.timeline--icons li::before {
  left: 13px;
  top: 30px;
}
.timeline__ic {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink-2);
  flex: none;
}
.timeline__ic .i {
  width: 15px;
  height: 15px;
}
.timeline--icons li.is-note .timeline__ic {
  background: var(--copper-50);
  color: var(--copper);
}
.note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
}
.note > .i {
  color: var(--copper);
  margin-top: 1px;
}
.note > div {
  flex: 1;
}
.note strong {
  display: block;
  color: var(--ink);
}
.note span {
  font-size: 13.5px;
}
.note--info {
  background: #f7f1ec;
  border-color: #eedfd3;
}
.note--bad {
  background: var(--bad-bg);
  border-color: #f4cdc8;
  align-items: center;
  flex-wrap: wrap;
}
.note--bad > .i {
  color: var(--bad);
}

/* fázy */
.stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}
.stepper li {
  flex: 1;
  min-width: 0;
  position: relative;
}
.stepper button {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  border-radius: 10px;
  text-align: center;
  color: var(--ink-3);
  font-weight: 700;
  font-size: 12.5px;
}
.stepper button:not(:disabled):hover {
  background: var(--surface-2);
  color: var(--ink);
}
.stepper button:disabled {
  cursor: default;
}
.stepper li::before {
  content: '';
  position: absolute;
  top: 18px;
  left: calc(-50% + 16px);
  right: calc(50% + 16px);
  height: 2px;
  background: var(--line);
}
.stepper li:first-child::before {
  display: none;
}
.stepper li.is-done::before,
.stepper li.is-current::before {
  background: var(--copper);
}
.stepper__dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  font-weight: 800;
  position: relative;
  z-index: 1;
}
.stepper__dot .i {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}
.stepper li.is-done .stepper__dot {
  background: var(--copper);
  border-color: var(--copper);
  color: #fff;
}
.stepper li.is-current .stepper__dot {
  border-color: var(--copper);
  color: var(--copper);
  box-shadow: 0 0 0 4px var(--copper-50);
}
.stepper li.is-current .stepper__label {
  color: var(--ink);
}
.stepper__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.card--stepper {
  padding: 12px 10px 10px;
}

/* ==========================================================================
   Modálne okno, formuláre
   ========================================================================== */
.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(28, 24, 21, 0.42);
  animation: fadeIn 0.18s;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
}
.modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--sh-3);
  animation: modalIn 0.24s var(--ease);
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}
.modal--sm {
  max-width: 440px;
}
.modal--lg {
  max-width: 720px;
}
.modal--doc {
  max-width: 900px;
}
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 12px 22px;
  border-bottom: 1px solid var(--line-2);
}
.modal__head h2 {
  font: 600 21px/1.25 var(--display);
}
.modal__head p {
  color: var(--ink-3);
  margin-top: 4px;
  font-size: 13.5px;
}
.modal__body {
  padding: 18px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1px solid var(--line-2);
  flex-wrap: wrap;
}
.modal__text {
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 14px;
}
.modal__text:last-child {
  margin-bottom: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.form-grid--1 {
  grid-template-columns: 1fr;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field--wide,
.subform {
  grid-column: 1 / -1;
}
.field > label,
.field__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}
.field label b {
  color: var(--copper);
}
.field input,
.field textarea,
.area {
  width: 100%;
  height: var(--tap);
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 500;
  min-width: 0;
}
.field textarea,
.area {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}
.field input:disabled {
  background: var(--surface-2);
  color: var(--ink-3);
}
.field small {
  color: var(--ink-3);
}
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--bad);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}
.field--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.subform {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px dashed #e0d4c7;
}
.subform[hidden] {
  display: none;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-top: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid #c9bcae;
  background: var(--surface);
  flex: none;
  display: grid;
  place-items: center;
  margin: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.check input::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.check input:checked {
  background: var(--copper);
  border-color: var(--copper);
}
.check input:checked::after {
  opacity: 1;
}
.check.is-done span {
  color: var(--ink-3);
  text-decoration: line-through;
}
.pick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pick__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 12px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
}
.pick__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pick__item:has(input:checked) {
  background: var(--copper-50);
  border-color: var(--copper);
  color: var(--copper-700);
}
.pick__item:has(input:focus-visible) {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}
.po-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.po-row {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 8px;
}
.po-row input {
  height: var(--tap);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  text-align: right;
}
.ev-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--ink-2);
}
.ev-type::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--ev);
}

/* toasty */
#toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 12px 12px 12px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: #f3ece5;
  box-shadow: var(--sh-3);
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s, transform 0.22s var(--ease);
}
.toast.is-in {
  opacity: 1;
  transform: none;
}
.toast > .i {
  color: #7fd3a2;
}
.toast--warn > .i {
  color: #f3c26b;
}
.toast--bad > .i {
  color: #f19185;
}
.toast span {
  flex: 1;
}
.toast__btn {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 700;
}
.toast__btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* rozbaľovacie menu */
.dd {
  position: relative;
}
.dd__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  min-width: 240px;
  padding: 6px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
  display: none;
  max-height: min(560px, calc(100dvh - 90px));
  overflow-y: auto;
}
.dd__menu--right {
  left: auto;
  right: 0;
}
.dd__menu--wide {
  width: 380px;
}
.dd.is-open .dd__menu {
  display: block;
  animation: ddIn 0.16s var(--ease);
}
@keyframes ddIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.dd__menu > button,
.dd__menu > a {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 9px;
  text-align: left;
  font-weight: 600;
}
.dd__menu > button:hover,
.dd__menu > a:hover {
  background: var(--bg);
}
.dd__menu > button > .i,
.dd__menu > a > .i {
  color: var(--ink-3);
}
.dd__menu > button > span {
  flex: 1;
  min-width: 0;
}
.dd__menu > button small {
  display: block;
  color: var(--ink-3);
  font-weight: 500;
  font-size: 12px;
}
.dd__menu > button.is-on {
  background: var(--copper-50);
}
.dd__menu > button.is-on > .i:last-child {
  color: var(--copper);
}
.dd__menu > .is-danger,
.dd__menu > .is-danger .i {
  color: var(--bad);
}
.dd__menu hr {
  border: 0;
  border-top: 1px solid var(--line-2);
  margin: 6px 4px;
}
.dd__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
}
.dd__head small {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
}
.dd__head .link {
  font-size: 12.5px;
}
.dd__head--sub {
  border-top: 1px solid var(--line-2);
  margin-top: 4px;
  padding-top: 12px;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.dd__label {
  display: block;
  padding: 8px 10px 4px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.dd__empty {
  padding: 12px;
  color: var(--ink-3);
}
.notif {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  text-align: left;
  position: relative;
}
.notif:hover {
  background: var(--bg);
}
.notif > span:last-child {
  flex: 1;
  min-width: 0;
}
.notif strong,
.notif__t {
  display: block;
  font-size: 13.5px;
  line-height: 1.35;
}
.notif small {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
  margin-top: 2px;
}
.notif__ic {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: none;
}
.notif__ic .i {
  width: 16px;
  height: 16px;
}
.notif.is-unread::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--copper);
}

/* ⌘K */
.cmdk-wrap {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10vh 16px 16px;
}
.cmdk-bg {
  position: absolute;
  inset: 0;
  background: rgba(28, 24, 21, 0.42);
  animation: fadeIn 0.15s;
}
.cmdk {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--sh-3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 72vh;
  animation: modalIn 0.2s var(--ease);
}
.cmdk__in {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-2);
}
.cmdk__in .i {
  color: var(--ink-3);
  width: 20px;
  height: 20px;
}
.cmdk__in input {
  flex: 1;
  height: 58px;
  border: 0;
  outline: 0;
  font-size: 16px;
  font-weight: 600;
  background: none;
  min-width: 0;
}
.cmdk__list {
  overflow-y: auto;
  padding: 6px 8px 10px;
  overscroll-behavior: contain;
}
.cmdk__g {
  display: block;
  padding: 10px 10px 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cmdk__it {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  text-align: left;
  min-height: 44px;
}
.cmdk__it > .i {
  color: var(--ink-3);
}
.cmdk__it > span {
  flex: 1;
  min-width: 0;
}
.cmdk__it strong {
  display: block;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmdk__it small {
  display: block;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmdk__it.is-active {
  background: var(--copper-50);
}
.cmdk__it.is-active > .i {
  color: var(--copper);
}
.cmdk__empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 12px;
  color: var(--ink-3);
}
.cmdk__foot {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--line-2);
  color: var(--ink-3);
  font-size: 12px;
  background: var(--surface-2);
}
.cmdk__foot kbd {
  margin-right: 3px;
}

/* ==========================================================================
   Ponuka — editor
   ========================================================================== */
.q-layout,
.j-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}
.q-main,
.j-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.q-side,
.j-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--top-h) + 16px);
}
.table--edit td {
  padding: 6px 8px;
}
.table--edit th {
  padding: 10px 8px;
}
.cell-in {
  width: 100%;
  height: 38px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-weight: 600;
  min-width: 0;
}
.cell-in:hover:not(:disabled) {
  border-color: var(--line);
  background: var(--surface);
}
.cell-in.r {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.w-num {
  width: 36px;
}
.w-qty {
  width: 96px;
}
.w-unit {
  width: 44px;
}
.w-price {
  width: 120px;
}
.w-sum {
  width: 120px;
}
.w-x {
  width: 44px;
}
.table--edit td:nth-child(2) {
  min-width: 240px;
}
.q-add {
  justify-content: flex-start;
}
.sum {
  margin: 0;
  padding: 0 18px 8px;
}
.sum > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
}
.sum dt {
  color: var(--ink-3);
  font-weight: 600;
}
.sum dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sum__total {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 12px !important;
}
.sum__total dt {
  color: var(--ink);
  font-weight: 800;
}
.sum__total dd {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.sum__sub dd {
  color: var(--ink-3);
}
.sum--plain {
  padding-top: 14px;
}
.sum--plain dd {
  font-size: 16px;
}
.margin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 18px 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--good-bg);
  color: var(--good);
  font-weight: 700;
  font-size: 13px;
}
.margin__l {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.margin__l small {
  display: block;
  font-size: 12px;
}
.margin small {
  font-weight: 600;
  opacity: 0.8;
}
.margin .i {
  width: 16px;
  flex: none;
}
.margin strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.margin.is-low {
  background: var(--warn-bg);
  color: var(--warn);
}
.sum-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 18px 18px;
}
.pay-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 600;
}
.pay-line b {
  color: var(--ink);
}

/* ==========================================================================
   Zákazka
   ========================================================================== */
.checklist {
  padding: 4px 18px 14px;
}
.checklist li {
  border-bottom: 1px solid var(--line-2);
}
.checklist li:last-child {
  border-bottom: 0;
}
.checklist .check {
  margin: 0;
  padding: 10px 0;
  align-items: center;
}
.docs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 18px;
}
.doc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  flex-wrap: wrap;
}
.doc-card > div {
  flex: 1;
  min-width: 140px;
}
.doc-card strong {
  display: block;
}
.doc-card small {
  color: var(--ink-3);
}
.doc-card__ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--copper-50);
  color: var(--copper);
  flex: none;
}
.doc-card__act {
  display: flex;
  gap: 6px;
  flex: none !important;
  min-width: 0 !important;
}
.photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  padding: 0 18px 18px;
}
.photos figure {
  margin: 0;
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}
.photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photos figcaption {
  position: absolute;
  left: 6px;
  bottom: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(28, 24, 21, 0.6);
  color: #fff;
}
.rating {
  display: flex;
  align-items: center;
  gap: 2px;
}
.rating span {
  margin-left: 10px;
  color: var(--ink-3);
  font-weight: 700;
}
.star {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #d9cfc4;
}
.star .i {
  width: 26px;
  height: 26px;
}
.star.is-on {
  color: #c98a1d;
}
.star.is-on .i {
  fill: #e8b04a;
}
.star:hover {
  background: var(--bg);
}
.client-mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.client-mini > a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-2);
  font-weight: 600;
}
.client-mini > a:hover {
  color: var(--copper);
}
.client-mini > a .i {
  width: 16px;
  color: var(--ink-3);
  margin-top: 1px;
}
.client-mini .btn-row {
  margin-top: 4px;
}
.sig {
  position: relative;
  margin-top: 14px;
  border-radius: 14px;
  border: 1.5px dashed #d4c5b5;
  background: var(--surface-2);
  height: 200px;
}
.sig canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
  border-radius: inherit;
}
.sig__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 44px;
  text-align: center;
  color: var(--ink-4);
  font-weight: 600;
  pointer-events: none;
  border-top: 1px solid #ddd0c2;
  margin: 0 40px;
  padding-top: 6px;
}
.sig.is-signed .sig__hint {
  opacity: 0;
}
.sig__clear {
  position: absolute;
  top: 8px;
  right: 8px;
}

/* ==========================================================================
   Kalendár
   ========================================================================== */
.toolbar--cal {
  gap: 10px;
}
.cal-range {
  font: 600 18px/1.2 var(--display);
}
.people {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.people__btn {
  border-radius: 50%;
  padding: 3px;
  transition: opacity 0.15s, box-shadow 0.15s;
}
@media (pointer: coarse) {
  .people__btn {
    padding: 7px;
  }
}
.people__btn.is-on {
  box-shadow: 0 0 0 2px var(--copper);
}
.people__btn.is-dim {
  opacity: 0.4;
}
.legend--types {
  margin: 0;
  gap: 6px;
  align-items: center;
}
.lg-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-2);
  border: 1px solid transparent;
}
@media (pointer: coarse) {
  .lg-btn {
    height: 40px;
  }
}
.lg-btn:hover {
  background: var(--surface);
  border-color: var(--line);
}
.lg-btn i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.lg-btn span {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.lg-btn.is-off {
  opacity: 0.45;
}
.lg-btn.is-off i {
  background: var(--ink-4) !important;
}
.cal-card {
  overflow: hidden;
}
.cal {
  --gut: 58px;
  min-width: 760px;
}
.cal-card {
  overflow-x: auto;
}
.cal__head,
.cal__body {
  display: grid;
  grid-template-columns: var(--gut) repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, 0.6fr));
}
.cal__head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.cal__dh {
  padding: 10px 8px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  border-left: 1px solid var(--line-2);
}
.cal__dh span {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.cal__dh strong {
  font-size: 18px;
  font-weight: 800;
}
.cal__dh.is-today strong {
  color: #fff;
  background: var(--copper);
  border-radius: 8px;
  padding: 0 7px;
}
.cal__dh.is-we,
.cal__day.is-we {
  background: var(--surface-2);
}
.cal__all {
  display: grid;
  grid-template-columns: var(--gut) repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, 0.6fr));
  border-bottom: 1px solid var(--line);
}
.cal__all-label {
  padding: 10px 8px 0 0;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
}
.cal__all-day {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 4px;
  min-height: 46px;
  min-width: 0;
  border-left: 1px solid var(--line-2);
}
.cal__all-day.is-today {
  background-color: #fffbf8;
}
.cal__all-day.is-we {
  background: var(--surface-2);
}
.cal__chip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 6px 4px 8px;
  border-radius: 8px;
  border-left: 3px solid var(--ev);
  background: color-mix(in srgb, var(--ev) 13%, #fff);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  transition: background 0.15s, box-shadow 0.15s;
}
.cal__chip:hover {
  background: color-mix(in srgb, var(--ev) 20%, #fff);
  box-shadow: var(--sh-1);
}
.cal__chip > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal__chip small {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}
.cal__chip .avs {
  flex: none;
}
.cal__chip.is-done {
  opacity: 0.55;
}
.cal__body {
  position: relative;
  height: calc(var(--rows) * var(--px));
}
.cal__hours {
  position: relative;
}
.cal__hours span {
  display: block;
  height: var(--px);
  font-size: 12px;
  color: var(--ink-3);
  text-align: right;
  padding-right: 10px;
  transform: translateY(-8px);
  font-variant-numeric: tabular-nums;
}
.cal__hours span:first-child {
  visibility: hidden;
}
.cal__day {
  position: relative;
  border-left: 1px solid var(--line-2);
  background-image: repeating-linear-gradient(to bottom, var(--line-2) 0 1px, transparent 1px var(--px));
  cursor: copy;
}
.cal__day.is-today {
  background-color: #fffbf8;
}
.cal__ev {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 7px;
  border-radius: 8px;
  text-align: left;
  overflow: hidden;
  background: color-mix(in srgb, var(--ev) 13%, #fff);
  border-left: 3px solid var(--ev);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.25;
  cursor: pointer;
  transition: box-shadow 0.15s, background 0.15s;
}
.cal__ev:hover {
  box-shadow: var(--sh-2);
  z-index: 2;
  background: color-mix(in srgb, var(--ev) 20%, #fff);
}
.cal__ev > * {
  flex-shrink: 0;
  max-width: 100%;
}
.cal__ev strong {
  font-weight: 700;
  font-size: 12.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cal__ev-time {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 700;
  color: color-mix(in srgb, var(--ev) 70%, #1c1815);
  font-variant-numeric: tabular-nums;
}
.cal__ev-meta {
  color: var(--ink-3);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal__ev .avs {
  margin-top: auto;
}
.cal__ev.is-short {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.cal__ev.is-short strong {
  -webkit-line-clamp: 1;
  flex-shrink: 1;
  min-width: 0;
}
.cal__ev.is-done {
  opacity: 0.55;
}
.cal__now {
  position: absolute;
  left: -1px;
  right: 0;
  height: 2px;
  background: var(--bad);
  z-index: 2;
  pointer-events: none;
}
.cal__now::before {
  content: '';
  position: absolute;
  left: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bad);
}
.agenda-week {
  display: flex;
  flex-direction: column;
}
.aw-day {
  border-bottom: 1px solid var(--line-2);
  padding: 6px 0 10px;
}
.aw-day:last-child {
  border-bottom: 0;
}
.aw-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px 4px 18px;
}
.aw-day header strong {
  font-size: 14px;
}
.aw-day.is-today header strong {
  color: var(--copper);
}
.aw-empty {
  padding: 4px 18px 8px;
  color: var(--ink-4);
  font-size: 13px;
}
.load {
  padding: 4px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.load__row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr 90px;
  gap: 14px;
  align-items: center;
}
.load__row .who strong {
  display: block;
  font-size: 13.5px;
}
.load__row .who small {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
}
.load__row .who {
  flex-wrap: nowrap;
}
.load__bar {
  height: 10px;
  border-radius: 999px;
  background: var(--line-2);
  overflow: hidden;
}
.load__bar i {
  display: block;
  height: 100%;
  background: var(--copper);
  border-radius: inherit;
}
.load__bar i.is-high {
  background: var(--bad);
}
.load__val {
  text-align: right;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.load__val small {
  color: var(--ink-3);
  font-weight: 600;
}

/* ==========================================================================
   Klient
   ========================================================================== */
.client-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  flex-wrap: wrap;
}
.client-head__id {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.client-head h1 {
  font: 600 26px/1.15 var(--display);
}
.client-head p {
  color: var(--ink-3);
  margin: 4px 0 6px;
}
.client-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* náklady */
.cost-split {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.cost-split > div {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cost-split small {
  color: var(--ink-3);
  font-weight: 700;
  font-size: 12px;
}
.cost-split strong {
  font-variant-numeric: tabular-nums;
}
.cost-split em {
  font-style: normal;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 700;
}
.cost-split .prog i {
  background: var(--ink-4);
}

/* nastavenia */
.integ {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.integ__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
}
.integ__item > div {
  flex: 1;
}
.integ__item h3 {
  font-size: 14.5px;
  font-weight: 800;
}
.integ__item p {
  color: var(--ink-3);
  font-size: 13px;
  margin-top: 4px;
}
.integ__ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--copper-50);
  color: var(--copper);
  flex: none;
}
.switch {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  cursor: pointer;
  flex: none;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 44px;
  height: 26px;
  margin: 0;
  cursor: pointer;
}
.switch span {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #d7ccc0;
  position: relative;
  transition: background 0.2s;
}
.switch span::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s var(--ease);
}
.switch input:checked + span {
  background: var(--good);
}
.switch input:checked + span::after {
  transform: translateX(18px);
}
.switch input:focus-visible + span {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}
.switch em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
}
.roles td:not(:first-child),
.roles th:not(:first-child) {
  text-align: center;
}
.task-group .card__head {
  padding-bottom: 6px;
}

/* ==========================================================================
   Môj deň (technik)
   ========================================================================== */
.md-who {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}
.md-who::-webkit-scrollbar {
  display: none;
}
.md-who__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 700;
  white-space: nowrap;
}
.md-who__btn.is-on {
  border-color: var(--copper);
  background: var(--copper-50);
  color: var(--copper-700);
}
.md-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.md-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 2px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 64px;
}
.md-day small {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
  text-transform: uppercase;
}
.md-day strong {
  font-size: 18px;
}
.md-day i {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--copper-50);
  color: var(--copper-700);
  font-style: normal;
  font-size: 11.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.md-day i.is-empty {
  background: none;
}
.md-day.is-today {
  border-color: #e6c3ae;
}
.md-day.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.md-day.is-on small {
  color: #cfc2b5;
}
.md-day.is-on i {
  background: var(--copper);
  color: #fff;
}
.md-sum {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.md-sum > div:nth-child(2) {
  flex: 1;
}
.md-sum strong {
  display: block;
}
.md-sum > div span {
  color: var(--ink-3);
  font-size: 13px;
}
.md-sum__n {
  text-align: right;
}
.md-sum__n b {
  display: block;
  font-size: 20px;
}
.md-sum__n small {
  color: var(--ink-3);
}
.md-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.md-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  border-left: 4px solid var(--ev);
}
.md-card.is-done {
  opacity: 0.7;
}
.md-card__time {
  width: 50px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.md-card__time b {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.md-card__time small {
  color: var(--ink-3);
}
.md-card__n {
  margin-top: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
}
.md-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.md-card h3 {
  font-size: 16px;
  font-weight: 800;
}
.md-card p {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--ink-2);
  font-size: 13.5px;
}
.md-card p .i {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--ink-3);
  flex: none;
}
.md-card__who a {
  color: var(--copper-700);
  font-weight: 700;
}
.md-card__note {
  background: var(--surface-2);
  padding: 8px 10px;
  border-radius: 9px;
}
.md-card__mates {
  align-items: center !important;
}
.md-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.md-check {
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 0 12px;
}
.md-check summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.md-check summary::-webkit-details-marker {
  display: none;
}
.md-check summary .i {
  color: var(--copper);
}
.md-check ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.md-check .check {
  margin: 0;
  padding: 8px 0;
  align-items: center;
}
.md-check .link {
  display: inline-block;
  margin: 8px 0 12px;
}

/* ==========================================================================
   Prihlásenie
   ========================================================================== */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--surface);
}
.login__art {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}
.login__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
}
.login__art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 24, 21, 0.05) 30%, rgba(28, 24, 21, 0.85));
}
.login__quote {
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: 48px;
  z-index: 1;
  color: #fff;
}
.login__quote h2 {
  font: 500 34px/1.15 var(--display);
  margin: 18px 0 10px;
  max-width: 560px;
}
.login__quote p {
  color: #e2d6ca;
}
.login__panel {
  display: grid;
  place-items: center;
  padding: 32px 24px;
}
.login__form {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.login__brand strong {
  display: block;
  font: 600 18px/1.1 var(--display);
}
.login__brand small {
  color: var(--ink-3);
}
.login__form h1 {
  font: 600 32px/1.1 var(--display);
}
.login__lead {
  color: var(--ink-3);
  margin-top: -6px;
}
.login__demo {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding-top: 6px;
}
.login__demo span {
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  margin-right: 4px;
}
.login__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--copper-50);
  color: var(--copper-700);
  font-size: 13px;
  font-weight: 600;
}
.login__note .i {
  width: 16px;
  margin-top: 1px;
}

/* ==========================================================================
   Dokumenty (A4)
   ========================================================================== */
.doc-preview {
  background: #ece6df;
  padding: 20px;
  border-radius: 12px;
  overflow-x: auto;
}
.doc-preview--page {
  border-radius: var(--r-lg);
}
.doc {
  width: 100%;
  max-width: 794px;
  min-width: 600px;
  margin: 0 auto;
  background: #fff;
  color: #1c1815;
  padding: 44px 48px 32px;
  box-shadow: 0 8px 30px -10px rgba(28, 24, 21, 0.3);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.doc__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 2px solid #1c1815;
}
.doc__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.doc__logo {
  width: 44px;
  height: 44px;
  color: #6f3a1d;
}
.doc__logo svg {
  width: 100%;
  height: 100%;
}
.doc__brand strong {
  display: block;
  font: 600 20px/1.1 var(--display);
}
.doc__brand span {
  color: #6f645a;
  font-size: 12px;
}
.doc__title {
  text-align: right;
}
.doc__title span {
  display: block;
  font-size: 12px;
  color: #6f645a;
}
.doc__title > span:first-child {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b8552a;
}
.doc__title strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  margin: 2px 0 4px;
}
.doc__parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.doc__parties > div {
  display: flex;
  flex-direction: column;
}
.doc__parties small {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6f645a;
  margin-bottom: 4px;
}
.doc__parties strong {
  font-size: 14px;
}
.doc__parties span {
  color: #4a423b;
}
.doc__subject {
  font: 600 18px/1.3 var(--display);
}
.doc__table {
  width: 100%;
  border-collapse: collapse;
}
.doc__table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6f645a;
  border-bottom: 1px solid #1c1815;
  padding: 6px 8px;
}
.doc__table td {
  padding: 7px 8px;
  border-bottom: 1px solid #ebe4dc;
  vertical-align: top;
}
.doc__table .r {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.doc__sum {
  margin-left: auto;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.doc__sum > div {
  display: flex;
  justify-content: space-between;
}
.doc__total {
  border-top: 2px solid #1c1815;
  padding-top: 8px;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 800;
}
.doc__note strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.doc__note p,
.doc__p {
  color: #4a423b;
}
.doc__pay {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #ebe4dc;
  border: 1px solid #ebe4dc;
}
.doc__pay > div {
  background: #fbf8f4;
  padding: 10px 12px;
}
.doc__pay small {
  display: block;
  font-size: 11px;
  color: #6f645a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.doc__pay strong {
  font-size: 13.5px;
}
.doc__stamp {
  align-self: flex-end;
  transform: rotate(-4deg);
  border: 2.5px solid #1d7548;
  color: #1d7548;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.doc__clauses {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #4a423b;
}
.doc__clauses strong {
  color: #1c1815;
}
.doc__sign {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 12px;
}
.doc__sign--two {
  grid-template-columns: 1fr 1fr;
}
.doc__sign > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.doc__sign span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6f645a;
  font-weight: 700;
}
.doc__sign i {
  display: block;
  height: 56px;
  border-bottom: 1px solid #1c1815;
}
.doc__sign img {
  height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left bottom;
  border-bottom: 1px solid #1c1815;
}
.doc__sign small {
  color: #4a423b;
}
.doc__foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #ebe4dc;
  font-size: 11px;
  color: #6f645a;
}
#print-root {
  display: none;
}

/* ==========================================================================
   Responzivita
   ========================================================================== */
@media (max-width: 1440px) {
  .kpis {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  .cost-split {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1366px) {
  .table th,
  .table td {
    padding-left: 10px;
    padding-right: 10px;
  }
  .hide-lg {
    display: none;
  }
}
@media (max-width: 1280px) {
  :root {
    --side-w: 228px;
  }
  .content {
    padding: 22px 22px 48px;
  }
  .s-4 {
    grid-column: span 6;
  }
  .s-8 {
    grid-column: span 12;
  }
  .q-layout,
  .j-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .top__me-txt {
    display: none;
  }
}
@media (max-width: 1100px) {
  .q-layout,
  .j-layout {
    grid-template-columns: 1fr;
  }
  .q-side,
  .j-side {
    position: static;
  }
  .grid--2 {
    grid-template-columns: 1fr;
  }
  .integ {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1023px) {
  .app {
    grid-template-columns: 1fr;
  }
  .side {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(300px, 86vw);
    transform: translateX(-102%);
    transition: transform 0.26s var(--ease);
    box-shadow: var(--sh-3);
  }
  .side .side__close {
    display: inline-grid;
  }
  .side-open .side {
    transform: none;
  }
  .side-bg {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(28, 24, 21, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s;
    display: block;
  }
  .side-open .side-bg {
    opacity: 1;
    pointer-events: auto;
  }
  .top {
    padding: 0 12px;
    gap: 6px;
  }
  .top .top__menu {
    display: inline-grid;
  }
  .top .top__logo {
    display: inline-flex;
  }
  .top__logo .logo {
    width: 34px;
    height: 34px;
  }
  .top__search {
    width: auto;
    flex: 1;
    max-width: 380px;
  }
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tab-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 58px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-3);
  }
  .tab-link .i {
    width: 21px;
    height: 21px;
  }
  .tab-link.is-active {
    color: var(--copper);
  }
  .tab-link b {
    position: absolute;
    top: 6px;
    left: calc(50% + 6px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--copper);
    color: #fff;
    font-size: 11px;
    display: grid;
    place-items: center;
  }
  .content {
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
  }
  #toast-root {
    bottom: calc(74px + env(safe-area-inset-bottom));
  }
  .s-4,
  .s-6 {
    grid-column: span 12;
  }
  .cost-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login__art {
    display: none;
  }
}
/* Zoznamové tabuľky na mobile: každý riadok je karta „názov — hodnota“ */
@media (max-width: 760px) {
  .table.table--stack thead {
    display: none;
  }
  .table.table--stack,
  .table.table--stack tbody,
  .table.table--stack tfoot {
    display: block;
    width: 100%;
  }
  .table.table--stack tr {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-2);
  }
  .table.table--stack tbody tr:last-child {
    border-bottom: 0;
  }
  .table.table--stack tfoot tr {
    border-top: 1px solid var(--line);
    border-bottom: 0;
  }
  .table.table--stack td,
  .table.table--stack tfoot td {
    display: block;
    padding: 3px 0;
    border: 0;
    text-align: right;
    overflow: hidden;
  }
  .table.table--stack td::before {
    content: attr(data-label);
    float: left;
    max-width: 48%;
    margin-right: 12px;
    padding-top: 1px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-3);
  }
  .table.table--stack td[data-label='']::before,
  .table.table--stack td:first-child::before {
    content: none;
  }
  .table.table--stack td:first-child {
    padding: 0 0 6px;
    text-align: left;
    font-size: 15px;
  }
  .table.table--stack td:empty {
    display: none;
  }
  .table.table--stack td .btn {
    margin-top: 4px;
  }
  .table-card .table-wrap {
    overflow: visible;
  }
  /* editor položiek ponuky: názov na celý riadok, pod ním množstvo, cena a súčet */
  .table--edit thead {
    display: none;
  }
  .table--edit,
  .table--edit tbody {
    display: block;
  }
  .table--edit tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 92px 40px;
    grid-template-areas: 'name name name name' 'qty price sum x';
    gap: 6px 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-2);
  }
  .table.table--edit td {
    padding: 0;
    border: 0;
    min-width: 0;
  }
  .table.table--edit td:nth-child(1),
  .table.table--edit td:nth-child(4) {
    display: none;
  }
  .table.table--edit td:nth-child(2) {
    grid-area: name;
    min-width: 0;
  }
  .table.table--edit td:nth-child(3) {
    grid-area: qty;
    text-align: left;
  }
  .table.table--edit td:nth-child(5) {
    grid-area: price;
    text-align: left;
  }
  .table.table--edit td:nth-child(6) {
    grid-area: sum;
    align-self: end;
    padding-bottom: 9px;
  }
  .table.table--edit td:nth-child(6) {
    text-align: right;
  }
  .table.table--edit td:nth-child(7) {
    grid-area: x;
    align-self: end;
    justify-self: end;
  }
  .table.table--edit td:nth-child(3)::before,
  .table.table--edit td:nth-child(5)::before {
    display: block;
    margin: 0 0 3px 2px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--ink-3);
  }
  .table.table--edit td:nth-child(3)::before {
    content: 'Počet · ' attr(data-unit);
  }
  .table.table--edit td:nth-child(5)::before {
    content: 'Cena / j.';
  }
  .table--edit .cell-in.r {
    text-align: left;
  }
}
@media (max-width: 760px) {
  :root {
    --top-h: 58px;
  }
  body {
    font-size: 14.5px;
  }
  .content {
    padding: 16px 14px calc(88px + env(safe-area-inset-bottom));
  }
  .view {
    gap: 14px;
  }
  .top__search {
    flex: 0 0 auto;
    width: var(--tap);
    height: var(--tap);
    padding: 0;
    justify-content: center;
    background: none;
    border: 0;
    margin-left: auto;
  }
  .top__search span,
  .top__search kbd {
    display: none;
  }
  .top__search .i {
    width: 20px;
    height: 20px;
    color: var(--ink-2);
  }
  .top .grow {
    display: none;
  }
  .top__new {
    width: var(--tap);
    padding: 0;
  }
  .top__new span {
    display: none;
  }
  .top__me {
    padding: 0 4px;
  }
  .top__me > .i {
    display: none;
  }
  .dd__menu--wide {
    position: fixed;
    top: calc(var(--top-h) + 6px);
    left: 10px;
    right: 10px;
    width: auto;
  }
  .page-head h1 {
    font-size: 24px;
  }
  .page-head--hello .display {
    font-size: 28px;
  }
  .page-head .lead {
    font-size: 14px;
  }
  .page-head__actions {
    width: 100%;
  }
  .page-head__actions > .btn,
  .page-head__actions > .dd {
    flex: 1 1 auto;
  }
  .page-head__actions > .dd > .btn {
    width: 100%;
  }
  .page-head__actions > .btn--icon,
  .page-head__actions > .dd:has(.btn--icon) {
    flex: 0 0 auto;
  }
  .kpis,
  .kpis--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .kpi {
    padding: 12px 14px;
  }
  .kpi__value {
    font-size: 21px;
  }
  .kpi__ic {
    display: none;
  }
  .kpis > .kpi:first-child:nth-last-child(odd) {
    grid-column: 1 / -1;
  }
  .stats > div {
    flex: 1 1 45%;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-2);
  }
  .stats strong {
    font-size: 17px;
  }
  .toolbar {
    gap: 8px;
  }
  .search {
    flex: 1 1 100%;
  }
  .toolbar .select {
    flex: 1 1 calc(50% - 4px);
  }
  .toolbar .select select {
    width: 100%;
  }
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -14px;
    padding: 0 14px;
  }
  .chips::-webkit-scrollbar {
    display: none;
  }
  .hide-m {
    display: none !important;
  }
  .card__head {
    padding: 14px 14px 10px;
    flex-wrap: wrap;
  }
  .card__body {
    padding: 4px 14px 14px;
  }
  .card__body--tight {
    padding: 0 14px 10px;
  }
  .table th,
  .table td {
    padding: 10px 12px;
  }
  .kanban {
    grid-auto-columns: minmax(84vw, 1fr);
    margin: 0 -14px;
    padding: 0 14px 8px;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 14px;
  }
  .row-btn__prog {
    width: 96px;
  }
  .form-grid,
  .subform {
    grid-template-columns: 1fr;
  }
  .modal-wrap {
    padding: 0;
    align-items: end;
  }
  .modal {
    max-width: none !important;
    border-radius: 18px 18px 0 0;
    max-height: 92dvh;
    animation: sheetIn 0.26s var(--ease);
  }
  @keyframes sheetIn {
    from {
      transform: translateY(40px);
      opacity: 0;
    }
  }
  .modal__head {
    padding: 16px 12px 12px 16px;
  }
  .modal__body {
    padding: 16px;
  }
  .modal__foot {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  .modal__foot .btn {
    flex: 1 1 auto;
  }
  .modal__foot .grow {
    display: none;
  }
  .cmdk-wrap {
    padding: 8px;
  }
  .cmdk {
    max-height: 86dvh;
  }
  .cmdk__foot {
    display: none;
  }
  .drawer {
    width: 100vw;
  }
  .dp__title,
  .dp__sec,
  .dp__actions {
    padding-left: 16px;
    padding-right: 16px;
  }
  .dp__value {
    margin: 14px 16px 0;
  }
  .dp__value strong {
    font-size: 15px;
  }
  .dp__foot {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  .dp__foot .btn {
    flex: 1;
  }
  .wiz__grid {
    grid-template-columns: 1fr 1fr;
  }
  .stepper__label {
    display: none;
  }
  .stepper li.is-current .stepper__label {
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    white-space: nowrap;
    overflow: visible;
    max-width: none;
  }
  .card--stepper {
    padding-bottom: 30px;
  }
  .docs {
    grid-template-columns: 1fr;
    padding: 0 14px 14px;
  }
  .photos {
    padding: 0 14px 14px;
    grid-template-columns: repeat(3, 1fr);
  }
  .load__row {
    grid-template-columns: 1fr 70px;
  }
  .load__bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .client-head {
    padding: 14px;
  }
  .client-head h1 {
    font-size: 22px;
  }
  .client-head__actions {
    width: 100%;
  }
  .client-head__actions > * {
    flex: 1 1 auto;
  }
  .client-head__actions .dd > .btn {
    width: 100%;
  }
  .cost-split {
    grid-template-columns: 1fr 1fr;
  }
  .hb__row {
    grid-template-columns: minmax(90px, 40%) 1fr auto;
    gap: 10px;
  }
  .fn__row {
    grid-template-columns: 84px 1fr 44px;
    gap: 8px;
  }
  .cc {
    padding-left: 40px;
  }
  .cc__bars {
    flex-basis: 76%;
  }
  .cc__x span {
    font-size: 11.5px;
  }
  .cc__x span:nth-child(even):not(.is-current) {
    visibility: hidden;
  }
  .doc-preview {
    padding: 10px;
    margin: -16px;
    border-radius: 0;
  }
  .doc {
    padding: 28px 24px;
  }
  .md-card {
    padding: 14px;
    gap: 10px;
  }
  .md-card__time {
    width: 44px;
  }
  .md-card__actions .btn {
    flex: 1 1 auto;
  }
  .table--edit td:nth-child(2) {
    min-width: 180px;
  }
  .q-add {
    flex-direction: column;
    align-items: stretch;
  }
  .note-form {
    flex-direction: column;
    align-items: stretch;
  }
  .integ__item {
    flex-wrap: wrap;
  }
  .cal-range {
    font-size: 16px;
    flex: 1;
  }
  .toolbar--cal .grow {
    display: none;
  }
  .people {
    width: 100%;
  }
}
@media (max-width: 380px) {
  .kpi__value {
    font-size: 19px;
  }
  .dp__value {
    grid-template-columns: 1fr 1fr;
  }
  .dp__value > div:last-child {
    grid-column: 1 / -1;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   Tlač
   ========================================================================== */
@page {
  size: A4;
  margin: 12mm;
}
@media print {
  html.is-printing body > *:not(#print-root) {
    display: none !important;
  }
  html.is-printing #print-root {
    display: block !important;
  }
  html.is-printing body {
    background: #fff;
  }
  #print-root .doc {
    box-shadow: none;
    padding: 0;
    max-width: none;
    min-width: 0;
    width: 100%;
    gap: 14px;
    font-size: 12px;
    line-height: 1.4;
  }
  /* bežná ponuka (10–14 položiek) sa zmestí na jednu stranu A4 */
  #print-root .doc__table td {
    padding: 4px 6px;
  }
  #print-root .doc__table th {
    padding: 4px 6px;
  }
  #print-root .doc__subject {
    font-size: 16px;
  }
  #print-root .doc__table tr,
  #print-root .doc__sum,
  #print-root .doc__note,
  #print-root .doc__sign {
    break-inside: avoid;
  }
  body:not(.x) .app .side,
  body:not(.x) .app .top,
  body:not(.x) .tabbar {
    display: none;
  }
}
