/* PRISM Phase 2L confirmation system. Scoped selectors preserve the legacy app. */
body.prismDlgOpen{overflow:hidden!important}
.prismDlgBackdrop{position:fixed;inset:0;margin:0!important;width:100vw;max-width:none!important;height:100dvh;max-height:none!important;box-sizing:border-box;border:0;z-index:2147483000;display:grid;place-items:center;padding:16px;background:rgba(2,33,45,.72);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);animation:prismDlgDim .17s ease-out}
.prismDlg{position:relative;overflow:hidden;width:min(100%,510px);max-height:min(90dvh,720px);overflow-y:auto;border:1px solid rgba(184,247,241,.86);border-radius:24px;background:linear-gradient(162deg,#fff 0%,#f5fffe 55%,#eef9fa 100%);color:#173f50;box-shadow:0 30px 100px rgba(0,32,48,.40),0 0 0 1px rgba(255,255,255,.72) inset;animation:prismDlgRise .22s cubic-bezier(.2,.8,.2,1);font:15px/1.55 Inter,'Segoe UI',Arial,sans-serif}
.prismDlgAccent{height:7px;background:linear-gradient(90deg,#077e87,#2cbba9 50%,#a0e2f3 80%,#e6b5ef)}
.prismDlgAccent--success{background:linear-gradient(90deg,#097c77,#21bc8d,#7cddb0)}
.prismDlgAccent--warning{background:linear-gradient(90deg,#a76618,#f0b33c,#ffe4aa)}
.prismDlgAccent--danger{background:linear-gradient(90deg,#a82c4c,#e94c64,#ffbaab)}
.prismDlgHead{display:flex;align-items:center;gap:16px;padding:29px 28px 8px}
.prismDlgSymbol{flex:0 0 56px;width:56px;height:56px;border-radius:20px;display:grid;place-items:center;font-size:27px;font-weight:850;color:#077983;background:linear-gradient(160deg,#b9f4ec,#d8fcf8);box-shadow:0 9px 21px rgba(4,139,132,.13)}
.prismDlgAccent--warning~.prismDlgHead .prismDlgSymbol{color:#986110;background:#fff0cb}
.prismDlgAccent--danger~.prismDlgHead .prismDlgSymbol{color:#b3314b;background:#ffe5e7}
.prismDlgAccent--success~.prismDlgHead .prismDlgSymbol{color:#06845e;background:#d2f9e7}
.prismDlgEyebrow{display:block;font-size:10px;letter-spacing:1.7px;font-weight:850;color:#0c928e;margin-bottom:2px}
.prismDlgTitle{font-family:Georgia,'Times New Roman',serif;font-size:clamp(22px,3.5vw,27px);font-weight:800;line-height:1.18;color:#075e68;margin:0}
.prismDlgBody{padding:7px 28px 21px}
.prismDlgDescription{margin:11px 0 0;color:#405c69;font-size:14px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
.prismDlgFacts{display:grid;grid-template-columns:125px minmax(0,1fr);gap:7px 12px;background:#effbf8;border:1px solid #cce9e4;border-radius:14px;padding:14px 15px;margin:18px 0 0;font-size:13px}
.prismDlgFacts dt{font-weight:750;color:#55767c;margin:0}
.prismDlgFacts dd{font-weight:750;color:#174b55;margin:0;overflow-wrap:anywhere}
.prismDlgActions{display:flex;justify-content:flex-end;gap:12px;padding:19px 28px 25px;border-top:1px solid #d5ebeb;background:linear-gradient(180deg,#f9fffe,#f2fbfa)}
.prismDlgButton{border:1px solid #a8d9d7;border-radius:12px;padding:11px 20px;min-height:46px;font-size:14px;line-height:1.25;font-weight:800;cursor:pointer;transition:transform .12s ease,filter .12s ease,box-shadow .12s ease}
.prismDlgButton:hover{transform:translateY(-1px);filter:brightness(1.04)}
.prismDlgButton:focus-visible{outline:3px solid #58bcc7;outline-offset:3px}
.prismDlgCancel{background:#fff;color:#145c69}
.prismDlgApprove{background:linear-gradient(105deg,#008d8d,#006b84);border-color:#00868a;color:#fff;box-shadow:0 7px 18px rgba(0,105,116,.20)}
.prismDlgApprove--success{background:linear-gradient(100deg,#148a66,#047e78);border-color:#078869}
.prismDlgApprove--warning{background:linear-gradient(105deg,#bd7720,#a96b25);border-color:#bd7620}
.prismDlgApprove--danger{background:linear-gradient(100deg,#cb4259,#a52d48);border-color:#b73c52}
.prismDlgInputLabel{display:block;margin-top:18px;font-weight:750;color:#214f5c;font-size:13px}
.prismDlgInput{display:block;width:100%;box-sizing:border-box;max-width:100%;font:inherit;margin-top:7px;padding:12px 13px;background:#fff;color:#183e4a;border:1px solid #afd9d8;border-radius:11px}
.prismDlgInput[aria-invalid=true]{border-color:#c42e4b;box-shadow:0 0 0 2px #f7bac4}
.prismDlgHelp{font-size:12px;color:#6c858a;margin:7px 0 0}
.prismToastArea{position:fixed;top:20px;right:20px;z-index:2147483001;display:flex;flex-direction:column;gap:10px;width:min(380px,calc(100vw - 28px));pointer-events:none}
.prismToast{display:flex;align-items:flex-start;gap:10px;padding:14px 14px;border:1px solid #a8dfc8;border-radius:15px;background:#f1fff8;color:#185d4c;box-shadow:0 15px 35px rgba(0,53,64,.18);pointer-events:auto;animation:prismDlgRise .2s ease-out}
.prismToast--error{background:#fff2f4;color:#8f2942;border-color:#f4b9c3}
.prismToast--warning{background:#fffaf0;color:#86591c;border-color:#eed29d}
.prismToastIcon{flex:0 0 23px;width:23px;height:23px;border-radius:50%;display:grid;place-items:center;background:currentColor;color:inherit;font-weight:850;font-size:15px;position:relative;isolation:isolate}
.prismToastIcon::before{content:'';background:#fff;position:absolute;inset:3px;border-radius:50%;z-index:-1}
.prismToastMessage{flex:1;overflow-wrap:anywhere;font-weight:650;font-size:13px;line-height:1.55}
.prismToastDismiss{border:0;background:transparent;font-size:21px;line-height:1;color:inherit;cursor:pointer}
@keyframes prismDlgDim{from{opacity:0}to{opacity:1}}
@keyframes prismDlgRise{from{opacity:0;transform:translateY(15px) scale(.975)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:530px){.prismDlg{border-radius:19px}.prismDlgHead{padding:21px 17px 7px;gap:12px}.prismDlgSymbol{height:49px;width:49px;flex-basis:49px}.prismDlgBody{padding:4px 17px 17px}.prismDlgActions{padding:15px 17px 20px;flex-direction:column-reverse}.prismDlgButton{width:100%}.prismDlgFacts{grid-template-columns:1fr;gap:2px}.prismDlgFacts dd{margin-bottom:8px}.prismToastArea{right:14px;top:14px}}
@media(prefers-reduced-motion:reduce){.prismDlg,.prismDlgBackdrop,.prismToast{animation:none}.prismDlgButton{transition:none}}

.prismDlgBusy{padding-bottom:23px;max-width:440px}
.prismDlgSpinner{width:52px;height:52px;flex:0 0 52px;border:5px solid #b9e6e2;border-top-color:#057e88;border-radius:50%;animation:prismDlgSpin .9s linear infinite;box-sizing:border-box}
.prismDlgBusyMessage{margin:10px 28px;color:#345d68;font-weight:650;overflow-wrap:anywhere}
.prismDlgBusyHint{margin:12px 28px 0;padding:12px 14px;background:#eef9f7;border-radius:10px;font-size:12px;color:#5b7b80}
@keyframes prismDlgSpin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.prismDlgSpinner{animation-duration:2s}}

.prismDlgBackdrop::backdrop{background:rgba(0,31,41,.55);backdrop-filter:blur(5px)}


/* Phase 2AY.0 — modal-safe, high-contrast popup error notifications.
   Explicitly scoped: existing dashboard and ordinary toast styles untouched. */
.prismActionAlert{
 position:fixed;inset:0;margin:auto;padding:0;width:min(92vw,600px);
 max-width:600px;max-height:min(82dvh,680px);overflow:auto;
 border:1px solid #efb7c4;border-radius:21px;
 background:#fffafa;color:#263548;
 box-shadow:0 30px 110px rgba(12,20,45,.58),inset 0 1px 0 #fff;
 font:15px/1.55 Inter,'Segoe UI',Arial,sans-serif;
}
.prismActionAlert::backdrop{
 background:rgba(8,15,31,.52);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);
}
.prismActionAlertHeader{display:flex;align-items:center;gap:13px;padding:22px 23px;
 background:linear-gradient(130deg,#fff0f2,#ffe0e7);border-bottom:1px solid #edb6c3}
.prismActionAlertIcon{flex:0 0 42px;display:grid;place-items:center;width:42px;height:42px;
 border-radius:13px;background:#b93452;color:#fff;font-size:27px;font-weight:850}
.prismActionAlertTitle{margin:0;font:800 21px/1.25 Inter,'Segoe UI',Arial,sans-serif;color:#6f1f36}
.prismActionAlertMain{padding:20px 23px 10px}
.prismActionAlertDetail{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;
 color:#24374a;font-size:15px;line-height:1.65;font-weight:650;user-select:text}
.prismActionAlertHint{margin:18px 0 10px;font-size:12px;line-height:1.6;color:#5a6676}
.prismActionAlertFooter{padding:12px 23px 23px;display:flex;justify-content:flex-end}
.prismActionAlertClose{cursor:pointer;min-height:44px;padding:10px 19px;border-radius:12px;
 border:1px solid #a52b4d;background:#ae2f50;color:#fff;font-weight:800;font-size:13px}
.prismActionAlertClose:focus-visible{outline:3px solid #336fae;outline-offset:3px}
.prismActionAlert--warning{border-color:#e8c894;background:#fffdf8}
.prismActionAlert--warning .prismActionAlertHeader{background:linear-gradient(130deg,#fff9e9,#fce7b5);border-color:#e5ca9b}
.prismActionAlert--warning .prismActionAlertIcon{background:#9b641f}
.prismActionAlert--warning .prismActionAlertTitle{color:#694a19}
.prismActionAlert--warning .prismActionAlertClose{background:#8f5a1c;border-color:#81511b}
/* Deliberately keep these colors legible under both Classic and Glass. */
html.prismThemeGlass .prismActionAlert .prismActionAlertTitle{color:#6f1f36!important;text-shadow:none!important}
html.prismThemeGlass .prismActionAlert--warning .prismActionAlertTitle{color:#694a19!important}
html.prismThemeGlass .prismActionAlert .prismActionAlertDetail{color:#24374a!important;text-shadow:none!important}
.prismActionAlertFallback{position:fixed;top:25px;left:50%;transform:translateX(-50%);z-index:2147483647;
 width:min(92vw,610px);padding:20px;border:2px solid #bd2b51;border-radius:14px;
 color:#6f1f36;background:#fff7fa;box-shadow:0 20px 80px #0008;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:560px){.prismActionAlertHeader{padding:18px 16px}.prismActionAlertMain{padding:18px 16px 8px}
 .prismActionAlertFooter{padding:10px 16px 18px}.prismActionAlertTitle{font-size:18px}
 .prismActionAlertClose{width:100%}}
@media(prefers-reduced-motion:reduce){.prismActionAlert{animation:none!important}}
