/* ms-dialog — popup กลางแทน confirm/alert (ยกมาจาก pomnaka partials/ms-dialog) · โทนส้ม-ดำ */
.msd-back{position:fixed;inset:0;z-index:2100;display:flex;align-items:center;justify-content:center;padding:16px;
  background:rgba(23,18,13,.30);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);opacity:0;transition:opacity .16s;}
.msd-back.show{opacity:1;}
.msd-box{width:100%;max-width:420px;border-radius:24px;padding:22px 22px 18px;position:relative;overflow:hidden;
  background:rgba(255,255,255,.88);backdrop-filter:blur(24px) saturate(1.6);-webkit-backdrop-filter:blur(24px) saturate(1.6);
  border:1px solid rgba(255,255,255,.7);box-shadow:0 24px 60px -12px rgba(15,23,42,.35),inset 0 1px 0 rgba(255,255,255,.9);
  transform:translateY(10px) scale(.96);transition:transform .22s cubic-bezier(.34,1.56,.64,1);}
.msd-back.show .msd-box{transform:none;}
.msd-head{display:flex;align-items:flex-start;gap:12px;}
.msd-ico{flex-shrink:0;width:44px;height:44px;border-radius:14px;display:grid;place-items:center;color:#fff;
  box-shadow:0 8px 18px -8px currentColor,inset 0 1px 0 rgba(255,255,255,.35);}
.msd-ico svg{color:#fff;}
.msd-ico.info{background:linear-gradient(135deg,#fb923c,#ea580c);color:#ea580c;}
.msd-ico.warning{background:linear-gradient(135deg,#fbbf24,#f59e0b);color:#f59e0b;}
.msd-ico.danger,.msd-ico.error{background:linear-gradient(135deg,#fb7185,#dc2626);color:#dc2626;}
.msd-ico.success{background:linear-gradient(135deg,#4ade80,#16a34a);color:#16a34a;}
.msd-box.compact .msd-ico.success{animation:msdPop .45s cubic-bezier(.34,1.56,.64,1);}
@keyframes msdPop{0%{transform:scale(.4) rotate(-12deg);opacity:0}100%{transform:none;opacity:1}}
.msd-bar{position:absolute;left:0;right:0;bottom:0;height:3px;background:rgba(148,163,184,.15);}
.msd-bar i{display:block;height:100%;width:100%;transform-origin:left;animation:msdBar linear forwards;}
.msd-bar.success i{background:linear-gradient(90deg,#4ade80,#16a34a);}
.msd-bar.info i{background:#ea580c;} .msd-bar.error i{background:#dc2626;}
@keyframes msdBar{from{transform:scaleX(1)}to{transform:scaleX(0)}}
/* เนื้อหาแบบมีโครงสร้าง (msNotify {html}) */
.msd-rich{font-size:.88rem;color:#475569;}
.msd-sub{font-weight:600;color:#334155;margin-bottom:.45rem;font-size:.9rem;}
.msd-row{display:flex;gap:.5rem;align-items:flex-start;padding:.4rem 0;border-top:1px dashed rgba(148,163,184,.35);}
.msd-row:first-of-type{border-top:0;}
.msd-lbl{flex-shrink:0;min-width:84px;font-size:.72rem;font-weight:700;letter-spacing:.3px;color:#94a3b8;padding-top:.2rem;}
.msd-val{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem;min-width:0;}
.msd-chip{display:inline-block;padding:.15rem .6rem;border-radius:999px;font-size:.78rem;font-weight:600;line-height:1.45;
  background:rgba(249,115,22,.1);color:#c2410c;border:1px solid rgba(249,115,22,.22);max-width:100%;}
.msd-chip.old{background:rgba(148,163,184,.14);color:#64748b;border-color:rgba(148,163,184,.25);text-decoration:line-through;font-weight:500;}
.msd-chip.add{background:rgba(22,163,74,.1);color:#15803d;border-color:rgba(22,163,74,.22);}
.msd-chip.del{background:rgba(220,38,38,.08);color:#b91c1c;border-color:rgba(220,38,38,.2);text-decoration:line-through;}
.msd-arrow{color:#94a3b8;font-weight:700;}
.msd-box.compact.wide{max-width:400px;}
.msd-box.compact:has(.msd-rich){max-width:400px;}
.msd-dot{flex-shrink:0;width:6px;height:6px;border-radius:50%;background:#94a3b8;margin-top:.55rem;}
.msd-lbl2{font-size:.78rem;font-weight:600;color:#64748b;margin-right:.15rem;}
.msd-box.compact .msd-msg{font-size:.9rem;}
.msd-title{font-weight:700;font-size:1.05rem;color:#1e293b;margin:2px 0 4px;}
.msd-msg{font-size:.92rem;color:#475569;white-space:pre-line;line-height:1.55;word-break:break-word;max-height:55vh;overflow:auto;}
.msd-btns{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;}
.msd-btns .btn{min-width:96px;}
.msd-box.compact{max-width:340px;padding:16px 18px;}
.msd-box.compact .msd-btns{display:none;}
[data-theme="dark"] .msd-box,[data-theme="aurora"] .msd-box{background:rgba(30,41,59,.92);border-color:rgba(255,255,255,.08);}
[data-theme="dark"] .msd-title,[data-theme="aurora"] .msd-title{color:#f1f5f9;}
[data-theme="dark"] .msd-msg,[data-theme="aurora"] .msd-msg,[data-theme="dark"] .msd-rich,[data-theme="aurora"] .msd-rich{color:#cbd5e1;}
[data-theme="dark"] .msd-sub,[data-theme="aurora"] .msd-sub{color:#e2e8f0;}
