:root {
  --freiheit-bg: #ffffff;
  --freiheit-card: #ffffff;
  --freiheit-text: #111827;
  --freiheit-muted: #6b7280;
  --freiheit-border: #d9dee8;
  --freiheit-primary: #e6007e;
  --freiheit-primary-hover: #044b7a;
  --freiheit-focus: rgba(29, 78, 216, 0.24);
  --freiheit-error: #b91c1c;
  --freiheit-radius: 18px;
  --freiheit-shadow: 0 24px 70px rgba(17, 24, 39, 0.13);
}

html,
body,
.login-pf,
.login-pf body,
.login-pf-page {
  min-height: 100%;
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  color: var(--freiheit-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-pf-page {
  min-height: 100vh;
  padding: 3rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#kc-header {
  display: none;
}

.card-pf {
  width: min(100%, 440px);
  margin: 0;
  padding: 2.2rem;
  border: 1px solid rgba(217, 222, 232, 0.85);
  border-radius: var(--freiheit-radius);
  box-shadow: var(--freiheit-shadow);
  background: var(--freiheit-card);
  background-color: var(--freiheit-card);
  background-image: none;
}

#kc-content-wrapper::before {
  content: "";
  display: block;
  width: 164px;
  height: 54px;
  margin: 0 auto 1.4rem auto;
  background: url("../img/logo.svg") center / contain no-repeat;
}

#kc-page-title {
  margin: 0 0 1.4rem 0;
  color: var(--freiheit-text);
  font-size: 1.45rem;
  font-weight: 720;
  line-height: 1.2;
  text-align: center;
  letter-spacing: -0.02em;
}

#kc-form,
#kc-form-wrapper {
  margin-top: 0;
}

label,
.pf-c-form__label,
.pf-v5-c-form__label {
  color: var(--freiheit-text);
  font-weight: 650;
}

.form-control,
.pf-c-form-control,
.pf-v5-c-form-control {
  min-height: 44px;
  border: 1px solid var(--freiheit-border);
  border-radius: 12px;
  box-shadow: none;
  color: var(--freiheit-text);
  background-color: #ffffff;
  background-image: none;
}

.form-control:focus,
.pf-c-form-control:focus,
.pf-v5-c-form-control:focus {
  border-color: var(--freiheit-primary);
  box-shadow: 0 0 0 4px var(--freiheit-focus);
  outline: none;
}

.btn-primary,
.pf-c-button.pf-m-primary,
.pf-v5-c-button.pf-m-primary,
input[type="submit"] {
  width: 100%;
  min-height: 45px;
  border: 0;
  border-radius: 12px;
  background: var(--freiheit-primary);
  background-color: var(--freiheit-primary);
  background-image: none;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(29, 78, 216, 0.22);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.btn-primary:hover,
.pf-c-button.pf-m-primary:hover,
.pf-v5-c-button.pf-m-primary:hover,
input[type="submit"]:hover {
  background: var(--freiheit-primary-hover);
  background-color: var(--freiheit-primary-hover);
  background-image: none;
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(29, 78, 216, 0.26);
}

#kc-form-options,
#kc-registration,
#kc-info,
#kc-social-providers {
  color: var(--freiheit-muted);
  font-size: 0.92rem;
}

a {
  color: var(--freiheit-primary);
  font-weight: 650;
  text-decoration: none;
}

a:hover {
  color: var(--freiheit-primary-hover);
  text-decoration: underline;
}

.alert-error,
.pf-c-alert.pf-m-danger,
.pf-v5-c-alert.pf-m-danger {
  border-radius: 12px;
  border-color: rgba(185, 28, 28, 0.22);
  background: #fef2f2;
  background-color: #fef2f2;
  background-image: none;
  color: var(--freiheit-error);
}

.checkbox label,
.pf-c-check__label,
.pf-v5-c-check__label {
  color: var(--freiheit-muted);
  font-weight: 500;
}

#kc-locale ul {
  border-radius: 12px;
  border-color: var(--freiheit-border);
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.12);
}

@media (max-width: 520px) {
  .login-pf-page {
    padding: 1rem;
    align-items: flex-start;
  }

  .card-pf {
    padding: 1.4rem;
    border-radius: 16px;
  }
}
