:root
{
  color-scheme: dark;
  --background: #030507;
  --surface: rgba(8, 13, 18, 0.94);
  --surface-light: rgba(17, 26, 34, 0.82);
  --line: rgba(151, 192, 211, 0.22);
  --line-strong: rgba(172, 217, 234, 0.42);
  --text: #edf4f6;
  --text-muted: #8f9ba2;
  --cyan: #6bdcf3;
  --red: #e12d37;
  --red-light: #ff5960;
}

*
{
  box-sizing: border-box;
}

html
{
  min-width: 320px;
  min-height: 100%;
  background: var(--background);
}

body
{
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 21% 46%, rgba(0, 151, 199, 0.13), transparent 34rem),
    radial-gradient(circle at 78% 52%, rgba(184, 17, 28, 0.12), transparent 29rem),
    linear-gradient(135deg, #020304 0%, #080d11 52%, #020304 100%);
  font-family: "Segoe UI", Inter, Arial, sans-serif;
}

body::before
{
  position: fixed;
  z-index: 0;
  content: "";
  pointer-events: none;
}

body::before
{
  inset: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(130, 177, 195, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 177, 195, 0.09) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
}

.login-layout
{
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(340px, 0.78fr);
  /* Die Höhe der festen Navigation wird vom verfügbaren Seitenraum abgezogen. */
  min-height: calc(90vh - var(--ic-header-height));
  min-height: calc(90dvh - var(--ic-header-height));
  transform: translateX(clamp(-5rem, -5.5vw, -3rem));
}

.brand-panel,
.login-panel
{
  display: flex;
  align-items: center;
}

.brand-panel
{
  justify-content: center;
  padding:
    clamp(2rem, 6vw, 7rem)
    clamp(1rem, 3vw, 3.5rem)
    clamp(2rem, 6vw, 7rem)
    clamp(2rem, 6vw, 7rem);
}

.brand-content
{
  width: min(100%, 960px);
  transform: translateY(-1.25rem);
}

.brand-logo
{
  display: block;
  width: min(80%, 768px);
  height: auto;
  margin-left: auto;
  transform: translateX(clamp(0.75rem, 1.5vw, 1.5rem));
  filter:
    drop-shadow(0 0 18px rgba(78, 198, 232, 0.14))
    drop-shadow(0 18px 32px rgba(0, 0, 0, 0.86));
}

.brand-copy
{
  max-width: 31rem;
  margin:
    clamp(1.15rem, 2.5vw, 2.4rem)
    clamp(0rem, 1vw, 1rem)
    0
    auto;
  padding-left: clamp(1rem, 3vw, 3rem);
  border-left: 1px solid var(--line-strong);
}

.eyebrow,
.system-label
{
  margin: 0;
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  line-height: 1.5;
  text-transform: uppercase;
}

.brand-copy h1
{
  margin: 0.5rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 3.2vw, 3.35rem);
  font-weight: 500;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(124, 209, 232, 0.16);
}

.brand-text
{
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: clamp(0.82rem, 1vw, 0.95rem);
  letter-spacing: 0.05em;
  line-height: 1.7;
}

.login-panel
{
  justify-content: flex-start;
  padding:
    clamp(2rem, 5vw, 6rem)
    clamp(1.25rem, 5vw, 5rem)
    clamp(2rem, 5vw, 6rem)
    clamp(1rem, 2.5vw, 2.5rem);
}

.login-card
{
  position: relative;
  width: min(100%, 430px);
  transform: translateX(clamp(-2.5rem, -2.5vw, -1.5rem));
  padding: clamp(1.75rem, 4vw, 3.25rem);
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(24, 34, 43, 0.55), transparent 42%),
    var(--surface);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}

.login-card::before,
.login-card::after
{
  position: absolute;
  content: "";
}

.login-card::before
{
  top: 0;
  right: 28px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent 68%);
  box-shadow: 0 0 12px rgba(107, 220, 243, 0.4);
}

.login-card::after
{
  right: 0;
  bottom: 0;
  width: 42%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red));
  box-shadow: 0 0 12px rgba(225, 45, 55, 0.42);
}

.login-language-toggle
{
  z-index: 2;
  top: 1rem;
  right: 1rem;
  min-width: 68px;
  min-height: 31px;
  padding: 0.35rem 0.58rem;
  transform: none;
}

[data-language-content][hidden]
{
  display: none !important;
}

.card-heading
{
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2.25rem;
}

.access-mark
{
  position: relative;
  flex: 0 0 2.7rem;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid rgba(107, 220, 243, 0.5);
  background: rgba(107, 220, 243, 0.05);
  transform: rotate(45deg);
  box-shadow: inset 0 0 18px rgba(107, 220, 243, 0.08);
}

.access-mark::before,
.access-mark::after
{
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  background: var(--cyan);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(107, 220, 243, 0.72);
}

.access-mark::before
{
  width: 1px;
  height: 1.05rem;
}

.access-mark::after
{
  width: 1.05rem;
  height: 1px;
}

.card-heading h2
{
  margin: 0.25rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 3vw, 2.3rem);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.login-alert
{
  margin: -0.75rem 0 1.5rem;
  padding: 0.8rem 1rem;
  border-left: 2px solid var(--red-light);
  color: #ffd7d9;
  background: rgba(225, 45, 55, 0.1);
  font-size: 0.9rem;
  line-height: 1.45;
}

.login-form
{
  display: grid;
  gap: 1.35rem;
}

.form-field
{
  display: grid;
  gap: 0.55rem;
}

