/* Every dialog depth uses the same short entry motion. No layout dimensions animate. */
@keyframes jf-layer-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes jf-backdrop-in{from{opacity:0}to{opacity:1}}
dialog[open],.modal[aria-modal="true"]>:first-child,[role="alertdialog"]:not(dialog),[role="dialog"]:not(dialog):not(.modal),[role="menu"],[popover]:popover-open{animation:jf-layer-in 180ms cubic-bezier(.2,.7,.2,1)}
dialog[open]::backdrop{animation:jf-backdrop-in 160ms ease-out}
details[open]>:not(summary){animation:jf-backdrop-in 160ms ease-out}
#toast{transition:opacity 160ms ease,transform 160ms ease,visibility 160ms ease}
.ui-confirm-dialog{width:min(440px,calc(100vw - 32px));box-sizing:border-box;max-height:82dvh;overflow:auto;background:var(--adm-surface,#fff);color:var(--text,#202630)}.ui-confirm-dialog p{overflow-wrap:anywhere}.ui-confirm-dialog .ui-confirm-actions{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:12px}.ui-confirm-dialog .ui-confirm-actions button{flex:none;min-width:72px;height:auto}
@media(prefers-reduced-motion:reduce){
 dialog[open],.modal[aria-modal="true"]>:first-child,[role="alertdialog"]:not(dialog),[role="dialog"]:not(dialog):not(.modal),[role="menu"],[popover]:popover-open,dialog[open]::backdrop,details[open]>:not(summary){animation:none!important}
 #toast{transition:none!important}
}

.customer-detail-link{background:none;border:0;padding:0;color:var(--primary,#4168cf);text-align:left;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.customer-detail-dialog{width:min(820px,94vw);max-width:94vw;max-height:88dvh;padding:0;overflow:hidden}
.customer-detail-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;border-bottom:1px solid #e3e9f2}
.customer-detail-dialog h2{margin:0;font-size:21px}.customer-detail-body{max-height:calc(88dvh - 85px);overflow-y:auto;padding:20px 24px;overscroll-behavior:contain}
.customer-detail-profile{display:grid;gap:6px;overflow-wrap:anywhere}.customer-detail-note{white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.customer-detail-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:20px 0}.customer-detail-summary>div{padding:12px;background:#f4f7fc;border-radius:12px;font-size:13px}.customer-detail-summary strong{display:block;font-size:20px;color:#4168cf;margin-top:8px;overflow-wrap:anywhere}
.customer-detail-body nav,.customer-detail-body footer{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.customer-detail-body [aria-pressed=true]{background:#edf2ff;color:#4168cf;border-color:#b4c6fb}
.customer-detail-hint{font-size:13px;color:#74839d}.customer-detail-records article{border-bottom:1px solid #e3e9f2;padding:12px 0;overflow-wrap:anywhere}.customer-detail-records article>div{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.customer-detail-records p{margin:6px 0;color:#74839d;font-size:13px}.customer-record-note{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.customer-detail-body footer{justify-content:space-between;margin-top:18px;font-size:13px}
@media(max-width:600px){.customer-detail-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-detail-body{padding:16px}.customer-detail-dialog>header{padding:16px}}

.customer-detail-dialog[open]{display:flex;flex-direction:column}.customer-detail-dialog>header{flex:none}.customer-detail-body{min-height:0;flex:1}

/* Native dialogs live under body, outside the admin palette scope. */
.security-dialog{--dialog-surface:#fff;--dialog-soft:#f4f7fc;--dialog-line:#e3e9f2;--dialog-text:#202630;--dialog-muted:#67748b;--dialog-accent:#4168cf}
html[data-theme=dark] .security-dialog{--dialog-surface:#162130;--dialog-soft:#1b293a;--dialog-line:#35455a;--dialog-text:#d6e0ec;--dialog-muted:#a8bad0;--dialog-accent:#91b6ff;background:var(--dialog-surface);color:var(--dialog-text);border-color:var(--dialog-line)}
html[data-theme=dark] .security-dialog p{color:var(--dialog-muted)}
html[data-theme=dark] .security-dialog button{background:#21354e;border-color:#38506f;color:#b1d0ff}
html[data-theme=dark] .security-dialog button:hover{background:#294365}
html[data-theme=dark] .security-dialog button.strong{background:#3268d2;color:#fff}
.customer-detail-dialog>header,.customer-detail-records article{border-color:var(--dialog-line)}
.customer-detail-dialog h2{min-width:0;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.customer-detail-dialog>header>[data-close]{flex:none}
.customer-detail-summary>div{background:var(--dialog-soft)}
.customer-detail-summary strong{color:var(--dialog-accent)}
.customer-detail-hint,.customer-detail-records p{color:var(--dialog-muted)}
.customer-detail-body [aria-pressed=true]{background:var(--dialog-soft);color:var(--dialog-accent);border-color:var(--dialog-accent)}
.customer-detail-loading{margin:0 0 12px;font-size:13px}
.customer-detail-error{padding:10px 12px;border:1px solid #e5a0ab;border-radius:10px;margin:12px 0;overflow-wrap:anywhere}
.customer-detail-error p{margin:0 0 8px}
.customer-detail-body button:disabled{opacity:.5;cursor:wait}

html[data-theme=dark] .customer-detail-body [aria-pressed=true]{background:#29476d;border-color:#91b6ff;color:#d9e8ff}
html[data-theme=dark] .security-dialog :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background:var(--dialog-soft);color:var(--dialog-text);border-color:var(--dialog-line);color-scheme:dark}
html[data-theme=dark] .security-dialog .security-codes{background:var(--dialog-soft)}
