/* ============================================================================
   smer.css — SMĚR A · „Studio"
   Teplý editorial, klidný stůl. Reference: Parallel (Warm Canvas, Restrained
   Focus) + Getharvest (jeden zvýrazněný akcent, jinak klid).
   Jeden centrovaný sloupec ~760px, elevated bílé karty r20, velký Fraunces
   nadpis, zlatá jen jako střídmý akcent. Tokeny berou z brand.css.
   ========================================================================== */

:root {
  --a-r: 20px;              /* velký rádius karet směru A */
  --a-max: 760px;           /* šířka sloupce */
}

body { background: var(--podklad); }

/* ── nosný sloupec ────────────────────────────────────────────────────── */
.st-app {
  max-width: var(--a-max);
  margin: 0 auto;
  padding: 40px 24px 110px;
}
.st-screen { animation: st-vplyn .34s ease both; }
@keyframes st-vplyn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .st-screen { animation: none; } }

/* ── hlavička ─────────────────────────────────────────────────────────── */
.st-header { margin-bottom: 4px; }
.st-brandrow {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 30px;
}
.st-wordmark {
  font-family: var(--font-nadpis); font-size: 20px; font-weight: 500;
  letter-spacing: -.01em; color: var(--text); white-space: nowrap;
}
.st-sep { color: var(--zlata); margin: 0 7px; font-weight: 600; }

.st-kicker {
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 600; color: var(--popisek);
}
.st-kicker-zlaty { color: var(--zlata); }

.st-pozdrav {
  font-family: var(--font-nadpis); font-weight: 500;
  font-size: clamp(27px, 5vw, 37px); line-height: 1.1; letter-spacing: -.022em;
  color: var(--text); margin: 10px 0 26px; text-wrap: balance;
}
.st-pozdrav b { font-weight: 600; color: var(--text); }

/* segmentová navigace */
.st-nav {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--pilulka); border-radius: 999px; max-width: 100%;
  overflow-x: auto; scrollbar-width: none;
}
.st-nav::-webkit-scrollbar { display: none; }
.st-nav-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: transparent; color: var(--slaby);
  font-family: var(--font-text); font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 999px; white-space: nowrap; min-height: 44px;
  transition: color .15s ease, background .15s ease;
}
.st-nav-btn:hover { color: var(--text); }
.st-nav-btn.je-aktivni { background: var(--karta); color: var(--text); box-shadow: var(--stin); }
.st-nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--zlata); color: #fff; font-size: 11.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.st-nav-btn.je-aktivni .st-nav-badge { background: var(--zlata); color: #fff; }

/* ── tenant přepínač ──────────────────────────────────────────────────── */
.st-tenant { position: relative; flex: 0 1 auto; min-width: 0; }
.st-tenant-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--karta); border: 1px solid var(--karta-okraj);
  border-radius: 999px; padding: 7px 12px 7px 14px; min-height: 44px;
  box-shadow: var(--stin); max-width: 100%;
}
.st-tenant-role {
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; color: var(--zlata); flex: 0 0 auto;
}
.st-tenant-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px;
}
.st-tenant-caret { color: var(--slaby-2); font-size: 11px; flex: 0 0 auto; }
.st-tenant-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  min-width: 268px; padding: 6px;
  background: var(--karta); border: 1px solid var(--karta-okraj);
  border-radius: 16px; box-shadow: var(--stin-vyrazny);
}
.st-tenant-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; border: 0; background: transparent; text-align: left;
  padding: 11px 12px; border-radius: 11px; min-height: 46px;
  color: var(--text); font-size: 14px; font-weight: 500;
}
.st-tenant-opt:hover { background: var(--karta-2); }
.st-tenant-opt.je-tady { background: var(--karta-2); }
.st-tenant-opt.je-tady .st-tenant-opt-name { font-weight: 600; }
.st-tenant-opt-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-tenant-badge {
  flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--pilulka); color: var(--slaby);
  font-size: 12px; font-weight: 700;
}
.st-tenant-opt.je-tady .st-tenant-badge { background: var(--zlata); color: #fff; }

/* ── obecné sekce ─────────────────────────────────────────────────────── */
.st-sekce-hlava {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin: 34px 6px 14px;
}
.st-pocet { font-size: 12px; color: var(--slaby-2); }
.st-sekce-title {
  font-family: var(--font-nadpis); font-weight: 500;
  font-size: clamp(24px, 4.4vw, 32px); line-height: 1.12; letter-spacing: -.02em;
  color: var(--text); margin: 8px 0 8px;
}
.st-lead { font-size: 15.5px; line-height: 1.55; color: var(--slaby); margin: 0 0 26px; max-width: 56ch; }

/* velký rádius + měkký stín pro karty směru A */
[data-smer="a"] .karta { border-radius: var(--a-r); }

/* ── HERO karta ───────────────────────────────────────────────────────── */
.st-hero {
  position: relative; padding: 30px 30px 22px;
  box-shadow: var(--stin-vyrazny); border-top: 3px solid var(--zlata);
  transition: opacity .3s ease, transform .3s ease;
  margin-bottom: 8px;
}
.st-card-tap {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: 0; padding: 0; color: inherit; font: inherit;
}
.st-card-tap:focus-visible { outline: 2px solid var(--zlata); outline-offset: 6px; border-radius: 10px; }

.st-meta-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px;
}
.st-typ { font-size: 12.5px; font-weight: 600; color: var(--slaby); }
.st-tecka-oddel { color: var(--slaby-2); }

