/* --------------------------------------------------------------------------
   Digitana Social - Registrierung / Passwort / Auth-Formulare
   Block: ACCOUNT_AUTH_OPTIK_ANGLEICHUNG_V1B_REGISTRIERUNG_PASSWORT
   Stand: 2026-05-24

   Ziel: Registrierung und Passwortseiten optisch an die neue Mein-Konto-Linie
   angleichen. Keine technische Logik, keine Routen, keine Formularnamen und
   keine 2FA-Sicherheitslogik werden geändert.
   -------------------------------------------------------------------------- */

/* Konto-/Auth-Seiten bleiben im global stabilen Plattformrahmen.
   Kein eigener ds-page-shell-Versatz, damit Logo, Navigation und Radar nicht springen. */

.ds-form-panel {
  position: relative;
  width: 100%;
  max-width: none;
  align-self: stretch;
  margin: 0;
  padding: clamp(18px, 2.2vw, 28px);
  border: 0;
  border-radius: 8px;
  color: #eaf6ff;
  background:
    radial-gradient(ellipse at 16% 0%, rgba(215, 237, 255, 0.13), transparent 36%),
    radial-gradient(ellipse at 82% 8%, rgba(32, 169, 255, 0.10), transparent 40%),
    linear-gradient(135deg, rgba(38, 50, 58, 0.34) 0%, rgba(5, 12, 19, 0.84) 34%, rgba(0, 0, 0, 0.98) 70%, rgba(0, 0, 0, 1) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(142, 223, 255, 0.10),
    inset 0 20px 34px rgba(215, 237, 255, 0.025),
    0 0 22px rgba(32, 169, 255, 0.08);
  overflow: visible;
}

.ds-form-panel::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: -1px;
  height: 2px;
  border-radius: 999px;
  background:
    linear-gradient(90deg,
      transparent,
      rgba(32, 169, 255, 0.28) 18%,
      rgba(215, 237, 255, 0.78) 52%,
      rgba(32, 169, 255, 0.34) 78%,
      transparent);
  box-shadow:
    0 0 9px rgba(32, 169, 255, 0.45),
    0 0 18px rgba(215, 237, 255, 0.16);
  pointer-events: none;
}

.ds-form-panel,
.ds-form-panel * {
  box-sizing: border-box;
}

.ds-form-head {
  max-width: 960px;
  margin: 0 0 20px;
  text-align: left;
}

.ds-form-head h1,
.ds-form-message h1 {
  margin: 0 0 11px;
  color: #ffffff;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.10em;
  text-transform: none;
  text-shadow:
    0 0 7px rgba(215, 237, 255, 0.72),
    0 0 15px rgba(32, 169, 255, 0.44),
    0 1px 0 #000000;
}

.ds-form-head p,
.ds-form-message p {
  max-width: 920px;
  margin: 8px 0 0;
  color: #d7efff;
  font-size: 0.98rem;
  line-height: 1.52;
  text-align: left;
  text-shadow: 0 1px 0 #000000;
}

/* Formularbereiche: keine zweite Innenkarte, sondern offene Konto-Optik. */
.ds-form-input-area {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ds-register-form {
  width: 100%;
  margin: 0;
}

.ds-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px 28px;
  align-items: end;
}

.ds-form-field {
  min-width: 0;
  margin: 0;
}

.ds-form-field-full {
  grid-column: 1 / -1;
}

.ds-field-label {
  display: block;
  margin: 0 0 5px;
  color: #8edfff;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-shadow: 0 0 8px rgba(32, 169, 255, 0.28);
}

.ds-field-input,
textarea.ds-field-input {
  width: 100%;
  max-width: none;
  min-height: 34px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  color: #eaf6ff;
  background:
    linear-gradient(135deg, rgba(24, 29, 33, 0.98), rgba(0, 0, 0, 0.99));
  font: inherit;
  outline: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(215, 237, 255, 0.22),
    inset 0 9px 14px rgba(0, 0, 0, 0.55),
    inset 0 0 14px rgba(32, 169, 255, 0.07);
}

.ds-field-input:focus,
textarea.ds-field-input:focus {
  box-shadow:
    0 0 18px rgba(32, 169, 255, 0.28),
    inset 0 0 0 1px rgba(130, 222, 255, 0.72),
    inset 0 9px 14px rgba(0, 0, 0, 0.50);
}

/* Passwortfeld mit Sichtbarkeitsknopf bleibt technisch gleich, nur sauber eingebunden. */
.ds-password-wrap {
  position: relative;
  width: 100%;
}

.ds-password-wrap .ds-field-input {
  padding-right: 42px;
}

.ds-password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 30px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 6px;
  color: #bfeeff;
  background: transparent;
  cursor: pointer;
}

.ds-password-toggle:hover,
.ds-password-toggle:focus-visible {
  color: #ffffff;
  outline: none;
  text-shadow: 0 0 8px rgba(32, 169, 255, 0.48);
}

.ds-eye-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

