body.system-modal-open { overflow: hidden; }
.system-modal-overlay {
  position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem); background: rgba(3, 7, 18, 0.78); backdrop-filter: blur(6px);
}
.system-modal-dialog {
  width: min(100%, 760px); max-height: min(86vh, 760px); display: flex; flex-direction: column;
  border: 1px solid rgba(255,255,255,.18); border-radius: 28px; padding: clamp(1.25rem, 4vw, 2.25rem);
  color: #f8fafc; background: linear-gradient(145deg, rgba(15,23,42,.98), rgba(30,41,59,.96));
  box-shadow: 0 28px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(59,130,246,.18); outline: none;
}
.system-modal-heading { display: flex; align-items: center; gap: 1rem; margin: 0 0 .65rem; }
.system-modal-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 3.25rem; height: 3.25rem; border-radius: 18px; font-size: 1.65rem; background: rgba(245,158,11,.18); color: #f59e0b; }
.system-modal-title { margin: 0; font-size: clamp(1.75rem, 6vw, 2.75rem); font-weight: 800; line-height: 1.05; }
.system-modal-subtitle { margin: 0 0 1rem; color: #bfdbfe; font-size: clamp(1rem, 3vw, 1.25rem); font-weight: 700; }
.system-modal-content { overflow: auto; max-height: 46vh; margin: .5rem 0 1.25rem; padding-right: .35rem; color: #e5e7eb; font-size: clamp(1rem, 2.5vw, 1.125rem); line-height: 1.65; }
.system-modal-actions { display: flex; justify-content: stretch; margin-top: auto; }
.system-modal-accept {
  width: 100%; min-height: 58px; border: 0; border-radius: 18px; padding: 1rem 1.35rem; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, #2563eb, #0ea5e9); font-weight: 800; font-size: 1.125rem;
  box-shadow: 0 14px 34px rgba(37,99,235,.35); transition: transform .18s ease, filter .18s ease;
}
.system-modal-accept:hover { transform: translateY(-1px); filter: brightness(1.05); }
.system-modal-accept:disabled { cursor: wait; opacity: .72; transform: none; }
@media (min-width: 720px) { .system-modal-actions { justify-content: flex-end; } .system-modal-accept { width: auto; min-width: 240px; } }
@media (max-width: 420px) { .system-modal-overlay { padding: .75rem; } .system-modal-dialog { border-radius: 22px; max-height: 90vh; } .system-modal-content { max-height: 50vh; } }
.system-modal-error {
  width: 100%;
  margin: 0 0 .85rem;
  color: #fecaca;
  font-size: .95rem;
  font-weight: 700;
}
@media (min-width: 720px) {
  .system-modal-actions { flex-wrap: wrap; }
  .system-modal-error { text-align: right; }
}
.welcome-system-modal-error {
  width: min(100%, 720px);
  margin: .9rem auto 0;
  border: 1px solid rgba(248, 113, 113, .42);
  border-radius: 16px;
  padding: .85rem 1rem;
  color: #fecaca;
  background: rgba(127, 29, 29, .28);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}
.welcome-system-modal-error[hidden] { display: none !important; }
