:root {
  --pb-blue: #003eb0;
  --pb-blue-dark: #00337a;
  --pb-blue-hover: #00337a;
  --pb-bg: #ffffff;
  --pb-text: #1c1d1e;
  --pb-muted: #2e3033;
  --pb-border: #c8ccd0;
  --pb-error: #cf2e2e;
  --pb-disabled-bg: #c5c6c9;
  --pb-disabled-text: #909193;
  --pb-link: #0000ee;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Roboto", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--pb-text);
  background: var(--pb-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Main / Logo */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 60px;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: 28px;
}

.logo img {
  display: block;
  width: 110px;
  height: 40px;
}

/* Card */
.card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: rgba(0, 0, 0, 0.02) 0 1px 5px 2px,
    rgba(0, 0, 0, 0.08) 0 1px 2px 0;
  padding: 24px;
  text-align: center;
}

.card__title {
  margin: 4px 0 12px;
  font-size: 32px;
  font-weight: 300;
  line-height: 1.25;
  color: var(--pb-blue);
}

.card__subtitle {
  margin: 0 0 22px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.3px;
  color: var(--pb-text);
}

/* Form */
.field {
  margin-bottom: 18px;
}

.field--password {
  position: relative;
}

.field--password .field__input {
  padding-right: 50px;
}

.field__toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.forgot-line {
  margin: 10px 0 20px;
  text-align: left;
}

.forgot-line a {
  font-size: 15px;
  color: var(--pb-link);
  text-decoration: underline;
}

.remember {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: flex-start;
  margin: 18px 0 2px;
  font-size: 15px;
  color: var(--pb-text);
  cursor: pointer;
}

.remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--pb-blue);
  cursor: pointer;
}

.field__input {
  width: 100%;
  height: 56px;
  padding: 16.5px 14px;
  font-size: 16px;
  letter-spacing: -0.3px;
  color: var(--pb-text);
  background: #ffffff;
  border: 1px solid var(--pb-border);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__input::placeholder {
  color: #707477;
}

.field__input:focus {
  border-color: var(--pb-blue);
  box-shadow: 0 0 0 1px var(--pb-blue);
}

/* Interaktives Captcha-Widget im Turnstile-Stil */
.turnstile-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.cap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 65px;
  padding: 9px 16px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  outline: none;
  /* Turnstile nutzt die System-Schrift, nicht die Seiten-Schrift */
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial,
    sans-serif;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cap__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cap__test {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.25;
  color: #b04a4a;
  text-align: left;
}

.cap:focus-visible {
  border-color: var(--pb-blue);
  box-shadow: 0 0 0 3px rgba(10, 78, 201, 0.18);
}

.cap__left {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  min-width: 0;
}

.cap__control {
  position: relative;
  width: 26px;
  height: 26px;
  flex: none;
}

/* Checkbox (idle) */
.cap__checkbox {
  position: absolute;
  inset: 0;
  border: 2px solid #b6b6b6;
  border-radius: 4px;
  background: #fff;
}

/* Spinner (checking) – grüner Segment-Spinner wie Turnstile */
.cap__spinner {
  position: absolute;
  inset: 0;
  width: 26px;
  height: 26px;
  display: none;
  transform-origin: 50% 50%;
}

.cap__spinner line {
  stroke: #20b24a;
  stroke-width: 1.7;
  stroke-linecap: round;
}

/* Tick (success) – grüner Kreis mit weißem Haken */
.cap__tick {
  position: absolute;
  inset: 0;
  width: 26px;
  height: 26px;
  display: none;
}

.cap__tick-bg {
  fill: #20b24a;
}

.cap__tick-mark {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cap[data-state="checking"] .cap__checkbox {
  display: none;
}
.cap[data-state="checking"] .cap__spinner {
  display: block;
  animation: cap-spin 0.85s linear infinite;
}
.cap[data-state="success"] .cap__checkbox {
  display: none;
}
.cap[data-state="success"] .cap__tick {
  display: block;
}

@keyframes cap-spin {
  to {
    transform: rotate(360deg);
  }
}

.cap__label {
  font-size: 15px;
  color: #1a1a1a;
  line-height: 1.25;
}

.cap__brand {
  position: relative;
  display: grid;
  justify-items: end;
  row-gap: 1px;
  flex: none;
  padding-top: 14px;
}

.cap__cloud {
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 13px;
  fill: #f6821f;
}

.cap__cf {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #404041;
}

.cap__links {
  font-size: 10px;
  color: #5a87d8;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 40px;
  padding: 0 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn--primary {
  background: var(--pb-blue);
  color: #ffffff;
}

.btn--primary:hover:not(:disabled) {
  background: var(--pb-blue-hover);
}

.btn:disabled {
  background: var(--pb-disabled-bg);
  color: var(--pb-disabled-text);
  cursor: not-allowed;
}

.register-line {
  margin: 22px 0 0;
  font-size: 16px;
}

.register-line a {
  color: var(--pb-link);
  font-weight: 400;
  text-decoration: underline;
}

.error {
  margin: 0 0 18px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--pb-error);
  background: #fdeaea;
  border: 1px solid #f6c6c6;
  border-radius: 8px;
  text-align: left;
}

.identifier-pill {
  display: inline-block;
  margin-bottom: 24px;
  padding: 8px 14px;
  background: #eef3fb;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pb-blue-dark);
}

/* Footer */
.site-footer {
  border-top: 1px solid #e4e7eb;
  padding: 26px 20px 40px;
}

.site-footer__inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
}

.site-footer a {
  font-size: 14px;
  font-weight: 500;
  color: var(--pb-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--pb-blue);
  text-decoration: underline;
}

@media (max-width: 520px) {
  .card {
    padding: 28px 22px 24px;
  }
  .card__title {
    font-size: 24px;
  }
  .turnstile {
    padding: 0 10px;
  }
  .site-footer__inner {
    gap: 16px 20px;
  }
}