/* Meldungen und Statusseiten folgen der ernsten Konto-Linie. */
.ds-form-errors,
.ds-form-info,
.ds-form-message {
  width: 100%;
  max-width: none;
  margin: 0 0 18px;
  padding: 14px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #d8f0ff;
  text-align: left;
  box-shadow: none;
}

.ds-form-errors {
  padding: 12px 14px;
  border-radius: 9px;
  color: #ffdada;
  background:
    linear-gradient(135deg, rgba(110, 20, 20, 0.42), rgba(18, 4, 8, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(255, 160, 160, 0.16),
    inset 0 12px 18px rgba(0, 0, 0, 0.22);
}

.ds-form-info {
  padding: 12px 14px;
  border-radius: 9px;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(215, 237, 255, 0.14), transparent 48%),
    linear-gradient(135deg, rgba(16, 37, 55, 0.82), rgba(0, 0, 0, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(142, 223, 255, 0.12),
    inset 0 12px 18px rgba(0, 0, 0, 0.20);
}

.ds-form-errors p,
.ds-form-info p {
  margin: 4px 0;
}

.ds-form-message {
  padding: 4px 0 2px;
}

.ds-form-message-success {
  color: #eaf6ff;
}

.ds-form-message-error {
  color: #ffdada;
}

.ds-required-note {
  margin: 12px 0 0;
  color: #b9dcf2;
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: left;
}

/* Button- und Linkoptik wie Mein Konto. */
.ds-login-submit,
.ds-register-submit,
a.ds-inline-action,
button.ds-inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 150px;
  min-height: 36px;
  margin: 0;
  padding: 8px 24px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(255, 255, 255, 0.24), transparent 52%),
    linear-gradient(135deg, rgba(226, 242, 252, 0.42), rgba(56, 157, 215, 0.50), rgba(3, 13, 23, 0.98) 74%);
  font: inherit;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 0 18px rgba(32, 169, 255, 0.26),
    0 7px 16px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -9px 17px rgba(0, 0, 0, 0.42);
}

.ds-login-submit:hover,
.ds-register-submit:hover,
a.ds-inline-action:hover,
button.ds-inline-action:hover,
.ds-login-submit:focus-visible,
.ds-register-submit:focus-visible,
a.ds-inline-action:focus-visible,
button.ds-inline-action:focus-visible {
  color: #ffffff;
  text-decoration: none;
  outline: none;
  box-shadow:
    0 0 24px rgba(32, 169, 255, 0.42),
    0 8px 18px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -9px 17px rgba(32, 169, 255, 0.14);
}

.ds-register-submit:disabled {
  opacity: 0.44;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.ds-inline-action-soft {
  opacity: 0.84;
}

.ds-form-actions,
.ds-inline-button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  margin-top: 22px;
}

/* Regelbox Registrierung: bleibt lesbar, aber nicht als fremde Karte. */
.ds-rule-box {
  width: 100%;
  margin: 22px 0 12px;
  border: 0;
  border-radius: 9px;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(215, 237, 255, 0.11), transparent 48%),
    linear-gradient(135deg, rgba(15, 34, 50, 0.82), rgba(0, 0, 0, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(142, 223, 255, 0.12),
    inset 0 12px 18px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.ds-rule-box summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 12px 13px;
  cursor: pointer;
  color: #ffffff;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  list-style: none;
  text-shadow: 0 0 8px rgba(32, 169, 255, 0.24);
}

.ds-rule-box summary::-webkit-details-marker {
  display: none;
}

.ds-rule-box summary::marker {
  content: "";
}

.ds-rule-box summary::after {
  content: " +";
  flex: 0 0 auto;
  color: #8edfff;
}

.ds-rule-box[open] summary::after {
  content: " -";
}

.ds-rule-content {
  max-height: 260px;
  overflow-y: auto;
  padding: 0 13px 16px;
  color: #d8f0ff;
  line-height: 1.5;
  text-align: left;
}

.ds-rule-content p {
  margin: 10px 0;
}

.ds-rule-version {
  color: #9fdcff;
  font-size: 0.78rem;
}

.ds-register-rules {
  margin-top: 14px;
}

.ds-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #d8f0ff;
  line-height: 1.45;
}

.ds-check-row input {
  flex: 0 0 auto;
  margin-top: 3px;
  accent-color: #20a9ff;
}

.ds-login-error a {
  display: inline-block;
  margin-top: 6px;
  color: #8edfff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ds-login-error a:hover {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(32, 169, 255, 0.5);
}

.ds-email-change-box .ds-rule-content {
  max-height: none;
  overflow: visible;
}

/* Passwort vergessen / Passwort neu setzen: gleiche Auth-Fläche, keine eigene Insel. */
.ds-password-reset-area {
  max-width: none;
  margin: 0;
}

.ds-password-reset-area .ds-register-form {
  max-width: none;
  margin: 0;
}

.ds-password-reset-area .ds-form-actions {
  margin-top: 22px;
}

.ds-2fa-code-input {
  max-width: 280px;
  letter-spacing: 0.10em;
  text-align: center;
}

/* 2FA-Sonderbereiche bleiben als Sicherheitsansichten bewusst geschützt. */
.ds-inline-button-row {
  margin-top: 18px;
}

.ds-form-panel[aria-label*="2FA"] {
  width: min(790px, 100%);
  max-width: 790px;
  align-self: center;
  margin: 0 auto;
  padding: 16px 18px 18px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ds-form-panel[aria-label*="2FA"]::after {
  display: none;
}

.ds-form-panel[aria-label*="2FA"] .ds-form-head,
.ds-form-panel[aria-label*="2FA"] .ds-form-message {
  text-align: center;
}

.ds-form-panel[aria-label*="2FA"] .ds-form-head p,
.ds-form-panel[aria-label*="2FA"] .ds-form-message p {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.ds-two-factor-area {
  max-width: 760px;
  margin: 0 auto;
}

.ds-two-factor-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
}

.ds-qr-card {
  width: 188px;
  min-height: 188px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(205, 232, 255, 0.16), rgba(5, 17, 31, 0.88) 44%, rgba(0, 0, 0, 0.96) 100%);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.38),
    0 0 24px rgba(32, 169, 255, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -14px 26px rgba(0, 0, 0, 0.36);
}

.ds-qr-image {
  width: 164px;
  height: 164px;
  display: block;
  border-radius: 7px;
  box-shadow:
    0 0 14px rgba(0, 0, 0, 0.46),
    0 0 20px rgba(32, 169, 255, 0.08);
}

.ds-two-factor-text {
  text-align: left;
}

.ds-two-factor-text h2 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(32, 169, 255, 0.30),
    0 1px 0 #000000;
}

