/**
 * KorePOS dialogs — used instead of Chrome alert/confirm/prompt on every page.
 */
.portal-toast-wrap {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10900;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}
.portal-toast {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  border: 1px solid transparent;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.portal-toast--show {
  opacity: 1;
  transform: translateY(0);
}
.portal-toast--success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.portal-toast--error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.portal-toast--info {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}
.portal-busy {
  position: fixed;
  inset: 0;
  z-index: 10850;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.35);
}
.portal-busy[hidden] {
  display: none !important;
}
.portal-busy__card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  min-width: 16rem;
  text-align: center;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}
.portal-busy__msg {
  margin-top: 0.85rem;
  color: #334155;
  font-weight: 600;
}
body.portal-busy-open {
  overflow: hidden;
}
.portal-confirm {
  position: fixed;
  inset: 0;
  z-index: 10880;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.4);
  padding: 1rem;
}
.portal-confirm__card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.35rem 1.5rem 1.2rem;
  max-width: 26rem;
  width: 100%;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
}
.portal-confirm__title {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: #0f172a;
}
.portal-confirm__msg {
  color: #475569;
  margin-bottom: 1.1rem;
  white-space: pre-wrap;
}
.portal-confirm__input {
  width: 100%;
  margin: 0 0 1.1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  color: #0f172a;
}
.portal-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.portal-confirm__actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}
.portal-confirm__actions .btn-light {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}
.portal-confirm__actions .btn-primary {
  background: #ff5a36;
  color: #fff;
}
.portal-confirm__actions .btn-danger {
  background: #dc2626;
  color: #fff;
}
[data-bs-theme="dark"] .portal-confirm__card,
[data-bs-theme="dark"] .portal-busy__card {
  background: #1a1a17;
}
[data-bs-theme="dark"] .portal-confirm__title,
[data-bs-theme="dark"] .portal-busy__msg {
  color: #f2f2f7;
}
[data-bs-theme="dark"] .portal-confirm__msg {
  color: #cbd5e1;
}
[data-bs-theme="dark"] .portal-confirm__input {
  background: #14140f;
  border-color: rgba(255, 90, 54, 0.25);
  color: #f2f2f7;
}