.st-hero-title {
  font-family: var(--font-nadpis); font-weight: 500;
  font-size: clamp(23px, 4.4vw, 31px); line-height: 1.14; letter-spacing: -.02em;
  color: var(--text); margin-bottom: 12px; text-wrap: balance;
}
.st-hero-anotace { font-size: 16px; line-height: 1.56; color: var(--slaby); margin: 0 0 20px; }

.st-hero-nahled {
  height: 214px; margin-bottom: 16px; width: 100%;
}
.st-meta-bottom { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.st-meta-bottom .jemny { font-variant-numeric: tabular-nums; }

/* akční lišta */
.st-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--cara);
}
.st-actions .btn { min-height: 44px; }
.st-akce-hlavni { padding-left: 22px; padding-right: 22px; }
.st-spacer { flex: 1 1 auto; }
.st-detail-link { color: var(--slaby); }
.st-detail-link:hover { color: var(--text); background: var(--karta-2); }

/* ⋯ menu */
.st-more { position: relative; }
.st-more-btn { min-width: 44px; min-height: 44px; padding: 10px 12px; font-size: 18px; line-height: 1; }
.st-more-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  min-width: 210px; padding: 6px;
  background: var(--karta); border: 1px solid var(--karta-okraj);
  border-radius: 14px; box-shadow: var(--stin-vyrazny);
}
.st-more-item {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 11px 12px; border-radius: 9px; font-size: 14px; font-weight: 500;
  color: var(--text); min-height: 44px;
}
.st-more-item:hover { background: var(--karta-2); }
.st-more-danger { color: var(--nebezpeci); }

/* ── fronta (kompaktní řádky) ─────────────────────────────────────────── */
.st-fronta { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.st-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 8px 16px; box-shadow: var(--stin);
  transition: opacity .28s ease, transform .28s ease, box-shadow .15s ease;
}
.st-row:hover { box-shadow: var(--stin-karta); }
.st-row-tap {
  display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0;
  border: 0; background: transparent; text-align: left; padding: 8px 2px;
  min-height: 44px; color: inherit; font: inherit; cursor: pointer;
}
.st-row-title {
  flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.005em;
}
.st-row-kritik { flex: 0 0 auto; }
.st-row-schval { flex: 0 0 auto; min-height: 44px; }

/* ── odchod karty (schválení/přepracování) ────────────────────────────── */
.st-odchazi { opacity: 0 !important; transform: translateY(-8px) scale(.99) !important; pointer-events: none; }

/* ── prázdný stav ─────────────────────────────────────────────────────── */
.st-prazdno { padding: 46px 30px; text-align: center; box-shadow: var(--stin-vyrazny); }
.st-prazdno-znak {
  width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--zelena) 14%, transparent);
  color: var(--zelena-text); font-size: 26px;
}
.st-prazdno-titul { font-family: var(--font-nadpis); font-size: 26px; color: var(--text); margin-bottom: 10px; }
.st-prazdno-text { font-size: 15px; line-height: 1.55; color: var(--slaby); margin: 0 auto; max-width: 44ch; }
.st-prazdno-mini { font-size: 14px; color: var(--slaby-2); padding: 6px 4px; }

