/* FINAL V19 — stable dashboard + clear event state + camera flow + large member frame */

/* Remove route repaint/shape animation that looked like an automatic refresh. */
body.v19-dashboard-route main.admin-mobile-main,
body.v19-camera-route main.admin-mobile-main{animation:none!important;transition:none!important}

/* Current event status is always visible on dashboard/cameras. */
.v19-event-state-panel{display:flex;align-items:center;flex-wrap:wrap;gap:7px 10px;margin-top:7px;font-size:11px;color:#9ca3af}
.v19-event-state-panel strong{color:#fff;font-weight:900}.v19-event-state-panel em{font-style:normal;color:#fca5a5;font-weight:800}
.v19-event-state{display:inline-flex;align-items:center;gap:6px;border:1px solid #374151;border-radius:999px;padding:5px 9px;font-weight:900;color:#d1d5db;background:#111827}
.v19-event-state i{font-size:7px}.v19-event-state.ongoing{color:#4ade80;border-color:rgba(34,197,94,.35);background:rgba(34,197,94,.09)}
.v19-event-state.published{color:#60a5fa;border-color:rgba(59,130,246,.35);background:rgba(59,130,246,.09)}
.v19-event-state.draft{color:#fbbf24;border-color:rgba(245,158,11,.35);background:rgba(245,158,11,.09)}
.v19-event-state.closed,.v19-event-state.archived{color:#f87171;border-color:rgba(239,68,68,.35);background:rgba(127,29,29,.12)}

/* Member frame fills the usable width and stays screenshot-friendly. */
body.v16-member-frame-route .member-frame-clean.v19-member-frame-clean,
body.v19-member-frame-route .member-frame-clean{width:min(96vw,700px)!important;max-width:700px!important;margin-inline:auto!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
body.v19-member-frame-route .member-frame-clean [data-frame-width]{width:100%!important;max-width:none!important;aspect-ratio:9/16!important;margin-inline:auto!important}
body.v19-member-frame-route .v19-member-frame-page{width:100%!important;max-width:760px!important;margin-inline:auto!important}
@media(max-width:640px){body.v16-member-frame-route .member-frame-clean.v19-member-frame-clean,body.v19-member-frame-route .member-frame-clean{width:calc(100vw - 18px)!important;max-width:none!important}body.v19-member-frame-route .v19-member-frame-page{padding-inline:0!important}}

/* Camera: scanned member/result above, camera next, every tool/action below. */
body.v19-camera-route .v19-scanner-box{display:flex!important;flex-direction:column!important;gap:12px!important;overflow:visible!important}
body.v19-camera-route .v19-result-toggle{order:-30!important;width:100%!important;min-height:50px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:11px 14px!important;border:1px solid rgba(34,197,94,.35)!important;border-radius:15px!important;background:rgba(34,197,94,.08)!important;color:#fff!important;font-size:12px!important;font-weight:900!important}
body.v19-camera-route .v19-result-toggle span{display:flex;align-items:center;gap:8px}.v19-result-toggle>i{transition:transform .18s ease}.v19-result-toggle[aria-expanded="false"]>i{transform:rotate(180deg)}
body.v19-camera-route .v19-scan-result{order:-29!important;width:100%!important;position:relative!important;z-index:4!important;margin:0!important}
body.v19-camera-route .v19-scan-result.v19-result-collapsed{display:none!important}
body.v19-camera-route .v19-camera-card{display:flex!important;flex-direction:column!important;gap:11px!important;overflow:visible!important}
body.v19-camera-route .v19-camera-viewport{order:0!important;width:min(100%,520px)!important;max-width:100%!important;margin:0 auto!important;position:relative!important;z-index:1!important;overflow:hidden!important}
body.v19-camera-route .v19-camera-viewport>.pointer-events-auto.absolute{display:none!important}
body.v19-camera-route .v19-camera-tools-toggle{order:10!important;width:100%!important;min-height:48px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding:10px 14px!important;border:1px solid rgba(239,29,37,.34)!important;border-radius:14px!important;background:rgba(239,29,37,.07)!important;color:#fff!important;font-weight:900!important;font-size:12px!important}
body.v19-camera-route .v19-camera-tools-toggle span{display:flex;align-items:center;gap:8px}.v19-camera-tools-toggle>i{transition:transform .18s ease}.v19-camera-card.v19-tools-collapsed .v19-camera-tools-toggle>i{transform:rotate(180deg)}
body.v19-camera-route .v19-camera-control{order:20!important;position:relative!important;z-index:2!important}
body.v19-camera-route .v19-camera-card.v19-tools-collapsed .v19-camera-control{display:none!important}
body.v19-camera-route .v19-original-primary-action{display:none!important}
body.v19-camera-route .v19-primary-action-proxy{order:99!important;width:100%!important;min-height:52px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;border:1px solid rgba(239,29,37,.7)!important;border-radius:15px!important;background:#ef171d!important;color:#fff!important;font-size:13px!important;font-weight:950!important;box-shadow:0 10px 28px rgba(239,23,29,.14)!important}
body.v19-camera-route .v19-primary-action-proxy:disabled{opacity:.5!important;cursor:not-allowed!important}
@media(max-width:640px){body.v19-camera-route .v19-camera-viewport{width:100%!important}.v19-result-toggle,.v19-camera-tools-toggle,.v19-primary-action-proxy{border-radius:13px!important}}

/* Member sort direction control. */
.v19-member-sort-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 10px;padding:9px 11px;border:1px solid rgba(239,68,68,.18);border-radius:13px;background:rgba(239,68,68,.05);font-size:11px;color:#d4d4d8}
.v19-member-sort-toolbar button{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:0 11px;border:1px solid #3f3f46;border-radius:10px;background:#111116;color:#fff;font-size:11px;font-weight:900}

/* Violations open member profile from the whole safe area. */
.v19-violation-profile-card{cursor:pointer!important}.v19-violation-profile-card:hover{outline:1px solid rgba(239,68,68,.28);outline-offset:-1px}

/* X/close is always visible on physical left and above the overlay. */
.v19-close-button{position:absolute!important;left:12px!important;right:auto!important;top:12px!important;inset-inline-start:auto!important;inset-inline-end:auto!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;display:grid!important;place-items:center!important;border-radius:999px!important;z-index:2147483640!important;pointer-events:auto!important;touch-action:manipulation!important}

/* Fallback event export buttons. */
.v19-event-export{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.v19-event-export button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:0 13px;border:1px solid #3f3f46;border-radius:12px;background:#111116;color:#fff;font-size:11px;font-weight:900}.v19-event-export button:hover{border-color:#ef4444;color:#f87171}.v19-event-export button:disabled{opacity:.55}
@media(max-width:640px){.v19-event-export button{flex:1 1 100%}}

/* Registration images never stretch the form. */
body.v19-register-route .v19-file-thumb{display:block!important;width:72px!important;height:72px!important;min-width:72px!important;min-height:72px!important;max-width:72px!important;max-height:72px!important;overflow:hidden!important;border-radius:14px!important}
body.v19-register-route .v19-file-thumb img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important}
body.v19-register-route .v19-upload-cell{width:72px!important;height:72px!important;min-width:72px!important;min-height:72px!important;position:relative!important}.v19-upload-gallery{grid-template-columns:repeat(auto-fill,72px)!important;gap:10px!important;align-items:start!important}

/* V19 frame-size hard override: remove legacy 430/520px wrapper caps. */
body.v19-member-frame-route .v9-user-frame-preview,
body.v19-member-frame-route .v12-member-frame-page .v9-user-frame-preview{
  width:min(96vw,700px)!important;max-width:700px!important;margin-inline:auto!important;position:static!important;
}
body.v19-member-frame-route .v9-user-frame-preview>.glass,
body.v19-member-frame-route .v12-member-frame-page .v9-user-frame-preview>.glass{
  width:100%!important;max-width:none!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible!important;
}
@media(max-width:640px){
  body.v19-member-frame-route .v9-user-frame-preview,body.v19-member-frame-route .v12-member-frame-page .v9-user-frame-preview{width:calc(100vw - 12px)!important;max-width:none!important;}
}
