/* obrazovky příběhu oboru Stavebnictví (.sb-*), doplňují .ss-* ze site-screens.css */

/* specifikace: půdorys s taženou stěnou */
.sb-plangrid { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 10px; flex: 1; min-height: 0; }
.sb-plancard { display: flex; flex-direction: column; min-height: 0; padding: 8px 10px; }
.sb-plan { display: block; width: 100%; flex: 1; min-height: 0; }
.sb-floor { fill: #f5f0e8; } .sb-floor--new { fill: #d5ebea; }
.sb-wall { fill: none; stroke: #1b2a44; stroke-width: 8; stroke-linejoin: miter; }
.sb-east.is-drag { stroke: #0a716f; }
.sb-part { stroke: #1b2a44; stroke-width: 4; }
.sb-win { fill: #fff; stroke: #4a6a96; stroke-width: 2; } .sb-win--new { fill: #fbe7d8; stroke: #e07a3a; }
.sb-room { font-size: 13px; font-weight: 600; fill: #1b2a44; text-anchor: middle; }
.sb-area { font-size: 12.5px; fill: #465062; text-anchor: middle; font-variant-numeric: tabular-nums; } .sb-area.is-on { fill: #0a716f; font-weight: 600; }
.sb-dim { stroke: #8a94a3; stroke-width: 1.2; } .sb-dimt { font-size: 12px; fill: #465062; text-anchor: middle; font-variant-numeric: tabular-nums; }
.sb-handle { fill: #e07a3a; stroke: #fff; stroke-width: 3; }
.sb-cursor { fill: #1b2a44; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; }
.sb-hint { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.sb-price { margin: 0 0 6px; font: 600 25px/1.1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sb-diff { display: inline-block; }

/* rozpočet */
.sb-budgetgrid { display: grid; grid-template-columns: minmax(0, 1fr) 226px; gap: 10px; flex: 1; min-height: 0; align-items: start; }
.sb-row { display: grid; grid-template-columns: minmax(0, 1fr) 62px 112px; gap: 8px; padding: 8px 0; border-top: 1px solid #eef1f2; opacity: .18; transition: opacity 180ms ease; }
.sb-row.is-in, .sb-row--h, .sb-row--sum { opacity: 1; }
.sb-row--h { font-size: 11.5px; color: var(--muted); border-top: 0; padding-top: 0; }
.sb-row > :last-child { text-align: right; font-variant-numeric: tabular-nums; } .sb-row b { font-weight: 500; }
.sb-row > span:nth-child(2) { color: var(--muted); }
.sb-row--sum { border-top: 2px solid #1b2a44; font-weight: 600; } .sb-row--sum b { font-weight: 600; font-size: 15px; }
.sb-letter { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: #e0eeeb; color: var(--action); font-style: normal; font-size: 11px; font-weight: 600; }

/* harmonogram: barvy fází */
.sb-ph--w { background: #e2e9f3; border-color: #4a6a96; }
.sb-ph--i { background: #f1ebde; border-color: #a8873f; }
.ss-trip.sb-ph--w.is-alert { background: #fbe7d8; border-color: #e07a3a; }

/* nákup */
.sb-buygrid { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 10px; flex: 1; min-height: 0; align-items: start; }
.sb-mrow { display: grid; grid-template-columns: minmax(0, 1fr) 50px 66px 66px 66px; gap: 6px; padding: 8px 0; border-top: 1px solid #eef1f2; align-items: center; }
.sb-mrow--h { font-size: 11px; color: var(--muted); border-top: 0; padding-top: 0; } .sb-mrow--h > span:nth-child(n+3) { text-align: right; }
.sb-mrow > span:nth-child(2) { color: var(--muted); font-size: 12px; }
.sb-mrow b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; padding: 2px 4px; border-radius: 5px; transition: background-color 160ms ease, color 160ms ease; }
.sb-mrow b.is-best { background: #d5ebea; color: var(--action); font-weight: 600; } .sb-mrow b.is-out { color: #9aa3ad; }
.sb-mrow--sum { border-top: 2px solid #1b2a44; font-weight: 600; } .sb-mrow--sum b { font-weight: 600; }
.sb-note { margin: 8px 0 0; padding: 7px 10px; background: #e8f3f2; border-radius: 8px; color: var(--action); font-weight: 500; }

/* docházka */
.sb-crewgrid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; flex: 1; min-height: 0; align-items: start; }
.sb-gps svg { height: 96px; }
.sb-map { fill: #eef1f2; } .sb-road { fill: none; stroke: #fff; stroke-width: 7; } .sb-zone { fill: rgba(10, 113, 111, .14); stroke: #0a716f; stroke-width: 2; stroke-dasharray: 4 3; } .sb-me { fill: #e07a3a; stroke: #fff; stroke-width: 3; }
.ss-phone .sb-road { stroke: #fff; stroke-dasharray: none; stroke-dashoffset: 0; stroke-width: 7; }
.sb-crow { display: grid; grid-template-columns: minmax(0, 1fr) 96px 150px; gap: 8px; padding: 6px 0; border-top: 1px solid #eef1f2; transition: background-color 180ms ease; }
.sb-crow--h { font-size: 11.5px; color: var(--muted); border-top: 0; padding-top: 0; }
.sb-crow > span:nth-child(2) { color: var(--muted); }
.sb-crow b { font-weight: 500; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; } .sb-crow--h > span:last-child { text-align: right; }
.sb-crow b.is-on { color: var(--action); } .sb-crow b.is-warn { color: #a0470f; font-weight: 600; }
.sb-crow.is-live { background: #e8f3f2; box-shadow: -13px 0 0 #e8f3f2, 13px 0 0 #e8f3f2; }
.sb-kpis b { font-size: 21px; }

/* stavební deník */
.sb-diarygrid { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 12px; flex: 1; min-height: 0; align-items: start; }
.sb-sky { fill: #e9eef2; } .sb-form { fill: #c7b48f; stroke: #8b7451; stroke-width: 1.5; }
.ss-phone .sb-rebar { fill: none; stroke: #6b7686; stroke-width: 2; stroke-dasharray: none; stroke-dashoffset: 0; }
.ss-phone .sb-form { stroke-dasharray: none; stroke-dashoffset: 0; fill: #c7b48f; stroke: #8b7451; stroke-width: 1.5; }
.sb-photo { font-size: 11px; fill: #465062; }
.sb-dict { margin: 0 0 6px; min-height: 64px; font-size: 13px; line-height: 1.35; font-style: italic; }
.sb-entry { display: grid; grid-template-columns: minmax(0, 1fr) 54px 88px; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid #eef1f2; } h5 + .sb-entry { border-top: 0; }
.sb-entry p { margin: 0; } .sb-entry p b { display: block; font-size: 12px; font-weight: 600; } .sb-entry p span { color: var(--muted); }
.sb-entry em { font-style: normal; font-size: 11.5px; color: var(--muted); } .sb-entry i { font-style: normal; font-size: 12px; font-weight: 500; color: var(--muted); text-align: right; } .sb-entry i.is-on { color: var(--action); }
.sb-entry--new { opacity: .55; transform: none; transition: opacity 200ms ease, transform 200ms ease, background-color 200ms ease; }
.sb-entry--new.is-in { opacity: 1; transform: none; background: #e8f3f2; box-shadow: -13px 0 0 #e8f3f2, 13px 0 0 #e8f3f2; }
.sb-entry--new.is-in p span { color: var(--ink); }

/* vícepráce a portál */
.sb-extragrid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px; flex: 1; min-height: 0; align-items: start; }
.sb-sumline { border-top: 2px solid #1b2a44; margin-top: 3px; padding-top: 6px; } .sb-sumline b { color: var(--ink); font-weight: 600; }
.sb-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sb-steps span { padding: 7px 8px; border-radius: 8px; background: #f5f7f8; color: var(--muted); font-size: 12px; font-weight: 500; text-align: center; transition: background-color 180ms ease, color 180ms ease; }
.sb-steps span.is-on { background: #d5ebea; color: var(--action); }
.sb-portal { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }

/* noční agent: předpověď */
.sb-fc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.sb-fc p { margin: 0; padding: 7px 8px; border-radius: 8px; background: rgba(255, 255, 255, .08); transition: background-color 180ms ease; }
.sb-fc small { display: block; font-size: 11px; color: rgba(255, 255, 255, .7); } .sb-fc b { font-size: 15px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.sb-fc p.is-cold.is-hit { background: #e07a3a; }

/* AI asistent: částky jsou delší než Kč/km */
.sb-bars > div { grid-template-columns: 64px minmax(0, 1fr) 92px; }

/* marže po kapitolách */
.sb-cats { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.sb-cat { display: grid; grid-template-columns: 124px minmax(0, 1fr) 108px; gap: 8px; align-items: center; }
.sb-cat em { position: relative; height: 18px; background: #f5f7f8; border-radius: 4px; overflow: hidden; }
.sb-cat u { position: absolute; left: 0; display: block; border-radius: 3px; }
.sb-plan-bar { top: 0; height: 18px; background: #c9d1d5; } .sb-real { top: 5px; height: 8px; background: #0a716f; width: 0; } .sb-real.is-over { background: #e07a3a; }
.sb-cat b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; } .sb-cat b.is-warn { color: #a0470f; font-weight: 600; }
.sb-cats .ss-alert { margin-top: auto; }

@media (prefers-reduced-motion: reduce) { .sb-row, .sb-entry--new, .sb-steps span, .sb-mrow b, .sb-crow, .sb-fc p { transition: none; } }
.sb-impact { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.sb-impact p { margin: 0; padding: 7px 9px; background: #f5f7f8; border-radius: 8px; }
.sb-impact small { display: block; font-size: 11px; color: var(--muted); } .sb-impact b { font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; } .sb-impact b.is-on { color: var(--action); }
.sb-row { padding: 10px 0; }
.sb-crow { padding: 8px 0; }
.sb-cats { gap: 12px; } .sb-cat em { height: 24px; } .sb-plan-bar { height: 24px; } .sb-real { top: 7px; height: 10px; }
