/* ─────────────────────────────────────────────────────────────
   password.css — Self-Service Change + Admin Reset Modals
   ───────────────────────────────────────────────────────────── */

.pw-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2200;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 20px;
  overflow-y: auto;
}
.pw-modal-backdrop.visible {
  display: flex;
}

.pw-modal {
  background: white;
  border-radius: 10px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}
.pw-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.08);
  color: #4a5664;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.pw-close:hover { background: rgba(0, 0, 0, 0.16); }

.pw-header {
  padding: 22px 24px 14px;
  background: linear-gradient(135deg, var(--theme-bg-dark, #0d2840) 0%, var(--theme-primary, #1565a8) 100%);
  color: white;
}
.pw-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.pw-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0.9;
}

.pw-form {
  padding: 20px 24px 24px;
}

.pw-field {
  display: block;
  margin-bottom: 14px;
}
.pw-field > span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #4a5664;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}
.pw-field input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d8dee5;
  border-radius: 5px;
  font-size: 14px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.pw-field input:focus {
  outline: none;
  border-color: var(--theme-primary, #0d2840);
  box-shadow: 0 0 0 2px rgba(13, 40, 64, 0.12);
}
.pw-field input:invalid {
  border-color: #c44b1c;
}
.pw-hint {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: #6b7785;
  font-family: -apple-system, sans-serif;
}

.pw-error {
  background: #f8d7da;
  color: #721c24;
  padding: 10px 14px;
  border-radius: 5px;
  font-size: 13px;
  margin-bottom: 14px;
  border-left: 3px solid #c44b1c;
}
.pw-success {
  background: #d4edda;
  color: #155724;
  padding: 12px 14px;
  border-radius: 5px;
  font-size: 13px;
  margin-bottom: 14px;
  border-left: 3px solid #2e8540;
}

.pw-warning {
  background: #fff3cd;
  color: #856404;
  padding: 10px 14px;
  border-radius: 5px;
  font-size: 12px;
  margin-bottom: 14px;
  border-left: 3px solid #b8860b;
}
.pw-warning ul {
  margin: 6px 0 0 18px;
  padding: 0;
}
.pw-warning li { margin: 3px 0; }

.pw-info {
  font-size: 13px;
  color: #4a5664;
  line-height: 1.5;
  margin-bottom: 14px;
}

.pw-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.pw-cancel {
  background: white;
  color: #4a5664;
  border: 1px solid #d8dee5;
  padding: 9px 16px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.pw-cancel:hover {
  border-color: #4a5664;
}
.pw-submit {
  background: var(--theme-primary, #0d2840);
  color: white;
  border: none;
  padding: 9px 18px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.pw-submit:hover {
  filter: brightness(1.1);
}
.pw-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.pw-submit.pw-danger {
  background: #c44b1c;
}

/* Mode-Tabs für Admin-Reset (Generate vs Manual) */
.pw-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #f4f6f8;
  border-radius: 6px;
  padding: 3px;
  margin-bottom: 16px;
}
.pw-mode-tab {
  position: relative;
  text-align: center;
  cursor: pointer;
}
.pw-mode-tab input {
  position: absolute;
  opacity: 0;
}
.pw-mode-tab span {
  display: block;
  padding: 7px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7785;
  transition: all 0.15s;
}
.pw-mode-tab input:checked + span {
  background: white;
  color: var(--theme-primary, #0d2840);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Generierte-Passwort-Anzeige */
.pw-generated-box {
  background: #f4f6f8;
  padding: 16px 18px;
  border-radius: 6px;
  margin: 18px 24px;
  border: 1px solid #d8dee5;
}
.pw-generated-label {
  font-size: 11px;
  font-weight: 700;
  color: #4a5664;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.pw-generated-value {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 17px;
  font-weight: 700;
  color: #0d2840;
  background: white;
  padding: 10px 14px;
  border-radius: 5px;
  border: 2px dashed var(--theme-primary, #0d2840);
  text-align: center;
  letter-spacing: 1px;
  word-break: break-all;
  margin-bottom: 10px;
  user-select: all;
}
.pw-copy-btn {
  width: 100%;
  background: white;
  border: 1px solid var(--theme-primary, #0d2840);
  color: var(--theme-primary, #0d2840);
  padding: 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.pw-copy-btn:hover {
  background: var(--theme-primary, #0d2840);
  color: white;
}

@media (max-width: 600px) {
  .pw-modal { max-width: 100%; }
  .pw-mode-tabs { grid-template-columns: 1fr; }
}