/* ── pipeline (sbalitelné) ────────────────────────────────────────────── */
#st-pipeline { margin-top: 30px; }
.st-slozka { border-top: 1px solid var(--cara); }
.st-slozka > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; padding: 17px 6px; min-height: 44px;
}
.st-slozka > summary::-webkit-details-marker { display: none; }
.st-slozka > summary:focus-visible { outline: 2px solid var(--zlata); outline-offset: -2px; border-radius: 8px; }
.st-slozka-label { font-size: 14px; font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.st-slozka-pocet {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--pilulka); color: var(--slaby); font-size: 11.5px; font-weight: 700;
}
.st-slozka-caret { color: var(--slaby-2); transition: transform .22s ease; }
.st-slozka[open] > summary .st-slozka-caret { transform: rotate(180deg); }
.st-slozka-telo { padding: 0 6px 14px; }

.st-mini {
  display: flex; align-items: center; gap: 12px; padding: 11px 2px;
  border-top: 1px solid var(--cara);
}
.st-mini:first-child { border-top: 0; }
.st-mini-title { flex: 1 1 auto; min-width: 0; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-mini-datum { flex: 0 0 auto; font-size: 12.5px; color: var(--slaby-2); }
.st-pill-zelena { color: var(--zelena-text); flex: 0 0 auto; }

/* ── DETAIL ───────────────────────────────────────────────────────────── */
.st-detail-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.st-back {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: transparent; color: var(--slaby); font-weight: 600;
  font-size: 14px; padding: 10px 12px 10px 4px; min-height: 44px; border-radius: 10px;
}
.st-back:hover { color: var(--text); }
.st-detail-nav { display: inline-flex; gap: 6px; }
.st-nav-arrow {
  width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--karta-okraj); background: var(--karta); color: var(--text);
  font-size: 16px; line-height: 1; box-shadow: var(--stin);
}
.st-nav-arrow:hover:not([disabled]) { background: var(--karta-2); }
.st-nav-arrow[disabled] { opacity: .38; cursor: not-allowed; }

.st-detail { padding: 30px; box-shadow: var(--stin-vyrazny); }
.st-detail-title {
  font-family: var(--font-nadpis); font-weight: 500;
  font-size: clamp(25px, 5vw, 34px); line-height: 1.12; letter-spacing: -.022em;
  color: var(--text); margin: 14px 0 12px; text-wrap: balance;
}
.st-detail-anotace { font-size: 16.5px; line-height: 1.55; color: var(--slaby); margin: 0 0 22px; }
.st-detail-nahled { height: 236px; margin-bottom: 22px; }

.st-detail-fakta {
  margin: 0 0 22px; padding: 4px 0; display: grid; gap: 2px;
  border-top: 1px solid var(--cara); border-bottom: 1px solid var(--cara);
}
.st-faktum { display: flex; gap: 14px; padding: 9px 0; align-items: baseline; }
.st-faktum dt {
  flex: 0 0 88px; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase;
  font-weight: 600; color: var(--popisek);
}
.st-faktum dd { margin: 0; font-size: 14.5px; color: var(--text); }

.st-detail-text { margin-bottom: 24px; }
.st-detail-text p {
  margin: 10px 0 0; font-size: 16px; line-height: 1.62; color: var(--text);
  padding: 16px 18px; background: var(--karta-2); border-radius: 14px;
  border-left: 3px solid color-mix(in srgb, var(--zlata) 55%, transparent);
}

.st-pripominky { margin-bottom: 22px; }
.st-textarea {
  display: block; width: 100%; margin-top: 10px; resize: vertical;
  font-family: var(--font-text); font-size: 15px; line-height: 1.5; color: var(--text);
  background: var(--pole-pozadi); border: 1px solid var(--okraj-pole);
  border-radius: var(--r-pole); padding: 13px 15px; min-height: 84px;
}
.st-textarea::placeholder { color: var(--slaby-2); }
.st-textarea:focus-visible { outline: 2px solid var(--zlata); outline-offset: 1px; border-color: var(--zlata); }
.st-actions-detail { flex-wrap: wrap; }
.st-zamitnout { color: var(--nebezpeci); }
.st-zamitnout:hover { background: color-mix(in srgb, var(--nebezpeci) 10%, transparent); }

