/* Shared native dialogs: existing business cancel/close handlers remain authoritative. */
html body dialog .dialog-close-icon{position:absolute!important;inset-block-start:10px!important;inset-inline-end:10px!important;display:grid!important;place-items:center!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;padding:9px!important;border:0!important;border-radius:0!important;background:transparent!important;background-image:none!important;box-shadow:none!important;color:#A8ADAF!important;cursor:pointer;z-index:3;opacity:1!important}
html body dialog .dialog-close-icon::before,html body dialog .dialog-close-icon::after{content:none!important;display:none!important}
html body dialog .dialog-close-icon svg{display:block;width:22px;height:22px;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;pointer-events:none}
html body dialog .dialog-close-icon:focus-visible{outline:2px solid #00D6B5!important;outline-offset:2px!important;border-radius:5px!important}
html body dialog .dialog-close-icon:hover:not(:disabled){color:#D0D3D4!important;background:transparent!important}
html body dialog .dialog-close-icon:disabled{opacity:.45!important;cursor:default}
html body dialog :is(.dialog-head,header)>h2{padding-inline-end:36px}
@supports (transition-behavior:allow-discrete) and (overlay:auto){
 html body dialog{opacity:0;translate:0 5px;scale:.985;transition:opacity 140ms ease,translate 140ms ease,scale 140ms ease,display 160ms allow-discrete,overlay 160ms allow-discrete}
 html body dialog[open]{opacity:1;translate:0 0;scale:1}
 html body dialog::backdrop{opacity:0;transition:opacity 140ms ease,display 160ms allow-discrete,overlay 160ms allow-discrete}
 html body dialog[open]::backdrop{opacity:1}
 @starting-style{html body dialog[open]{opacity:0;translate:0 5px;scale:.985}html body dialog[open]::backdrop{opacity:0}}
}
@media(prefers-reduced-motion:reduce){html body dialog,html body dialog::backdrop{transition:none!important;animation:none!important;translate:none!important;scale:1!important}}

/* Custom access-code dialogs keep one dark surface, including the legacy footer. */
html body.event-console-page>dialog.custom-access-dialog,
html body.event-console-page>dialog.custom-access-dialog>:is(.dialog-head,.remote-dialog-body,footer){background:#202020!important;color:#EEE!important;border-color:#383838!important}
html body.event-console-page>dialog.custom-access-dialog>.dialog-head{padding:16px 22px!important;border-bottom:1px solid #383838!important}
html body.event-console-page>dialog.custom-access-dialog>.remote-dialog-body{padding:18px 22px 0!important;gap:12px}
html body.event-console-page>dialog.custom-access-dialog>footer{min-height:0;margin:0;padding:12px 22px 16px!important;border:0!important;box-shadow:none!important}
html body.event-console-page>dialog.custom-access-dialog [data-custom-save]:not(:disabled){background:#00D6B5!important;border-color:transparent!important;color:#101010!important;box-shadow:none!important}

/* Event directory: compact list and explicit control geometry, isolated from edit dialogs. */
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact{box-sizing:border-box!important;width:min(720px,calc(100vw - 32px))!important;min-width:0!important;max-width:calc(100vw - 32px)!important;max-height:calc(100dvh - 40px)!important;padding:0!important;border:1px solid #414141!important;border-radius:16px!important;background:#1D1D1D!important;font-family:"MiSans VF",sans-serif!important;font-weight:700!important;overflow:auto!important;box-shadow:0 24px 80px #0008!important}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact>.dialog-head{position:relative!important;display:flex!important;align-items:center!important;min-height:0!important;margin:0!important;padding:20px 24px!important;background:#1D1D1D!important;border-bottom:1px solid #373737!important}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact>.dialog-head h2{margin:0!important;font-size:22px!important;line-height:1.4!important}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact>.remote-dialog-body{padding:20px 24px 24px!important;background:#1D1D1D!important;min-height:0!important}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .remote-dialog-body>[role=alert]:empty{display:none!important}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-directory-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-directory-count{display:flex;align-items:baseline;flex-wrap:wrap;gap:10px;font-size:14px;line-height:1.5}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-directory-count>span{color:#999!important;font-size:12px}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact :is(.managed-directory-actions,.managed-event-actions){display:flex;align-items:center;gap:8px;flex:none}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact button{box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;min-height:36px!important;min-width:36px!important;height:36px!important;margin:0!important;padding:0 12px!important;border-radius:7px!important;font-family:inherit!important;font-weight:700!important;font-size:13px!important;line-height:1!important;white-space:nowrap!important;box-shadow:none!important}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact button svg{display:block!important;flex:0 0 18px!important;width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;pointer-events:none}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact button:is(.managed-directory-refresh,.managed-event-delete,.dialog-close-icon){width:36px!important;padding:8px!important;border:0!important;background:transparent!important;color:#AAA!important}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .dialog-close-icon{inset-block-start:17px!important;inset-inline-end:18px!important}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact button:is(.managed-directory-refresh,.managed-event-delete,.dialog-close-icon):hover:not(:disabled){background:#303030!important;color:#FFF!important}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact button.managed-event-delete:hover:not(:disabled){color:#FF6C7D!important}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact button.managed-directory-create{background:#00D6B5!important;color:#101010!important;border:1px solid transparent!important;padding-inline:13px!important}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact button.managed-event-open{background:#292929!important;border:1px solid #505050!important;color:#EEE!important}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact button:disabled{opacity:.42!important;cursor:not-allowed!important}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-event-list{display:grid;gap:10px}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-event-card{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0;padding:18px;border:1px solid #3D3D3D;border-radius:10px;background:#242424;min-width:0}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-event-card.is-current{border-color:#525252}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-event-info{min-width:0;flex:1}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-event-name{display:flex;align-items:center;flex-wrap:wrap;gap:10px;min-width:0}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-event-name>strong{display:block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:17px;line-height:1.5}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-current-badge{display:inline-flex;align-items:center;padding:2px 7px;border:1px solid #00D6B566;border-radius:4px;color:#00D6B5!important;font-size:11px;line-height:1.5;white-space:nowrap}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact p.managed-event-state{margin:5px 0 0!important;font-size:12px;line-height:1.5;color:#AAA!important}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact p.managed-directory-feedback{margin:0 0 14px!important;font-size:12px;line-height:1.6;color:#C0C0C0!important}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-directory-empty{padding:30px 16px;text-align:center;border:1px dashed #444;border-radius:10px}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-directory-empty p{margin:7px 0 0!important;color:#AAA!important;font-size:13px;line-height:1.6}
html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-delete-recovery{margin-top:14px!important}
@media(max-width:560px){
 html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact>.dialog-head{padding:16px!important}
 html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact>.remote-dialog-body{padding:16px!important}
 html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .dialog-close-icon{inset-block-start:13px!important;inset-inline-end:10px!important}
 html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-directory-toolbar{gap:10px}
 html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-directory-count{display:grid;gap:1px}
 html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-event-card{padding:14px;gap:12px;align-items:flex-start;flex-wrap:wrap}
 html body:has(#master-sidebar)>dialog.remote-dialog.master-event-management-dialog.event-directory-compact .managed-event-actions{margin-left:auto}
}

/* Every master terminal-creation flow uses one neutral, bounded dialog surface. */
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog{box-sizing:border-box!important;width:min(620px,calc(100vw - 32px))!important;min-width:0!important;max-width:calc(100vw - 32px)!important;max-height:calc(100dvh - 32px)!important;margin:auto!important;padding:0!important;overflow:hidden!important;border:1px solid #484848!important;border-radius:12px!important;background:#1F1F1F!important;color:#F2F2F2!important;color-scheme:dark;font-family:"MiSans VF",sans-serif!important;font-size:14px!important;font-weight:700!important;line-height:1.5!important;box-shadow:0 20px 64px #0008!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog[open]{display:flex!important;flex-direction:column!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog>.dialog-head{position:relative!important;box-sizing:border-box!important;display:flex!important;align-items:center!important;flex:0 0 auto!important;min-height:60px!important;margin:0!important;padding:16px 22px!important;border:0!important;border-bottom:1px solid #3D3D3D!important;background:#242424!important;color:#F2F2F2!important;box-shadow:none!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog>.dialog-head>h2{min-width:0!important;margin:0!important;padding:0 36px 0 0!important;color:#F2F2F2!important;font-family:"MiSans VF",sans-serif!important;font-size:20px!important;font-weight:700!important;line-height:1.4!important;overflow-wrap:anywhere}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog>.remote-dialog-body{box-sizing:border-box!important;display:block!important;flex:1 1 auto!important;min-width:0!important;min-height:0!important;max-height:calc(100dvh - 180px)!important;margin:0!important;padding:18px 22px!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain;background:#1F1F1F!important;color:#F2F2F2!important;border:0!important;scrollbar-gutter:stable}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog>footer{box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;flex:0 0 auto!important;flex-wrap:wrap!important;gap:10px!important;min-height:0!important;margin:0!important;padding:14px 22px!important;border:0!important;border-top:1px solid #3D3D3D!important;background:#242424!important;color:#F2F2F2!important;box-shadow:none!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog .remote-dialog-body>:first-child{margin-top:0!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog .remote-dialog-body>:last-child{margin-bottom:0!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog :is(label,legend,p,small,strong,b,button:not([hidden]):not([aria-hidden=true]),select,textarea,input:not([data-viewer-code-cell])){font-family:"MiSans VF",sans-serif!important;font-weight:700!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog :is(label,legend){min-width:0!important;color:#E4E4E4!important;font-size:13px!important;line-height:1.5!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog .remote-dialog-body>label,
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog .formgrid>label{box-sizing:border-box!important;display:grid!important;align-items:start!important;gap:7px!important;min-width:0!important;margin:14px 0!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog .formgrid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start!important;gap:14px!important;min-width:0!important;margin:14px 0!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog .formgrid>label{margin:0!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog :is(p,.help,.muted,small){margin:10px 0!important;padding:0!important;color:#B7B7B7!important;font-size:13px!important;line-height:1.65!important;overflow-wrap:anywhere}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog :is(strong,b){color:#F2F2F2!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([data-viewer-code-cell]),select,textarea){box-sizing:border-box!important;display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;min-height:38px!important;height:38px!important;margin:0!important;padding:8px 10px!important;border:1px solid #5B5B5B!important;border-radius:6px!important;background:#171717!important;color:#F2F2F2!important;font-size:14px!important;line-height:1.4!important;caret-color:#00D6B5!important;box-shadow:none!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog textarea{height:auto!important;min-height:88px!important;max-height:220px!important;resize:vertical}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog :is(input:not([data-viewer-code-cell]),textarea)::placeholder{color:#929292!important;opacity:1!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog select>option{background:#171717!important;color:#F2F2F2!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog :is(input[type=checkbox],input[type=radio]){width:16px!important;min-width:16px!important;height:16px!important;min-height:16px!important;margin:0!important;accent-color:#00D6B5!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog button:not([hidden]):not([aria-hidden=true]){box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;flex:none!important;width:auto!important;min-width:0!important;min-height:36px!important;height:auto!important;margin:0!important;padding:8px 12px!important;border:1px solid #555!important;border-radius:6px!important;background:#2B2B2B!important;color:#F2F2F2!important;font-size:13px!important;line-height:1.4!important;white-space:normal!important;box-shadow:none!important;text-align:center}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog .remote-dialog-body>button:not([hidden]):not([aria-hidden=true]){margin:4px 6px 4px 0!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog button:not([hidden]):not([aria-hidden=true]):hover:not(:disabled){background:#353535!important;border-color:#777!important;color:#FFF!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog button:not([hidden]):not([aria-hidden=true]).primary:not(:disabled){background:#00D6B5!important;border-color:#00D6B5!important;color:#111!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog button:not([hidden]):not([aria-hidden=true]).primary:hover:not(:disabled){background:#00E5C2!important;border-color:#00E5C2!important;color:#111!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog :is(button:not([hidden]):not([aria-hidden=true]),input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([data-viewer-code-cell]),select,textarea):disabled{background:#303030!important;border-color:#454545!important;color:#A0A0A0!important;opacity:1!important;cursor:not-allowed}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog :is(button:not([hidden]):not([aria-hidden=true]),input:not([data-viewer-code-cell]),select,textarea,a):focus-visible{outline:2px solid #00D6B5!important;outline-offset:2px!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog :is(input,select,textarea)[aria-invalid=true]{border-color:#FF8795!important;outline-color:#FF8795!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog :is([role=alert],.dialog-error){color:#FF9AA5!important;font-size:13px!important;line-height:1.6!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog :is([role=alert],[role=status]):empty{display:none!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog button:not([hidden]):not([aria-hidden=true])>svg{box-sizing:border-box!important;display:block!important;flex:none!important;width:16px!important;min-width:16px!important;max-width:16px!important;height:16px!important;min-height:16px!important;max-height:16px!important;fill:none!important;stroke:currentColor!important;pointer-events:none}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog>.dialog-head>button:not([hidden]):not([aria-hidden=true]){position:absolute!important;inset:14px 14px auto auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important;margin:0!important;padding:8px!important;border:0!important;border-radius:4px!important;background:transparent!important;color:#C4C4C4!important;box-shadow:none!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog>.dialog-head>button:not([hidden]):not([aria-hidden=true]):hover:not(:disabled){background:#333!important;color:#FFF!important}
html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog :is([hidden],input[type=hidden]){display:none!important}
@media(max-width:520px){
 html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog{width:calc(100vw - 24px)!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important}
 html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog>.dialog-head{padding:16px!important}
 html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog>.dialog-head>h2{font-size:18px!important}
 html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog>.remote-dialog-body{padding:16px!important}
 html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog>footer{padding:12px 16px!important}
 html body.event-console-page:has(#master-sidebar)>dialog.remote-dialog.terminal-create-dialog .formgrid{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
}

/* 132: round the dialog shell without adding scroll clipping to its contents. */
html body:is(.event-console-page,.score-desk-standalone,.viewer-body) dialog{border-radius:12px!important}
html body:is(.event-console-page,.score-desk-standalone,.viewer-body) dialog>:is(header,.dialog-head):first-child{border-start-start-radius:inherit;border-start-end-radius:inherit}
html body:is(.event-console-page,.score-desk-standalone,.viewer-body) dialog>footer:last-child{border-end-start-radius:inherit;border-end-end-radius:inherit}
