/* Area D – proof reports, time tracking, issues + public share page (public/proof.html). Owned by the area (docs/AREAS.md).
   Classes are prefixed pr- (office pages) and ps- (share page); only tokens from theme.css. Look follows docs/mockups (calm white cards,
   soft pills, photo tiles with time badges). No all-caps labels, no thick coloured left borders. */

.pr-gap { margin-bottom: 14px; } .pr-gap-top { margin-top: var(--gap); }
.pr-kpis { margin-bottom: var(--gap); }
.pr-kpis .kpi .val { font-size: 22px; }

/* soft pills (variance, checklist counter, mail status, link state) */
.pr-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 650; white-space: nowrap;
  background: var(--neutral-bg); color: var(--text-2); font-variant-numeric: tabular-nums; }
.pr-pill.ok { background: var(--st-done-bg); color: var(--st-done); } .pr-pill.warn { background: var(--st-progress-bg); color: var(--st-progress); }
.pr-pill.err { background: var(--st-cancelled-bg); color: var(--st-cancelled); } .pr-pill.info { background: var(--st-planned-bg); color: var(--st-planned); }
.pr-warn { margin-left: 4px; margin-top: 3px; }

/* checklist progress in lists */
.pr-check { display: flex; align-items: center; gap: 8px; min-width: 90px; }
.pr-bar { flex: 1; display: block; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; min-width: 48px; }
.pr-bar > span { display: block; height: 100%; border-radius: 3px; background: var(--st-progress); } .pr-bar > span.full { background: var(--st-done); }

/* detail: photos */
.pr-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.pr-ph { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pr-ph-img { position: relative; display: block; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface-3); cursor: zoom-in; aspect-ratio: 4 / 3; }
.pr-ph-img img { width: 100%; height: 100%; object-fit: cover; }
.pr-ph-badge { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: var(--radius-pill); background: rgba(15, 23, 42, .72); color: #fff; font-size: 11px; font-weight: 600; }
.pr-ph-hidden { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15, 23, 42, .45); color: #fff; font-weight: 650; font-size: 12px; }
.pr-ph.off img { filter: grayscale(1); opacity: .6; }
.pr-ph figcaption { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pr-ph figcaption b { font-size: var(--fs-sm); } .pr-ph figcaption .btn { align-self: flex-start; margin-top: 2px; }
.pr-lb img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--radius); background: var(--surface-3); margin-bottom: 10px; }

