/* ------------------------------------------------------------------ */
/* Toasts + modal                                                      */
/* ------------------------------------------------------------------ */

.toast-host {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 300;
  max-width: min(360px, calc(100vw - 40px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 11px 14px;
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink);
  animation: toast-in 0.2s ease both;
  pointer-events: auto;
}

.toast .icon {
  margin-top: 1px;
  color: var(--accent);
}

.toast.success {
  border-left-color: var(--ok);
}

.toast.success .icon {
  color: var(--ok);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.error .icon {
  color: var(--danger);
}

.toast.leaving {
  animation: toast-out 0.18s ease both;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 16, 13, 0.55);
  backdrop-filter: blur(2px);
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fade 0.15s ease both;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 24px;
  animation: pop 0.18s ease both;
}

.modal h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}

.modal > p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.modal .modal-form .modal-actions {
  margin-top: 8px;
}