.form-field label
{
  color: #b8c3c9;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.form-field input
{
  width: 100%;
  min-height: 3.25rem;
  border: 1px solid rgba(148, 179, 193, 0.3);
  border-radius: 0;
  outline: 0;
  color: var(--text);
  background: rgba(1, 4, 6, 0.65);
  padding: 0.8rem 1rem;
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.form-field input:hover
{
  border-color: rgba(148, 205, 224, 0.48);
}

.form-field input:focus
{
  border-color: var(--cyan);
  background: rgba(4, 12, 16, 0.9);
  box-shadow: 0 0 0 3px rgba(107, 220, 243, 0.1), 0 0 24px rgba(107, 220, 243, 0.08);
}

.login-button
{
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.4rem;
  margin-top: 0.55rem;
  padding: 0 1.25rem;
  border: 1px solid rgba(255, 89, 96, 0.74);
  border-radius: 0;
  color: #fff;
  background:
    linear-gradient(110deg, rgba(225, 45, 55, 0.95), rgba(119, 12, 21, 0.96));
  box-shadow: 0 8px 30px rgba(181, 19, 30, 0.2);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.login-button:hover
{
  filter: brightness(1.14);
  box-shadow: 0 10px 34px rgba(225, 45, 55, 0.3);
  transform: translateY(-1px);
}

.login-button:focus-visible
{
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.login-button:active
{
  transform: translateY(1px);
}

.button-arrow
{
  font-size: 1.55rem;
  font-weight: 300;
  line-height: 1;
}

.security-note
{
  margin: 1.65rem 0 0;
  color: #66747c;
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}

.login-registration
{
  margin-top: 1.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.login-registration p
{
  margin: 0;
}

.login-registration-title
{
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.login-registration-title + p
{
  margin-top: 0.45rem;
}

.login-registration-link
{
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  margin-top: 0.85rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(107, 220, 243, 0.46);
  color: var(--cyan);
  background: rgba(107, 220, 243, 0.04);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
}

.login-registration-link:hover,
.login-registration-link:focus-visible
{
  border-color: var(--cyan);
  color: #b8f3ff;
  background: rgba(107, 220, 243, 0.09);
  text-shadow: 0 0 12px rgba(107, 220, 243, 0.45);
}

/* --------------------------------------------------------- Registrierung */
.register-layout
{
  grid-template-columns: minmax(0, 1.2fr) minmax(480px, 0.9fr);
  transform: translateX(clamp(-3rem, -3vw, -1rem));
}

.register-panel
{
  padding-block: clamp(1.5rem, 3vw, 3.25rem);
}

.register-card
{
  width: min(100%, 570px);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.register-card .card-heading
{
  margin-bottom: 1.6rem;
}

.register-form
{
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.register-field-wide
{
  grid-column: 1 / -1;
}

.register-newsletter
{
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.25rem;
  padding: 0.7rem 3.5rem 0.7rem 1rem;
  border: 1px solid rgba(148, 179, 193, 0.3);
  color: #b8c3c9;
  background: rgba(1, 4, 6, 0.65);
  cursor: pointer;
}

.register-newsletter > span:first-child
{
  display: grid;
  gap: 0.2rem;
}

.register-newsletter strong
{
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.register-newsletter small
{
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.register-newsletter input
{
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.register-checkbox
{
  position: absolute;
  top: 50%;
  right: 1rem;
  display: grid;
  width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  border: 1px solid rgba(107, 220, 243, 0.5);
  color: transparent;
  background: rgba(107, 220, 243, 0.04);
  transform: translateY(-50%);
}

.register-newsletter input:checked + .register-checkbox
{
  border-color: var(--red-light);
  color: #ffffff;
  background: rgba(225, 45, 55, 0.82);
  box-shadow: 0 0 16px rgba(225, 45, 55, 0.25);
}

.register-newsletter:has(input:focus-visible)
{
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(107, 220, 243, 0.1);
}

.register-login-link
{
  margin: 1.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.register-login-link a
{
  color: var(--cyan);
  font-weight: 700;
  text-decoration: none;
}

.register-login-link a:hover,
.register-login-link a:focus-visible
{
  color: #ffffff;
}

.register-card .security-note
{
  margin-top: 0.9rem;
}

@media (max-width: 920px)
{
  .login-layout
  {
    grid-template-columns: 1fr;
    align-content: center;
    padding: clamp(1.25rem, 5vw, 3rem) 0;
    transform: none;
  }

  .brand-panel
  {
    padding: 0 1.5rem 1.75rem;
  }

  .brand-content
  {
    width: min(100%, 650px);
    transform: none;
  }

  .brand-logo
  {
    margin-right: auto;
    transform: none;
  }

  .brand-copy
  {
    display: none;
  }

  .login-panel
  {
    justify-content: center;
    padding: 0 1.25rem;
  }

  .login-card
  {
    transform: none;
  }

  .register-layout
  {
    grid-template-columns: 1fr;
    transform: none;
  }

  .register-card
  {
    width: min(100%, 570px);
  }
}

@media (max-width: 520px)
{
  .login-layout
  {
    align-content: start;
    padding-top: max(1.25rem, env(safe-area-inset-top));
  }

  .brand-panel
  {
    padding-bottom: 1rem;
  }

  .login-card
  {
    padding: 1.5rem;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  }

  .card-heading
  {
    margin-bottom: 1.75rem;
  }

  .login-language-toggle + .card-heading
  {
    padding-top: 1.5rem;
  }

  .system-label
  {
    letter-spacing: 0.16em;
  }

  .register-form
  {
    grid-template-columns: 1fr;
  }

  .register-field-wide
  {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce)
{
  *,
  *::before,
  *::after
  {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
