/* Best Pro Max Gallery Manager: isolated, responsive interface */
.bpmg-manager,.bpmg-public-gallery {box-sizing:border-box;font-family:inherit;color:#1c2d3c}
.bpmg-manager *,.bpmg-public-gallery * {box-sizing:border-box}
.bpmg-manager {width:min(100%,1200px);margin:24px auto;padding:0 14px 30px}
.bpmg-header {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;background:#102a3d;border-radius:18px;padding:22px 26px;color:#fff;margin-bottom:22px}
.bpmg-brand {display:flex;align-items:center;gap:16px;min-width:0}
.bpmg-brand .bpmg-site-logo {max-width:145px;max-height:65px;width:auto;height:auto;object-fit:contain;background:#fff;border-radius:9px;padding:5px}
.bpmg-brand h2 {font-size:clamp(20px,2vw,28px)!important;line-height:1.2!important;margin:4px 0!important;color:#fff!important;overflow-wrap:anywhere}
.bpmg-brand p {font-size:14px;margin:2px 0 0;color:#c9d7df}
.bpmg-brand-kicker {font-size:11px;letter-spacing:.14em;font-weight:700;color:#94d7c1}
.bpmg-header-links {display:flex;gap:10px;flex-wrap:wrap}
.bpmg-header-links a {border:1px solid #6c96a1;color:#fff!important;text-decoration:none!important;font-weight:650;padding:8px 12px;border-radius:9px;font-size:13px;white-space:nowrap}
.bpmg-header-links a:hover {background:rgba(255,255,255,.12)}
.bpmg-manager .bpmg-message {padding:13px 16px;border-radius:10px;margin:0 0 18px;font-size:14px;border:1px solid #b8d4da;background:#f0fbfd;color:#1b4b58}
.bpmg-manager .bpmg-message.error {background:#fff2f1;border-color:#f1bbb4;color:#8d2620}
.bpmg-manager .bpmg-message.warning {background:#fff8e6;border-color:#ead6a3;color:#68500c}
.bpmg-manager .bpmg-message.success {background:#eff9f2;border-color:#b8dfc5;color:#22593b}
.bpmg-dashboard {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,430px),1fr));align-items:start;gap:18px}
.bpmg-card,.bpmg-login {background:#fff;border:1px solid #dae2e8;border-radius:16px;padding:23px;box-shadow:0 5px 18px rgba(21,41,57,.045)}
.bpmg-login {max-width:490px;margin:50px auto}
.bpmg-login h3,.bpmg-section-heading h3 {font-size:21px!important;line-height:1.25!important;color:#183449!important;margin:0 0 6px!important}
.bpmg-login p,.bpmg-section-heading p {margin:0 0 20px;color:#637481;font-size:14px}
.bpmg-login form {display:grid;gap:14px}
.bpmg-login label,.bpmg-form>label,.bpmg-form [data-bpmg-fields] label {display:block;font-size:14px;font-weight:700;color:#263e4d;margin:0 0 7px}
.bpmg-login label,.bpmg-login .forgetmenot label {font-weight:600}
.bpmg-login input[type=text],.bpmg-login input[type=password],.bpmg-form input[type=text],.bpmg-form input[type=file] {width:100%;max-width:100%;background:#fff;border:1px solid #c9d5dc;border-radius:9px;min-height:44px;padding:10px;color:#233d4f;line-height:1.35}
.bpmg-form input[type=file] {font-size:13px;overflow:hidden;height:auto;min-height:58px}
.bpmg-form>label span {font-weight:400;color:#6f7e8b}
.bpmg-form>input[type=text] {margin-bottom:20px}
.bpmg-form .bpmg-type {border:0;margin:0 0 18px;padding:0;display:flex;flex-wrap:wrap;gap:16px}
.bpmg-form .bpmg-type legend {font-size:14px;color:#263e4d;font-weight:700;margin-bottom:8px}
.bpmg-form .bpmg-type label {display:inline-flex;align-items:center;gap:7px;font-weight:600;color:#3a5464;font-size:14px;cursor:pointer}
.bpmg-form .bpmg-type input {accent-color:#1d6b69}
.bpmg-form .bpmg-type small {display:block;width:100%;color:#6b7c88}
.bpmg-form [data-bpmg-fields] {padding:14px;background:#f7fafc;border:1px solid #e2e9ed;border-radius:12px}
.bpmg-form [data-bpmg-fields][hidden] {display:none!important}
.bpmg-help {font-size:12px!important;line-height:1.5;margin:10px 0 0!important;color:#687b88!important}
.bpmg-pair {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.bpmg-pair>div {min-width:0}
.bpmg-pair img {width:100%;height:140px;object-fit:cover;border-radius:9px;margin-top:9px}
.bpmg-actions {display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:19px}
.bpmg-btn,.bpmg-login input[type=submit] {display:inline-block;background:#126b68!important;border:1px solid #126b68!important;border-radius:9px!important;color:#fff!important;text-decoration:none!important;font-size:14px!important;line-height:1.25!important;font-weight:700!important;padding:12px 18px!important;cursor:pointer;box-shadow:none!important}
.bpmg-btn:hover,.bpmg-login input[type=submit]:hover {background:#0d534f!important}
.bpmg-secondary {color:#165e64!important;text-decoration:none!important;font-size:14px;font-weight:650}
.bpmg-muted {color:#667883;font-size:14px}
.bpmg-list {display:flex;flex-direction:column;gap:10px}
.bpmg-project {display:flex;gap:13px;align-items:flex-start;border:1px solid #e3eaee;border-radius:12px;padding:11px;min-width:0}
.bpmg-project-thumbnail {width:90px;height:82px;flex:0 0 90px;border-radius:9px;background:#eaf0f2;overflow:hidden}
.bpmg-project-thumbnail img {width:100%;height:100%;object-fit:cover}
.bpmg-project-detail {min-width:0;flex:1}
.bpmg-project-detail>strong {display:block;color:#1d3b4c;overflow-wrap:anywhere;font-size:14px;line-height:1.35;margin:0 0 3px}
.bpmg-project-detail>small {display:block;color:#687a85;font-size:12px}
.bpmg-project-actions {display:flex;gap:10px 13px;flex-wrap:wrap;align-items:center;margin-top:8px}
.bpmg-project-actions form {display:inline;margin:0}
.bpmg-project-actions a,.bpmg-project-actions button {color:#126b68!important;font-weight:700!important;font-size:12px!important;cursor:pointer;text-decoration:none!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;line-height:1.3!important;text-transform:none!important}
.bpmg-project-actions .bpmg-danger {color:#a43432!important}
.bpmg-existing {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:13px}
.bpmg-image-cell {position:relative;min-width:0}
.bpmg-image-cell img {display:block;width:100%;aspect-ratio:1.1;object-fit:cover;border-radius:8px}
.bpmg-mini-delete {margin-top:5px;width:100%;border:1px solid #e8bdba!important;background:#fff4f4!important;color:#99302b!important;border-radius:6px!important;padding:4px!important;font-size:12px!important;cursor:pointer}
.bpmg-public-gallery {max-width:100%;margin:0 auto}
.bpmg-public-grid {display:grid;grid-template-columns:repeat(var(--bpmg-columns,3),minmax(0,1fr));gap:14px}
.bpmg-public-grid>* {min-width:0}
.bpmg-tile,.bpmg-compare {position:relative;display:block;aspect-ratio:4/3;border-radius:12px;overflow:hidden;background:#e6ecf0}
.bpmg-tile img,.bpmg-compare img {display:block;width:100%;height:100%;object-fit:cover;transition:transform .2s ease}
.bpmg-tile:hover img {transform:scale(1.025)}
.bpmg-compare .bpmg-before,.bpmg-compare .bpmg-after {position:absolute;inset:0}
.bpmg-compare .bpmg-before {clip-path:inset(0 calc(100% - var(--bpmg-split)) 0 0)}
.bpmg-compare-line {pointer-events:none;position:absolute;top:0;bottom:0;left:var(--bpmg-split);width:3px;background:white;transform:translateX(-50%);box-shadow:0 0 8px rgba(0,0,0,.3)}
.bpmg-compare-line::after {content:'↔';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#fff;border-radius:50%;width:34px;height:34px;display:grid;place-items:center;color:#143e4f;font-size:20px;font-weight:800;box-shadow:0 2px 10px rgba(0,0,0,.25)}
.bpmg-before-label,.bpmg-after-label {position:absolute;top:10px;background:rgba(12,30,42,.75);color:#fff;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;padding:5px 8px;border-radius:5px;pointer-events:none;z-index:2}
.bpmg-before-label {left:10px}.bpmg-after-label {right:10px}
.bpmg-compare input[type=range] {position:absolute!important;inset:0!important;width:100%!important;height:100%!important;margin:0!important;padding:0!important;opacity:0!important;cursor:ew-resize!important;z-index:3!important;touch-action:pan-y}
.bpmg-compare:focus-within {outline:3px solid #198f9c;outline-offset:3px}
.bpmg-lightbox {border:0;border-radius:14px;background:#101a24;padding:10px;max-width:95vw;max-height:95vh;box-shadow:0 10px 50px rgba(0,0,0,.45)}
.bpmg-lightbox::backdrop {background:rgba(0,0,0,.88)}
.bpmg-lightbox img {display:block;max-width:min(90vw,1250px);max-height:85vh;object-fit:contain;margin:auto}
.bpmg-lightbox-close {position:absolute;top:6px;right:8px;background:#fff!important;color:#111!important;border:0!important;border-radius:50%;width:34px;height:34px;padding:0!important;font-size:24px!important;line-height:1!important;cursor:pointer;z-index:1}
.bpmg-pages {display:flex;gap:15px;align-items:center;justify-content:center;margin:22px 0;font-size:14px}
.bpmg-pages a {text-decoration:none}
@media(max-width:900px) {.bpmg-dashboard {grid-template-columns:minmax(0,1fr)}.bpmg-public-grid {grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px) {.bpmg-manager {margin:8px auto;padding:0 10px 24px}.bpmg-header {padding:18px;border-radius:14px}.bpmg-header-links {width:100%}.bpmg-card,.bpmg-login {padding:16px;border-radius:12px}.bpmg-pair {grid-template-columns:minmax(0,1fr)}.bpmg-pair img {height:190px}.bpmg-existing {grid-template-columns:repeat(2,minmax(0,1fr))}.bpmg-public-grid {grid-template-columns:minmax(0,1fr);gap:12px}.bpmg-project-thumbnail {width:74px;height:74px;flex-basis:74px}.bpmg-brand .bpmg-site-logo {max-width:100px}}
@media(prefers-reduced-motion:reduce) {.bpmg-tile img {transition:none}}

/* V1.2: responsive uploads and public HTML5 video playback */
.bpmg-video-tile {position:relative;display:flex;align-items:center;justify-content:center;aspect-ratio:4/3;overflow:hidden;border-radius:12px;background:#101d2b;min-width:0}
.bpmg-video-player {display:block;width:100%;height:100%;object-fit:contain;background:#101d2b;border-radius:10px;max-width:100%}
.bpmg-video-preview {width:100%;aspect-ratio:4/3;object-fit:contain;border-radius:8px;display:block;background:#101d2b;max-width:100%}
.bpmg-video-cell {min-width:0}
.bpmg-project-thumbnail .bpmg-video-symbol {display:grid;place-items:center;width:100%;height:100%;background:#153647;color:#fff;font-size:32px}
.bpmg-form input[type=file] {max-width:100%;min-width:0}
.bpmg-public-grid .bpmg-video-tile video {display:block;min-width:0;width:100%;height:100%;max-width:100%}
@media (max-width:600px) {.bpmg-video-tile {aspect-ratio:16/10}.bpmg-video-player {border-radius:9px}}
