/* Portál ponúk rozumnydom.sk
   Rozloženie: tmavá lišta s logom, obsah ponuky vľavo, chat a história vpravo (na mobile pod sebou). */
:root {
  --green: #8cff6f;
  --green-ink: #2f7a1c;
  --ink: #1d1d1b;
  --text: #2b2b29;
  --muted: #6b6b68;
  --line: #e4e4e0;
  --soft: #f4f4f1;
  --paper: #ffffff;
  --bg: #ecece8;
  --danger: #b3261e;
  --font: "Segoe UI", "Open Sans", Arial, sans-serif;
  --font-light: "Segoe UI Light", "Segoe UI", "Open Sans", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-light); font-weight: 300; color: var(--ink); line-height: 1.15; margin: 0; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- lišta ---------- */
.top { background: var(--ink); color: #fff; border-bottom: 5px solid var(--green); }
.top-in { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 20px;
  padding-block: 12px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.top-logo img { height: 34px; display: block; }
.top nav { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.top nav a, .top nav button { color: #fff; text-decoration: none; font: inherit; font-size: 14px; background: none; border: 0; padding: 8px 12px; cursor: pointer; }
.top nav a:hover, .top nav button:hover { color: var(--green); }
.top nav .who { color: #a9a9a4; font-size: 13px; padding-right: 4px; }

.wrap { max-width: 1320px; margin: 0 auto; padding-block: 24px 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 880px; }

/* ---------- prvky ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; font-size: 14px; padding: 10px 18px;
  border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); text-decoration: none; cursor: pointer; border-radius: 0; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--green); border-color: var(--green); }
.btn.primary:hover { background: #7ef35f; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.link { border-color: transparent; background: none; padding-inline: 6px; text-decoration: underline; font-weight: 400; }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.flash { background: var(--paper); border-left: 4px solid var(--green); padding: 12px 16px; margin-bottom: 18px; }
.errors { background: #fff4f3; border-left: 4px solid var(--danger); padding: 12px 16px; margin-bottom: 18px; color: var(--danger); }
.errors ul { margin: 0; padding-left: 18px; }

.panel { background: var(--paper); padding: 22px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 22px; margin-bottom: 14px; }
.panel h3 { font-size: 17px; margin-bottom: 10px; font-family: var(--font); font-weight: 600; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.chip.sent { background: #e8f0ff; color: #2747a0; }
.chip.accepted { background: var(--green); color: var(--ink); }
.chip.declined { background: #fde8e7; color: var(--danger); }
.badge { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 99px; background: var(--ink); color: var(--green); font-size: 12px; font-weight: 700; text-align: center; }

/* ---------- formuláre ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], textarea {
  width: 100%; font: inherit; padding: 9px 11px; border: 1.5px solid #cfcfca; background: #fff; color: var(--ink); border-radius: 0; }
input:focus, textarea:focus { border-color: var(--ink); outline: none; }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 4px; }

.drop { display: block; border: 2px dashed #bdbdb7; background: var(--soft); padding: 26px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--ink); background: #fff; }
.drop b { display: block; font-size: 16px; margin-bottom: 4px; }
.drop.ok { border-style: solid; border-color: var(--green); background: #f3ffef; }
.parse { margin-top: 12px; font-size: 14px; }
.parse table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.parse td { padding: 4px 0; border-bottom: 1px solid var(--line); }
.parse td:first-child { width: 48px; color: var(--muted); }
.parse td.r { text-align: right; }
.items { width: 100%; border-collapse: collapse; font-size: 14px; }
.items th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; padding: 6px 8px 6px 0; border-bottom: 1.5px solid var(--ink); }
.items td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.items .r { text-align: right; }
.items input.qty { width: 74px; text-align: right; padding: 5px 7px; }
.items input.price { width: 100px; text-align: right; padding: 5px 7px; }
.add-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.warn { background: #fff8e5; border-left: 4px solid #e0a800; padding: 10px 14px; margin-top: 10px; font-size: 14px; }

/* ---------- zoznam ponúk ---------- */
.list { width: 100%; border-collapse: collapse; background: var(--paper); }
.list th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 2px solid var(--ink); }
.list td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr:hover td { background: #fafaf8; }
.list a.row-link { text-decoration: none; font-weight: 600; }
.list .r { text-align: right; }
.table-scroll { overflow-x: auto; }
.empty { background: var(--paper); padding: 48px 24px; text-align: center; }
.empty h2 { margin-bottom: 8px; }

.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.head-row h1 { font-size: 32px; }

/* ---------- detail ponuky: 2 stĺpce ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1080px) { .layout { grid-template-columns: minmax(0, 1fr); } .side { position: static; } }

/* ---------- chat ---------- */
.chat { background: var(--paper); display: flex; flex-direction: column; }
.chat-head { padding: 16px 18px 10px; border-bottom: 1px solid var(--line); }
.chat-head h3 { font-size: 17px; font-weight: 600; font-family: var(--font); margin: 0; }
.chat-list { padding: 14px 18px; max-height: 420px; min-height: 140px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; }
.msg .meta { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.msg .body { background: var(--soft); padding: 9px 12px; white-space: pre-line; overflow-wrap: anywhere; font-size: 14px; }
.msg.mine { align-self: flex-end; }
.msg.mine .meta { text-align: right; }
.msg.mine .body { background: var(--green); }
.chat-empty { color: var(--muted); font-size: 14px; margin: auto 0; text-align: center; }
.chat form { border-top: 1px solid var(--line); padding: 12px 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.chat textarea { min-height: 70px; }

/* ---------- história ---------- */
.log { list-style: none; margin: 0; padding: 0; }
.log li { position: relative; padding: 0 0 14px 20px; font-size: 14px; }
.log li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: #c9c9c4; }
.log li::after { content: ""; position: absolute; left: 6.5px; top: 17px; bottom: 0; width: 1px; background: var(--line); }
.log li:last-child::after { display: none; }
.log li.accepted::before, .log li.version::before, .log li.created::before { background: var(--green-ink); }
.log time { display: block; font-size: 12px; color: var(--muted); }
.log ul { margin: 4px 0 0; padding-left: 16px; font-size: 13px; color: var(--muted); }

/* ---------- webová ponuka ---------- */
.ofr { background: var(--paper); }
.ofr-hero { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 380px; }
.ofr-hero .ph { background-size: cover; background-position: center; min-height: 260px; }
.ofr-hero .g { background: var(--green); padding: 34px 32px; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; }
.ofr-hero h1 { font-size: clamp(28px, 3.4vw, 42px); color: var(--ink); }
.ofr-hero .lead { margin: 0; font-size: 16px; }
.meta-row { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; }
.meta-row span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; opacity: .65; }
.hero-total { border-top: 1.5px solid rgba(29,29,27,.35); padding-top: 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hero-total b { font-size: 28px; font-weight: 600; }
.ofr-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 32px; border-bottom: 1px solid var(--line); background: var(--paper); }
.ofr-bar .spacer { flex: 1; }

.sec { padding: 40px 32px; border-bottom: 1px solid var(--line); }
.sec > h2 { font-size: 30px; margin-bottom: 14px; }
.sec .big { font-size: 18px; line-height: 1.45; max-width: 60ch; margin: 0 0 10px; color: var(--ink); }
.sec p { max-width: 68ch; }
.stats-w { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); margin-top: 22px; }
.stats-w div { padding: 14px 10px 14px 0; border-bottom: 1px solid var(--line); }
.stats-w b { display: block; font-family: var(--font-light); font-weight: 300; font-size: 38px; line-height: 1.05; color: var(--ink); }
.stats-w span { font-size: 13px; color: var(--muted); }

.cat-w { display: grid; grid-template-columns: 320px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.cat-w .l { background: var(--soft); }
.cat-w .l .ph { height: 210px; background-size: cover; background-position: center; }
.cat-w .l .g { background: var(--green); padding: 18px 22px; }
.cat-w .l .g h2 { font-size: 24px; margin-top: 4px; }
.cat-w .l .t { padding: 18px 22px 24px; font-size: 14px; }
.cat-w .l .t p { margin: 0 0 12px; }
.dots { list-style: none; margin: 0; padding: 0; }
.dots li { position: relative; padding-left: 18px; margin-bottom: 6px; }
.dots li::before { content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--green-ink); }
.cat-w .r { padding: 24px 26px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.card-w { border: 1px solid var(--line); display: flex; flex-direction: column; }
.card-w .im { height: 130px; display: flex; align-items: center; justify-content: center; padding: 10px; }
.card-w .im img { max-height: 100%; object-fit: contain; }
.card-w .cb { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-w .cn { font-weight: 600; font-size: 14px; line-height: 1.3; }
.card-w .cd { font-size: 12.5px; color: var(--muted); line-height: 1.4; flex: 1; }
.card-w .cq { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; font-size: 13px; }
.card-w .cq b { font-size: 14px; }
.pozn-w { font-size: 13px; color: var(--muted); margin: 0; }
.pbox { border-top: 2px solid var(--ink); }
.pbox .row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.pbox .row b { font-size: 15px; }
.pbox .row.work { align-items: flex-start; }
.pbox .row.work ul { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.pbox .row.tot { border-bottom: 0; }
.pbox .row.tot b { font-size: 20px; }

.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px 24px; margin-top: 18px; }
.step { border-top: 1px solid var(--line); padding-top: 12px; display: flex; gap: 12px; }
.step .n { font-family: var(--font-light); font-size: 26px; line-height: 1; color: #b9b9b4; width: 34px; flex: none; }
.step b { display: block; margin-bottom: 4px; }
.step ul { font-size: 13px; color: var(--muted); }

.recap-w { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; }
.sum-w { width: 100%; border-collapse: collapse; font-size: 14px; }
.sum-w td, .sum-w th { padding: 9px 0; border-bottom: 1px solid var(--line); }
.sum-w th { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; text-align: left; border-bottom: 1.5px solid var(--ink); }
.sum-w td + td, .sum-w th + th { text-align: right; padding-left: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sum-w tr.line td { font-weight: 600; border-bottom: 1.5px solid var(--ink); }
.total-w { background: var(--green); padding: 16px 20px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.total-w b { font-size: 28px; font-weight: 600; }
.note-w { margin-top: 16px; padding: 14px 16px; border-left: 3px solid var(--green-ink); background: var(--soft); font-size: 14px; }
.cond-w { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.cond-w li { padding-left: 16px; position: relative; margin-bottom: 8px; }
.cond-w li::before { content: "–"; position: absolute; left: 0; }
.accepted-box { background: var(--green); padding: 16px 20px; font-weight: 600; }

/* ---------- pôdorys ---------- */
.plan-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); margin-bottom: 14px; }
.plan-tab { font: inherit; font-size: 14px; padding: 9px 16px; background: var(--paper); border: 0; color: var(--text); text-decoration: none; cursor: pointer; }
.plan-tab.on { background: var(--ink); color: #fff; }
.plan-tab.add { background: none; color: var(--green-ink); font-weight: 600; }
.add-plan { margin-bottom: 16px; }
.plan-editor { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.palette { background: var(--paper); padding: 14px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.palette-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.pal-item { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; width: 100%; text-align: left; font: inherit; font-size: 13px;
  padding: 6px 8px; margin-bottom: 3px; background: none; border: 1.5px solid transparent; cursor: pointer; color: var(--text); }
.pal-item:hover { background: var(--soft); }
.pal-item.on { border-color: var(--c); background: var(--soft); }
.pal-item.removed { opacity: .65; }
.pal-ico { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--c); display: grid; place-items: center; color: var(--c); background: #fff; }
.pal-name { line-height: 1.25; }
.pal-count { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 1px 7px; border-radius: 99px; background: var(--soft); color: var(--muted); }
.pal-count.ok { background: var(--green); color: var(--ink); }
.pal-count.todo { background: #fff3d6; color: #8a5a00; }
.pal-count.over { background: #fde8e7; color: var(--danger); }
.stage-wrap { background: var(--paper); padding: 10px; min-width: 0; position: relative; }
.stage-bar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.stage-scroll { overflow: auto; max-height: calc(100vh - 140px); border: 1px solid var(--line); background: #f7f7f5; }
.stage { position: relative; width: 100%; user-select: none; -webkit-user-select: none; }
.stage img { display: block; width: 100%; height: auto; }
.stage.placing { cursor: crosshair; }
.mk { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--c); background: #fff;
  color: var(--c); display: grid; place-items: center; padding: 0; cursor: grab; box-shadow: 0 1px 3px rgba(0,0,0,.25); touch-action: none; }
.mk:hover, .mk.sel { box-shadow: 0 0 0 3px var(--green), 0 1px 3px rgba(0,0,0,.25); z-index: 2; }
.mk .mk-note { position: absolute; right: -2px; top: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); border: 1.5px solid #fff; }
.inspector { position: absolute; left: 20px; bottom: 20px; width: min(380px, calc(100% - 40px)); background: #fff; padding: 12px 14px; box-shadow: 0 4px 18px rgba(0,0,0,.18); z-index: 5; }
.plan-editor { grid-template-columns: 290px minmax(0, 1fr) 300px; grid-template-areas: "pal stage items"; }
.plan-editor > .palette { grid-area: pal; } .plan-editor > .stage-wrap { grid-area: stage; } .plan-editor > .offer-items { grid-area: items; }
.offer-items { background: var(--paper); padding: 14px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; font-size: 13px; }
.oi-cat { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 12px 0 4px; }
.oi-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); }
.oi-name { line-height: 1.25; }
.oi-qty { display: flex; align-items: center; gap: 2px; }
.oi-qty .btn { padding: 4px 9px; min-width: 30px; }
.oi-qty input { width: 46px; text-align: center; padding: 4px 2px; font: inherit; }
.oi-add { margin-top: 12px; } .oi-add input { width: 100%; padding: 7px 8px; font: inherit; }
.oi-total { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 8px; border-top: 2px solid var(--ink); font-size: 14px; }
@media (max-width: 1350px) { .plan-editor { grid-template-columns: 290px minmax(0, 1fr); grid-template-areas: "pal stage" "pal items"; } .offer-items { position: static; max-height: none; } }
@media (max-width: 900px) { .plan-editor { grid-template-columns: 1fr; grid-template-areas: "pal" "stage" "items"; } .palette { position: static; max-height: none; } }

.crop-area { position: relative; overflow: hidden; border: 1px solid var(--line); cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; max-width: 100%; }
.crop-area img { display: block; width: 100%; height: auto; pointer-events: none; }
.crop-sel { position: absolute; border: 2px solid var(--green); box-shadow: 0 0 0 9999px rgba(29,29,27,.5); cursor: move; }
.mode-tabs { display: flex; margin: -14px -14px 12px; border-bottom: 1px solid var(--line); }
.mode-tab { flex: 1; font: inherit; font-size: 14px; font-weight: 600; padding: 11px 8px; background: var(--soft); border: 0; cursor: pointer; color: var(--muted); }
.mode-tab.on { background: var(--paper); color: var(--ink); box-shadow: inset 0 -3px 0 var(--green); }
.rooms-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.rooms-svg .room { fill: rgba(140, 255, 111, .14); stroke: var(--green-ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.rooms-svg.active .room { pointer-events: auto; cursor: pointer; }
.rooms-svg .room:hover, .rooms-svg .room.sel { fill: rgba(140, 255, 111, .35); }
.rooms-svg .room-draw { fill: rgba(140, 255, 111, .15); stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.rooms-svg .room-pt { fill: #fff; stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; }
.rooms-svg .room-pt.first { fill: var(--green); }
.room-label { position: absolute; transform: translate(-50%, -50%); font-size: 11px; font-weight: 700; color: var(--green-ink); background: rgba(255,255,255,.85); padding: 1px 6px; pointer-events: none; white-space: nowrap; }
.stage.rooms-mode { cursor: crosshair; }
.stage.rooms-mode .mk { pointer-events: none; opacity: .45; }
.room-obsah { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.room-obsah li { display: flex; align-items: center; gap: 8px; }
.room-obsah .pal-ico svg { width: 14px; height: 14px; }
.pv-room { position: absolute; z-index: 6; background: #fff; padding: 12px 14px; width: 270px; box-shadow: 0 4px 18px rgba(0,0,0,.2); font-size: 13px; }
.pv-room b { font-size: 15px; display: block; margin-bottom: 4px; }
.pv-room-panel { margin-top: 12px; background: var(--soft); padding: 14px 16px; }
.pv-room-panel h3 { font-size: 17px; font-family: var(--font); font-weight: 600; margin-bottom: 6px; }
/* expirovaná ponuka: sivá, ale čitateľná */
.expired-box { background: #e9e9e6; border-left: 4px solid #8a8a85; padding: 12px 16px; margin-bottom: 12px; font-size: 14px; }
.ofr.is-expired { filter: grayscale(1); opacity: .82; }
.ofr.is-expired .ofr-hero .g, .ofr.is-expired .total-w { background: #d6d6d2; }
.chip.expired { background: #e1e1dd; color: #6b6b68; }
.house-box { background: var(--soft); padding: 8px 10px; margin-bottom: 4px; }
.house-box summary { cursor: pointer; font-size: 13px; }
.room-story { max-width: 70ch; }
.room-story p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.55; }
.room-story p:first-child { font-size: 16px; color: var(--ink); }
.room-prod { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.room-prod li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.room-prod .btn.link { padding: 2px 4px; }
.rins-search { margin-top: 10px; padding: 10px; background: var(--soft); }
.rs-res { max-height: 220px; overflow-y: auto; margin-top: 6px; }
.rs-item { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; font: inherit; font-size: 13px; padding: 6px 8px; margin-bottom: 3px; background: #fff; border: 1px solid var(--line); cursor: pointer; }
.rs-item:hover { border-color: var(--ink); }
#room-inspector { max-height: calc(100% - 40px); overflow-y: auto; }
.pv-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.pv-chip { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 99px; border: 1.5px solid var(--c, var(--ink)); background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pv-chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--ink)); }
.pv-chip[aria-pressed="false"] { opacity: .45; }
.pv-stage-scroll { overflow: auto; border: 1px solid var(--line); background: #f7f7f5; max-height: 80vh; }
.pv .mk { cursor: pointer; width: 26px; height: 26px; }
.pv .mk svg { width: 16px; height: 16px; }
.pv-pop { position: absolute; z-index: 6; transform: translate(-50%, calc(-100% - 20px)); background: #fff; padding: 10px 12px; width: 240px; box-shadow: 0 4px 18px rgba(0,0,0,.2); font-size: 13px; pointer-events: none; }
.pv-pop b { display: block; font-size: 14px; }
.pv-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 14px; margin-top: 12px; font-size: 13px; }
.pv-legend div { display: flex; gap: 8px; align-items: center; }
.pv-legend .pal-ico { width: 24px; height: 24px; flex: none; }
.pv-legend .pal-ico svg { width: 15px; height: 15px; }
/* rozpracované úpravy, kapacita rozvádzača, schvaľovanie */
.draft-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; background: #eef4ff; border-left: 4px solid #3b6fd8; padding: 12px 16px; margin-bottom: 16px; }
.draft-bar form { margin: 0; }
.kap { background: var(--soft); padding: 8px 10px; margin-bottom: 10px; }
.kap summary { cursor: pointer; font-size: 13px; }
.kap-chyba { background: #fdecea; }
.kap-bad { color: var(--danger); font-weight: 600; }
.kap-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.kap-table th, .kap-table td { padding: 3px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.kap-table th { font-weight: 600; color: var(--muted, #666); }
.kap-table .r { text-align: right; }
.zmeny-box { background: #eef4ff; border-left: 4px solid #3b6fd8; padding: 12px 16px; margin: 12px 0; }
.zmeny-box ul { margin: 6px 0 0; padding-left: 18px; }
.sign-pad { width: 100%; height: 180px; background: #fff; border: 1.5px dashed var(--line); touch-action: none; display: block; }
.chip.changes { background: #dfe8fb; color: #2a4f9e; }

@media (max-width: 860px) {
  .ofr-hero { grid-template-columns: 1fr; }
  .ofr-hero .g { padding: 26px 20px; }
  .ofr-bar, .sec { padding-left: 20px; padding-right: 20px; }
  .cat-w { grid-template-columns: 1fr; }
  .cat-w .r { padding: 20px; }
  .recap-w { grid-template-columns: minmax(0, 1fr); }
  .recap-w > div { min-width: 0; }
  .sum-w { font-size: 13px; }
  .sum-w th { white-space: normal; }
  .sum-w td + td, .sum-w th + th { padding-left: 8px; }
  .stats-w { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .head-row h1 { font-size: 26px; }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-w .im { height: 100px; }
  .list .hide-s { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* admin katalóg */
.cat-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 2px solid var(--ink); }
.cat-tabs a { padding: 8px 14px; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--muted); }
.cat-tabs a:hover { color: var(--ink); }
.cat-tabs a.on { background: var(--ink); color: #fff; }
.cat-filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.cat-filter .field { min-width: 0; flex: 1 1 180px; }
.cat-filter .field.q { flex: 2 1 260px; }
.cat-form select, .cat-filter select { width: 100%; font: inherit; padding: 9px 11px; border: 1.5px solid #cfcfca; background: #fff; color: var(--ink); border-radius: 0; }
.cat-form select[multiple] { min-height: 160px; padding: 4px; }
.cat-form textarea.html { min-height: 260px; font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.cat-form .field label { display: flex; align-items: center; gap: 6px; }
.lock { display: inline-flex; align-items: center; gap: 3px; font: inherit; font-size: 11px; font-weight: 600; color: #8a5a00; background: #fff3d6; border: 0; border-radius: 99px; padding: 1px 8px; cursor: pointer; }
.lock:hover { background: #ffe3a3; }
.lock svg { width: 11px; height: 11px; }
.chip.on { background: #e8f7e2; color: var(--green-ink); }
.chip.sync { background: #fff3d6; color: #8a5a00; }
.cat-thumb { width: 48px; height: 48px; object-fit: contain; background: var(--soft); display: block; }
.cat-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.cat-imgs figure { margin: 0; border: 1px solid var(--line); display: flex; flex-direction: column; }
.cat-imgs img { height: 120px; width: 100%; object-fit: contain; padding: 8px; }
.cat-imgs figcaption { border-top: 1px solid var(--line); padding: 6px 8px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.cat-imgs form { margin: 0; }
.cat-pages { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 14px; font-size: 14px; }
.cat-pages .on { font-weight: 700; padding: 6px 10px; }
.cat-tree td:first-child { white-space: nowrap; }
.cat-tree .ind { display: inline-block; color: #b9b9b4; }
@media (max-width: 860px) { .cat-imgs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bulk-bar { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: flex-end; padding: 12px 14px; margin-bottom: 12px; background: var(--soft); border: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.bulk-bar .field { min-width: 0; flex: 1 1 200px; margin: 0; }
.bulk-bar .field.narrow { flex: 0 1 130px; }
.bulk-bar select, .bulk-bar input[type=number], .bulk-bar input[type=text] { width: 100%; font: inherit; padding: 8px 10px; border: 1.5px solid #cfcfca; background: #fff; border-radius: 0; }
.bulk-bar .lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.bulk-bar .check { display: block; font-size: 14px; }
.list th.chk, .list td.chk { width: 34px; padding-right: 0; }
.list .chk input { width: 17px; height: 17px; cursor: pointer; }
.list tr.sel td { background: #f1f9ee; }
.cat-form .tox-tinymce { border: 1.5px solid #cfcfca; border-radius: 0; }
