body {
  font-family: "Inter", Arial, sans-serif;
  background-color: #f7f9fc;
  color: #222;
  margin: 0;
  line-height: 1.5;
}

header {
  background-color: #0b2850;
  color: white;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0.8rem 2rem;

  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.login-btn {
  background-color: gray;
  color: white;

  border: none;

  padding: 0.5rem 1rem;
  border-radius: 6px;

  cursor: pointer;
  font-weight: bold;

  transition:
    background 0.3s,
    transform 0.2s;
}

.login-btn:hover {
  transform: translateY(-2px);
  background: #8c8c8c;
}

.signup-page {
  min-height: calc(100vh - 70px);

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 2rem;
}

.signup-card {
  width: 100%;
  max-width: 460px;

  background: white;

  border-radius: 16px;

  padding: 2rem;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.signup-card h1 {
  margin-top: 0;

  color: #0b2850;

  text-align: center;
}

.intro-text {
  color: #6b7280;

  text-align: center;

  margin-bottom: 1.5rem;
}

label {
  display: block;

  margin-top: 1rem;
  margin-bottom: 0.4rem;

  font-weight: 600;
}

input,
select {
  width: 100%;

  padding: 0.75rem;

  border: 1px solid #ccc;
  border-radius: 8px;

  box-sizing: border-box;

  font-size: 0.95rem;

  transition:
    border 0.3s,
    box-shadow 0.3s;
}

input:focus,
select:focus {
  outline: none;

  border: 1px solid #0b2850;

  box-shadow: 0 0 0 4px rgba(11, 40, 80, 0.1);
}

select {
  background: white;
  color: #222;
  appearance: auto;
}

select:invalid {
  color: #6b7280;
}

.email-hint {
  display: block;
  margin-top: 0.45rem;
  color: #6b7280;
  font-size: 0.82rem;
}

.save-btn {
  background: #0b2850;
  color: white;

  border: none;

  padding: 0.85rem 1.2rem;

  border-radius: 8px;

  margin-top: 1.5rem;

  cursor: pointer;

  width: 100%;

  font-size: 1rem;
  font-weight: 700;

  transition:
    background 0.3s,
    transform 0.2s;
}

.save-btn:hover {
  background: #163b70;
  transform: translateY(-2px);
}

.save-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  transform: none;
}

.signup-checks {
  margin-top: 1.5rem;

  background: #f8fafc;

  border-radius: 12px;

  padding: 1rem;
}

.signup-checks p {
  margin: 0.5rem 0;
}

.valid {
  color: #2ecc71;
  font-weight: 600;
}

.invalid {
  color: #e74c3c;
  font-weight: 600;
}

.neutral {
  color: #7f8c8d;
  font-style: italic;
}

@media (max-width: 520px) {
  header {
    padding: 0.8rem 1rem;
  }

  .signup-page {
    padding: 1rem;
  }

  .signup-card {
    padding: 1.3rem;
  }
}

.form-message {
  display: none;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.form-message.success {
  display: block;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.form-message.error {
  display: block;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.form-message.info {
  display: block;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* =========================
   Hochschulzugang: E-Mail oder Matrikelnummer
========================= */
.identity-method {
  margin-top: 1rem;
}

.identity-method-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #26364a;
}

.identity-method-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.identity-method-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
  margin: 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid #cfd7e3;
  border-radius: 9px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.identity-method-option:has(input:checked) {
  border-color: #0b2850;
  background: #eef4fb;
  color: #0b2850;
  box-shadow: 0 0 0 2px rgba(11, 40, 80, 0.08);
}

.identity-method-option:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

.identity-method-option input[type="radio"] {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0;
  padding: 0;
  accent-color: #0b2850;
}

@media (max-width: 380px) {
  .identity-method-options {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Hochschul-E-Mail Composer
========================= */
.email-composer {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition:
    border 0.3s,
    box-shadow 0.3s;
}

.email-composer:focus-within {
  border-color: #0b2850;
  box-shadow: 0 0 0 4px rgba(11, 40, 80, 0.1);
}

.email-composer input {
  min-width: 0;
  flex: 1 1 auto;
  width: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.email-composer input:focus {
  border: 0;
  box-shadow: none;
}

.email-composer input:disabled {
  background: #f3f5f8;
  color: #7b8797;
}

.email-suffix {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 0.8rem;
  border-left: 1px solid #d9e0e8;
  background: #eef3f9;
  color: #0b2850;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.email-suffix.hidden {
  display: none;
}

@media (max-width: 420px) {
  .email-composer {
    align-items: stretch;
  }

  .email-suffix {
    padding: 0 0.55rem;
    font-size: 0.78rem;
  }
}

/* Mobile form fields stay at 16px or more so iOS browsers do not
   auto-zoom them. Pinch-to-zoom remains available to the user. */
@media (max-width: 768px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="hidden"]),
  textarea:not([data-allow-small-text]),
  select:not([data-allow-small-text]) {
    font-size: 16px;
  }
}


/* Mobile width containment: prevents horizontal page expansion when a field
   receives focus on iOS/Brave. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.signup-page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.signup-card {
  min-width: 0;
  box-sizing: border-box;
}

.signup-card input,
.signup-card select,
.email-composer {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}


.auth-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(213, 220, 229, 0.9);
  font-size: 0.82rem;
}

.auth-legal-links a {
  color: #315b89;
  font-weight: 700;
  text-decoration: none;
}

.auth-legal-links a:hover {
  text-decoration: underline;
}

/* Password visibility toggle */
.password-field {
  position: relative;
  width: 100%;
}

.password-field input {
  padding-right: 2.8rem;
}

.signup-card .password-toggle {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: #66778a;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
}

.password-eye-icon {
  position: relative;
  display: inline-flex;
  width: 1.1rem;
  height: 1.1rem;
}

.password-eye-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-eye-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.25rem;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg) scaleX(0);
  transition: transform 0.15s ease;
}

.signup-card .password-toggle:hover {
  color: #0b2850;
}

.signup-card .password-toggle:focus-visible {
  outline: 2px solid #0b2850;
  outline-offset: 2px;
  border-radius: 6px;
}

.signup-card .password-toggle[aria-pressed="true"] {
  color: #0b2850;
}

.signup-card .password-toggle[aria-pressed="true"] .password-eye-icon::after {
  transform: translate(-50%, -50%) rotate(45deg) scaleX(1);
}
