.pw-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 21, 48, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease;
  z-index: 9999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pw-backdrop.pw-open {
  opacity: 1;
  visibility: visible;
}

.pw-modal {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 30px 60px -20px rgba(11, 21, 48, 0.45);
  padding: 28px 28px 24px;
  position: relative;
  transform: translateY(14px) scale(0.97);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
  box-sizing: border-box;
}

.pw-backdrop.pw-open .pw-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.pw-modal * { box-sizing: border-box; }

.pw-close-x {
  position: absolute;
  top: 18px;
  right: 18px;
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: #b7bdca;
  cursor: pointer;
  padding: 4px;
}

.pw-close-x:hover { color: #5b6478; }

.pw-banner {
  position: absolute;
  top: -14px;
  left: 28px;
  background: #fef3c7;
  color: #92620a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #fcd9a0;
}

.pw-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 0 22px;
}

.pw-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(160deg, #1a2550, #0b1530);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pw-logo svg { width: 30px; height: 30px; }

.pw-brand-name {
  font-size: 22px;
  font-weight: 800;
  color: #0b1530;
}

.pw-brand-image {
  width: 50%;
  max-width: 210px;
  display: block;
}

.pw-tabs {
  display: flex;
  gap: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e6e8ee;
  margin-bottom: 20px;
}

.pw-tab {
  background: none;
  border: none;
  font-size: 15px;
  color: #5b6478;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
  position: relative;
}

.pw-tab.pw-active {
  color: #0b1530;
  font-weight: 600;
}

.pw-tab.pw-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -15px;
  height: 2px;
  background: #1d6df0;
  border-radius: 2px;
}

.pw-panel { display: none; }
.pw-panel.pw-active { display: block; }

.pw-field-box {
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  padding: 16px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pw-field-box.pw-disabled { background: #f7f8fb; }

.pw-field-label {
  font-size: 14px;
  color: #9aa1b1;
}

.pw-input,
.pw-field {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: 14px;
  color: #0b1530;
  background: transparent;
}

.pw-input { min-height: 80px; }
.pw-field { min-height: auto; padding: 2px 0; }

.pw-input::placeholder,
.pw-field::placeholder { color: #b7bdca; }

.pw-input:disabled,
.pw-field:disabled { cursor: not-allowed; }

.pw-helper {
  font-size: 13px;
  color: #5b6478;
  margin: 14px 2px 18px;
}

.pw-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pw-btn-primary {
  width: 100%;
  border: none;
  background: #1d6df0;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 13px 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
}

.pw-btn-primary:hover { background: #1456c2; }

.pw-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pw-row-end {
  display: flex;
  justify-content: flex-end;
}

.pw-btn-secondary {
  border: none;
  background: #d3434c;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
}

.pw-btn-secondary:hover { background: #b6333c; }

.pw-note {
  margin-top: 18px;
  font-size: 12px;
  color: #9aa1b1;
  text-align: center;
  line-height: 1.5;
}

.pw-error {
  display: none;
  font-size: 13px;
  color: #d3434c;
  margin: 10px 2px 0;
}

.pw-error.pw-visible {
  display: block;
}