.ds-two-factor-text p {
  color: #d8f0ff;
  line-height: 1.5;
}

.ds-manual-key-label {
  margin: 14px 0 5px;
  color: #aee0ff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ds-manual-key {
  word-break: break-all;
  padding: 9px 11px;
  border-radius: 7px;
  background: #000000;
  color: #eaf6ff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.84rem;
  box-shadow:
    inset 0 0 0 1px rgba(215, 237, 255, 0.22),
    inset 0 9px 14px rgba(0, 0, 0, 0.55),
    inset 0 0 14px rgba(32, 169, 255, 0.07);
}

.ds-two-factor-note {
  padding: 22px 12px 0;
}

.ds-recovery-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ds-recovery-list code {
  display: block;
  padding: 10px 12px;
  border-radius: 7px;
  background: #000000;
  color: #eaf6ff;
  font-family: Consolas, "Courier New", monospace;
  text-align: center;
  box-shadow:
    inset 0 0 0 1px rgba(215, 237, 255, 0.18),
    inset 0 9px 14px rgba(0, 0, 0, 0.48);
}

/* 2FA Login-Prüfung: kompakt und zentriert wie bisher. */
.ds-form-panel[aria-label="2FA Anmeldung"] .ds-form-input-area {
  max-width: 440px;
  margin: 0 auto;
  padding: 22px 24px;
  border-radius: 13px;
  background:
    radial-gradient(ellipse at 14% 0%, rgba(230, 244, 255, 0.13) 0%, rgba(76, 159, 210, 0.08) 34%, transparent 58%),
    linear-gradient(135deg, rgba(34, 63, 84, 0.72), rgba(5, 17, 31, 0.74) 38%, rgba(0, 0, 0, 0.62) 100%);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 14px 0 24px rgba(215, 237, 255, 0.045),
    inset -18px -18px 34px rgba(0, 0, 0, 0.38);
}

.ds-form-panel[aria-label="2FA Anmeldung"] .ds-register-form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ds-form-panel[aria-label="2FA Anmeldung"] .ds-field-label {
  width: 100%;
  max-width: 270px;
  text-align: left;
}

.ds-form-panel[aria-label="2FA Anmeldung"] .ds-2fa-code-input {
  width: 100%;
  max-width: 270px;
  margin: 0 auto;
}

.ds-form-panel[aria-label="2FA Anmeldung"] .ds-form-actions {
  width: 100%;
  justify-content: center;
  margin-top: 22px;
}

@media (max-width: 900px) {
  .ds-form-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .ds-form-field-full {
    grid-column: auto;
  }
}

@media (max-width: 860px) {
  .ds-form-panel {
    padding: 16px 12px 18px;
  }

  .ds-form-head h1,
  .ds-form-message h1 {
    font-size: clamp(1.10rem, 5vw, 1.35rem);
    letter-spacing: 0.09em;
    line-height: 1.18;
  }

  .ds-rule-content {
    max-height: 220px;
  }

  .ds-two-factor-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .ds-two-factor-text {
    text-align: center;
  }

  .ds-qr-card {
    width: 176px;
    min-height: 176px;
  }

  .ds-qr-image {
    width: 152px;
    height: 152px;
  }

  .ds-recovery-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .ds-form-actions,
  .ds-inline-button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .ds-login-submit,
  .ds-register-submit,
  a.ds-inline-action,
  button.ds-inline-action {
    width: 100%;
  }
}
