/* Website masters and photo galleries, 1.0 */
.master-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:22px;align-items:start}.master-card{background:#fff;border:1px solid #dce4ea;border-radius:14px;padding:22px;min-width:0}.master-card h3{margin:0 0 18px;font-size:21px}.master-add{display:flex;align-items:end;gap:10px;padding-bottom:20px;border-bottom:1px solid #e5e9ef}.master-add label{flex:1;min-width:0}.master-card input:not([type=checkbox]){width:100%;min-width:0;padding:10px;border:1px solid #cbd5df;border-radius:6px;font:inherit}.master-card label{font-size:12px;font-weight:600;display:block}.master-card input{margin-top:6px}.master-row{display:grid;grid-template-columns:1fr auto;gap:10px;padding:18px 0;border-bottom:1px solid #e5e9ef}.master-name{grid-column:1/-1}.master-row .master-active{display:flex;align-items:center;gap:6px}.master-active input{margin:0}.master-usage{font-size:12px;color:#5b6877}.master-actions{grid-column:1/-1;display:flex;gap:8px}.master-actions button,.photo-edit-card button{padding:7px 10px;border:1px solid #cbd5df;border-radius:5px;background:white;cursor:pointer;font:inherit;font-size:12px}.master-actions button:first-child{color:#a5153a;font-weight:700}.master-actions button:disabled,.photo-edit-card button:disabled{opacity:.4;cursor:default}#editModal{max-width:760px;width:calc(100% - 32px)}.photo-editor-heading{margin:24px 0 8px}.photo-editor-heading h3{margin:0 0 5px}.photo-editor-heading small{color:#586777}.photo-editor{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;margin-bottom:14px}.photo-edit-card{border:1px solid #dce4ea;border-radius:9px;overflow:hidden;background:#f7f9fb}.photo-edit-card img{display:block;width:100%;height:130px;object-fit:cover}.photo-edit-card>span{display:block;font-size:12px;padding:8px 10px;font-weight:700}.photo-edit-card>div{display:flex;flex-wrap:wrap;gap:5px;padding:0 8px 10px}.photo-editor-status{font-size:14px;color:#a5153a;font-weight:600;white-space:pre-wrap}.property-gallery{margin:20px 0 26px;min-width:0}.gallery-main{display:block;position:relative;width:100%;padding:0;border:0;background:#eff2f5;border-radius:13px;overflow:hidden;cursor:zoom-in}.gallery-main img{display:block;width:100%;height:360px;object-fit:contain}.gallery-main>span{position:absolute;right:12px;bottom:12px;padding:8px 12px;border-radius:6px;background:#fff;color:#25384b;font-size:12px;font-weight:700}.gallery-controls{display:flex;align-items:center;justify-content:center;gap:18px;margin:10px 0}.gallery-controls button{border:1px solid #cbd5df;border-radius:50%;width:40px;height:40px;background:#fff;color:#24364a;font-size:22px;cursor:pointer}.gallery-controls output{font-size:14px;font-weight:700;min-width:55px;text-align:center}.gallery-thumbs{display:flex;gap:8px;overflow-x:auto;padding:3px;max-width:100%}.gallery-thumbs button{flex:0 0 84px;width:84px;height:65px;border:2px solid transparent;border-radius:7px;padding:2px;background:#fff;cursor:pointer}.gallery-thumbs button[aria-pressed=true]{border-color:#c41945}.gallery-thumbs img{width:100%;height:100%;object-fit:cover;border-radius:3px}.photo-lightbox{border:0;border-radius:14px;padding:42px 16px 10px;background:#f6f8fa;max-width:96vw;width:1100px;max-height:94dvh}.photo-lightbox::backdrop{background:rgba(16,32,50,.85)}.photo-lightbox>img{display:block;max-width:100%;width:100%;height:calc(85dvh - 120px);object-fit:contain}.lightbox-close{position:absolute;right:10px;top:6px;border:0;background:none;font-size:32px;cursor:pointer;color:#20344a}.property-photo-count{font-size:11px;padding-left:8px;color:#627180}.filter-row{flex-wrap:wrap}.master-card button:focus-visible,.property-gallery button:focus-visible,.photo-lightbox button:focus-visible,.photo-edit-card button:focus-visible{outline:3px solid #c41945;outline-offset:3px}@media(max-width:600px){.master-card{padding:16px}.gallery-main img{height:250px}.photo-editor{grid-template-columns:repeat(2,minmax(0,1fr))}.photo-edit-card img{height:105px}.photo-edit-card button{padding:5px;font-size:11px}}

/* Optional sections collapse when empty; a single value uses the available space. */
.modal-finance>div:only-child{grid-column:1/-1}.property-financial>div:only-child{flex:1}.property-facts>div:only-child{grid-column:1/-1}

/* Figma V4.1: Masters, photo editor and customer gallery. */
:root{--white:#fff;--space-8:8px;--space-12:12px;--space-16:16px;--space-22:22px;--space-24:24px;--space-32:32px;--radius-9:9px;--radius-14:14px}
.master-card{padding:var(--space-16);border-color:var(--line);border-radius:var(--radius-14)}
.master-card h3,.photo-editor-heading h3{font:800 21px/1.4 Manrope,sans-serif;margin:0 0 16px}
.master-add{gap:12px;border:0;padding-bottom:16px}.master-add .btn{min-width:72px;padding:12px}
.master-card input:not([type=checkbox]){padding:12px;border-color:var(--line);border-radius:9px;font-size:14px;line-height:1.4;margin-top:8px;color:var(--ink);background:var(--white)}
.master-card label{font-weight:700}.master-list{display:grid;gap:16px}
.master-row{padding:16px;border:1px solid var(--line);border-radius:9px;gap:12px;grid-template-columns:auto 1fr}
.master-name{min-width:0}.master-active{color:var(--green)}.master-active input{accent-color:var(--green)}.master-usage{align-self:center;font-weight:700;color:var(--muted)}
.master-actions button,.photo-edit-card button{min-height:48px;border-color:var(--line);border-radius:9px;padding:12px;font-size:14px;font-weight:700;color:var(--ink);line-height:1.4}
.master-actions button{min-width:80px}.master-actions button:first-child,.photo-edit-card [data-photo-action=remove]{color:var(--red)}
#admin-masters .btn-red,#editModal .btn-red,#propertyModal .btn-red{background:var(--red);box-shadow:none}
#editModal{padding:32px;border-radius:14px}#editModal h2{font-size:29px;line-height:1.4}#editForm{gap:24px;padding-right:0}
#editForm label{gap:8px}#editForm input:not([type=checkbox]),#editForm select,#editForm textarea{border-radius:9px;border-color:var(--line);font-size:14px;line-height:1.4;min-width:0}
.master-selects{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.photo-editor-heading{margin:0}.photo-editor-heading h3{margin-bottom:8px}.photo-editor-heading small{font-size:12px;color:var(--muted);font-weight:700}
.photo-editor{grid-template-columns:repeat(3,minmax(0,1fr));margin:0;gap:12px}.photo-edit-card{background:var(--sky);border:0;border-radius:9px}
.photo-edit-card>span{padding:16px 8px 8px}.photo-edit-card>div{gap:8px;padding:0 8px 8px}
.photo-edit-card [data-photo-action=cover],.photo-edit-card [data-photo-action=remove]{min-width:96px}.photo-edit-card [data-photo-action=left],.photo-edit-card [data-photo-action=right]{width:44px;padding:8px}
#editForm .photo-upload{background:var(--sky);border-radius:9px;padding:24px;font-size:12px}.photo-upload small{font-size:12px;color:var(--muted)}
#editPhoto{padding:0;border:0;background:transparent;min-height:48px}#editPhoto::file-selector-button{min-height:48px;margin-right:12px;border:1px solid var(--line);border-radius:9px;padding:12px;background:white;color:var(--ink);font-weight:700;cursor:pointer}
.photo-save-actions{display:flex;gap:12px}.photo-save-actions .btn{font-size:14px}.photo-save-actions .btn-outline,#propertyModal .btn-outline{border-color:var(--line);color:var(--ink)}
.property-gallery{display:grid;gap:12px}.gallery-main{background:var(--sky,#f3f7f9);border-radius:14px}.gallery-main>span{min-height:48px;display:grid;place-items:center;border:1px solid var(--line,#e6ecf0);border-radius:9px}
.gallery-controls{gap:16px;margin:0}.gallery-controls button{width:44px;height:48px;border-radius:9px;border-color:var(--line,#e6ecf0);font:700 18px 'DM Sans',sans-serif}
.gallery-thumbs{padding:0}.gallery-thumbs button{height:69px;padding:8px;border-color:var(--line,#e6ecf0);border-radius:9px}.gallery-thumbs img{border-radius:0}
#propertyModal{width:960px;max-width:calc(100vw - 24px);padding:96px 32px 32px;border-radius:14px}
#propertyModal>.modal-close{top:32px;right:32px;width:44px;height:48px;border:1px solid var(--line);border-radius:9px;background:white;color:var(--ink)}
#propertyDetails{display:flex;flex-direction:column;gap:16px}#propertyDetails>.property-gallery{margin:0}#propertyDetails>p,#propertyDetails>h2{margin:0}
#propertyDetails .modal-title{font:800 29px/1.4 Manrope,sans-serif}#propertyDetails .modal-badge{font-size:12px}#propertyDetails .modal-subcopy{font-size:14px;line-height:1.4;overflow-wrap:anywhere}
#propertyDetails .modal-finance{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:24px;border-top:1px solid var(--line);padding-top:16px;margin:0}
#propertyDetails .modal-finance>div{background:transparent;padding:0;border-radius:0}#propertyDetails .modal-finance small{font-size:12px;font-weight:700}#propertyDetails .modal-finance strong{font:800 26px/1.4 Manrope,sans-serif;color:var(--red);margin-top:8px}
#propertyDetails .modal-detail-meta{display:flex;flex-direction:column;gap:12px;background:var(--sky);padding:16px;border-radius:9px;margin:0}#propertyDetails .modal-detail-meta span{background:transparent;padding:0;font-size:14px;overflow-wrap:anywhere}
#propertyDetails .modal-note{font-size:12px;font-weight:700;line-height:1.4}#propertyDetails .modal-actions{gap:12px;flex-wrap:wrap}#propertyDetails .modal-actions .btn{font-size:14px}
@media(max-width:700px){#editModal{padding:24px 16px}.master-selects{grid-template-columns:1fr}.photo-editor{grid-template-columns:repeat(2,minmax(0,1fr))}.photo-edit-card button{font-size:12px;min-height:44px;padding:8px}.photo-edit-card [data-photo-action=cover],.photo-edit-card [data-photo-action=remove]{min-width:0}.photo-edit-card [data-photo-action=left],.photo-edit-card [data-photo-action=right]{width:40px}.photo-save-actions{flex-wrap:wrap}#propertyModal{padding:80px 16px 16px}#propertyModal>.modal-close{top:16px;right:16px}#propertyDetails .modal-title{font-size:21px}#propertyDetails .modal-finance{grid-template-columns:1fr}#propertyDetails .modal-actions{flex-direction:column}#propertyDetails .modal-actions .btn{width:100%;white-space:normal}.gallery-main img{height:250px}}
