/* ============ 弹窗：密码验证 / 通用确认 ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, .7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 404px;
  background: linear-gradient(180deg, #1a1f2c, var(--panel));
  border: 1px solid #2e3648;
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow-2);
  animation: modal-in .18s ease-out;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.modal__panel h3 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: .01em;
}
.modal__panel .muted { font-size: 13px; margin: 0 0 14px; }

.modal__panel input[type="password"],
.modal__panel input[type="text"] {
  margin-top: 4px;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.modal__actions .btn { min-width: 92px; }

/* 密码错误抖动（reduced-motion 下由全局规则自动停用） */
.shake { animation: shake .3s ease-in-out; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

@media (max-width: 640px) {
  .modal__panel { padding: 22px; }
  .modal__actions .btn { flex: 1; }
}
