/* =========================================
   ProDesk Global Stylish Toast & Modal UI
   ========================================= */
.proui-toast-stack {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 410px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000000;
  pointer-events: none;
}

.proui-toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px 15px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  color: #f8fafc;
  opacity: 0;
  transform: translateY(-14px) scale(0.96);
  transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.proui-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.proui-toast.hide {
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
}

.proui-toast.type-success { border-color: rgba(52, 211, 153, 0.48); }
.proui-toast.type-warning { border-color: rgba(251, 191, 36, 0.5); }
.proui-toast.type-error   { border-color: rgba(248, 113, 113, 0.52); }
.proui-toast.type-info    { border-color: rgba(56, 189, 248, 0.45); }

.proui-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.type-success .proui-icon { background: rgba(52, 211, 153, 0.14); color: #34d399; }
.type-warning .proui-icon { background: rgba(251, 191, 36, 0.14); color: #fbbf24; }
.type-error   .proui-icon { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.type-info    .proui-icon { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }

.proui-body {
  flex: 1;
  min-width: 0;
}

.proui-title {
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-bottom: 2px;
  color: #f8fafc;
}

.proui-msg {
  font-size: 0.84rem;
  line-height: 1.45;
  color: #cbd5e1;
  word-break: break-word;
}

.proui-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.15rem;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.proui-close:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.proui-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left center;
  animation: prouiBarShrink var(--proui-dur, 4200ms) linear forwards;
}

.type-success .proui-bar { background: linear-gradient(90deg, #34d399, #10b981); }
.type-warning .proui-bar { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.type-error   .proui-bar { background: linear-gradient(90deg, #f87171, #ef4444); }
.type-info    .proui-bar { background: linear-gradient(90deg, #38bdf8, #818cf8); }

@keyframes prouiBarShrink {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* =========================================
   Center Glass Confirm / Alert Modal
   ========================================= */
.proui-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000005;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.proui-backdrop.show {
  opacity: 1;
}

.proui-modal {
  width: min(92vw, 390px);
  background: #111827;
  border: 1px solid #263248;
  border-radius: 18px;
  padding: 22px 20px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  color: #f8fafc;
  transform: translateY(12px) scale(0.95);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.proui-backdrop.show .proui-modal {
  transform: translateY(0) scale(1);
}

.proui-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.proui-modal-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #f8fafc;
}

.proui-modal-msg {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #94a3b8;
  margin-bottom: 18px;
}

.proui-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.proui-btn {
  flex: 1;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.proui-btn:active {
  transform: scale(0.98);
}

.proui-btn-cancel {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}

.proui-btn-primary {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #0b1120;
}

.proui-btn-danger {
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: #ffffff;
}
