:root {
  --navy: #071d3d;
  --blue: #0068d9;
  --blue-hover: #0053ad;
  --light-blue: #eef6ff;
  --border: #dbe6f3;
  --text: #11213d;
  --muted: #6d7c94;
  --bg: #f4f7fb;
  --white: #ffffff;
  --shadow: 0 10px 28px rgba(10, 38, 72, 0.08);
  --radius: 14px;
  --header-bar-height: 76px;
  --menu-height: 76px;
  --sticky-bottom-gap: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: calc(var(--header-bar-height) + var(--menu-height) + var(--sticky-bottom-gap));
  background: var(--bg);
}

.portal-header__bar {
  width: 100%;
  height: var(--header-bar-height);
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(7, 29, 61, 0.18);
}

.portal-header__inner {
  width: calc(100% - 140px);
  height: var(--header-bar-height);
  margin-left: 40px;
  margin-right: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.portal-header__logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.portal-header__logo img {
  display: block;
  height: 42px;
  width: auto;
}

.portal-header__title {
  color: #ffffff;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.portal-header__menu {
  width: 100%;
  height: var(--menu-height);
  padding-left: 0;
  padding-right: 0;
  background: var(--bg);
}

.portal-header__menu-inner {
  position: relative;
  width: 100%;
  height: var(--menu-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
  border-bottom: 1px solid var(--navy);
}

.portal-header__menu-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.portal-header__menu-link:hover,
.portal-header__menu-link.active {
  color: var(--blue);
}

.portal-header__menu-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--blue);
}

.download-table-wrapper {
  width: auto;
  max-width: calc(100% - 140px);
  margin-top: 24px;
  margin-bottom: 48px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}


.release-layout {
  display: inline-block;
  max-width: 100%;
  text-align: left;
}

.release-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
  margin-bottom: 32px;
}

.release-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.release-switch__label {
  transition: color 0.15s ease;
}

.release-switch[data-channel="preview"] .release-switch__label--preview,
.release-switch[data-channel="final"] .release-switch__label--final {
  color: var(--blue);
}

.release-switch__control {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.release-switch__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.release-switch__track {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.release-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s ease, background 0.15s ease;
}

.release-switch__input:checked + .release-switch__track {
  border-color: var(--blue);
}

.release-switch__input:checked + .release-switch__track .release-switch__thumb {
  transform: translateX(24px);
  background: var(--blue);
}

.release-switch__input:focus-visible + .release-switch__track {
  box-shadow: 0 0 0 3px rgba(0, 104, 217, 0.12);
}

.release-table-card {
  display: inline-block;
  width: auto;
  max-width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  overflow-y: hidden;
  text-align: left;
}

.release-table {
  width: 1126px;
  table-layout: fixed;
  border-collapse: collapse;
}

.release-table thead {
  background: var(--light-blue);
}

.release-table th {
  box-sizing: border-box;
  padding: 16px 100px 16px 18px;
  background: var(--light-blue);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.release-table td {
  box-sizing: border-box;
  padding: 18px 100px 18px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 400;
  vertical-align: middle;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.release-table th:first-child,
.release-table td:first-child {
  width: 380px;
  min-width: 380px;
  max-width: 380px;
}

.release-table th:nth-child(2),
.release-table td:nth-child(2) {
  width: 205px;
  min-width: 205px;
  max-width: 205px;
}

.release-table th:nth-child(3),
.release-table td:nth-child(3) {
  width: 205px;
  min-width: 205px;
  max-width: 205px;
}

.release-table th:nth-child(4),
.release-table td:nth-child(4) {
  width: 200px;
  min-width: 200px;
  max-width: 200px;
}

.release-table th:nth-child(5),
.release-table td:nth-child(5) {
  width: 136px;
  min-width: 136px;
  max-width: 136px;
}

.release-table th:last-child,
.release-table td:last-child {
  padding-left: 18px;
  padding-right: 18px;
}

.release-table tr:last-child td {
  border-bottom: none;
}

.release-table tbody tr {
  transition: background 0.15s ease;
}

.release-table tbody tr:hover td {
  background-color: #f4f8ff;
}

.module-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.module-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--light-blue);
  color: var(--blue);
}

.module-icon .icon {
  width: 25px;
  height: 25px;
}

.module-name,
.module-number,
.version-text {
  color: var(--text);
  font-weight: 400;
  line-height: 1.35;
  white-space: nowrap;
}

.date {
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}

.download-button {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: var(--white);
  cursor: pointer;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.download-button:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  transform: translateY(-1px);
}

.download-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.download-button:disabled:hover {
  background: var(--blue);
  border-color: var(--blue);
  transform: none;
}

.download-button .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

@media (max-width: 980px) {
  :root {
    --menu-horizontal-padding: 20px;
  }

  .download-table-wrapper {
    max-width: calc(100% - 40px);
  }

  .portal-header__inner {
    width: calc(100% - 40px);
    margin-left: 20px;
    margin-right: 20px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-bar-height: 68px;
    --menu-height: 64px;
    --menu-horizontal-padding: 14px;
  }

  .portal-header__logo img {
    height: 34px;
  }

  .portal-header__title {
    font-size: 14px;
    letter-spacing: 0.08em;
  }

  .portal-header__menu-link {
    font-size: 15px;
  }

  .download-table-wrapper {
    max-width: calc(100% - 28px);
    margin-top: 28px;
    margin-bottom: 28px;
  }
}

/* Installationsnummer Login */
.login-wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.login-panel {
  width: 420px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-card {
  width: 420px;
  max-width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
  text-align: left;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 104, 217, 0.12);
}

.login-button {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: var(--white);
  cursor: pointer;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.login-button:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  transform: translateY(-1px);
}

.login-error {
  width: 100%;
  max-width: 100%;
  min-height: 20px;
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #c62828;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.login-error--empty {
  visibility: hidden;
}

.login-error__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #c62828;
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.login-support {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}

.login-support a {
  color: var(--blue);
  text-decoration: none;
}

.login-support a:hover {
  color: var(--blue-hover);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .login-wrapper {
    padding: 28px 14px;
  }

  .login-card {
    padding: 28px;
  }
}