/* ── KALENDÁŘ ─────────────────────────────────────────────────────────── */
.st-den { padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--stin-karta); }
.st-den-hlava {
  display: flex; align-items: baseline; gap: 12px;
  padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid var(--cara);
}
.st-den-nazev { font-family: var(--font-nadpis); font-weight: 500; font-size: 20px; color: var(--text); }
.st-den-datum { font-size: 13px; color: var(--slaby-2); }
.st-udalost { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--cara); }
.st-udalost:first-of-type { border-top: 0; }
.st-cas { flex: 0 0 auto; width: 50px; font-weight: 600; font-size: 15px; color: var(--text); }
.st-udalost-title { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 500; color: var(--text); line-height: 1.35; }
.st-udalost-typ { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; }
.st-udalost-typ-txt { font-size: 12.5px; color: var(--slaby); }

/* ── NASTAVENÍ ────────────────────────────────────────────────────────── */
.st-set { padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--stin-karta); }
.st-set-hlava { margin-bottom: 4px; padding-bottom: 12px; }
.st-set-radek {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 0; border-top: 1px solid var(--cara);
}
.st-set-label { font-size: 15px; font-weight: 500; color: var(--text); }
.st-stepper {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  background: var(--pole-pozadi); border: 1px solid var(--okraj-pole);
  border-radius: 999px; padding: 3px;
}
.st-step-btn {
  width: 44px; height: 44px; min-height: 44px; border-radius: 999px;
  border: 0; background: transparent; color: var(--text);
  font-size: 20px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.st-step-btn:hover { background: var(--karta); box-shadow: var(--stin); }
.st-stepper-val { min-width: 30px; text-align: center; font-size: 16px; font-weight: 600; color: var(--text); }

.st-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; text-align: left; border: 0; background: transparent;
  padding: 14px 0; border-top: 1px solid var(--cara); min-height: 56px; cursor: pointer;
}
.st-set .st-toggle:first-of-type, .st-set .st-set-radek:first-of-type { border-top: 0; }
.st-toggle-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.st-toggle-hint { font-size: 12.5px; line-height: 1.4; color: var(--slaby-2); font-weight: 400; }
.st-switch {
  position: relative; flex: 0 0 auto; width: 48px; height: 28px; border-radius: 999px;
  background: var(--pilulka); border: 1px solid var(--okraj-pole);
  transition: background .18s ease, border-color .18s ease;
}
.st-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: var(--stin);
  transition: transform .18s ease;
}
.st-switch.je-on { background: var(--zelena); border-color: var(--zelena); }
.st-switch.je-on::after { transform: translateX(20px); }

/* ── patička ──────────────────────────────────────────────────────────── */
.st-paticka {
  margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--cara);
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.st-paticka-mark { font-family: var(--font-nadpis); font-size: 15px; color: var(--text); }
.st-paticka-txt { font-size: 12.5px; color: var(--slaby-2); }

/* ── toast ────────────────────────────────────────────────────────────── */
.st-toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 1200;
  transform: translate(-50%, 16px); opacity: 0;
  background: var(--navy); color: #fff;
  font-size: 14px; font-weight: 600; padding: 12px 20px; border-radius: 999px;
  box-shadow: var(--stin-vyrazny); pointer-events: none;
  transition: opacity .28s ease, transform .28s ease; max-width: calc(100vw - 32px);
}
:root.tema-dark .st-toast { background: var(--karta-2); border: 1px solid var(--karta-okraj); }
.st-toast.je-videt { opacity: 1; transform: translate(-50%, 0); }
.st-toast-ok { color: #fff; }

/* ── responsivita (mobil 390px, mobilní dědictví) ─────────────────────── */
@media (max-width: 640px) {
  .st-app { padding: 22px 16px 92px; }
  .st-brandrow { margin-bottom: 24px; }
  .st-tenant-name { max-width: 40vw; }
  .st-hero { padding: 22px 20px 18px; border-radius: 18px; }
  .st-hero-nahled { height: 176px; }
  .st-detail { padding: 22px 20px; border-radius: 18px; }
  .st-detail-nahled { height: 192px; }
  .st-den, .st-set { padding: 20px 18px; }
  .st-actions .btn { flex: 1 1 auto; }
  .st-actions .st-more, .st-actions .st-spacer { flex: 0 0 auto; }
  .st-detail-link { flex-basis: 100%; justify-content: center; }
  .st-faktum dt { flex-basis: 74px; }
}
@media (max-width: 380px) {
  .st-row-kritik { display: none; }
}
