/* Financie — minimalistický vzhľad podľa Ledgerix: biele sklenené karty na jemnom prechode,
   farby Mirible (červená #EE1C4E, čierna #231F20, sivá #E2E2E2), tenké písmo Onest. Len svetlý režim. */

@font-face {
  font-family: "Onest";
  src: url("/fonts/Onest.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font: "Onest", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --rounded: var(--font);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  /* Mirible: červená #EE1C4E, čierna #231F20, sivá #E2E2E2 */
  --brand: #ee1c4e;
  --brand-ink: #231f20;

  /* zvýraznenie (červená) */
  --hi: #ee1c4e;
  --hi-strong: #d10f3e;
  --hi-soft: rgba(238, 28, 78, 0.08);
  --hi-ink: #ffffff;
  /* čierna — hlavné tlačidlá, aktívne prvky */
  --deep: #231f20;
  --deep-2: #3a3536;
  --on-deep: #ffffff;

  /* plochy: biele sklo na jemnom prechode */
  --bg: #f2f0f1;
  --surface: #ffffff;
  --surface-2: #f8f7f7;
  --fill: #efedee;
  --fill-2: #f5f4f4;
  --hover: rgba(35, 31, 32, 0.035);
  --border: rgba(35, 31, 32, 0.08);
  --border-strong: rgba(35, 31, 32, 0.16);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-edge: rgba(255, 255, 255, 0.85);
  --glass-blur: blur(26px) saturate(170%);

  /* text */
  --ink: #231f20;
  --ink-2: #6f6a6c;
  --ink-3: #a9a4a6;

  --accent: var(--deep);
  --accent-hover: var(--deep-2);
  --accent-ink: #ffffff;
  --accent-soft: rgba(238, 28, 78, 0.12);
  --focus: rgba(238, 28, 78, 0.32);

  --side-bg: transparent;
  --side-ink: var(--ink);
  --side-ink-2: var(--ink-2);
  --side-hover: rgba(255, 255, 255, 0.55);
  --side-active: #ffffff;
  --side-border: transparent;

  /* graf: zákazky čierne, náklady sivé */
  --rev: var(--deep);
  --cost: #d9d5d7;
  --grid: rgba(35, 31, 32, 0.06);
  --axis: rgba(35, 31, 32, 0.14);

  /* stavy: oranžová = urob ty, modrá = čakáš, zelená = hotovo, sivá = uzavreté */
  --todo: #bf5f0c;
  --todo-bg: #fdf0e1;
  --todo-line: #f39b3c;
  --wait: #3a62c4;
  --wait-bg: #eaeffb;
  --wait-line: #6b8fe6;
  --done: #23804a;
  --done-bg: #e4f4ea;
  --done-line: #45b86a;
  --off: #6f6a6c;
  --off-bg: #efedee;

  --pos: var(--done);
  --pos-bg: var(--done-bg);
  --neg: #d42a3c;
  --neg-bg: #fde8eb;
  --warn: var(--todo);
  --warn-bg: var(--todo-bg);
  --info: var(--wait);
  --info-bg: var(--wait-bg);
  --muted-bg: var(--off-bg);

  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 32px -18px rgba(35, 31, 32, 0.22), 0 0 0 1px rgba(35, 31, 32, 0.05);
  --shadow-lg: 0 34px 90px -26px rgba(35, 31, 32, 0.38), 0 0 0 1px rgba(35, 31, 32, 0.06);
  --blur-bg: rgba(255, 255, 255, 0.8);
}

/* ---------- základ ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.47 var(--font);
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
  letter-spacing: inherit;
}

[hidden] {
  display: none !important;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--ink-3);
}

.strong {
  font-weight: 600;
}

.text-neg {
  color: var(--neg) !important;
}

.text-pos,
.text-done {
  color: var(--done) !important;
}

.text-warn,
.text-todo {
  color: var(--todo) !important;
}

.text-wait {
  color: var(--wait) !important;
}

kbd {
  display: inline-block;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--fill);
  color: var(--ink-2);
  font: 500 12.5px/1.25 var(--font);
  text-align: center;
}

code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--fill);
  font-family: var(--mono);
  font-size: 13px;
  word-break: break-all;
}

/* ---------- rozloženie ---------- */

.app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.main {
  min-width: 0;
  padding: 34px 44px 80px;
}

.view {
  max-width: 1320px;
  margin: 0 auto;
}

.view.is-loading > .view-root {
  opacity: 0.6;
  transition: opacity 0.2s 0.15s;
}

/* ---------- bočné menu (ako na Macu) ---------- */

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 20px 12px 14px;
  border-right: 1px solid var(--side-border);
  background: var(--side-bg);
  color: var(--side-ink);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 8px 20px;
  color: var(--side-ink);
  text-decoration: none;
}

.brand-mark img {
  display: block;
  width: auto;
  height: 32px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.brand-name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand-sub {
  overflow: hidden;
  color: var(--side-ink-2);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.quick {
  position: relative;
  margin: 0 4px 16px;
}

.quick-btn {
  width: 100%;
  height: 34px;
  font-size: 14.5px;
}

/* menu ako na Macu: zaoblené, rozmazané pozadie, výber farbou appky */
.quick-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  padding: 5px;
  border-radius: 12px;
  background: var(--blur-bg);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--shadow-lg);
}

.quick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
}

.quick-item span {
  flex: 1;
}

.quick-item .icon {
  color: var(--accent);
}

.quick-item:hover,
.quick-item:focus-visible {
  background: var(--accent);
  color: #fff;
  outline: none;
}

.quick-item:hover .icon,
.quick-item:focus-visible .icon {
  color: #fff;
}

.quick-item:hover kbd,
.quick-item:focus-visible kbd {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--side-ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.nav-link .icon {
  width: 19px;
  height: 19px;
  color: var(--accent);
}

.nav-label {
  flex: 1;
}

.nav-link:hover {
  background: var(--side-hover);
}

.nav-link.is-active {
  background: var(--side-active);
  font-weight: 600;
}

.nav-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

/* počty v menu ako v Mail: len číslo, farba podľa významu (modrá = dlžia tebe, oranžová = dlžíš ty) */
.nav-badge {
  min-width: 20px;
  color: var(--side-ink-2);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.nav-badge.tone-wait {
  color: var(--wait);
  font-weight: 600;
}

.nav-badge.tone-todo {
  color: var(--todo);
  font-weight: 600;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--side-border);
}

/* ---------- hlavička stránky (veľký nadpis ako v iOS) ---------- */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 26px;
}

.page-heading {
  min-width: 0;
}

.page-heading h1 {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.022em;
}

.page-sub {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 15.5px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 15.5px;
  font-weight: 500;
  text-decoration: none;
}

.back-link .icon {
  width: 17px;
  height: 17px;
}

.back-link:hover {
  opacity: 0.75;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* ---------- tlačidlá ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--fill);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, opacity 0.15s, transform 0.1s;
}

.btn .icon {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.btn:hover {
  background: rgba(118, 118, 128, 0.18);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-danger {
  background: var(--neg);
  color: #fff;
}

.btn-danger:hover {
  background: color-mix(in srgb, var(--neg) 88%, #000);
}

.btn-quiet-danger {
  padding: 0 10px;
  background: transparent;
  color: var(--neg);
}

.btn-quiet-danger:hover {
  background: var(--neg-bg);
}

.btn-sm {
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 13.5px;
}

.btn-sm .icon {
  width: 15px;
  height: 15px;
}

.icon-btn {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--fill);
  color: var(--ink);
}

.icon-btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
}

.icon-btn-sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.icon-btn-sm .icon {
  width: 16px;
  height: 16px;
}

.quick-pair {
  display: inline-flex;
  gap: 6px;
}

.quick-pair .icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--fill);
}

.quick-pair .icon-btn .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.icon-btn-pos:hover {
  background: var(--done-bg);
  color: var(--done);
}

.icon-btn-neg:hover {
  background: var(--neg-bg);
  color: var(--neg);
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- formulárové prvky (sivé zaoblené polia) ---------- */

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--fill-2);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: background-color 0.15s, box-shadow 0.15s, border-color 0.15s;
}

:where(textarea) {
  height: auto;
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-3);
}

input:hover:not(:focus),
select:hover:not(:focus),
textarea:hover:not(:focus) {
  background: var(--fill);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
  background: var(--surface);
  box-shadow: 0 0 0 3.5px var(--accent-soft);
}

input[type="date"] {
  font-variant-numeric: tabular-nums;
}

input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select-wrap select {
  width: auto;
  padding-right: 34px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.select-block,
.select-block select {
  width: 100%;
}

.select-caret {
  position: absolute;
  right: 10px;
  width: 15px;
  height: 15px;
  color: var(--ink-3);
  stroke-width: 2.2;
  pointer-events: none;
}

.year-select select {
  height: 36px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 300px;
  max-width: 100%;
}

.toolbar-filters .select-wrap select {
  max-width: 280px;
  height: 36px;
}

.search > .icon {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--ink-3);
  stroke-width: 2.1;
  pointer-events: none;
}

.search input {
  height: 36px;
  padding-left: 34px;
  padding-right: 36px;
  background: var(--fill);
}

.search-kbd {
  position: absolute;
  right: 8px;
  pointer-events: none;
}

.search input:focus ~ .search-kbd,
.search input:not(:placeholder-shown) ~ .search-kbd {
  display: none;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
}

.check input {
  margin-top: 1px;
}

.field > label.check {
  align-items: flex-start;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.check-inline {
  align-items: center;
  color: var(--ink-2);
  font-size: 14.5px;
}

/* segmentový prepínač ako v iOS / macOS */
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  align-self: flex-start;
  gap: 2px;
  max-width: 100%;
  padding: 2px;
  border-radius: 9px;
  background: var(--fill);
}

.seg-opt {
  position: relative;
  display: flex;
}

.seg-opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.seg-opt span,
.seg-buttons button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.seg-buttons button .icon {
  width: 16px;
  height: 16px;
}

.seg-opt input:checked + span,
.seg-buttons button[aria-pressed="true"] {
  background: var(--surface);
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.04);
}

.seg-opt input:focus-visible + span,
.seg-buttons button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
}

/* ---------- karty ---------- */

.card {
  min-width: 0;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card-table,
.card-flush {
  padding: 0;
  overflow: hidden;
}

.card-pad {
  margin: 0;
  padding: 18px 22px 12px;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-head-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.card-sub {
  margin: 2px 0 0;
  color: var(--ink-2);
  font-size: 14px;
}

.card-sub a {
  color: var(--accent);
  text-decoration: none;
}

.card-sub a:hover {
  text-decoration: underline;
}

.card-link {
  padding: 2px 0;
  color: var(--accent);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.card-count {
  color: var(--ink-3);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.card-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 15px;
}

.card-empty .icon {
  color: var(--done-line);
}

.card-flush .card-empty {
  margin: 0;
  padding: 0 22px 20px;
}

/* „Zobraziť všetkých …“ pod zoznamom v karte */
.card-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--fill-2);
  color: var(--accent);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
}

.card-more:hover {
  background: var(--fill);
}

.card-more .icon {
  width: 16px;
  height: 16px;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.card-actions-start {
  justify-content: flex-start;
  margin-top: 16px;
}

.card-foot-note {
  margin: 12px 0 0;
  color: var(--ink-3);
  font-size: 14px;
}

.error-card {
  max-width: 560px;
}

.error-card p {
  color: var(--ink-2);
}

.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--todo-bg);
  color: var(--todo);
  font-weight: 500;
}

/* Ikonka v štýle iOS Nastavení: farebný zaoblený štvorec s bielym symbolom */
.tile-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  background: var(--ti);
  color: #fff;
}

.tile-icon .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.tile-icon-brand {
  --ti: var(--brand);
}

.tile-icon-ink {
  --ti: #8e8e93;
}

.tile-icon-done {
  --ti: var(--done-line);
}

.tile-icon-wait {
  --ti: var(--wait-line);
}

.tile-icon-todo {
  --ti: var(--todo-line);
}

.tile-icon-neg {
  --ti: #ff3b30;
}

/* ---------- hlavné čísla (widgety ako v Apple Zdravie) ---------- */

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
}

