/* Redesign: private zone (docs/migration/REDESIGN.md, slice 5, register R33). Owned by templates/site/private/*,
   private-ad-form.js, private-media.js, private-list.js. */

.private-shell { background: linear-gradient(180deg, var(--iep-sky) 0, var(--iep-sky) 180px, var(--iep-sand) 180px); padding: 1.25rem 0 clamp(2.5rem, 6vw, 4rem); min-height: 60vh; }
.private-crumbs { margin-bottom: 1rem; }

/* Side menu: a column from 992 px, a scrolling row of buttons below */
.private-menu { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: thin; }
.private-menu-link { display: inline-flex; align-items: center; gap: .55rem; padding: .6rem .85rem; border-radius: var(--iep-radius-sm); color: var(--iep-navy-900); font-weight: 600; text-decoration: none; white-space: nowrap; background: #fff; border: 1px solid var(--iep-line); min-height: 44px; }
.private-menu-link .bi { font-size: 1.1rem; color: var(--iep-navy-700); flex: 0 0 auto; }
.private-menu-link:hover { background: var(--iep-sky); color: var(--iep-navy-900); }
.private-menu-link.active { background: var(--iep-navy); border-color: var(--iep-navy); color: #fff; }
.private-menu-link.active .bi { color: #fff; }
.private-menu-logout { color: var(--iep-muted); }
@media (min-width: 992px) {
    .private-menu { flex-direction: column; overflow: visible; position: sticky; top: 1rem; background: #fff; border: 1px solid var(--iep-line); border-radius: var(--iep-radius); padding: .5rem; box-shadow: var(--iep-shadow); }
    .private-menu-link { border: 0; background: transparent; }
    .private-menu-logout { margin-top: .35rem; border-top: 1px solid var(--iep-line) !important; border-radius: 0 0 var(--iep-radius-sm) var(--iep-radius-sm); }
}

.private-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 1.25rem; }
.private-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 .2rem; }

/* Dashboard */
.private-stat { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--iep-line); border-radius: var(--iep-radius); text-decoration: none; color: var(--iep-muted); box-shadow: var(--iep-shadow); font-size: .9rem; }
.private-stat strong { font-size: 1.9rem; line-height: 1.1; color: var(--iep-navy-900); }
.private-stat:hover { border-color: #b7cbe0; color: var(--iep-muted); }
.private-stat-icon { font-size: 1.25rem; }
.private-stat-ok .private-stat-icon { color: var(--iep-success); }
.private-stat-wait .private-stat-icon { color: #9a6700; }
.private-stat-warn .private-stat-icon { color: var(--iep-orange-600); }
.private-stat-off .private-stat-icon { color: var(--iep-muted); }
.private-callout { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1.1rem; background: var(--iep-orange-050); border: 1px solid #ffd2b5; border-radius: var(--iep-radius-sm); color: #6a3205; }
.private-callout > .bi { font-size: 1.2rem; flex: 0 0 auto; margin-top: .1rem; }
.private-tile { display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: 1.25rem; background: #fff; border: 1px solid var(--iep-line); border-radius: var(--iep-radius); text-decoration: none; color: var(--iep-muted); transition: transform .15s ease, box-shadow .15s ease; }
.private-tile strong { color: var(--iep-navy-900); font-size: 1.08rem; }
.private-tile:hover { transform: translateY(-2px); box-shadow: var(--iep-shadow); color: var(--iep-muted); }
.private-tile-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--iep-orange-050); color: var(--iep-orange-600); font-size: 1.35rem; margin-bottom: .25rem; }
.private-panel { background: #fff; border: 1px solid var(--iep-line); border-radius: var(--iep-radius); padding: 1.25rem 1.4rem; }
.private-tips { margin: 0; padding-left: 1.1rem; color: var(--iep-muted); display: grid; gap: .35rem; }
.private-empty { text-align: center; background: #fff; border: 1px dashed #b7cbe0; border-radius: var(--iep-radius); padding: clamp(1.75rem, 5vw, 3rem) 1.25rem; }

/* Forms */
.pz-form { display: grid; gap: 1rem; }
.pz-section { background: #fff; border: 1px solid var(--iep-line); border-radius: var(--iep-radius); padding: clamp(1.1rem, 3vw, 1.6rem); box-shadow: 0 1px 2px rgba(0, 29, 61, .05); }
.pz-section-title { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; margin: 0 0 1rem; }
.pz-step { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--iep-navy); color: #fff; font-size: .9rem; font-weight: 800; flex: 0 0 auto; }
.pz-label, .pz-form .form-label { display: block; font-weight: 700; color: var(--iep-navy-900); font-size: .93rem; margin-bottom: .45rem; }
.pz-hint { color: var(--iep-muted); font-size: .93rem; }
.pz-count, .pz-optional { margin-left: auto; font-size: .85rem; font-weight: 700; color: var(--iep-muted); background: var(--iep-sky); border-radius: 999px; padding: .2rem .65rem; }
.pz-group { border: 0; margin: 0; padding: 0; }
.pz-group-title { float: none; width: auto; font-size: 1rem; font-weight: 800; color: var(--iep-navy-900); margin: .5rem 0 .6rem; padding: 0; }
.pz-form .form-control, .pz-form .form-select { min-height: 44px; border-radius: var(--iep-radius-sm); }
.pz-form .input-group-text { background: var(--iep-sky); border-radius: var(--iep-radius-sm) 0 0 var(--iep-radius-sm); color: var(--iep-navy-700); }
.pz-form textarea.form-control { min-height: 10rem; }
.pz-form .form-text { color: var(--iep-muted); }
.pz-form .invalid-feedback { font-weight: 600; }
.pz-form .chip-group + .invalid-feedback, .pz-form .chip-group ~ .invalid-feedback { display: block; }
.btn-chip-muted { --bs-btn-color: var(--iep-muted); font-weight: 500; }
.pz-submit { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding: .85rem 1.1rem; background: rgba(255, 255, 255, .97); border: 1px solid var(--iep-line); border-radius: var(--iep-radius); box-shadow: 0 -6px 24px rgba(0, 29, 61, .08); }
.pz-submit .btn-lg { min-width: 12rem; }
@media (max-width: 575.98px) {
    .pz-submit { flex-wrap: nowrap; padding: .6rem; border-radius: var(--iep-radius-sm); }
    .pz-submit > p { display: none; }
    .pz-submit .btn { flex: 1 1 auto; min-width: 0; padding-left: .6rem; padding-right: .6rem; }
    .pz-submit .btn-lg { --bs-btn-font-size: 1rem; flex-grow: 2; }
}
.btn.is-loading { opacity: .75; cursor: progress; }
[aria-busy="true"] .pz-form { opacity: .55; pointer-events: none; transition: opacity .15s; }

/* Steps */
.pz-steps { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1rem; counter-reset: none; }
.pz-steps li { flex: 1 1 0; display: flex; align-items: center; gap: .5rem; padding: .55rem .75rem; background: #fff; border: 1px solid var(--iep-line); border-radius: var(--iep-radius-sm); font-weight: 700; color: var(--iep-muted); font-size: .92rem; min-width: 0; }
.pz-steps li a { display: flex; align-items: center; gap: .5rem; color: inherit; text-decoration: none; }
.pz-steps li .pz-step { background: var(--iep-line); color: var(--iep-navy-900); width: 1.6rem; height: 1.6rem; font-size: .8rem; }
.pz-steps li.is-current { border-color: var(--iep-navy); color: var(--iep-navy-900); box-shadow: inset 0 -3px 0 var(--iep-orange); }
.pz-steps li.is-current .pz-step { background: var(--iep-navy); color: #fff; }
.pz-steps li.is-done .pz-step { background: var(--iep-success); color: #fff; }

/* Category picker */
.category-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.category-option { display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: .9rem 1rem; border: 2px solid var(--iep-line); border-radius: var(--iep-radius); background: #fff; cursor: pointer; color: var(--iep-muted); font-size: .86rem; line-height: 1.3; transition: border-color .15s, background .15s; }
.category-option strong { color: var(--iep-navy-900); font-size: 1rem; }
.category-option-icon { font-size: 1.4rem; color: var(--iep-navy-700); margin-bottom: .15rem; }
.category-option:hover { border-color: #b7cbe0; background: var(--iep-sky); }
.btn-check:checked + .category-option { border-color: var(--iep-navy); background: var(--iep-sky); box-shadow: inset 0 0 0 1px var(--iep-navy); }
.btn-check:checked + .category-option .category-option-icon { color: var(--iep-orange-600); }
.btn-check:focus-visible + .category-option { outline: 3px solid var(--iep-orange); outline-offset: 2px; }

/* Energy classes as chips: A–G in the colours of the legal scales once selected */
.chip-group-energy .btn-chip { min-width: 3rem; justify-content: center; }
.chip-group-energy .btn-check:checked + .btn-chip { color: #fff; border-color: transparent; }
.chip-group-energy:not(.chip-group-ges) .btn-check:checked + label:nth-of-type(2) { background: #009c6d; }
.chip-group-energy:not(.chip-group-ges) .btn-check:checked + label:nth-of-type(3) { background: #52b153; }
.chip-group-energy:not(.chip-group-ges) .btn-check:checked + label:nth-of-type(4) { background: #78bd76; }
.chip-group-energy:not(.chip-group-ges) .btn-check:checked + label:nth-of-type(5) { background: #f4e70f; color: #1b2a37; }
.chip-group-energy:not(.chip-group-ges) .btn-check:checked + label:nth-of-type(6) { background: #f0b50f; color: #1b2a37; }
.chip-group-energy:not(.chip-group-ges) .btn-check:checked + label:nth-of-type(7) { background: #eb8235; }
.chip-group-energy:not(.chip-group-ges) .btn-check:checked + label:nth-of-type(8) { background: #d7221f; }
.chip-group-ges .btn-check:checked + label:nth-of-type(2) { background: #a4dbf8; color: #1b2a37; }
.chip-group-ges .btn-check:checked + label:nth-of-type(3) { background: #8cb4d3; }
.chip-group-ges .btn-check:checked + label:nth-of-type(4) { background: #7792b1; }
.chip-group-ges .btn-check:checked + label:nth-of-type(5) { background: #606f8f; }
.chip-group-ges .btn-check:checked + label:nth-of-type(6) { background: #4d5271; }
.chip-group-ges .btn-check:checked + label:nth-of-type(7) { background: #393551; }
.chip-group-ges .btn-check:checked + label:nth-of-type(8) { background: #281b35; }
.chip-group-energy .btn-check:checked + label:nth-of-type(1), .chip-group-energy .btn-check:checked + label:nth-of-type(9) { background: var(--iep-navy); }

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; list-style: none; padding: 0; margin: 0 0 .75rem; }
.photo-tile { position: relative; aspect-ratio: 4 / 3; border-radius: var(--iep-radius-sm); overflow: hidden; background: var(--iep-sky); border: 1px solid var(--iep-line); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile.is-new { outline: 2px dashed var(--iep-orange); outline-offset: -2px; }
.photo-badge { position: absolute; left: .4rem; bottom: .4rem; background: rgba(0, 29, 61, .85); color: #fff; font-size: .74rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; }
.photo-remove { position: absolute; top: .4rem; right: .4rem; display: inline-flex; align-items: center; gap: .3rem; min-width: 36px; height: 36px; padding: 0 .55rem; justify-content: center; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .95); color: #b02a37; font-weight: 700; font-size: .85rem; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.photo-remove.is-plain { color: var(--iep-navy-900); font-size: 1.3rem; line-height: 1; }
.photo-remove-confirm { display: none; }
.photo-remove.is-confirm { background: #b02a37; color: #fff; }
.photo-remove.is-confirm .photo-remove-confirm { display: inline; }
.photo-drop { aspect-ratio: 4 / 3; }
.photo-drop label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; height: 100%; padding: .75rem; text-align: center; border: 2px dashed #b7cbe0; border-radius: var(--iep-radius-sm); background: #fff; color: var(--iep-muted); font-size: .82rem; cursor: pointer; transition: border-color .15s, background .15s; }
.photo-drop label .bi { font-size: 1.8rem; color: var(--iep-navy-700); }
.photo-drop label strong { color: var(--iep-navy-900); font-size: .95rem; }
.photo-drop label:hover, .photo-drop.is-over label { border-color: var(--iep-navy); background: var(--iep-sky); }
.photo-drop:focus-within label { outline: 3px solid var(--iep-orange); outline-offset: 2px; }
.pz-photo-status:not(:empty) { margin-top: .75rem; padding: .6rem .85rem; border-radius: var(--iep-radius-sm); background: var(--iep-sky); font-weight: 600; font-size: .9rem; }
.pz-photo-status[data-tone="error"] { background: #fbe9eb; color: #8a1c27; }
.pz-photo-status[data-tone="success"] { background: #e6f4ec; color: #145233; }

/* Owner's list */
.pz-filters { background: #fff; border: 1px solid var(--iep-line); border-radius: var(--iep-radius); padding: .9rem 1rem .4rem; margin-bottom: 1rem; }
.pz-filters .mb-3 { margin-bottom: .5rem !important; }
.owner-ads { display: grid; gap: .9rem; }
.owner-ad { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 1rem; align-items: start; background: #fff; border: 1px solid var(--iep-line); border-radius: var(--iep-radius); padding: .85rem; box-shadow: 0 1px 2px rgba(0, 29, 61, .05); }
.owner-ad-media { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--iep-radius-sm); overflow: hidden; background: var(--iep-sky); }
.owner-ad-media img { width: 100%; height: 100%; object-fit: cover; }
.owner-ad-photos { position: absolute; right: .35rem; bottom: .35rem; background: rgba(0, 29, 61, .8); color: #fff; font-size: .75rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; display: inline-flex; gap: .25rem; align-items: center; }
.owner-ad-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .35rem; }
.owner-ad-badges .badge { font-weight: 700; border: 1px solid var(--iep-line); }
.status-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 800; padding: .25rem .6rem; border-radius: 999px; }
.status-ok { background: #e6f4ec; color: #145233; }
.status-wait { background: #fff4d6; color: #6b4a00; }
.status-off { background: #eef0f3; color: #43505c; }
.status-bad { background: #fbe9eb; color: #8a1c27; }
.owner-ad-title { font-size: 1.05rem; margin: 0 0 .3rem; }
.owner-ad-title a { color: var(--iep-navy-900); text-decoration: none; }
.owner-ad-title a:hover { color: var(--iep-orange-600); text-decoration: underline; }
.owner-ad-meta { display: flex; flex-wrap: wrap; gap: .25rem .9rem; color: var(--iep-muted); font-size: .9rem; margin: 0 0 .2rem; }
.owner-ad-price { color: var(--iep-navy-900); font-weight: 800; }
.owner-ad-dates { color: var(--iep-muted); font-size: .82rem; margin: 0; }
.owner-ad-note { margin: .45rem 0 0; font-size: .85rem; color: #6b4a00; }
.owner-ad-actions { display: grid; gap: .4rem; min-width: 150px; }
.owner-ad-actions .btn { white-space: nowrap; }
.owner-ad-actions form { margin: 0; }
.owner-ad-more { display: flex; justify-content: space-between; gap: .25rem; }
.owner-ad-more .btn-link { text-decoration: none; padding-left: 0; padding-right: 0; font-weight: 600; }
@media (max-width: 767.98px) {
    .owner-ad { grid-template-columns: 110px minmax(0, 1fr); }
    .owner-ad-actions { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); min-width: 0; }
    .owner-ad-more { grid-column: 1 / -1; justify-content: flex-start; gap: 1.25rem; }
}
