/* ==========================================================================
   green.control v3 — sdílené styly podstránek + stránka Rezervace
   Každá další stránka má vlastní soubor assets/pages/<stránka>.css
   ========================================================================== */

/* ---------- Drobnosti shellu ---------- */
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-ink); font-weight: 600; transition: top var(--dur-base); }
.skip:focus { top: 12px; }
#view:focus { outline: none; }
.view h1:focus { outline: none; }
.count--warn { background: var(--warn); color: var(--forest-950); }
.drawer--wide { width: min(760px, calc(100vw - 24px)); }
.pulse--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pulse--6 .kpi__value { font-size: var(--text-2xl); }
a.kpi { color: inherit; }
@media (max-width: 1500px) { .pulse--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .pulse--6 { grid-template-columns: 1fr 1fr; } }

/* segmented bez posuvného „thumbu“ (na podstránkách) */
.segmented:not(:has(.segmented__thumb)) button[aria-pressed="true"] { background: var(--surface-raised); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border-strong); color: var(--text); }
.segmented button { min-height: 32px; }

/* řádek pošty: celé li klikatelné přes skutečné tlačítko */
.mail__open { display: block; width: 100%; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mail__open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.mail__open:focus-visible { outline: none; }
.mail:has(.mail__open:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* prázdný stav */
.empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.empty .i { width: 28px; height: 28px; color: var(--text-faint); }

/* ---------- Rezervace ---------- */
.resv-week { margin-bottom: var(--grid-gap); padding: var(--space-4) var(--space-5); }
.resv-week__nav { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.resv-week__nav .eyebrow { margin-right: auto; order: -1; }
.resv-table td { font-size: var(--text-sm); }
.resv-name { font-weight: 600; font-size: var(--text-base); text-align: left; color: var(--text); }
.resv-name:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.resv-src { display: block; font-size: var(--text-xs); color: var(--text-muted); }
.resv-src a { color: var(--text-muted); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.resv-src a:hover { color: var(--accent-text); }
.resv-note { max-width: 260px; color: var(--text-muted); }
.resv-soon { display: block; font-size: 12px; color: var(--warn); }
.resv-actions { white-space: nowrap; text-align: right; }
.resv-actions .btn + .btn { margin-left: 4px; }

.occ { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-bottom: 22px; position: relative; }
.occ::before { content: ""; position: absolute; left: 0; right: 0; top: 20%; border-top: 1px dashed var(--border-strong); }
.occ__col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; }
.occ__bar { width: 100%; border-radius: 4px 4px 2px 2px; background: var(--accent); opacity: .85; transition: height var(--dur-slow) var(--ease-out); }
.occ__bar.is-warn { background: var(--warn); }
.occ__col.is-now .occ__bar { box-shadow: 0 0 0 2px var(--text); }
.occ__salon { position: absolute; left: 0; right: 0; top: -2px; height: 4px; border-radius: 2px; background: var(--info); }
.occ__lbl { position: absolute; left: 0; bottom: -22px; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.occ__legend { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-3); font-size: var(--text-xs); color: var(--text-muted); }
.occ__legend span { display: inline-flex; align-items: center; gap: 6px; }
.occ__key { width: 12px; height: 12px; border-radius: 3px; background: var(--accent); }
.occ__key--salon { height: 4px; background: var(--info); }

@media (max-width: 860px) {
  .resv-table thead { display: none; }
  .resv-table tr { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
  .resv-table td { border: 0; padding: 0; }
  .resv-table td:nth-child(5), .resv-table td:nth-child(4) { grid-column: 2 / -1; }
  .resv-actions { grid-column: 1 / -1; text-align: left; }
}

/* ---------- Rezervace: stoly, potvrzení, akce ---------- */
.resv-area { display: block; font-size: 12px; color: var(--text-muted); }
.resv-event { margin-left: 6px; min-height: 22px; padding: 0 8px; font-size: 12px; vertical-align: 1px; }
.resv-sent { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); color: var(--accent-text); white-space: nowrap; }
/* potvrzení hostovi ve formuláři */
.res-notify { margin: 0; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-sunken); }
.res-notify legend { padding: 0 6px; margin-left: -6px; display: flex; align-items: center; gap: var(--space-2); }
.res-notify__via { display: flex; flex-wrap: wrap; width: 100%; }
.res-via { flex: 1 1 auto; cursor: pointer; }
.res-via input { position: absolute; opacity: 0; pointer-events: none; }
.res-via span { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 7px; font-size: var(--text-xs); font-weight: 500; color: var(--text-muted); white-space: nowrap; transition: background-color var(--dur-fast), color var(--dur-fast); }
.res-via:hover span { color: var(--text); }
.res-via input:checked + span { background: var(--surface-raised); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm), 0 0 0 1px var(--border-strong); }
.res-via input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.res-notify__to { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: var(--space-3); font-size: var(--text-sm); }
.res-notify__to b { font-weight: 600; }
.res-notify__msg { margin-top: var(--space-2); padding: var(--space-3); border-radius: var(--radius-sm); background: var(--surface-raised); border: 1px solid var(--border); font-size: var(--text-xs); line-height: 1.55; color: var(--text-muted); }
.resv-to { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.res-warn { color: var(--warn); font-weight: 500; }
.res-warn .i { vertical-align: -2px; }

/* Rozpis stolů */
.tplan { margin-top: var(--grid-gap); }
.tplan__grid { display: flex; flex-direction: column; }
.tplan__row { display: grid; grid-template-columns: 120px 1fr; align-items: center; min-height: 40px; border-top: 1px solid var(--border); }
.tplan__row--head { border-top: 0; min-height: 28px; }
.tplan__area { padding: var(--space-4) 0 var(--space-2); }
.tplan__name { font-size: var(--text-sm); font-weight: 500; }
.tplan__name small { display: block; font-size: 12px; font-weight: 400; color: var(--text-muted); }
.tplan__lane { position: relative; height: 40px; }
.tplan__row--head .tplan__lane { height: 24px; }
.tplan__hour { position: absolute; top: 2px; transform: translateX(-50%); font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--text-muted); }
.tplan__tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border); }
.tplan__now { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--text); border-radius: 2px; z-index: 1; }
.tplan__res {
  position: absolute; top: 5px; bottom: 5px; min-width: 64px; padding: 0 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left;
  border-radius: 6px; font-size: 13px; color: var(--accent-ink); background: var(--accent); border: 1px solid transparent; z-index: 2;
  transition: filter var(--dur-fast);
}
.tplan__res b { font-family: var(--font-mono); font-weight: 600; }
.tplan__res:hover { filter: brightness(1.08); }
.tplan__res.is-pending { background: var(--warn-soft); color: var(--text); border: 1px dashed var(--warn); }
.tplan__res.is-arrived { background: var(--info-soft); color: var(--text); border-color: var(--info); }
@media (max-width: 860px) {
  .tplan__grid { overflow-x: auto; }
  .tplan__row { min-width: 900px; }
}
.tplan__hint { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; margin-right: var(--space-4); font-size: var(--text-xs); color: var(--text-muted); }
.tplan__lane--free { cursor: crosshair; touch-action: none; border-radius: 6px; }
.tplan__lane--free:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
/* náhled nového bloku při kliknutí/tažení do kalendáře – sdílí Rezervace i Program */
.tplan__ghost, .pg-tl__ghost {
  position: absolute; top: 5px; bottom: 5px; z-index: 1; pointer-events: none;
  display: flex; align-items: center; padding: 0 8px; overflow: hidden; white-space: nowrap;
  border-radius: 6px; border: 1.5px dashed var(--accent-text); background: var(--accent-soft);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--accent-text);
}
.tplan__ghost.is-drag, .pg-tl__ghost.is-drag { border-style: solid; background: color-mix(in oklab, var(--accent) 28%, transparent); }

/* přetahování rezervací */
.tplan__res { cursor: grab; touch-action: none; padding-right: 14px; }
.tplan__res.is-dragging { cursor: grabbing; z-index: 5; box-shadow: var(--shadow-lg); outline: 2px solid var(--text); }
.tplan__res:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.tplan__grip { position: absolute; top: 0; right: 0; bottom: 0; width: 10px; cursor: ew-resize; }
.tplan__grip::after { content: ""; position: absolute; top: 25%; bottom: 25%; right: 3px; width: 2px; border-radius: 2px; background: currentColor; opacity: .45; }
.tplan__res:hover .tplan__grip::after { opacity: .9; }