/* detail: checklist per area */
.pr-area { padding: 14px 18px; border-bottom: 1px solid var(--border); } .pr-area:last-child { border-bottom: 0; }
.pr-area-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pr-area-cmt { margin: 0 0 6px; color: var(--text-2); background: var(--surface-2); border-radius: var(--radius-sm); padding: 6px 10px; }
.pr-items li { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); }
.pr-items li:first-child { border-top: 0; }
.pr-mark { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; margin-top: 1px; border: 1.5px solid var(--st-progress); }
.pr-items li.done .pr-mark { background: var(--st-done); border-color: var(--st-done); color: #fff; } .pr-mark .icon { width: 13px; height: 13px; stroke-width: 2.6; }
.pr-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pr-item-cmt { color: var(--text-2); font-style: italic; }
.pr-open { color: var(--st-progress); font-weight: 600; }
.pr-summary h3 { margin-bottom: 12px; } .pr-summary .mini { display: block; color: var(--text-3); font-size: 11.5px; font-weight: 400; }
.pr-actions { flex-wrap: wrap; } .pr-actions .btn { flex: 1 1 auto; }
.pr-hash code { word-break: break-all; font-size: 10.5px; }
.pr-links li, .pr-sends li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.pr-links li:first-child, .pr-sends li:first-child { border-top: 0; }
.pr-sends { padding: 4px 18px; } .pr-send-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.pr-link-main, .pr-send-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pr-mail-prev { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 12px 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.pr-mail-prev [data-pv-b] { color: var(--text-2); max-height: 180px; overflow: auto; }
.pr-daysin { width: 80px; } .pr-range { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pr-batch-list { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; }
.pr-static { display: flex; flex-direction: column; padding-top: 8px; } .pr-static .mini { color: var(--text-3); font-size: 12px; }
.pr-pre { white-space: pre-wrap; }
.pr-desc { max-width: 280px; }

/* month stepper */
.pr-month { display: inline-flex; align-items: center; gap: 2px; } .pr-month .input { width: 150px; height: 36px; }

/* time entries: bulk bar */
.pr-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 18px; background: var(--primary-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pr-te input[type="checkbox"], .pr-batch-list input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--primary); }
.pr-te .mini { max-width: 220px; }

/* hours per object: paired bars */
.pr-legend { margin: 0 0 12px; } .pr-legend i { width: 10px; height: 10px; } .pr-lg-plan { background: var(--c-prev); } .pr-lg-act { background: var(--primary); }
.pr-pairs { display: flex; flex-direction: column; gap: 12px; }
.pr-pair-l { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 4px; }
.pr-pair-bars { display: flex; flex-direction: column; gap: 3px; }
.pr-b { display: block; height: 8px; border-radius: 4px; min-width: 2px; } .pr-b.plan { background: var(--c-prev); } .pr-b.act { background: var(--primary); }

/* hours per employee */
.pr-warnlist { margin-top: 4px; } .pr-warnlist li { padding: 1px 0; }
.pr-pos { color: var(--st-progress); font-weight: 650; }
.pr-he-detail td { background: var(--surface-2); }
.pr-he tr.pr-he-detail:hover td { background: var(--surface-2); }
.pr-limit { min-width: 190px; } .pr-limit .row { margin-top: 4px; }
.pr-limit-bar { position: relative; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.pr-limit-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.pr-limit-bar .proj { background: color-mix(in srgb, var(--primary) 25%, transparent); } .pr-limit-bar .act { background: var(--st-done); }
.pr-limit.warn .act { background: var(--st-progress); } .pr-limit.over .act { background: var(--st-cancelled); }
.pr-limit-bar i { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text-3); opacity: .5; }
.pr-days { display: flex; gap: 3px; align-items: flex-end; overflow-x: auto; padding-bottom: 2px; }
.pr-day { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1 0 16px; }
.pr-day-bar { position: relative; display: block; width: 100%; max-width: 22px; height: 60px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.pr-day-bar span { position: absolute; left: 0; right: 0; bottom: 0; background: var(--primary); border-radius: 4px 4px 0 0; } .pr-day-bar span.over { background: var(--st-cancelled); }
.pr-day-n { font-size: 10px; color: var(--text-3); } .pr-day.we .pr-day-n { color: var(--st-cancelled); opacity: .7; }
.pr-months { display: flex; gap: 14px; align-items: flex-end; margin-top: 6px; }
.pr-mo { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 52px; }
.pr-mo-bar { position: relative; display: block; width: 26px; height: 64px; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.pr-mo-bar span { position: absolute; left: 0; right: 0; bottom: 0; background: var(--primary); } .pr-mo-bar span.warn { background: var(--st-progress); } .pr-mo-bar span.over { background: var(--st-cancelled); }

/* issues */
.pr-steps { margin-bottom: 4px; }

.pr-detail > *, .pr-issue > * { min-width: 0; }
@media (max-width: 960px) {
  .pr-detail, .pr-issue { grid-template-columns: minmax(0, 1fr); }
  .pr-photos { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-width: 560px) {
  .pr-range { grid-template-columns: 1fr; }
  .pr-month .input { width: 130px; }
  .pr-desc, .pr-te .mini { max-width: 160px; }
}

/* ---------- public share page ---------- */
.ps-body { background: var(--bg); }
.ps-wrap { max-width: 980px; margin: 0 auto; padding: 0 16px 40px; }
.ps-head { display: flex; align-items: center; gap: 12px; padding: 18px 0; }
.ps-co { display: flex; align-items: center; gap: 12px; min-width: 0; } .ps-co > div { display: flex; flex-direction: column; min-width: 0; }
.ps-logo { max-height: 44px; max-width: 160px; object-fit: contain; }
.ps-mono { width: 42px; height: 42px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; flex: none; }
.ps-lang { margin-left: auto; display: inline-flex; gap: 4px; }
.ps-lang button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text-2); }
.ps-lang button[aria-pressed="true"] { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.ps-lang .flag { width: 18px; height: 13px; border-radius: 2px; }
.ps-hero { background: var(--grad); color: #fff; border-radius: var(--radius-lg); padding: 22px 24px; margin-bottom: 16px; }
.ps-hero h1 { font-size: 24px; } .ps-hero p { margin: 6px 0 0; opacity: .85; }
.ps-main { display: flex; flex-direction: column; gap: 16px; }
.ps-toc a { font-weight: 650; } .ps-toc li { padding: 3px 0; }
.ps-report { padding: 20px; }
.ps-r-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; } .ps-r-head .btn { margin-left: auto; }
.ps-r-head h2 { font-size: 20px; }
.ps-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ps-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ps-tile > span:first-child { font-size: 12px; color: var(--text-3); } .ps-tile b { font-size: 18px; } .ps-tile small { color: var(--text-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-addr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.ps-addr > div { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.ps-h3 { margin: 18px 0 10px; }
.ps-areas { border: 1px solid var(--border); border-radius: var(--radius); }
.ps-confirm { margin: 14px 0 0; }
.ps-gone { margin-top: 40px; text-align: center; } .ps-gone .icon { width: 36px; height: 36px; margin: 10px auto; stroke: var(--text-3); } .ps-gone h1 { font-size: 20px; margin-bottom: 8px; }
.ps-foot { text-align: center; padding: 26px 0 0; }
@media (max-width: 700px) { .ps-tiles { grid-template-columns: 1fr 1fr; } .ps-addr { grid-template-columns: 1fr; } .ps-r-head .btn { margin-left: 0; width: 100%; } }
.pr-issue .dl .mini, .pr-detail .dl .mini { display: block; color: var(--text-3); font-size: 11.5px; font-weight: 400; }
.pr-ho td.r, .pr-he td.r, .pr-te td.r { white-space: nowrap; }
