.fp-dialog {
  box-sizing: border-box;
  width: min(520px, calc(100vw - 28px));
  max-width: 100%;
  max-height: min(760px, calc(100dvh - 28px));
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #315170;
  border-radius: 18px;
  background: #07182d;
  color: #eaf3ff;
  box-shadow: 0 28px 90px #000c;
}
.fp-dialog::backdrop { background: #020914b8; backdrop-filter: blur(5px); }
.fp-dialog-form { display: grid; gap: 14px; padding: 22px; }
.fp-dialog-head h2 { margin: 0; font-size: 21px; }
.fp-dialog-head p { margin: 8px 0 0; color: #9bb0c8; line-height: 1.55; }
.fp-dialog-field { display: grid; min-width: 0; gap: 7px; color: #bfd0e2; font-size: 13px; font-weight: 700; }
.fp-dialog-field input,
.fp-dialog-field select,
.fp-dialog-field textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #36597d;
  border-radius: 9px;
  outline: none;
  background: #0d2948;
  color: #edf6ff;
  font: inherit;
  font-weight: 500;
}
.fp-dialog-field textarea { resize: vertical; line-height: 1.5; }
.fp-dialog-field input:focus,
.fp-dialog-field select:focus,
.fp-dialog-field textarea:focus { border-color: #51a7ff; box-shadow: 0 0 0 3px #3b91e62e; }
.fp-dialog-field [aria-invalid="true"] { border-color: #ff7586; }
.fp-dialog-hint { color: #819ab6; font-weight: 500; overflow-wrap: anywhere; }
.fp-dialog-error { min-height: 16px; color: #ff9dac; font-weight: 600; }
.fp-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.fp-dialog-actions button {
  box-sizing: border-box;
  min-width: 96px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #3c638c;
  border-radius: 9px;
  background: #102f52;
  color: #edf6ff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.fp-dialog-actions button:hover { border-color: #64adf6; background: #153b64; }
.fp-dialog-actions .fp-dialog-cancel { background: #0a213b; color: #aec3d9; }
.fp-dialog-actions .danger { border-color: #a94a5a; background: #782f3b; color: #fff5f6; }
.fp-dialog-actions button:focus-visible { outline: 3px solid #6ab7ff66; outline-offset: 2px; }
.fp-dialog-toast { position: fixed; z-index: 1400; right: 18px; bottom: 18px; box-sizing: border-box; width: min(420px, calc(100vw - 28px)); max-width: 100%; margin: 0; padding: 12px 15px; border: 1px solid #315170; border-radius: 11px; background: #0d2948; color: #edf6ff; box-shadow: 0 16px 44px #0008; overflow-wrap: anywhere; }
.fp-dialog-toast.error { border-color: #a94a5a; background: #4b202b; color: #fff2f4; }
@media (max-width: 430px) {
  .fp-dialog-form { padding: 17px; }
  .fp-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .fp-dialog-actions button { width: 100%; min-width: 0; }
  .fp-dialog-toast { right: 14px; bottom: 14px; }
}