/* ikonka pred názvom, nie v rohu */
.kpi-top {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.kpi-top .tile-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.kpi-top .tile-icon .icon {
  width: 16px;
  height: 16px;
}

.kpi-label {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.kpi-note {
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 400;
}

.kpi-value {
  margin: 12px 0 10px;
  font-family: var(--rounded);
  font-size: 34px;
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.kpi-sub {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: auto;
  color: var(--ink-2);
  font-size: 13.5px;
}

.kpi-sub a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.kpi-sub a:hover {
  text-decoration: underline;
}

.delta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  font-weight: 600;
  text-decoration: none;
}

.delta .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}

.delta.is-good {
  color: var(--done);
}

.delta.is-bad {
  color: var(--neg);
}

a.delta:hover {
  text-decoration: underline;
}

.delta-label {
  margin-left: 2px;
  color: var(--ink-2);
  font-weight: 400;
}

/* súhrn nad zoznamami — jedna biela karta, položky oddelené tenkou čiarou */
.summary {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 22px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.summary-item {
  flex: 1 1 180px;
  min-width: 0;
  padding: 16px 20px 15px;
  box-shadow: -1px -1px 0 var(--border);
}

.summary-label {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

.summary-value {
  margin: 4px 0 0;
  overflow: hidden;
  font-family: var(--rounded);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.015em;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.summary-sub {
  margin: 2px 0 0;
  color: var(--ink-3);
  font-size: 13.5px;
}

.summary-item[class*='tone-'] .summary-label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.summary-item[class*='tone-'] .summary-label::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--tone-line);
}

.summary-item.tone-todo {
  --tone-line: var(--todo-line);
}

.summary-item.tone-wait {
  --tone-line: var(--wait-line);
}

.summary-item.tone-done {
  --tone-line: var(--done-line);
}

.summary-item.tone-neg {
  --tone-line: var(--neg);
}

/* ---------- prehľad ---------- */

.dash-main {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.dash-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

/* „Na vybavenie“ — riadky ako v Nastaveniach iPhonu: farebná ikonka, názov, suma, šípka */
.todo-card {
  margin-bottom: 14px;
  padding: 6px 0;
}

.todo-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 18px 10px 20px;
  color: inherit;
  text-decoration: none;
}

.todo-row:hover {
  background: var(--hover);
}

.todo-row:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.todo-text {
  flex: 1;
  min-width: 0;
}

.todo-title {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
}

.todo-meta {
  display: block;
  margin-top: 1px;
  color: var(--ink-2);
  font-size: 13.5px;
}

.todo-amount {
  font-family: var(--rounded);
  font-size: 17px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.todo-row .chev {
  width: 16px;
  height: 16px;
  color: var(--ink-3);
  stroke-width: 2.2;
}

.todo-row.is-empty .todo-amount {
  color: var(--ink-3);
  font-weight: 500;
}

/* deliace čiary: medzi riadkami vodorovne, medzi stĺpcami zvislo */
.todo-list li:nth-child(n + 3) .todo-row {
  box-shadow: inset 0 1px 0 var(--border);
}

.todo-list li:nth-child(even) {
  box-shadow: inset 1px 0 0 var(--border);
}

/* Nezaplatené zákazky a Komu dlžím vedľa seba; keď je len jedno, ide cez celú šírku */
.unpaid-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin-bottom: 14px;
}

@media (min-width: 1241px) {
  .unpaid-pair:has(> :nth-child(2)) {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  }
}

.unpaid-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin: 0;
}

.unpaid-totals dt {
  color: var(--ink-2);
  font-size: 13.5px;
}

.unpaid-totals dd {
  margin: 1px 0 0;
  font-family: var(--rounded);
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* riadok zákazky / dlhu v kartách: meno a popis | čipy | suma */
.unpaid-card .list .list-row.tile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 14px;
}

.unpaid-card .list .list-row.tile .tile-chips {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
}

.unpaid-card .list .list-row.tile .list-side {
  grid-column: 3;
  grid-row: 1;
  min-width: 96px;
}

/* Komu dlžím je užšia karta: suma vpravo hore, „Dlžím“ pod ňou */
.unpaid-card-todo .list .list-row.tile {
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 6px;
}

.unpaid-card-todo .list .list-row.tile .list-side {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.unpaid-card-todo .list .list-row.tile .tile-chips {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
}

.vat-card {
  margin-bottom: 14px;
}

.legend {
  display: flex;
  gap: 18px;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 13.5px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.swatch-rev {
  background: var(--rev);
}

.swatch-cost {
  background: var(--cost);
}

/* graf */
.chart-card {
  display: flex;
  flex-direction: column;
}

.chart {
  position: relative;
  flex: 1;
  min-height: 280px;
}

.chart-svg {
  position: absolute;
  inset: 0;
  display: block;
  overflow: visible;
}

.chart .gridline {
  stroke: var(--grid);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.chart .baseline {
  stroke: var(--axis);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.chart .tick,
.chart .xlabel {
  fill: var(--ink-3);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.chart .xlabel.is-current {
  fill: var(--ink);
  font-weight: 650;
}

.chart .bar-rev {
  fill: var(--rev);
}

.chart .bar-cost {
  fill: var(--cost);
}

.chart .wash {
  fill: var(--fill-2);
}

.chart .hit {
  fill: transparent;
  outline: none;
}

.chart .hit:focus-visible {
  stroke: var(--focus);
  stroke-width: 2;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--ink-2);
  text-align: center;
}

.chart-tip {
  position: absolute;
  z-index: 5;
  min-width: 200px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--blur-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  pointer-events: none;
}

.tip-title {
  margin-bottom: 6px;
  font-weight: 600;
}

.tip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}

.tip-key {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.key-rev {
  background: var(--rev);
}

.key-cost {
  background: var(--cost);
}

.tip-val {
  min-width: 100px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.tip-name {
  color: var(--ink-2);
}

.tip-sum {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* zoznamy v kartách — riadky s tenkými čiarami ako v iOS */
.list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -12px;
  padding: 11px 12px;
  border-top: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.list-row:first-child {
  border-top-color: transparent;
}

.list-row:hover {
  background: var(--hover);
}

.list-row:hover + .list-row {
  border-top-color: transparent;
}

.list-row:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.list-main {
  min-width: 0;
}

.list-title {
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.list-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 1px 0 0;
  color: var(--ink-2);
  font-size: 13.5px;
}

.list-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.list-meta .icon {
  width: 15px;
  height: 15px;
}

.list-side {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
}

.list-amount {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.list-side-stack {
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

.list-side-stack .list-meta {
  margin: 0;
  white-space: nowrap;
}

/* vodorovné pruhy */
.bars {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  margin: 0 -12px;
  padding: 9px 12px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.bar-row:hover {
  background: var(--hover);
}

.bar-name {
  overflow: hidden;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bar-value {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.bar-track {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--fill);
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
}

.bar-fill-rev {
  background: var(--rev);
}

.bar-fill-cost {
  background: var(--cost);
}

.bar-meta {
  grid-column: 1 / -1;
  color: var(--ink-2);
  font-size: 13.5px;
}

/* úspešnosť ponúk */
.winrate {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.winrate-value {
  margin: 0;
  font-family: var(--rounded);
  font-size: 40px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.03em;
}

.winrate-label {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.winrate-label span {
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 400;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 18px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--fill-2);
}

.stats > div {
  min-width: 0;
  padding: 10px 12px;
  box-shadow: -1px 0 0 var(--border);
}

.stats dt {
  color: var(--ink-2);
  font-size: 13.5px;
}

.stats dd {
  margin: 2px 0 0;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sub-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.sub-title .muted {
  font-weight: 400;
}

/* ---------- zoznamy: nástroje, filtre, tabuľky ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 14px;
}

.toolbar-filters,
.toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Filtre ako segmentový prepínač (iOS / macOS) */
.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  max-width: 100%;
  padding: 2px;
  border-radius: 10px;
  background: var(--fill);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.tab:hover:not(.is-active) {
  background: rgba(118, 118, 128, 0.1);
}

.tab.is-active {
  background: var(--surface);
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.04);
}

.tab:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
}

.tab-count {
  color: var(--ink-3);
  font-size: 13.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.tab.is-active .tab-count {
  color: var(--ink-2);
}

.tab .dot {
  width: 8px;
  height: 8px;
  margin-right: -1px;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.table th {
  padding: 11px 14px 9px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

/* prvý stĺpec má miesto na stavovú bodku */
.card-table .table th:first-child,
.card-table .table td:first-child,
.card-flush .table th:first-child,
.card-flush .table td:first-child {
  padding-left: 20px;
}

.card-table .table th:last-child,
.card-table .table td:last-child,
.card-flush .table th:last-child,
.card-flush .table td:last-child {
  padding-right: 20px;
}

.card:not(.is-expanded) .table tr.is-extra {
  display: none;
}

.table-more {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: -1px;
  padding: 12px;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--accent);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}

.table-more .icon {
  width: 16px;
  height: 16px;
}

.table-more:hover {
  background: var(--hover);
}

.is-expanded .table-more .icon {
  transform: rotate(180deg);
}

.detail-main .trunc-text {
  max-width: 220px;
}

.detail-main .table th,
.detail-main .table td {
  padding-left: 12px;
  padding-right: 12px;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr[data-open],
.table tbody tr[data-href] {
  cursor: pointer;
}

.table tbody tr:hover td {
  background: var(--hover);
}

.table tbody tr:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.table .num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.table tfoot td {
  border-top: 1px solid var(--border);
  border-bottom: 0;
  background: var(--surface-2);
  font-weight: 650;
}

/* Ďalšie riadky súčtu (zaplatené / ešte dlžím) — ľahšie písmo. */
.table tfoot tr.foot-sub td {
  border-top-color: var(--border);
  color: var(--ink-2);
  font-weight: 500;
}

.table tfoot tr.foot-sub td.muted {
  color: var(--ink-3);
}

.table tfoot tr.foot-owe td {
  color: var(--todo);
  font-weight: 650;
}

.table tr.is-muted td {
  color: var(--ink-3);
}

.table-compact th,
.table-compact td {
  padding: 9px 12px;
}

.card:not(.card-table):not(.card-flush) .table-compact th:first-child,
.card:not(.card-table):not(.card-flush) .table-compact td:first-child {
  padding-left: 0;
}

.card:not(.card-table):not(.card-flush) .table-compact th:last-child,
.card:not(.card-table):not(.card-flush) .table-compact td:last-child {
  padding-right: 0;
}

.table-plain th,
.card:not(.card-table):not(.card-flush) .table-compact th,
.card:not(.card-table):not(.card-flush) .table-compact tfoot td {
  background: transparent;
}

.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.th-sort:hover {
  color: var(--ink);
}

.th-sort.is-active {
  color: var(--ink);
}

.th-sort:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.sort-caret {
  width: 13px;
  height: 13px;
  stroke-width: 2.4;
  opacity: 0;
}

.th-sort:hover .sort-caret {
  opacity: 0.45;
}

.th-sort.is-active .sort-caret {
  opacity: 1;
}

.th-sort.is-asc .sort-caret {
  transform: rotate(180deg);
}

.cell-sub {
  display: block;
  margin-top: 1px;
  color: var(--ink-3);
  font-size: 13.5px;
  font-weight: 400;
}

.cell-link {
  text-decoration: none;
}

.cell-link:hover {
  text-decoration: underline;
}

.trunc-text {
  display: block;
  max-width: clamp(180px, 26vw, 380px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.trunc-text > a,
.trunc-text > span {
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table td .cell-sub {
  white-space: nowrap;
}

.cell-action {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

/* Názvy nákladov pod sumou len na širokom okne — inak by sa nezmestil stĺpec s faktúrou a platbou */
@media (max-width: 1560px) {
  .card-table .cost-titles {
    display: none;
  }
}

/* Zákazky majú veľa stĺpcov — dlhý názov zákazky sa skôr skráti „…“ */
.jobs-table .trunc-text {
  max-width: clamp(150px, 20vw, 340px);
}

/* Užšie okno: menej vzduchu v bunkách */
@media (max-width: 1400px) {
  .card-table .table th,
  .card-table .table td {
    padding-left: 10px;
    padding-right: 10px;
  }

  .card-table .table th:first-child,
  .card-table .table td:first-child {
    padding-left: 26px;
  }

  .card-table .trunc-text {
    max-width: clamp(150px, 16vw, 380px);
  }
}

/* Stĺpec so stavom */
.cell-paid {
  width: 1%;
  white-space: nowrap;
}

.cell-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 14px;
}

.cell-note .icon {
  width: 16px;
  height: 16px;
}

.clip {
  display: inline-flex;
  margin-left: 6px;
  color: var(--ink-3);
  vertical-align: -2px;
}

.clip .icon {
  width: 15px;
  height: 15px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--fill);
  color: var(--ink-2);
  font-size: 13.5px;
  white-space: nowrap;
}

/* stavové odznaky — kapsula s ikonou a textom, nikdy len farba */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px 0 8px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.badge .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.badge-pos,
.badge-done {
  background: var(--done-bg);
  color: var(--done);
}

.badge-neg {
  background: var(--neg-bg);
  color: var(--neg);
}

.badge-info {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-warn,
.badge-todo {
  background: var(--todo-bg);
  color: var(--todo);
}

.badge-wait {
  background: var(--wait-bg);
  color: var(--wait);
}

.badge-muted,
.badge-off {
  background: var(--off-bg);
  color: var(--off);
}

/* ---------- stavové bodky ---------- */

/* Otvorené riadky: farebná bodka vľavo (ako neprečítaný mail) — oranžová = treba konať, modrá = čaká sa */
.table tr.row-todo,
.list-row.row-todo {
  --stripe: var(--todo-line);
}

.table tr.row-wait,
.list-row.row-wait {
  --stripe: var(--wait-line);
}

.table tr.row-done,
.list-row.row-done {
  --stripe: var(--done-line);
}

.table tr[class*='row-'] td:first-child {
  position: relative;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--dot, var(--ink-3));
}

.dot-todo {
  --dot: var(--todo-line);
}

.dot-wait {
  --dot: var(--wait-line);
}

.dot-done {
  --dot: var(--done-line);
}

.dot-off {
  --dot: rgba(142, 142, 147, 0.7);
}

/* Legenda farieb (už sa nepoužíva, nechávam pre istotu) */
.legend-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: -4px 0 14px;
  color: var(--ink-2);
  font-size: 13.5px;
}

.legend-line span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-line b {
  color: var(--ink);
  font-weight: 600;
}

/* Stav vo formulári: segmentový prepínač s farebnou bodkou */
.seg-opt span .dot {
  width: 8px;
  height: 8px;
}

.cost-paid .seg-opt span {
  padding: 4px 10px;
  font-size: 13.5px;
}

/* ---------- detail klienta ---------- */

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 14px;
}

@media (max-width: 1480px) {
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-side {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
  }
}

.detail-main,
.detail-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.detail-side .card-title {
  margin-bottom: 12px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.info-list .icon {
  width: 17px;
  height: 17px;
  color: var(--ink-3);
}

.info-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-ids {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 6px 24px;
  margin: 16px 0 0;
}

.info-ids dt {
  color: var(--ink-3);
  font-size: 13.5px;
}

.info-ids dd {
  margin: 2px 0 0;
  font-variant-numeric: tabular-nums;
}

.info-address,
.note-text {
  margin: 14px 0 0;
  color: var(--ink-2);
  white-space: pre-line;
}

.note-text {
  margin: 0;
  color: var(--ink);
}

/* ---------- nastavenia ---------- */

.settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.settings-card .card-title {
  margin-bottom: 6px;
}

.settings-card .card-sub {
  margin: 0 0 14px;
}

.settings-card .form-grid {
  margin-top: 16px;
}

.export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.backup-list {
  display: flex;
  flex-direction: column;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.backup-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 14.5px;
}

.backup-list li + li {
  border-top: 1px solid var(--border);
}

.backup-list .icon {
  color: var(--ink-3);
}

.backup-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 8px 0 18px;
}

.shortcuts > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shortcuts dt {
  min-width: 84px;
}

.shortcuts dd {
  margin: 0;
  color: var(--ink-2);
}

/* ---------- úvod ---------- */

.welcome {
  padding: 36px;
}

.welcome h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.welcome > p {
  max-width: 660px;
  color: var(--ink-2);
  font-size: 16px;
}

.welcome-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.welcome-action {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  border: 0;
  border-radius: 14px;
  background: var(--fill-2);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.welcome-action .icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.welcome-action kbd {
  position: absolute;
  top: 16px;
  right: 16px;
}

.welcome-action:hover {
  background: var(--fill);
}

.welcome-action:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

/* ---------- panely a dialógy ---------- */

dialog {
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.24);
}

/* bočný panel ako inšpektor na Macu — plávajúci, zaoblený */
dialog.drawer {
  position: fixed;
  inset: 10px 10px 10px auto;
  width: min(600px, calc(100vw - 20px));
  max-width: calc(100vw - 20px);
  height: calc(100dvh - 20px);
  max-height: calc(100dvh - 20px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

dialog.drawer[open] {
  animation: drawer-in 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes drawer-in {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
}

dialog.modal,
dialog.confirm {
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

dialog.modal {
  width: min(580px, calc(100vw - 32px));
}

/* potvrdenie ako upozornenie v iOS */
dialog.confirm {
  width: min(320px, calc(100vw - 48px));
  border-radius: 16px;
  background: var(--blur-bg);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
}

dialog.confirm[open],
dialog.modal[open] {
  animation: alert-in 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes alert-in {
  from {
    transform: scale(1.06);
    opacity: 0;
  }
}

.sheet {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.modal .sheet {
  max-height: calc(100dvh - 48px);
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 12px;
}

.sheet-head .icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--fill);
}

.sheet-head .icon-btn .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.sheet-titles {
  min-width: 0;
}

.sheet-titles h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.sheet-titles p {
  margin: 3px 0 0;
  color: var(--ink-2);
  font-size: 15px;
}

.sheet-body {
  flex: 1;
  padding: 8px 24px 26px;
  overflow-y: auto;
}

.sheet-foot {
  padding: 12px 24px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.sheet-actions .btn {
  height: 38px;
  padding: 0 18px;
}

.spacer {
  flex: 1;
}

.form-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--neg-bg);
  color: var(--neg);
  font-size: 14.5px;
  font-weight: 600;
}

.confirm-box {
  padding: 20px 18px 0;
  text-align: center;
}

.confirm-box h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.confirm-box p {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 13.5px;
}

/* tlačidlá ako v iOS upozornení: cez celú šírku, oddelené čiarou */
.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 18px -18px 0;
  border-top: 1px solid var(--border);
}

.confirm-actions .btn {
  height: 46px;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-size: 16px;
  font-weight: 500;
}

.confirm-actions .btn + .btn {
  border-left: 1px solid var(--border);
}

.confirm-actions .btn:hover {
  background: var(--hover);
}

.confirm-actions .btn-primary {
  font-weight: 650;
}

.confirm-actions .btn-danger {
  color: var(--neg);
  font-weight: 650;
}

.confirm-actions .btn:focus-visible {
  outline-offset: -3px;
}

/* formulár */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
}

.span-2 {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > label,
.label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

.req {
  margin-left: -3px;
  color: var(--accent);
}

.optional {
  color: var(--ink-3);
  font-size: 13.5px;
  font-weight: 400;
}

.hint {
  margin: 0;
  color: var(--ink-3);
  font-size: 13.5px;
}

.hint-new {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
}

.hint-new .icon {
  width: 15px;
  height: 15px;
}

.lead {
  margin: 0;
  color: var(--ink-2);
}

/* Položky sumy (výroba + grafika…), pod nimi bez/s DPH a sadzba */
.item-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.items-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.items-total {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.pay-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.amount-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.amount-row:empty {
  display: none;
}

.input-affix {
  position: relative;
  display: flex;
  flex: 1 1 170px;
}

/* Samostatné pole so sumou (napr. náklad) je v stĺpci — tam by flex-basis natiahol výšku */
.field > .input-affix {
  flex: none;
}

.input-affix input {
  height: 44px;
  padding-right: 34px;
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.affix {
  position: absolute;
  top: 50%;
  right: 13px;
  color: var(--ink-3);
  transform: translateY(-50%);
  pointer-events: none;
}

.amount .seg-opt span {
  padding: 8px 13px;
}

.amount select {
  height: 40px;
}

.amount-summary {
  min-height: 1.4em;
  margin: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  white-space: pre-wrap;
}

.amount-summary.is-error {
  color: var(--neg);
}

.repeat-box {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--fill-2);
}

.repeat-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin-top: 14px;
}

/* záloha pri zákazke — rovnaký sivý blok ako pri pravidelnej platbe */
.deposit-field {
  gap: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--fill-2);
}

.deposit-amount {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}

.deposit-amount > label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

.deposit-amount .input-affix {
  flex: none;
  width: min(100%, 240px);
}

.deposit-hint {
  font-variant-numeric: tabular-nums;
  white-space: pre-wrap;
}

.deposit-hint:empty {
  display: none;
}

.deposit-hint.is-error {
  color: var(--neg);
}

.deposit-hint.is-done {
  color: var(--done);
}

/* „záloha 300 € · zostáva 930 €“ pod stavom v zozname */
.deposit-line {
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.note-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--fill-2);
  color: var(--ink-2);
  font-size: 14px;
}

.linked {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.linked-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--fill-2);
  color: var(--ink);
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
}

.linked-item:hover {
  background: var(--fill);
}

.linked-amount {
  margin-left: auto;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.linked-profit {
  min-width: 110px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* náklady priamo v zákazke — skupina ako v iOS formulároch */
.costs {
  padding: 16px;
  border-radius: 14px;
  background: var(--fill-2);
}

.costs :where(input:not([type="checkbox"])) {
  background: var(--surface);
}

.costs :where(input:not([type="checkbox"])):hover:not(:focus) {
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border-strong);
}

.cost-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cost-rows:empty {
  display: none;
}

@media (min-width: 561px) {
  .cost-rows .cost-row + .cost-row {
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }
}

/* Za čo | počet ks × cena za ks | zmazať; pod tým výpočet, keď je viac kusov */
.cost-row,
.item-row,
.cost-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 10px 124px 28px;
  align-items: center;
  gap: 8px;
}

.cost-head {
  margin-bottom: -2px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
}

.cost-head span:nth-child(2),
.cost-head span:nth-child(4) {
  text-align: right;
}

.cost-op {
  color: var(--ink-3);
  font-size: 15px;
  text-align: center;
}

.cost-amount input,
.cost-qty input {
  height: 40px;
  font-size: 15px;
  text-align: right;
}

.cost-amount input {
  padding-right: 30px;
  font-weight: 600;
}

.cost-qty input {
  padding-right: 30px;
}

.cost-amount .affix,
.cost-qty .affix {
  right: 11px;
}

/* Druhý riadok nákladu: komu + „zaplatené“; pod tým výpočet kusov */
.cost-payee {
  grid-column: 1 / 2;
}

.cost-paid {
  grid-column: 2 / -2;
  justify-self: start;
  margin-left: 2px;
  color: var(--ink-2);
  font-size: 14px;
}

.cost-calc {
  grid-column: 1 / -2;
  margin: -2px 0 2px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.cost-calc.is-error {
  color: var(--neg);
}

.item-row .cost-calc {
  grid-column: 1 / -2;
}

.costs-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.profit {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.profit-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
  color: var(--ink-2);
  font-size: 14.5px;
}

.profit-total {
  margin-top: 4px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
}

.profit-total .muted {
  font-weight: 400;
}

.linked-sum {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 14.5px;
}

.linked-sum strong {
  color: var(--ink);
}

.jobs-card {
  margin-bottom: 14px;
}

.card-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 22px 16px;
  border-top: 1px solid var(--border);
  color: var(--ink-2);
  font-size: 14.5px;
}

.card-tip .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

/* upozornenie nad zoznamom */
.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--todo-bg);
  color: var(--todo);
  font-size: 14.5px;
  font-weight: 500;
}

.notice > span {
  flex: 1;
  min-width: 200px;
}

.notice .btn {
  background: var(--surface);
  color: var(--ink);
}

/* hlášky ako v iOS: tmavá kapsula s rozmazaným pozadím */
.toasts {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 7px 7px 7px 16px;
  border-radius: 22px;
  background: rgba(30, 30, 32, 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  animation: toast-in 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.toast > .icon {
  color: #30d158;
}

.toast:not(:has(.toast-action)) {
  padding: 10px 18px 10px 14px;
}

.toast-error {
  background: rgba(215, 0, 21, 0.92);
}

.toast-error > .icon {
  color: #fff;
}

.toast-action {
  padding: 6px 13px;
  border: 0;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.toast-action:hover {
  background: rgba(255, 255, 255, 0.26);
}

.toast-action:focus-visible {
  outline: 2px solid #fff;
}

@keyframes toast-in {
  from {
    transform: translateY(10px) scale(0.96);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- menšie obrazovky ---------- */

@media (max-width: 1240px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .dash-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid,
  .settings {
    grid-template-columns: minmax(0, 1fr);
  }

  .welcome-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Telefón / úzke okno: dole lišta s ikonami ako v iPhone appkách */
@media (max-width: 880px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 30;
    flex-direction: row;
    align-items: stretch;
    height: auto;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    overflow: visible;
    border-top: 1px solid var(--side-border);
    border-right: 0;
    background: var(--blur-bg);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
  }

  .brand,
  .quick {
    display: none;
  }

  .nav {
    flex: 5;
    flex-direction: row;
    gap: 0;
  }

  .sidebar-foot {
    flex: 1;
    display: flex;
    margin: 0;
    padding: 0;
    border-top: 0;
  }

  .nav-link {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    height: 52px;
    padding: 0 2px;
    border-radius: 10px;
    color: var(--ink-3);
    font-size: 10.5px;
    font-weight: 500;
  }

  .nav-link .icon {
    width: 24px;
    height: 24px;
    color: inherit;
  }

  .nav-label {
    flex: none;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .nav-link:hover {
    background: transparent;
  }

  .nav-link.is-active {
    background: transparent;
    color: var(--accent);
    font-weight: 600;
  }

  /* počet ako červená bodka s číslom pri ikonke (ako v iOS) */
  .nav-badge {
    position: absolute;
    top: 3px;
    left: calc(50% + 6px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ff3b30;
    color: #fff !important;
    font-size: 11px;
    font-weight: 650;
    line-height: 18px;
    text-align: center;
  }

  .nav-badge.tone-wait {
    background: var(--wait-line);
  }

  .nav-badge.tone-todo {
    background: var(--todo-line);
  }

  .main {
    padding: 20px 16px calc(96px + env(safe-area-inset-bottom));
  }

  .page-heading h1 {
    font-size: 30px;
  }

  .dash-cols,
  .form-grid,
  .repeat-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .todo-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .todo-list li:nth-child(even) {
    box-shadow: none;
  }

  .todo-list li + li .todo-row {
    box-shadow: inset 0 1px 0 var(--border);
  }

  .toasts {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }

  dialog.drawer {
    inset: 8px 0 0 0;
    width: 100vw;
    max-width: 100vw;
    height: calc(100dvh - 8px);
    max-height: calc(100dvh - 8px);
    border-radius: 16px 16px 0 0;
  }

  @keyframes drawer-in {
    from {
      transform: translateY(40px);
      opacity: 0;
    }
  }
}

@media (max-width: 560px) {
  .welcome-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  /* hlavné čísla dve vedľa seba ako widgety na iPhone */
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .kpi {
    padding: 14px 14px 13px;
  }

  .kpi-label {
    font-size: 14px;
  }

  .kpi-sub {
    font-size: 12.5px;
  }

  .kpi .delta-label {
    display: none;
  }

  /* súhrn nad zoznamom: dve položky vedľa seba */
  .summary-item {
    flex: 1 1 40%;
    padding: 12px 14px;
  }

  .summary-value {
    font-size: 20px;
  }

  .summary-sub {
    font-size: 12.5px;
  }

  /* Na mobile ide „za čo“ na vlastný riadok, pod ním kusy × cena */
  .cost-head {
    display: none;
  }

  .cost-row,
  .item-row {
    grid-template-columns: 96px 10px minmax(0, 1fr) 28px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }

  .cost-row [name='cost_title'],
  .item-row [name='item_title'] {
    grid-column: 1 / -1;
  }

  .item-row .cost-calc {
    grid-column: 1 / -1;
  }

  .cost-row [name='cost_payee'] {
    grid-column: 1 / -1;
  }

  .cost-paid {
    grid-column: 1 / 4;
  }

  .cost-calc {
    grid-column: 1 / -1;
  }

  .kpi-value {
    margin: 10px 0 8px;
    font-size: 25px;
  }

  .search {
    width: 100%;
  }

  .tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  /* riadky v kartách: čipy pod meno */
  .unpaid-card .list .list-row.tile {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .unpaid-card .list .list-row.tile .list-side {
    grid-column: 2;
    grid-row: 1;
  }

  .unpaid-card .list .list-row.tile .tile-chips {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 8px;
  }
}

/* ---------- jeden stav na riadok: bodka + slovo, klik otvorí menu ---------- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  margin-left: -9px;
  padding: 0 8px 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.status:hover {
  background: var(--fill-2);
}

.status:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
}

.status .dot {
  width: 8px;
  height: 8px;
}

.status-caret {
  width: 13px;
  height: 13px;
  color: var(--ink-3);
  stroke-width: 2.3;
  opacity: 0;
}

.status:hover .status-caret,
.status:focus-visible .status-caret {
  opacity: 1;
}

.status-menu {
  position: fixed;
  z-index: 60;
  min-width: 250px;
  padding: 5px;
  border-radius: 12px;
  background: var(--blur-bg);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--shadow-lg);
}

.status-item {
  display: grid;
  grid-template-columns: 16px 9px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 10px 7px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
}

.status-check .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}

.status-text {
  display: flex;
  flex-direction: column;
}

.status-text small {
  color: var(--ink-2);
  font-size: 12.5px;
}

.status-item:hover,
.status-item:focus-visible {
  background: var(--accent);
  color: #fff;
  outline: none;
}

.status-item:hover small,
.status-item:focus-visible small {
  color: rgba(255, 255, 255, 0.8);
}

/* =====================================================================
   Leady a Kalendár
   ===================================================================== */

.text-brand {
  color: var(--accent) !important;
}

/* ---------- telefón: „Viac“ v dolnej lište (na Macu skryté) ---------- */

.nav-more {
  display: none;
  position: relative;
}

.more-menu {
  position: absolute;
  right: 4px;
  bottom: calc(100% + 10px);
  z-index: 40;
  width: 250px;
  padding: 5px;
  border-radius: 14px;
  background: var(--blur-bg);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--shadow-lg);
}

.more-menu .quick-item {
  height: 44px;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}

.more-menu .quick-item.is-current {
  font-weight: 600;
}

.more-count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.more-count.tone-wait {
  color: var(--wait);
}

.more-count.tone-todo {
  color: var(--todo);
}

.more-menu .quick-item:hover .more-count {
  color: #fff;
}

@media (max-width: 880px) {
  .nav-link.nav-secondary,
  .sidebar-foot {
    display: none;
  }

  .nav-more {
    flex: 1;
    display: flex;
  }

  .nav-more > .nav-link {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
  }
}

/* ---------- leady ---------- */

.cell-contact {
  max-width: 230px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14.5px;
  text-decoration: none;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.contact-link + .contact-link {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 13.5px;
}

.contact-link .icon {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--ink-3);
}

.contact-link:hover {
  color: var(--accent);
}

.contact-actions,
.lead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-actions .btn {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ďalší krok — sivý blok ako pri zálohe */
.next-box {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--fill-2);
}

.date-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.chip-btn {
  height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.chip-btn:hover {
  color: var(--accent);
}

.chip-btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
}

/* ---------- udalosť ---------- */

.field-check {
  justify-content: flex-end;
  padding-bottom: 9px;
}

.time-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.linked-item .chev {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--ink-3);
}

a.linked-item {
  text-decoration: none;
}

/* ---------- kalendár ---------- */

/* mesiac a pod ním deň; na širokom okne deň vpravo */
.cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

@media (min-width: 1400px) {
  .cal-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .day-card {
    position: sticky;
    top: 20px;
  }
}

.cal-card {
  padding: 18px 18px 14px;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 14px;
}

.cal-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cal-title span {
  color: var(--ink-3);
  font-weight: 500;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cal-nav .btn {
  text-decoration: none;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cal-dow {
  padding: 0 8px 8px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}

.cal-dow.is-weekend {
  color: var(--ink-3);
  opacity: 0.75;
}

.cal-day {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  min-height: 112px;
  padding: 6px 5px 6px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  outline: none;
}

.cal-day:not(:nth-child(7n + 1)) {
  box-shadow: inset 1px 0 0 var(--border);
}

.cal-day.is-weekend {
  background: color-mix(in srgb, var(--fill-2) 45%, transparent);
}

.cal-day:hover {
  background: var(--hover);
}

.cal-day:focus-visible {
  box-shadow: inset 0 0 0 2px var(--focus);
}

.cal-num {
  align-self: flex-end;
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 5px;
  border-radius: 14px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.cal-day.is-other .cal-num {
  color: var(--ink-3);
}

.cal-day.is-today .cal-num {
  background: var(--accent);
  color: #fff;
  font-weight: 650;
}

.cal-day.is-selected:not(.is-today) .cal-num {
  background: var(--ink);
  color: var(--surface);
  font-weight: 650;
}

.cal-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cal-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 2px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.cal-chip-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* udalosť s časom: bodka + čas + názov (ako v Apple Kalendári) */
.cal-chip::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: 1px;
  border-radius: 50%;
  background: var(--accent);
}

.cal-chip-time {
  flex: none;
  color: var(--ink-3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

/* celodenná / viacdňová: vyplnený pásik */
.cal-chip-allday {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.cal-chip-allday::before {
  display: none;
}

/* ozvať sa z leadu: oranžová — úloha pre teba */
.cal-chip-lead {
  background: var(--todo-bg);
  color: var(--todo);
  font-weight: 600;
}

.cal-chip-lead::before {
  background: var(--todo-line);
}

.cal-chip:hover {
  filter: brightness(0.96);
  background-color: var(--fill);
}

.cal-chip-allday:hover {
  background: var(--accent-soft);
}

.cal-chip-lead:hover {
  background: var(--todo-bg);
}

.cal-chip:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 0;
}

.cal-day.is-other .cal-chip {
  opacity: 0.55;
}

.cal-more {
  padding: 0 6px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
}

.cal-dots {
  display: none;
}

/* ---------- zvolený deň ---------- */

.day-card {
  padding: 18px 18px 14px;
}

.day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.day-title {
  margin: 4px 0 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.day-section {
  margin: 12px 0 4px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

.day-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.day-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.day-row + .day-row {
  box-shadow: inset 0 1px 0 var(--border);
}

.day-item {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  padding: 10px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.day-item:hover {
  background: var(--hover);
}

.day-item:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.day-time {
  display: flex;
  flex-direction: column;
  flex: none;
  width: 58px;
  padding-top: 1px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.day-time small {
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 500;
}

.day-bar {
  flex: none;
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
}

.day-bar-lead {
  background: var(--todo-line);
}

.day-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.day-name {
  overflow: hidden;
  font-size: 15.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.day-meta {
  overflow: hidden;
  color: var(--ink-2);
  font-size: 13.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.day-call {
  color: var(--done);
}

.day-empty {
  margin: 18px 0 10px;
  color: var(--ink-3);
  font-size: 15px;
  text-align: center;
}

/* ---------- pripojenie k Apple Kalendáru ---------- */

.subscribe .btn-primary {
  text-decoration: none;
}

.subscribe-steps .label {
  margin: 0 0 6px;
}

.subscribe-steps ol {
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.5;
}

.copy-row {
  display: flex;
  gap: 8px;
}

.copy-row input {
  flex: 1;
  min-width: 0;
  color: var(--ink-2);
  font-size: 13px;
}

@media (max-width: 880px) {
  .time-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cal-card {
    padding: 14px 8px 8px;
  }

  .cal-title {
    font-size: 21px;
  }

  .cal-dow {
    padding: 0 0 6px;
    text-align: center;
    font-size: 12px;
  }

  /* na telefóne ako iPhone Kalendár: číslo dňa a pod ním bodky */
  .cal-day {
    align-items: center;
    min-height: 52px;
    padding: 4px 0 6px;
    gap: 4px;
  }

  .cal-day:not(:nth-child(7n + 1)) {
    box-shadow: none;
  }

  .cal-day.is-weekend {
    background: transparent;
  }

  .cal-num {
    align-self: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    font-size: 16.5px;
  }

  .cal-items {
    display: none;
  }

  .cal-dots {
    display: flex;
    gap: 3px;
    height: 6px;
  }

  .cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
  }

  .cal-dot-lead {
    background: var(--todo-line);
  }

  .cal-day.is-other .cal-dots {
    opacity: 0.5;
  }

  .page-actions [data-subscribe] {
    order: 2;
  }
}

/* prázdny zoznam */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 48px 24px 52px;
  text-align: center;
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
}

.empty-mark .navicon {
  width: 26px;
  height: 26px;
  fill: currentColor;
  color: var(--accent);
}

.empty-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.empty-text {
  max-width: 480px;
  margin: 0;
  color: var(--ink-2);
}

.empty .btn {
  margin-top: 12px;
}

/* stav zápisu do Apple Kalendára */
.apple-status {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--fill-2);
  font-size: 14.5px;
}

.apple-status .dot {
  margin-top: 6px;
}

.apple-done {
  background: var(--done-bg);
}

.apple-todo {
  background: var(--todo-bg);
}

.apple-neg {
  background: var(--neg-bg);
}

.dot-neg {
  --dot: var(--neg);
}

/* =====================================================================
   Nový vzhľad (november 2026) — podľa Fynix / PlanIQ / Ledgerix / Finpath.
   Vrstva je posledná a prepisuje staršie pravidlá. Pozor: čo sa tu nastaví
   bez media query, prebije aj staršie mobilné pravidlá — preto je na konci
   mobilný blok, ktorý ich opakuje.
   ===================================================================== */

body {
  font-family: var(--font);
  font-size: 15px;
  letter-spacing: -0.005em;
  font-feature-settings: "tnum" 0;
}

.icon {
  stroke-width: 1.7;
}

/* ---------- rozloženie ---------- */

.app {
  grid-template-columns: 256px minmax(0, 1fr);
}

.main {
  padding: 18px 34px 130px;
}

.view {
  max-width: 1480px;
}

/* ---------- bočné menu (ako Fynix) ---------- */

.sidebar {
  padding: 18px 14px 16px;
  border-right: 0;
  background: var(--bg);
}

.brand {
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.brand-mark img {
  height: 30px;
}

.brand-name {
  font-size: 15.5px;
  font-weight: 700;
}

.brand-sub {
  font-size: 12.5px;
}

.quick {
  margin: 0 0 6px;
}

.quick-btn {
  height: 44px;
  border-radius: 999px;
  font-size: 15px;
}

.quick-menu {
  padding: 6px;
  border-radius: 18px;
}

.quick-item {
  height: 40px;
  border-radius: 12px;
  font-size: 14.5px;
}

.quick-item .icon {
  color: var(--ink-2);
}

.quick-item:hover,
.quick-item:focus-visible {
  background: var(--hi-soft);
  color: var(--ink);
}

.quick-item:hover .icon,
.quick-item:focus-visible .icon {
  color: var(--ink);
}

.quick-item:hover kbd,
.quick-item:focus-visible kbd {
  background: var(--surface);
  color: var(--ink-2);
}

.nav {
  gap: 2px;
}

.nav-group {
  margin: 18px 12px 6px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
}

.nav-link {
  gap: 12px;
  height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
}

.nav-link .icon {
  width: 20px;
  height: 20px;
  color: currentColor;
}

.nav-link:hover {
  background: var(--side-hover);
  color: var(--ink);
}

.nav-link.is-active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.nav-link.is-active .icon {
  color: var(--ink);
}

/* počet ako malá kapsula */
.nav-badge {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--fill);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 22px;
  text-align: center;
}

.nav-badge.tone-wait {
  background: var(--wait-bg);
  color: var(--wait);
}

.nav-badge.tone-todo {
  background: var(--todo-bg);
  color: var(--todo);
}

.sidebar-foot {
  padding-top: 8px;
  border-top: 0;
}

/* ---------- horná lišta: hľadanie, Inbox, kalendár, iniciály ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1480px;
  margin: 0 auto 26px;
}

.topbar-brand {
  display: none;
}

.topbar-search {
  display: flex;
  flex: 0 1 440px;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 8px 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-3);
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
}

.topbar-search:hover {
  border-color: var(--border-strong);
  color: var(--ink-2);
}

.topbar-search .icon {
  color: var(--ink-2);
}

.topbar-search kbd {
  margin-left: auto;
  border-radius: 999px;
  background: var(--fill);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.topbar-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-2);
}

.topbar-btn:hover,
.topbar-btn.is-active {
  color: var(--ink);
  border-color: var(--border-strong);
}

.topbar-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid var(--bg);
  border-radius: 10px;
  background: var(--hi);
  color: var(--hi-ink);
  font-size: 11px;
  font-weight: 750;
}

.topbar-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--deep);
  color: var(--hi);
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
}

/* ---------- rýchly zápis dole (ako „Ask anything“ v Ledgerix) ---------- */

.capture {
  position: fixed;
  bottom: 22px;
  left: calc(50% + 128px);
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(580px, calc(100vw - 360px));
  padding: 7px;
  border-radius: 999px;
  background: #141a14;
  box-shadow: 0 20px 44px -14px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: translateX(-50%);
}

.capture-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--hi);
  color: var(--hi-ink);
}

.capture input {
  flex: 1;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  box-shadow: none;
}

.capture input:hover:not(:focus),
.capture input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.capture input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.capture-kbd {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.65);
}

.capture:focus-within .capture-kbd {
  display: none;
}

.capture-go {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.capture-go:hover,
.capture:focus-within .capture-go {
  background: var(--hi);
  color: var(--hi-ink);
}

body[data-route="inbox"] .capture {
  display: none;
}

/* ---------- hlavička stránky ---------- */

.page-head {
  align-items: flex-end;
  margin-bottom: 22px;
}

.page-heading h1 {
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.page-sub {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 15.5px;
}

.back-link {
  color: var(--ink-2);
}

/* ---------- tlačidlá ---------- */

.btn {
  gap: 7px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
}

.btn:hover {
  border-color: #bdc4b9;
  background: var(--surface-2);
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.btn-lime {
  border-color: var(--hi);
  background: var(--hi);
  color: var(--hi-ink);
}

.btn-lime:hover {
  border-color: var(--hi-strong);
  background: var(--hi-strong);
}

.btn-danger {
  border-color: var(--neg);
}

.btn-quiet-danger {
  border-color: transparent;
  background: transparent;
}

.btn-quiet-danger:hover {
  border-color: transparent;
}

.btn-sm {
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 13.5px;
}

.icon-btn {
  border-radius: 50%;
}

.quick-pair .icon-btn {
  background: var(--fill-2);
}

.link-btn,
.card-sub a,
.kpi-sub a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--hi-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ---------- polia ---------- */

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 15px;
}

:where(textarea) {
  height: auto;
  padding: 11px 14px;
}

input:hover:not(:focus),
select:hover:not(:focus),
textarea:hover:not(:focus) {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ink-2);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

input[type="checkbox"] {
  accent-color: var(--deep);
}

.year-select select {
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: none;
}

.seg {
  padding: 3px;
  border-radius: 999px;
  background: var(--fill);
}

.seg-opt span,
.seg-buttons button {
  border-radius: 999px;
  padding: 7px 14px;
}

.seg-opt input:checked + span,
.seg-buttons button[aria-pressed="true"] {
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(18, 23, 18, 0.12);
}

/* ---------- karty ---------- */

.card {
  padding: 22px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-table,
.card-flush {
  padding: 0;
}

.card-title {
  font-size: 17.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.card-sub {
  color: var(--ink-3);
  font-size: 13.5px;
}

/* „Všetky“, „Ponuky“ … ako malé oblé tlačidlo */
.card-link {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

.card-link:hover {
  border-color: var(--border-strong);
  text-decoration: none;
}

.card-more {
  border-radius: 999px;
  background: var(--fill-2);
  color: var(--ink);
}

.tile-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--fill);
  color: var(--ink);
}

.tile-icon .icon {
  width: 19px;
  height: 19px;
}

.tile-icon-brand {
  background: var(--deep);
  color: var(--hi);
}

.tile-icon-done {
  background: var(--hi-soft);
  color: var(--done);
}

.tile-icon-wait {
  background: var(--wait-bg);
  color: var(--wait);
}

.tile-icon-todo {
  background: var(--todo-bg);
  color: var(--todo);
}

.tile-icon-neg {
  background: var(--neg-bg);
  color: var(--neg);
}

.tile-icon-ink {
  background: var(--fill);
  color: var(--ink-2);
}

/* súhrn nad zoznamami: samostatné karty vedľa seba */
.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.summary-item {
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.summary-label {
  color: var(--ink-2);
  font-size: 14px;
}

.summary-value {
  margin-top: 8px;
  font-family: var(--font);
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.summary-sub {
  margin-top: 3px;
}

/* prvá karta súhrnu je zvýraznená (ako „Total Balance“) */
.summary > .summary-item:first-child {
  background: var(--hi);
  color: var(--hi-ink);
}

.summary > .summary-item:first-child .summary-label,
.summary > .summary-item:first-child .summary-sub {
  color: rgba(255, 255, 255, 0.82);
}

.summary > .summary-item:first-child .summary-value {
  color: var(--hi-ink) !important;
}

.kpi-value,
.unpaid-totals dd,
.winrate-value,
.todo-amount {
  font-family: var(--font);
  letter-spacing: -0.02em;
}

/* ---------- zoznamy, filtre, tabuľky ---------- */

.toolbar {
  margin-bottom: 16px;
}

.tabs {
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.tab {
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 550;
}

.tab:hover:not(.is-active) {
  background: var(--fill-2);
}

.tab.is-active {
  background: var(--deep);
  color: var(--on-deep);
  box-shadow: none;
}

.tab.is-active .tab-count {
  color: rgba(243, 247, 239, 0.65);
}

.search input {
  height: 46px;
  border-radius: 999px;
  background: var(--surface);
}

.table th {
  padding: 12px 14px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
}

.table td {
  padding: 14px;
}

.card-table .table th:first-child,
.card-table .table td:first-child {
  padding-left: 24px;
}

.card-table .table th:last-child,
.card-table .table td:last-child {
  padding-right: 24px;
}

.table tbody tr:hover td {
  background: var(--surface-2);
}

.table tfoot td {
  background: var(--surface-2);
}

/* stav: oblá kapsula s bodkou (ako „Completed“ / „Pending“) */
.status {
  gap: 6px;
  height: 30px;
  margin-left: 0;
  padding: 0 10px 0 10px;
  border-radius: 999px;
  background: var(--st-bg, var(--fill));
  color: var(--st, var(--ink));
  font-size: 13.5px;
  font-weight: 600;
}

.status:hover {
  background: var(--st-bg, var(--fill));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--st, var(--ink)) 30%, transparent);
}

.status-caret {
  color: currentColor;
  opacity: 0.5;
}

.status-todo { --st: var(--todo); --st-bg: var(--todo-bg); }
.status-wait { --st: var(--wait); --st-bg: var(--wait-bg); }
.status-done { --st: var(--done); --st-bg: var(--done-bg); }
.status-off { --st: var(--off); --st-bg: var(--off-bg); }

.badge {
  height: 30px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  font-size: 13.5px;
}

.status-menu,
.more-menu,
.quick-menu {
  border-radius: 18px;
  background: var(--surface);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.status-item {
  border-radius: 12px;
}

.status-item:hover,
.status-item:focus-visible {
  background: var(--hi-soft);
  color: var(--ink);
}

.status-item:hover small,
.status-item:focus-visible small {
  color: var(--ink-2);
}

.dot-done {
  --dot: var(--done-line);
}

/* ---------- panel s formulárom, dialógy, hlášky ---------- */

dialog::backdrop {
  background: rgba(10, 14, 10, 0.35);
}

dialog.drawer {
  inset: 12px 12px 12px auto;
  height: calc(100dvh - 24px);
  max-height: calc(100dvh - 24px);
  border-radius: 26px;
}

dialog.modal,
dialog.confirm {
  border-radius: 24px;
}

.sheet-head {
  padding: 24px 26px 14px;
}

.sheet-titles h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.sheet-body {
  padding: 8px 26px 26px;
}

.sheet-foot {
  padding: 14px 26px 16px;
}

.sheet-actions .btn {
  height: 44px;
  padding: 0 20px;
}

.repeat-box,
.deposit-field,
.next-box,
.costs,
.note-line,
.linked-item {
  border-radius: 16px;
}

.toast {
  background: #141a14;
}

.toast > .icon {
  color: var(--hi);
}

.toast-action {
  background: rgba(196, 240, 108, 0.18);
  color: var(--hi);
}

/* ---------- prehľad ---------- */

.dash-hello {
  margin-bottom: 22px;
}

.dash-hello h1 {
  font-size: 36px;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.dash-hello p {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 16px;
}

.dash {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

/* veľká limetková karta so ziskom (ako „Total Balance“ vo Fynixe) */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  overflow: hidden;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--hi);
  color: var(--hi-ink);
}

.hero::after {
  content: '';
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  border: 34px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-label {
  margin: 0;
  font-size: 16px;
  font-weight: 550;
}

.hero-value {
  margin: 10px 0 4px;
  font-size: 46px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.hero-sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 650;
}

.hero-chip .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

.hero-actions .btn {
  height: 46px;
  border: 0;
}

.hero-actions .btn:first-child {
  background: #fff;
  color: var(--hi-ink);
}

.hero-actions .btn:last-child {
  background: #14211a;
  color: #fff;
}

/* tri čísla v jednej karte (ako „AI Enhancements“) */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stat-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
}

a.stat-tile:hover {
  border-color: var(--border-strong);
}

.stat-tile-top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 550;
}

.stat-tile-top .tile-icon {
  width: 30px;
  height: 30px;
}

.stat-tile-top .tile-icon .icon {
  width: 16px;
  height: 16px;
}

.stat-tile-value {
  margin: 12px 0 2px;
  overflow: hidden;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.03em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stat-tile-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: 12.5px;
}

.pill-delta {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}

.pill-delta.is-good {
  background: var(--hi-soft);
  color: var(--done);
}

.pill-delta.is-bad {
  background: var(--neg-bg);
  color: var(--neg);
}

/* malé stĺpčeky po mesiacoch v dlaždici */
.mini-bars {
  display: block;
  width: 100%;
  height: 34px;
  margin-top: auto;
  padding-top: 10px;
}

.mini-bars rect {
  fill: #dde2d8;
}

.mini-bars rect.is-on {
  fill: var(--deep);
}

/* zdravie biznisu (ako „Finance Score“) */
.score-word {
  margin: 14px 0 0;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.score-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.score-pct {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.score-label {
  color: var(--ink-3);
  font-size: 13.5px;
}

.score-bar {
  display: flex;
  gap: 4px;
  height: 14px;
  margin: 12px 0 18px;
}

.score-bar span {
  border-radius: 7px;
  background: var(--hi);
}

.score-bar span:first-child {
  background: var(--deep);
}

.score-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--border);
}

.score-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}

.score-list dt {
  color: var(--ink-2);
}

.score-list dd {
  margin: 0;
  font-weight: 650;
}

/* najbližší meeting — tmavá karta (ako „Meeting Notes“ v PlanIQ) */
.meet-card {
  display: flex;
  flex-direction: column;
}

.meet {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 20px;
  background: #141a14;
  color: #f3f7ef;
}

.meet::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 240, 108, 0.35), transparent 70%);
  pointer-events: none;
}

.meet-when {
  margin: 0;
  color: var(--hi);
  font-size: 13.5px;
  font-weight: 650;
}

.meet-title {
  margin: 6px 0 4px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.meet-meta {
  margin: 0;
  color: rgba(243, 247, 239, 0.65);
  font-size: 14px;
}

.meet-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.meet-actions .btn {
  height: 42px;
  border: 0;
}

.meet-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.meet-empty {
  padding: 18px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 20px;
  color: var(--ink-2);
}

.mini-list {
  display: flex;
  flex-direction: column;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.mini-list a,
.mini-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 4px;
  border: 0;
  border-top: 1px solid var(--border);
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.mini-list li:first-child a,
.mini-list li:first-child button {
  border-top: 0;
}

.mini-list .icon {
  color: var(--ink-3);
}

.mini-list .mini-main {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mini-list .mini-side {
  color: var(--ink-3);
  font-size: 13px;
  white-space: nowrap;
}

/* úlohy na prehľade: stĺpce s pruhom */
.task-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  color: inherit;
  text-decoration: none;
}

.task-bar-name {
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 550;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.task-bar-n {
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
}

.task-bar-track {
  grid-column: 1 / -1;
  display: flex;
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--fill);
}

.task-bar-track span {
  height: 100%;
}

.task-bar-track .is-open {
  background: var(--deep);
}

.task-bar-track .is-done {
  background: var(--hi);
}

.inbox-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--hi-soft);
  color: inherit;
  text-decoration: none;
}

.inbox-strip strong {
  font-size: 22px;
  font-weight: 700;
}

.inbox-strip span {
  color: var(--ink-2);
  font-size: 14px;
}

.inbox-strip .icon {
  margin-left: auto;
  color: var(--ink-2);
}

/* kam idú peniaze — koláč (ako „Statistic“) */
.donut-wrap {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}

.donut {
  position: relative;
  width: 180px;
  height: 180px;
}

.donut svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.donut-center small {
  color: var(--ink-3);
  font-size: 12.5px;
}

.donut-center strong {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.donut-legend li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.donut-legend .pct {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 24px;
  padding: 0 6px;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.donut-legend .name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.donut-legend .val {
  font-weight: 650;
}

/* ---------- úlohy: nástenka ako v Trelle ---------- */

.toggle-done {
  margin-right: 4px;
  color: var(--ink-2);
}

.board {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 -34px;
  padding: 2px 34px 24px;
  overflow-x: auto;
  scroll-padding: 34px;
}

.col {
  display: flex;
  flex: 0 0 292px;
  flex-direction: column;
  max-height: calc(100dvh - 250px);
  padding: 10px;
  border-radius: 22px;
  background: #e4e7e1;
}

.col-inbox {
  background: var(--hi-soft);
  box-shadow: inset 0 0 0 1px rgba(169, 222, 69, 0.45);
}

.col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px 10px 8px;
}

.col-title {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.col-title[data-rename] {
  cursor: text;
}

.col-count {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

.col-menu-btn {
  width: 32px;
  height: 32px;
}

.col-cards {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 44px;
  padding: 2px;
  overflow-y: auto;
  border-radius: 14px;
}

.col-cards.is-over {
  background: rgba(18, 23, 18, 0.04);
}

.col-empty {
  margin: 6px;
  color: var(--ink-3);
  font-size: 13.5px;
}

.task {
  display: flex;
  flex: none;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(18, 23, 18, 0.07), 0 0 0 1px rgba(18, 23, 18, 0.03);
  cursor: pointer;
}

.task:hover {
  box-shadow: 0 0 0 2px var(--hi-strong);
}

.task:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.task.is-dragging {
  opacity: 0.35;
}

.task-ph {
  flex: none;
  border-radius: 14px;
  background: rgba(18, 23, 18, 0.08);
}

.task-check {
  display: grid;
  flex: none;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  padding: 0;
  border: 1.6px solid var(--border-strong);
  border-radius: 50%;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.task-check .icon {
  width: 12px;
  height: 12px;
  stroke-width: 3.2;
}

.task-check:hover {
  border-color: #3fae55;
  color: #3fae55;
}

.task.is-done .task-check,
.inbox-item.is-done .task-check {
  border-color: #3fae55;
  background: #3fae55;
  color: #fff;
}

.task-body {
  flex: 1;
  min-width: 0;
}

.task-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.task.is-done .task-title {
  color: var(--ink-2);
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}

.due {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--fill);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
}

.due .icon {
  width: 13px;
  height: 13px;
}

.due.is-soon {
  background: var(--todo-bg);
  color: var(--todo);
}

.due.is-late {
  background: var(--neg-bg);
  color: var(--neg);
}

.task-note {
  display: inline-flex;
  color: var(--ink-3);
}

.task-note .icon {
  width: 15px;
  height: 15px;
}

.task-client {
  color: var(--ink-3);
  font-size: 12.5px;
}

.col-quick input {
  height: 42px;
  margin-bottom: 8px;
  border-color: transparent;
  background: var(--surface);
}

.col-add {
  margin-top: 8px;
}

.col-add textarea {
  min-height: 64px;
  border-radius: 14px;
  background: var(--surface);
  resize: none;
}

.col-add-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.col-add-btn {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 40px;
  margin-top: 6px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}

.col-add-btn:hover {
  background: rgba(18, 23, 18, 0.06);
  color: var(--ink);
}

.col-new {
  flex: 0 0 292px;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 8px;
  height: 56px;
  border: 1.5px dashed var(--border-strong);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.col-new:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}

.col-adding {
  padding: 12px;
}

.col-rename {
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  font-weight: 650;
}

.col-menu {
  min-width: 230px;
}

.col-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.col-menu-item .icon {
  width: 17px;
  height: 17px;
  color: var(--ink-2);
}

.col-menu-item.is-danger,
.col-menu-item.is-danger .icon {
  color: var(--neg);
}

/* ---------- Inbox ---------- */

.inbox-capture {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 8px 8px 8px 10px;
  border-radius: 999px;
}

.inbox-capture-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--hi);
  color: var(--hi-ink);
}

.inbox-capture input {
  flex: 1;
  height: 48px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  font-size: 18px;
  box-shadow: none;
}

.inbox-capture input:hover:not(:focus),
.inbox-capture input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.inbox-capture .btn {
  height: 48px;
}

.inbox-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.inbox-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
}

.inbox-item:first-child {
  border-top: 0;
}

.inbox-item .task-check {
  width: 24px;
  height: 24px;
  margin: 0;
}

.inbox-title {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.inbox-title span {
  font-size: 16px;
  font-weight: 550;
  overflow-wrap: anywhere;
}

.inbox-title small {
  color: var(--ink-3);
  font-size: 13px;
}

.inbox-item.is-done .inbox-title span {
  color: var(--ink-3);
  text-decoration: line-through;
}

.inbox-move select {
  max-width: 200px;
  height: 38px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 14px;
}

.inbox-done summary {
  padding: 14px 0 6px;
  color: var(--ink-2);
  font-weight: 600;
  cursor: pointer;
}

/* ---------- poznámky ---------- */

.notes {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.notes-side {
  position: sticky;
  top: 18px;
  max-height: calc(100dvh - 140px);
  padding: 14px;
  overflow-y: auto;
}

.notes-search {
  width: 100%;
  margin-bottom: 10px;
}

.notes-search input {
  height: 42px;
  background: var(--surface-2);
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.note-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
}

.note-item:hover {
  background: var(--surface-2);
}

.note-item.is-active {
  background: var(--hi-soft);
}

.note-item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.note-item-title {
  overflow: hidden;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.note-item-date {
  flex: none;
  color: var(--ink-3);
  font-size: 12.5px;
}

.note-item-who {
  color: var(--ink-2);
  font-size: 13px;
}

.note-item-snippet {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notes-none {
  padding: 14px;
  color: var(--ink-3);
}

.note-editor {
  min-height: 62vh;
  padding: 28px 32px;
}

.notes-back {
  display: none;
}

.note-title {
  width: 100%;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.note-title:hover:not(:focus),
.note-title:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.note-meta-field,
.note-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 6px 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-3);
}

.note-chip {
  padding-right: 14px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
}

.note-meta-field input {
  width: auto;
  height: 36px;
  padding: 0 6px 0 0;
  border: 0;
  background: transparent;
  font-size: 14px;
}

.note-meta-field input:hover:not(:focus),
.note-meta-field input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.note-who input {
  width: 190px;
}

.note-saved {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 13px;
}

.note-body {
  width: 100%;
  min-height: 320px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  font-size: 16.5px;
  line-height: 1.7;
  resize: none;
}

.note-body:hover:not(:focus),
.note-body:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.note-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ---------- hľadať čokoľvek (⌘K) ---------- */

dialog.palette {
  width: min(660px, calc(100vw - 32px));
  max-height: 72vh;
  margin: 11vh auto auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

dialog.palette[open] {
  animation: alert-in 0.18s cubic-bezier(0.32, 0.72, 0, 1);
}

.pal {
  display: flex;
  flex-direction: column;
  max-height: 72vh;
}

.pal-search {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}

.pal-search > .icon {
  width: 20px;
  height: 20px;
  color: var(--ink-2);
}

.pal-search input {
  flex: 1;
  height: 62px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 18px;
}

.pal-search input:hover:not(:focus),
.pal-search input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.pal-body {
  overflow-y: auto;
  padding: 8px;
}

.pal-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pal-group {
  margin: 10px 12px 4px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}

.pal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 14px;
  cursor: pointer;
}

.pal-item.is-active {
  background: var(--hi-soft);
}

.pal-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--fill);
  color: var(--ink-2);
}

.pal-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.pal-label,
.pal-sub {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pal-label {
  font-weight: 600;
}

.pal-sub {
  color: var(--ink-3);
  font-size: 13px;
}

.pal-empty {
  padding: 26px;
  color: var(--ink-3);
  text-align: center;
}

/* ---------- kalendár ---------- */

.cal-day.is-today .cal-num {
  background: var(--hi);
  color: var(--hi-ink);
}

.cal-day.is-selected:not(.is-today) .cal-num {
  background: var(--deep);
  color: var(--on-deep);
}

.cal-chip::before,
.cal-dot,
.day-bar {
  background: var(--deep);
}

.cal-chip-allday {
  background: var(--hi-soft);
  color: var(--ink);
}

.cal-chip-lead::before,
.cal-dot-lead,
.day-bar-lead {
  background: var(--todo-line);
}

.empty-mark {
  background: var(--hi-soft);
}

.empty-mark .navicon {
  color: var(--ink);
}

/* ---------- menšie okná ---------- */

@media (max-width: 1360px) {
  .span-3,
  .span-4,
  .span-5 {
    grid-column: span 6;
  }

  .span-7,
  .span-8 {
    grid-column: span 12;
  }
}

@media (max-width: 1100px) {
  .notes {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}

/* ---------- telefón ---------- */

@media (max-width: 880px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .main {
    padding: 12px 14px calc(96px + env(safe-area-inset-bottom));
  }

  .sidebar {
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--blur-bg);
  }

  .nav-group {
    display: none;
  }

  .nav-link {
    gap: 3px;
    height: 54px;
    padding: 0 2px;
    border-radius: 14px;
    color: var(--ink-3);
    font-size: 10.5px;
    font-weight: 500;
  }

  .nav-link .icon {
    width: 23px;
    height: 23px;
  }

  .nav-link:hover {
    background: transparent;
  }

  .nav-link.is-active {
    background: transparent;
    color: var(--ink);
    font-weight: 650;
    box-shadow: none;
  }

  .nav-link.is-active .icon {
    color: var(--ink);
  }

  .nav-badge {
    position: absolute;
    top: 2px;
    left: calc(50% + 6px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 11px;
    line-height: 18px;
  }

  .nav-badge.tone-wait {
    background: var(--wait-line);
    color: #fff;
  }

  .nav-badge.tone-todo {
    background: var(--todo-line);
    color: #fff;
  }

  .topbar {
    gap: 8px;
    margin-bottom: 18px;
  }

  .topbar-brand {
    display: block;
    flex: none;
  }

  .topbar-brand img {
    display: block;
    width: auto;
    height: 30px;
  }

  .topbar-search {
    flex: 1;
    height: 42px;
  }

  .topbar-search kbd {
    display: none;
  }

  .topbar-actions {
    margin-left: 0;
  }

  .topbar-actions .topbar-btn:not([href="#/inbox"]):not(.topbar-eye) {
    display: none;
  }

  .topbar-btn,
  .topbar-avatar {
    width: 42px;
    height: 42px;
  }

  .capture {
    display: none;
  }

  .page-heading h1,
  .dash-hello h1 {
    font-size: 28px;
  }

  .dash {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .dash > * {
    grid-column: 1 / -1;
  }

  .hero-value {
    font-size: 38px;
  }

  .stat-tiles {
    grid-template-columns: minmax(0, 1fr);
  }

  .donut-wrap {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .donut-legend {
    width: 100%;
  }

  .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .summary-item {
    padding: 14px;
  }

  .summary-value {
    font-size: 21px;
  }

  .board {
    margin: 0 -14px;
    padding: 2px 14px 20px;
    scroll-snap-type: x mandatory;
    scroll-padding: 14px;
  }

  .col,
  .col-new {
    flex-basis: 84vw;
    scroll-snap-align: start;
  }

  .col {
    max-height: calc(100dvh - 250px);
  }

  .inbox-capture input {
    font-size: 17px;
  }

  .inbox-capture .btn span {
    display: none;
  }

  .inbox-capture .btn {
    width: 48px;
    padding: 0;
  }

  .inbox-item {
    flex-wrap: wrap;
  }

  .inbox-move {
    margin-left: 38px;
  }

  .notes {
    grid-template-columns: minmax(0, 1fr);
  }

  .notes.has-note .notes-side {
    display: none;
  }

  .notes:not(.has-note) .note-editor {
    display: none;
  }

  .notes-side {
    position: static;
    max-height: none;
  }

  .notes-back {
    display: inline-flex;
  }

  .note-editor {
    padding: 18px;
  }

  .note-title {
    font-size: 24px;
  }

  dialog.drawer {
    inset: 8px 0 0 0;
    height: calc(100dvh - 8px);
    max-height: calc(100dvh - 8px);
    border-radius: 24px 24px 0 0;
  }

  dialog.palette {
    margin-top: 8vh;
  }
}

/* bunka v mriežke prehľadu: karta na celú výšku */
.cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cell > * {
  flex: 1;
  margin-bottom: 0 !important;
}

/* farby výsekov koláča a legendy */
.d1 { --c: var(--deep); }
.d2 { --c: var(--hi-strong); }
.d3 { --c: #6d8d5c; }
.d4 { --c: #b8c1b2; }
.d5 { --c: #dde5d4; }

.donut circle[class^="d"] {
  stroke: var(--c);
}

.donut-legend .pct {
  background: var(--c);
}

.d2 .pct,
.d4 .pct,
.d5 .pct {
  color: var(--hi-ink);
}


/* =====================================================================
   v4 — minimalizmus podľa Ledgerix, biele sklo (liquid glass) na jemnom
   prechode, farby Mirible. Posledná vrstva, prepisuje všetko vyššie.
   ===================================================================== */

/* pozadie: jemný prechod so závanom Mirible červenej — cez sklo kariet presvitá */
html {
  background: #f2f0f1;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 720px at 105% -12%, rgba(238, 28, 78, 0.16), transparent 62%),
    radial-gradient(820px 620px at -12% 108%, rgba(238, 28, 78, 0.09), transparent 60%),
    radial-gradient(900px 700px at 45% 40%, rgba(255, 255, 255, 0.95), transparent 70%),
    linear-gradient(180deg, #f6f4f5 0%, #efedee 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-weight: 400;
}

/* ---------- sklo ---------- */

.card,
.summary-item,
.hero,
.brand,
.tabs,
.topbar-search,
.topbar-btn,
.notes-side,
.note-editor,
.inbox-capture,
.col,
.stat-tile,
.capture {
  border: 1px solid var(--glass-edge);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
}

.stat-tile {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(35, 31, 32, 0.04);
}

.card {
  padding: 24px 26px;
}

.card-table {
  padding: 0;
}

/* ---------- písmo: tenšie, viac vzduchu ---------- */

.page-heading h1,
.dash-hello h1 {
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.page-sub,
.dash-hello p {
  color: var(--ink-2);
  font-size: 15px;
}

.card-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.card-sub {
  font-size: 13px;
}

.summary-value,
.stat-tile-value,
.kpi-value,
.unpaid-totals dd,
.winrate-value,
.todo-amount,
.score-pct {
  font-weight: 400;
}

.summary-value {
  font-size: 30px;
  letter-spacing: -0.04em;
}

.stat-tile-value {
  font-size: 28px;
  letter-spacing: -0.04em;
}

.list-title,
.todo-title,
.task-bar-name {
  font-weight: 500;
}

/* ---------- bočné menu ---------- */

.brand {
  border-radius: 18px;
}

.quick-btn {
  height: 44px;
  border-radius: 14px;
}

.nav-group {
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 450;
}

.nav-link {
  border-radius: 12px;
  font-weight: 450;
}

.nav-link.is-active {
  background: rgba(255, 255, 255, 0.92);
  font-weight: 550;
  box-shadow: inset 0 1px 0 #fff, 0 6px 18px -10px rgba(35, 31, 32, 0.25), 0 0 0 1px rgba(35, 31, 32, 0.05);
}

.nav-link.is-active .icon {
  color: var(--hi);
}

.nav-badge {
  background: rgba(35, 31, 32, 0.06);
}

/* ---------- horná lišta: hľadanie, oko, Inbox, kalendár ---------- */

.topbar-search {
  border-radius: 14px;
}

.topbar-search kbd {
  border-radius: 7px;
  background: rgba(35, 31, 32, 0.06);
}

.topbar-btn {
  border-radius: 14px;
  color: var(--ink);
}

.topbar-btn.is-on {
  border-color: var(--deep);
  background: var(--deep);
  color: #fff;
}

.topbar-dot {
  border-color: #f4f2f3;
  background: var(--hi);
  color: #fff;
}

.topbar-avatar {
  border-radius: 14px;
  background: linear-gradient(140deg, #ff4d74 0%, #ee1c4e 45%, #b70f38 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 20px -10px rgba(238, 28, 78, 0.7);
}

/* ---------- tlačidlá: hranatejšie, čierne hlavné ---------- */

.btn {
  height: 42px;
  border-radius: 12px;
  border-color: rgba(35, 31, 32, 0.12);
  background: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

.btn:hover {
  border-color: rgba(35, 31, 32, 0.22);
  background: #fff;
}

.btn-primary {
  border-color: var(--deep);
  background: var(--deep);
  color: #fff;
}

.btn-primary:hover {
  border-color: var(--deep-2);
  background: var(--deep-2);
}

.btn-lime {
  border-color: #fff;
  background: #fff;
  color: var(--hi);
}

.btn-lime:hover {
  border-color: #fff;
  background: #fff;
  color: var(--hi-strong);
}

.btn-sm {
  height: 34px;
  border-radius: 10px;
}

.card-link {
  height: 34px;
  border-radius: 10px;
  border-color: rgba(35, 31, 32, 0.1);
  background: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.year-select select {
  border-radius: 12px;
  border-color: rgba(35, 31, 32, 0.12);
  background: rgba(255, 255, 255, 0.75);
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
  border-color: rgba(35, 31, 32, 0.1);
  background: rgba(255, 255, 255, 0.7);
}

input:hover:not(:focus),
select:hover:not(:focus),
textarea:hover:not(:focus) {
  background: rgba(255, 255, 255, 0.85);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(238, 28, 78, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(238, 28, 78, 0.12);
}

input[type="checkbox"] {
  accent-color: var(--hi);
}

.link-btn,
.card-sub a,
.kpi-sub a {
  text-decoration-color: rgba(238, 28, 78, 0.5);
}

/* filtre: text s čiarou pod aktívnym (ako Week / Month v Ledgerix) */
.tabs {
  gap: 2px;
  padding: 4px;
  border-radius: 14px;
}

.tab {
  height: 36px;
  border-radius: 10px;
  font-weight: 450;
}

.tab.is-active {
  background: var(--deep);
  color: #fff;
}

.search input {
  border-radius: 14px;
  border-color: var(--glass-edge);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
}

.seg {
  border-radius: 12px;
  background: rgba(35, 31, 32, 0.05);
}

.seg-opt span,
.seg-buttons button {
  border-radius: 9px;
  font-weight: 450;
}

/* ---------- tabuľky ---------- */

.table th {
  border-bottom-color: var(--border);
  background: transparent;
  color: var(--ink-3);
  font-weight: 500;
}

.table td {
  border-bottom-color: var(--border);
}

.table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.6);
}

.table tfoot td {
  background: rgba(255, 255, 255, 0.45);
}

/* ---------- súhrn a ikonky ---------- */

.summary > .summary-item:first-child {
  background: var(--glass);
  color: var(--ink);
}

.summary > .summary-item:first-child .summary-label,
.summary > .summary-item:first-child .summary-sub {
  color: var(--ink-2);
}

.summary > .summary-item:first-child .summary-value {
  color: var(--ink) !important;
}

.tile-icon {
  border-radius: 12px;
  background: rgba(35, 31, 32, 0.05);
  color: var(--ink);
}

.tile-icon-brand {
  background: var(--deep);
  color: #fff;
}

.tile-icon-done {
  background: var(--done-bg);
  color: var(--done);
}

/* ---------- prehľad ---------- */

/* zisk: biela sklenená karta s jemnou červenou žiarou (nie výrazná) */
.hero {
  color: var(--ink);
}

.hero::after {
  right: -90px;
  bottom: -120px;
  width: 300px;
  height: 300px;
  border: 0;
  background: radial-gradient(circle at 40% 40%, rgba(238, 28, 78, 0.32), rgba(238, 28, 78, 0.08) 45%, transparent 70%);
  filter: blur(6px);
}

.hero-label {
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 450;
}

.hero-value {
  font-size: 50px;
  font-weight: 300;
  letter-spacing: -0.05em;
}

.hero-sub {
  color: var(--ink-2);
}

.hero-chip {
  background: rgba(35, 31, 32, 0.05);
  color: var(--ink);
}

.hero-actions .btn {
  height: 44px;
  border-radius: 12px;
}

.hero-actions .btn:first-child {
  border: 1px solid var(--deep);
  background: var(--deep);
  color: #fff;
}

.hero-actions .btn:last-child {
  border: 1px solid rgba(35, 31, 32, 0.12);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}

.pill-delta.is-good {
  background: var(--done-bg);
  color: var(--done);
}

.mini-bars rect {
  fill: rgba(35, 31, 32, 0.1);
}

.mini-bars rect.is-on {
  fill: var(--deep);
}

/* najbližší meeting: karta v Mirible červenej s prechodom */
.meet {
  border-radius: 18px;
  background: linear-gradient(140deg, #ff5a7d 0%, #ee1c4e 42%, #a90c35 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 18px 40px -20px rgba(238, 28, 78, 0.8);
  color: #fff;
}

.meet::before {
  top: -60px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 65%);
}

.meet-when {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.meet-title {
  font-weight: 500;
}

.meet-meta {
  color: rgba(255, 255, 255, 0.78);
}

.meet-actions .btn {
  border-radius: 12px;
}

.meet-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.18);
}

.meet-empty {
  border-color: rgba(35, 31, 32, 0.14);
  border-radius: 18px;
}

.inbox-strip {
  border: 1px solid rgba(238, 28, 78, 0.12);
  border-radius: 16px;
  background: var(--hi-soft);
}

.inbox-strip strong {
  font-weight: 500;
}

/* oprava: šípka doprava, nie ikonka v krúžku */
.inbox-strip .icon {
  margin-left: 0;
}

.inbox-strip > .icon {
  margin-left: auto;
}

.task-bar-track {
  background: rgba(35, 31, 32, 0.06);
}

.task-bar-track .is-open {
  background: var(--deep);
}

.task-bar-track .is-done {
  background: var(--hi);
}

.d1 { --c: var(--deep); }
.d2 { --c: var(--hi); }
.d3 { --c: #8b8588; }
.d4 { --c: #cfcacc; }
.d5 { --c: #e9e6e7; }

.d1 .pct,
.d2 .pct,
.d3 .pct {
  color: #fff;
}

.d4 .pct,
.d5 .pct {
  color: var(--ink);
}

.donut-center strong {
  font-weight: 400;
}

/* ---------- rýchly zápis dole: biele sklo ---------- */

.capture {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 #fff, 0 24px 50px -20px rgba(35, 31, 32, 0.35), 0 0 0 1px rgba(35, 31, 32, 0.06);
}

.capture-icon {
  border-radius: 12px;
  background: linear-gradient(140deg, #ff4d74, #ee1c4e 55%, #c3103f);
  color: #fff;
}

.capture input {
  color: var(--ink);
}

.capture input::placeholder {
  color: var(--ink-3);
}

.capture-kbd {
  background: rgba(35, 31, 32, 0.06);
  color: var(--ink-2);
}

.capture-go {
  border-radius: 12px;
  background: var(--deep);
  color: #fff;
}

.capture-go:hover,
.capture:focus-within .capture-go {
  background: var(--hi);
  color: #fff;
}

.toast {
  border-radius: 14px;
  background: rgba(35, 31, 32, 0.92);
}

.toast > .icon {
  color: #ff6f8e;
}

.toast-action {
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* ---------- úlohy ---------- */

.col {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
}

.col-inbox {
  border-color: rgba(238, 28, 78, 0.18);
  background: rgba(238, 28, 78, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.col-title {
  font-weight: 550;
}

.task {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 #fff, 0 4px 14px -8px rgba(35, 31, 32, 0.22), 0 0 0 1px rgba(35, 31, 32, 0.05);
}

.task:hover {
  box-shadow: 0 0 0 2px rgba(238, 28, 78, 0.55);
}

.task-title {
  font-weight: 450;
}

.col-quick input,
.col-add textarea,
.col-rename {
  background: #fff;
}

.col-new {
  border-color: rgba(35, 31, 32, 0.15);
  border-radius: 20px;
}

/* ---------- inbox, poznámky, hľadanie ---------- */

.inbox-capture {
  border-radius: 20px;
}

.inbox-capture-icon {
  border-radius: 14px;
  background: linear-gradient(140deg, #ff4d74, #ee1c4e 55%, #c3103f);
  color: #fff;
}

.inbox-capture .btn {
  border-radius: 14px;
}

.inbox-title span {
  font-weight: 450;
}

.note-item.is-active {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 3px 0 0 var(--hi), 0 0 0 1px rgba(35, 31, 32, 0.05);
}

.note-title {
  font-weight: 400;
  letter-spacing: -0.035em;
}

.note-meta-field,
.note-chip {
  border-color: rgba(35, 31, 32, 0.08);
  background: rgba(255, 255, 255, 0.6);
}

dialog.palette {
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

.pal-item.is-active {
  background: var(--hi-soft);
}

.pal-icon {
  background: rgba(35, 31, 32, 0.05);
}

/* panel s formulárom a dialógy: matné sklo */
dialog.drawer,
dialog.modal,
dialog.confirm {
  border: 1px solid var(--glass-edge);
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

.sheet-foot {
  background: transparent;
}

dialog::backdrop {
  background: rgba(35, 31, 32, 0.22);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.status-menu,
.more-menu,
.quick-menu {
  border: 1px solid var(--glass-edge);
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

.quick-item:hover,
.quick-item:focus-visible,
.status-item:hover,
.status-item:focus-visible {
  background: var(--hi-soft);
}

/* ---------- kalendár ---------- */

.cal-day.is-today .cal-num {
  background: var(--hi);
  color: #fff;
}

.cal-day.is-selected:not(.is-today) .cal-num {
  background: var(--deep);
  color: #fff;
}

.cal-chip-allday {
  background: var(--hi-soft);
  color: var(--ink);
}

.cal-chip::before,
.cal-dot,
.day-bar {
  background: var(--deep);
}

.empty-mark {
  background: var(--hi-soft);
}

.empty-mark .navicon,
.empty-mark .icon {
  color: var(--hi);
}

/* ---------- skryté sumy (oko hore) ---------- */

body.is-private :is(
  .hero-value, .hero-sub, .stat-tile-value, .summary-value, .kpi-value, .unpaid-totals dd,
  .list-amount, .list-side-stack .list-meta, .todo-amount, .donut-center strong, .donut-legend .val,
  .bar-value, .bar-meta, .table td.num, .table tfoot td, .stats dd, .linked-amount, .deposit-line,
  .chart .tick, .chart-tip, .tip-val, .winrate-value, .pill-delta, .hero-chip
) {
  filter: blur(8px);
  user-select: none;
}

body :is(.hero-value, .summary-value, .stat-tile-value, .list-amount, .table td.num) {
  transition: filter 0.25s;
}

/* ---------- telefón ---------- */

@media (max-width: 880px) {
  .sidebar {
    border-top: 1px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 -10px 30px -20px rgba(35, 31, 32, 0.3);
  }

  .nav-link.is-active {
    background: transparent;
    box-shadow: none;
    color: var(--ink);
  }

  .nav-link.is-active .icon {
    color: var(--hi);
  }

  .nav-badge.tone-wait,
  .nav-badge.tone-todo {
    background: var(--hi);
    color: #fff;
  }

  .page-heading h1,
  .dash-hello h1 {
    font-size: 30px;
  }

  .hero-value {
    font-size: 40px;
  }

  .topbar-search span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}

/* ---------- fotky ---------- */

.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.photo {
  position: relative;
  display: block;
  width: 88px;
  height: 88px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--fill);
  cursor: zoom-in;
}

.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo:hover {
  box-shadow: 0 0 0 2px rgba(238, 28, 78, 0.5);
}

.photo.is-pending {
  cursor: default;
  opacity: 0.85;
}

.photo-x {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(35, 31, 32, 0.75);
  color: #fff;
  cursor: pointer;
}

.photo-x .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.6;
}

.photo-add {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 88px;
  height: 88px;
  border: 1.5px dashed rgba(35, 31, 32, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
}

.photo-add:hover {
  border-color: var(--hi);
  color: var(--hi);
}

.photo-add input,
.inbox-photo input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photos.is-busy .photo-add {
  opacity: 0.5;
  pointer-events: none;
}

.note-photos {
  margin-top: 18px;
}

.inbox-photo {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 14px;
  cursor: pointer;
}

.inbox-thumb {
  flex: none;
  width: 46px;
  height: 46px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--fill);
  cursor: pointer;
}

.inbox-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* obrázok navrchu karty ako v Trelle */
.task-cover {
  display: block;
  width: calc(100% + 42px);
  max-height: 150px;
  margin: -11px -12px 10px -42px;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
  pointer-events: none;
}

.task:has(.task-cover) {
  overflow: hidden;
}

.task:has(.task-cover) .task-check {
  position: relative;
  z-index: 1;
}

.clip .icon {
  width: 14px;
  height: 14px;
}

/* prezeranie fotiek */
dialog.photo-viewer {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 18, 19, 0.94);
  color: #fff;
}

dialog.photo-viewer::backdrop {
  background: transparent;
}

.pv-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: max(12px, env(safe-area-inset-top)) 14px 12px 20px;
}

.pv-count {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.pv-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.pv-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.pv-img {
  position: absolute;
  inset: 70px 20px 20px;
  width: calc(100% - 40px);
  height: calc(100% - 90px);
  object-fit: contain;
}

.pv-nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transform: translateY(-50%);
  cursor: pointer;
}

.pv-prev {
  left: 16px;
}

.pv-next {
  right: 16px;
}

@media (max-width: 880px) {
  .photo,
  .photo-add {
    width: calc((100% - 16px) / 3);
    height: auto;
    aspect-ratio: 1;
  }

  .inbox-capture {
    gap: 8px;
  }
}

.task:has(.task-cover):not(.is-done) .task-check {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.92);
}

/* ---------- prihlásenie ---------- */

.login {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px 16px;
}

.login-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(380px, 100%);
  padding: 34px 28px 28px;
  border: 1px solid var(--glass-edge);
  border-radius: 26px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-logo {
  width: auto;
  height: 46px;
  margin: 0 auto 6px;
}

.login-card h1 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.login-sub {
  margin: -6px 0 8px;
  color: var(--ink-2);
  font-size: 14.5px;
}

.login-card input {
  height: 50px;
  font-size: 16px;
  text-align: center;
}

.login-card .btn {
  height: 50px;
  margin-top: 4px;
  font-size: 15.5px;
}

.login-error {
  margin: 0;
  color: var(--neg);
  font-size: 14px;
}
