:root {
  --accent: #0068dc;
  --accent-hover: #0055b8;
  color-scheme: light;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #17314d;
  background: #f2f7fd;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #f2f7fd url('/assets/dashboard-background-v8-nex.png') center center / cover no-repeat
    fixed;
}
[hidden] {
  display: none !important;
}
header {
  min-height: 88px;
  padding: 24px 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #d8e5f4;
  background: #fff;
  gap: 12px;
}
.brand {
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: 0.06em;
  font-size: 14px;
}
.product {
  color: #486583;
  letter-spacing: 0;
  font-weight: 400;
}
.version {
  font: 12px monospace;
  color: #486583;
  white-space: nowrap;
}
main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 64px 20px;
}
.card {
  width: 100%;
  max-width: 490px;
  padding: 42px;
  background: #fff;
  border: 1px solid #d8e5f4;
  border-radius: 18px;
  box-shadow: 0 12px 44px #43563c14;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  font-weight: 650;
  color: #53674f;
  margin-bottom: 20px;
}
h1 {
  font-size: clamp(20px, 4vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.035em;
  margin: 0;
  overflow-wrap: anywhere;
}
.intro {
  color: #486583;
  font-size: 16px;
  line-height: 1.6;
  margin: 12px 0 30px;
}
label {
  display: block;
  font-weight: 550;
  font-size: 14px;
  margin: 20px 0 9px;
}
input {
  font: inherit;
  width: 100%;
  padding: 14px;
  border: 1px solid #cbd5c5;
  border-radius: 8px;
  background: #fbfcf9;
  color: #17314d;
}
input::placeholder {
  color: #707d70;
}
button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 15px 18px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
button:hover {
  background: var(--accent-hover);
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.error {
  color: #ad2436;
  font-size: 14px;
  line-height: 1.5;
}
.error:empty {
  margin: 24px 0 0;
}
.badge {
  display: inline-block;
  color: var(--accent);
  background: #eaf0e4;
  padding: 7px 12px;
  font-size: 14px;
  border-radius: 6px;
  margin-bottom: 22px;
}
.welcome h1 {
  font-size: 36px;
}
.secondary {
  justify-content: center;
  background: #edf5ff;
  color: var(--accent-hover);
}
.secondary:hover {
  background: #dfe8d7;
}
footer {
  display: flex;
  justify-content: space-between;
  padding: 24px 5vw;
  color: #486583;
  font-size: 12px;
  gap: 12px;
}
@media (max-width: 520px) {
  .card {
    padding: 28px 22px;
  }
  .product {
    display: none;
  }
  main {
    padding: 36px 16px;
  }
}
.header-logo {
  display: block;
  width: 150px;
  max-width: 35vw;
  height: auto;
  flex-shrink: 0;
}
.login-logo {
  display: block;
  width: 260px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 32px;
}
.brand {
  min-width: 0;
}
.product {
  max-width: 420px;
  line-height: 1.5;
}
.eyebrow {
  line-height: 1.6;
}

.brand-tagline {
  text-align: center;
  margin: 8px 0 20px;
  font-size: 16px;
  font-style: italic;
  color: #0055b8;
}
#login .eyebrow {
  margin-bottom: 8px;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-align: center;
}

.brand-name {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
}
.brand-icon {
  width: 1.2em;
  height: 1.2em;
  object-fit: contain;
  flex-shrink: 0;
}

/* Der leicht transparente Hintergrund hält das Gebäudemotiv hinter dem Anmeldeformular sichtbar. */
#login.card {
  background: rgba(255, 255, 252, 0.78);
  border-color: rgba(255, 255, 255, 0.88);
}
#login input {
  background: rgba(255, 255, 253, 0.9);
}

/* Den kleinen Markenschriftzug über den unteren Hintergrundwellen lesbar halten. */
body:not(.portal-mode) > footer {
  position: fixed;
  inset: auto 0 0;
  z-index: 2;
  padding: 16px 5vw;
  color: #46563e;
  background: linear-gradient(transparent, rgba(250, 252, 247, 0.92));
}
body:not(.portal-mode) > main {
  padding-bottom: 90px;
}
body:not(.portal-mode) > footer .brand-icon {
  width: 14px;
  height: 14px;
}

#forgot-password,
#forgot-password:visited,
#forgot-password:hover,
#forgot-password:active {
  display: inline-block;
  margin-top: 18px;
  color: #79b8e8;
  text-decoration: underline;
  font-size: 14px;
  background: none;
}
#forgot-password:focus-visible {
  outline: 2px solid #79b8e8;
  outline-offset: 4px;
}
#password-recovery p {
  line-height: 1.7;
  margin: 24px 0;
}

#recovery-back {
  justify-content: center;
  text-align: center;
}

/* Die Anmeldung verwendet dieselbe blaue Akzentfarbe wie das Portal. */
body:not(.portal-mode) {
  background-color: #d9eaff;
  background-blend-mode: normal;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #1684e9;
  outline-offset: 2px;
}
