:root {
  --ink: #17202a;
  --muted: #657080;
  --line: #d8dee7;
  --brand: #255c7f;
  --brand-strong: #123d5a;
  --red: #b43a36;
  --panel: #ffffff;
  --page: #eef2f6;
  --side: #172333;
  --shadow-3d: 0 18px 34px rgba(23, 35, 51, 0.14), 0 4px 0 rgba(174, 188, 202, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
}
button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, p { margin-top: 0; }

.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 34.2vw) minmax(0, 1fr);
}

.portal-side {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 28px;
  padding: 34px 28px;
  background: var(--side);
  color: #f6f8fb;
}

.brand-line {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-logo {
  display: block;
  width: min(215px, 100%);
  height: auto;
}

.account-brand .brand-logo {
  width: min(215px, 100%);
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e8f0f5;
  color: #17354a;
  font-weight: 800;
}

.brand-line strong {
  display: block;
  font-size: 19px;
  line-height: 1.1;
}

.brand-line small {
  color: #b9c7d6;
  font-size: 13px;
}

.case-visual {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 24px;
  min-height: 560px;
}

.document-stack {
  position: relative;
  width: min(250px, 74%);
  height: 238px;
}

.document-stack span {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
}

.document-stack span:nth-child(1) {
  transform: rotate(-8deg) translate(-16px, 18px);
  background: #c9d1d8;
  opacity: 0.78;
}

.document-stack span:nth-child(2) {
  transform: rotate(6deg) translate(18px, 5px);
  background: #eef2f5;
  opacity: 0.92;
}

.document-stack span:nth-child(3)::before,
.document-stack span:nth-child(3)::after {
  content: "";
  position: absolute;
  left: 32px;
  right: 32px;
  height: 10px;
  border-radius: 999px;
}

.document-stack span:nth-child(3)::before {
  top: 50px;
  background: #d6e2ea;
  box-shadow: 0 34px 0 #e7ebf0, 0 68px 0 #e7ebf0, 0 102px 0 #e7ebf0;
}

.document-stack span:nth-child(3)::after {
  bottom: 42px;
  width: 43%;
  right: auto;
  background: #9fb8ca;
}

.calculation-card {
  width: min(260px, 78%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.08);
}

.calculation-card small {
  display: block;
  margin-bottom: 5px;
  color: #c9d7e5;
  font-size: 13px;
}

.calculation-card strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
}

.portal-main {
  padding: 32px min(4.6vw, 58px) 34px;
}

.portal-header {
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 31px;
  line-height: 1.12;
}

.portal-header p:last-child {
  max-width: 920px;
  margin: 0;
  color: #314052;
  font-size: 15px;
  line-height: 1.48;
}

.upload-form {
  display: grid;
  gap: 16px;
}

.form-section {
  display: grid;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

h2 {
  margin-bottom: 3px;
  color: var(--brand-strong);
  font-size: 18px;
  line-height: 1.2;
}

label {
  display: grid;
  gap: 8px;
  color: #314052;
  font-size: 13px;
  font-weight: 700;
}

input[type="file"] {
  width: 100%;
  min-height: 46px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #fbfcfe;
  color: var(--ink);
}

input:not([type="file"]) {
  width: 100%;
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

input:not([type="file"]):focus {
  outline: 2px solid rgba(37, 92, 127, 0.16);
  border-color: var(--brand);
}

.upload-status {
  border: 1px solid #cbd6e2;
  border-radius: 8px;
  padding: 13px;
  background: #f4f8fb;
  color: #314052;
  line-height: 1.45;
}

.upload-status.error {
  border-color: #dfb7b5;
  background: #fff5f4;
  color: var(--red);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border: 1px solid #cbd6e2;
  border-radius: 8px;
  padding: 12px 13px;
  background: #fbfcfe;
}

.form-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.primary-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 17px;
  background: var(--brand);
  color: white;
  white-space: nowrap;
}

.primary-button:hover { background: var(--brand-strong); }
.primary-button:disabled { opacity: 0.65; cursor: wait; }

.thank-you-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.thank-you-panel h2 {
  margin-bottom: 12px;
  color: var(--brand-strong);
  font-size: 28px;
}

.thank-you-panel p {
  max-width: 760px;
  margin-bottom: 10px;
  color: #314052;
  font-size: 16px;
  line-height: 1.5;
}

.account-login-form {
  display: grid;
  gap: 12px;
  max-width: 560px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.account-login-form h3 {
  margin: 0;
  color: var(--brand-strong);
  font-size: 19px;
}

.account-login-form p {
  margin-bottom: 2px;
  font-size: 14px;
}

.account-summary {
  margin-bottom: 16px;
}

.account-section {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.account-section + .account-section {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.account-section-head h2 {
  margin: 2px 0 0;
  color: var(--brand-strong);
  font-size: 22px;
}

.account-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.account-tile {
  display: grid;
  align-content: start;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.account-tile-feature {
  border-color: rgba(38, 107, 143, 0.36);
  background: linear-gradient(180deg, #ffffff 0%, #f3f8fb 100%);
}

.account-tile-locked {
  border-color: #d8dde3;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
}

.account-tile-locked .price-box {
  background: #f7fafc;
}

.account-tile h2 {
  margin-bottom: 8px;
}

.account-tile p {
  margin-bottom: 0;
  color: #314052;
  line-height: 1.45;
}

.duration-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.duration-options label {
  position: relative;
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfcfe;
}

.duration-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.duration-options label:has(input:checked) {
  border-color: var(--brand);
  background: #e8f0f5;
  box-shadow: inset 0 0 0 1px var(--brand);
}

.duration-options span,
.price-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.duration-options strong,
.price-box strong {
  color: var(--brand-strong);
  font-size: 22px;
}

.price-box {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 14px;
}

.message-preview {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 14px;
}

.message-preview strong {
  color: var(--brand-strong);
  font-size: 17px;
}

.message-preview span {
  color: var(--muted);
  line-height: 1.4;
}

.account-upload-field {
  display: grid;
  gap: 8px;
  border: 1px dashed #b7c5cf;
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 800;
}

.account-upload-field input {
  width: 100%;
  min-height: 36px;
  color: #314052;
  font-weight: 600;
}

.certificate-upload-list {
  display: grid;
  gap: 8px;
}

.add-certificate-button {
  justify-self: start;
  min-height: 28px;
  margin-top: -2px;
  border: 1px solid #8f98a3;
  border-radius: 2px;
  background: #f0f0f0;
  color: #111827;
  padding: 2px 10px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.add-certificate-button:hover,
.add-certificate-button:focus-visible {
  border-color: #6f7782;
  background: #e7e7e7;
  color: #111827;
}

.tile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 22px;
}

.account-modal[hidden] {
  display: none;
}

.account-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 34, 0.52);
}

.account-modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(780px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(10, 22, 34, 0.26);
  padding: 22px;
}

.account-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.account-modal-head h2 {
  margin: 2px 0 0;
  color: var(--brand-strong);
}

.icon-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #17202a;
  font-size: 26px;
  line-height: 1;
}

.message-form {
  display: grid;
  gap: 14px;
  padding-top: 16px;
}

.message-form textarea {
  resize: vertical;
  min-height: 150px;
}

.message-form select {
  width: 100%;
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
}

.modal-intro {
  margin: 0;
  border-left: 4px solid var(--red);
  background: #fff7f6;
  padding: 14px 16px;
  color: #263548;
  line-height: 1.55;
}

.appointment-modal-panel[data-appointment-type="meeting"] .modal-intro {
  border-left-color: #b43a36;
  background: #fff7f6;
}

.appointment-modal-panel[data-appointment-type="support"] .modal-intro {
  border-left-color: #255c7f;
  background: #f1f7fb;
}

.appointment-modal-panel[data-appointment-type="meeting"] .eyebrow {
  color: #b43a36;
}

.appointment-modal-panel[data-appointment-type="support"] .eyebrow {
  color: #255c7f;
}

.appointment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
  gap: 14px;
}

.appointment-duration-box {
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid #cfd8e3;
  border-right-color: #b8c4d2;
  border-bottom-color: #aebcca;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  padding: 10px 12px;
  box-shadow: var(--shadow-3d);
}

.appointment-duration-box span {
  color: #657080;
  font-size: 13px;
}

.appointment-duration-box strong {
  color: var(--brand-strong);
  font-family: Arial, sans-serif;
  font-size: 18px;
}

.appointment-slots-wrap {
  display: grid;
  gap: 10px;
}

.appointment-slots-wrap h3 {
  margin: 0;
  color: var(--brand-strong);
  font-family: Arial, sans-serif;
  font-size: 16px;
}

.appointment-slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.appointment-slot {
  min-height: 38px;
  border: 1px solid #cfd8e3;
  border-right-color: #b8c4d2;
  border-bottom-color: #aebcca;
  border-radius: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  color: #172333;
  font-family: Arial, sans-serif;
  font-weight: 700;
  box-shadow: 0 8px 14px rgba(23, 35, 51, 0.1), 0 2px 0 rgba(174, 188, 202, 0.45);
}

.appointment-modal-panel[data-appointment-type="meeting"] .appointment-slot.selected {
  border-color: #8f2926;
  background: #b43a36;
  color: #ffffff;
}

.appointment-modal-panel[data-appointment-type="support"] .appointment-slot.selected {
  border-color: #123d5a;
  background: #255c7f;
  color: #ffffff;
}

.appointment-slot.blocked,
.appointment-slot:disabled {
  cursor: not-allowed;
  border-color: #e3b2af;
  background: #fff0ef;
  color: #a13b36;
  text-decoration: line-through;
  opacity: 1;
  box-shadow: none;
}

.appointment-slot-empty {
  margin: 0;
  border: 1px solid #cfd8e3;
  background: #ffffff;
  padding: 12px;
  color: #657080;
}

.downloads-modal-panel {
  width: min(820px, 100%);
}

.downloads-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 18px;
}

.contracts-content {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-page-section .downloads-content {
  padding-top: 0;
}

.info-page-section .download-placeholder {
  min-height: 260px;
}

.download-placeholder {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 230px;
  border: 1px solid #cfd8e3;
  border-right-color: #b8c4d2;
  border-bottom-color: #aebcca;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  padding: 18px;
  box-shadow:
    0 18px 34px rgba(23, 35, 51, 0.16),
    0 4px 0 rgba(174, 188, 202, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.download-placeholder::before {
  content: "";
  width: 38px;
  height: 3px;
  background: #255c7f;
}

.download-placeholder h3 {
  margin: 0;
  color: var(--brand-strong);
  font-size: 20px;
  line-height: 1.22;
}

.download-placeholder p {
  margin: 0;
  color: #263548;
  line-height: 1.55;
}

.download-placeholder .eyebrow {
  color: var(--brand);
}

.download-action {
  align-self: end;
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  margin-top: 8px;
  border: 1px solid #d2d9e1;
  background: #f6f8fa;
  color: #687487;
  font-weight: 800;
  text-decoration: none;
  padding: 0 14px;
}

.contracts-page .creditor-info-card {
  margin-top: 0;
}

.contracts-page .download-placeholder {
  display: flex;
  flex-direction: column;
}

.contracts-page .download-placeholder > p:not(.eyebrow) {
  min-height: 50px;
}

.contracts-page .download-action {
  width: 100%;
  margin-top: auto;
}

.document-list {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px 14px 12px 28px;
  color: #314052;
  line-height: 1.35;
}

.document-list li {
  padding-left: 2px;
}

.secondary-action {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #17202a;
  font-weight: 800;
}

.secondary-action:hover {
  border-color: var(--brand);
  background: #e8f0f5;
  color: var(--brand-strong);
}

.secondary-action:disabled,
.secondary-action.locked-action {
  cursor: not-allowed;
  border-color: #d8dde3;
  background: #eef1f4;
  color: #788696;
}

.secondary-action:disabled:hover,
.secondary-action.locked-action:hover {
  border-color: #d8dde3;
  background: #eef1f4;
  color: #788696;
}

.payment-options.compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.payment-options.compact button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #17202a;
  font-weight: 800;
}

.payment-options.compact button:hover {
  border-color: var(--brand);
  background: #e8f0f5;
  color: var(--brand-strong);
}

@media (max-width: 980px) {
  .portal-shell { grid-template-columns: 1fr; }
  .portal-side {
    position: relative;
    min-height: 170px;
    padding: 20px;
  }
  .case-visual { display: none; }
  .portal-main { padding: 22px 14px 32px; }
}

@media (max-width: 1180px) and (min-width: 721px) {
  .account-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .account-tiles,
  .duration-options,
  .tile-actions,
  .payment-options.compact,
  .downloads-content {
    grid-template-columns: 1fr;
  }
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }
  h1 { font-size: 27px; }
}

/* Angemeldetes Kundenkonto */
.account-page {
  --account-ink: #172333;
  background: #f4f6f8;
  color: var(--account-ink);
  font-family: "Segoe UI Light", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 300;
}

.account-page button,
.account-page input,
.account-page select,
.account-page textarea {
  color: var(--account-ink);
  font-family: "Segoe UI Light", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 300;
}

.account-page h1,
.account-page h2,
.account-page h3,
.account-page .eyebrow,
.account-page strong {
  color: var(--account-ink);
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.account-page p,
.account-page li,
.account-page label,
.account-page small,
.account-page span {
  color: var(--account-ink);
  font-family: "Segoe UI Light", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 300;
}

.account-page .account-shell {
  display: block;
}

.account-page .account-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #d9dfe6;
  padding: 14px max(24px, calc((100vw - 1320px) / 2));
  background: #ffffff;
  color: #17202a;
}

.account-page .account-topbar .case-visual {
  display: none;
}

.account-brand {
  color: var(--account-ink);
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.account-page .portal-main {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 34px 24px 48px;
}

.account-page .account-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: stretch;
  gap: 48px;
  margin-bottom: 22px;
  border-bottom: 1px solid #d9dfe6;
  padding: 12px 0 28px;
}

.account-page .account-hero h1 {
  margin-bottom: 8px;
  color: var(--account-ink);
  font-size: 32px;
  line-height: 1.15;
}

.account-page .account-hero > div > p:last-child {
  font-size: 14px;
  line-height: 1.5;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.account-page .account-summary {
  display: grid;
  align-content: start;
  gap: 8px;
  margin: 0;
  border: 1px solid #cfd8e3;
  border-right-color: #b8c4d2;
  border-bottom-color: #aebcca;
  border-radius: 0;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow: var(--shadow-3d);
}

.account-page .account-summary::before {
  content: "";
  width: 36px;
  height: 3px;
  background: #255c7f;
}

.account-page .account-summary h2 {
  margin: 0;
  color: var(--account-ink);
  font-size: 17px;
  line-height: 1.25;
}

.account-page .account-summary p {
  margin: 0;
  color: var(--account-ink);
  font-family: "Segoe UI Light", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 300;
  text-align: left;
}

.account-page .account-summary p strong {
  font-family: Arial, sans-serif;
  font-weight: 800;
}

.account-page .account-summary .eyebrow {
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.account-page .account-profile-button {
  justify-self: start;
  width: max-content;
  min-height: auto;
  margin-top: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: var(--account-ink);
  box-shadow: none;
  font-family: "Segoe UI Light", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 300;
  text-align: left;
}

.account-page .account-profile-button:hover,
.account-page .account-profile-button:focus-visible {
  background: transparent;
  color: var(--account-ink);
  text-decoration: underline;
}

.profile-modal-panel {
  width: min(860px, 100%);
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-form-grid label:nth-child(4),
.profile-form-grid label:nth-child(7) {
  grid-column: 1 / -1;
}

.profile-form input[readonly] {
  border-color: #d8dee7;
  background: #f3f6f8;
  color: #4a5564;
  cursor: not-allowed;
}

.profile-password-box {
  display: grid;
  gap: 12px;
  border: 1px solid #cfd8e3;
  border-right-color: #b8c4d2;
  border-bottom-color: #aebcca;
  background: #ffffff;
  padding: 14px;
  box-shadow: var(--shadow-3d);
}

.profile-intro,
.profile-upload-field {
  border: 1px solid #cfd8e3;
  border-right-color: #b8c4d2;
  border-bottom-color: #aebcca;
  background: #ffffff;
  box-shadow: var(--shadow-3d);
}

.profile-intro {
  border-left: 1px solid #cfd8e3;
  padding: 14px;
}

.account-page .account-section {
  gap: 16px;
  margin-top: 24px;
}

.account-page .account-section + .account-section {
  margin-top: 36px;
  padding-top: 28px;
}

.account-page .account-service-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.account-page .account-booking-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-page .account-tile {
  min-width: 0;
  min-height: 210px;
  grid-template-rows: auto 1fr auto;
  align-content: stretch;
  gap: 10px;
  border: 1px solid #cfd8e3;
  border-right-color: #b8c4d2;
  border-bottom-color: #aebcca;
  border-radius: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  padding: 14px;
  box-shadow: var(--shadow-3d);
}

.account-page .account-tile::before {
  content: "";
  width: 36px;
  height: 3px;
  background: #255c7f;
}

.account-page .account-tile-feature,
.account-page .account-tile-locked {
  border-color: #d8dee7;
  background: #ffffff;
}

.account-page .account-tile h2 {
  font-size: 17px;
  line-height: 1.25;
}

.account-page .account-tile p,
.account-page .document-list {
  color: var(--account-ink);
  font-family: "Segoe UI Light", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 300;
}

.account-page .account-tile .eyebrow {
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.account-page .secondary-action,
.account-page .payment-options.compact button {
  border-radius: 0;
}

.account-page .account-service-grid .secondary-action {
  width: max-content;
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: var(--account-ink);
  font-family: "Segoe UI Light", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 300;
  text-align: left;
  box-shadow: none;
}

.account-page .account-service-grid .secondary-action:hover,
.account-page .account-service-grid .secondary-action:focus-visible {
  background: transparent;
  color: var(--account-ink);
  text-decoration: underline;
}

.account-search-empty {
  border: 1px solid #d8dee7;
  border-radius: 0;
  background: #ffffff;
  padding: 18px;
  color: #657080;
  text-align: center;
}

.account-page .account-modal-panel,
.account-page .account-modal-head,
.account-page .icon-close,
.account-page .message-form input,
.account-page .message-form textarea,
.account-page .message-form .form-actions,
.account-page .account-upload-field,
.account-page .document-list {
  border-radius: 0;
}

.account-page .message-form .form-actions {
  background: #ffffff;
}

.account-page .message-form .primary-button {
  border: 1px solid #9f2f2b;
  border-bottom-color: #76211f;
  border-radius: 0;
  background: linear-gradient(180deg, #c94440 0%, #b63733 100%);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(185, 55, 51, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.account-page .message-form .primary-button:hover,
.account-page .message-form .primary-button:focus-visible {
  background: linear-gradient(180deg, #d24b47 0%, #9f2f2b 100%);
}

.account-page .product-booking-button {
  width: 100%;
  min-height: 46px;
  border: 1px solid #9f2f2b;
  border-bottom-color: #76211f;
  border-radius: 0;
  background: linear-gradient(180deg, #c94440 0%, #b63733 100%);
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(185, 55, 51, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.account-page .product-booking-button:hover,
.account-page .product-booking-button:focus-visible {
  background: linear-gradient(180deg, #d24b47 0%, #9f2f2b 100%);
}

.account-page :is(
  button,
  input,
  select,
  textarea,
  .primary-button,
  .secondary-action,
  .form-actions,
  .upload-status,
  .thank-you-panel,
  .account-summary,
  .account-tile,
  .duration-options label,
  .price-box,
  .message-preview,
  .account-upload-field,
  .account-modal-panel,
  .icon-close,
  .document-list,
  .download-placeholder,
  .download-action,
  .payment-options.compact button,
  .account-search-empty
) {
  border-radius: 0;
}

:root {
  --page: #ffffff;
  --side: #ffffff;
}

.form-section,
.creditor-info-card,
.thank-you-panel,
.account-summary,
.account-page .account-tile,
.download-placeholder,
.account-modal-panel,
.duration-options label,
.price-box,
.message-preview,
.account-upload-field,
.document-list,
.account-search-empty {
  border: 1px solid #cfd8e3;
  border-right-color: #b8c4d2;
  border-bottom-color: #aebcca;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow: var(--shadow-3d);
}

.account-page .account-hero > div > .eyebrow,
.account-page .account-section-head > .eyebrow {
  color: var(--red);
}

html,
body,
.portal-shell,
.portal-side,
.portal-main,
.account-page,
.account-page .account-topbar,
.account-page .portal-main,
.account-page .account-summary,
.secondary-action:hover,
.secondary-action:disabled,
.secondary-action.locked-action,
.secondary-action:disabled:hover,
.secondary-action.locked-action:hover {
  background: #ffffff;
}

body:not(.account-page) {
  background: #ffffff;
}

body:not(.account-page) .portal-shell {
  grid-template-columns: minmax(300px, 27vw) minmax(0, 1fr);
  background: #ffffff;
}

body:not(.account-page) .portal-side {
  align-content: start;
  grid-template-rows: auto auto auto;
  min-height: 100vh;
  padding: 34px 28px;
  background: #ffffff;
  color: var(--ink);
}

.back-to-account {
  width: max-content;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.back-to-account:hover,
.back-to-account:focus-visible {
  color: var(--red);
  text-decoration: underline;
}

body:not(.account-page) .portal-main {
  padding: 36px clamp(24px, 5vw, 72px) 54px;
}

body:not(.account-page) .portal-header {
  max-width: 1130px;
  margin-bottom: 26px;
}

body:not(.account-page) .eyebrow {
  color: var(--red);
}

body:not(.account-page) .upload-form {
  max-width: 1130px;
}

.creditor-info-card {
  display: grid;
  gap: 10px;
  align-self: start;
  width: min(320px, 100%);
  margin: 37px auto 0;
  border: 1px solid #edf1f5;
  border-radius: 0;
  background: #ffffff;
  padding: 22px;
  box-shadow: 0 10px 22px rgba(23, 32, 42, 0.18), 0 2px 4px rgba(23, 32, 42, 0.08);
}

.creditor-info-card h2 {
  margin: 0;
  color: var(--red);
  font-size: 22px;
  line-height: 1.15;
}

.creditor-info-card p {
  margin: 0;
  color: #314052;
  font-size: 15px;
  line-height: 1.55;
}

.creditor-info-card .info-note {
  border-left: 4px solid var(--red);
  padding: 10px 12px;
  background: #ffffff;
  color: #17202a;
  font-weight: 700;
}

body:not(.account-page) .portal-header p:last-child {
  color: #314052;
}

body:not(.account-page) .form-section,
body:not(.account-page) .form-actions,
body:not(.account-page) .upload-status,
body:not(.account-page) .thank-you-panel,
body:not(.account-page) input[type="file"],
body:not(.account-page) input:not([type="file"]) {
  border-radius: 0;
  background: #ffffff;
}

body:not(.account-page) .form-section,
body:not(.account-page) .form-actions,
body:not(.account-page) .thank-you-panel {
  border-color: #d5dbe3;
  box-shadow: 0 10px 22px rgba(23, 32, 42, 0.18), 0 2px 4px rgba(23, 32, 42, 0.08);
}

body:not(.account-page) .form-section {
  padding: 0;
  overflow: hidden;
}

body:not(.account-page) .form-section h2 {
  padding: 26px 18px 10px;
  color: #173f5c;
}

body:not(.account-page) .upload-field {
  padding: 14px 18px 24px;
}

.creditor-upload-list {
  display: grid;
  gap: 12px;
}

.creditor-upload-list .upload-field + .upload-field {
  border-top: 1px solid #e2e7ec;
  padding-top: 18px;
}

body:not(.account-page) .add-creditor-button {
  width: max-content;
  min-height: 42px;
  margin: 0 18px 24px;
  border: 1px solid #c9d1dc;
  border-bottom-color: #9eaabd;
  border-radius: 0;
  background: #ffffff;
  color: var(--label, #253f55);
  padding: 0 18px;
  font-weight: 800;
  box-shadow: 0 7px 14px rgba(23, 32, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body:not(.account-page) .add-creditor-button:hover,
body:not(.account-page) .add-creditor-button:focus-visible {
  background: #ffffff;
  border-color: #b8c4d0;
}

body:not(.account-page) .add-creditor-button:disabled {
  cursor: wait;
  opacity: 0.55;
  box-shadow: none;
}

body:not(.account-page) input[type="file"] {
  border-color: #d7d7d7;
}

body:not(.account-page) .primary-button {
  border: 1px solid #8f2926;
  border-bottom-color: #6f1d1b;
  border-radius: 0;
  background: var(--red);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(180, 58, 54, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

body:not(.account-page) .primary-button:hover,
body:not(.account-page) .primary-button:focus-visible {
  background: #942b28;
  box-shadow: 0 10px 18px rgba(148, 43, 40, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

@media (max-width: 1240px) {
  .account-page .account-service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .account-page .account-topbar {
    position: relative;
    min-height: 0;
  }

  .account-page .account-hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .account-page .account-service-grid,
  .account-page .account-booking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .account-page .portal-main {
    padding: 24px 14px 36px;
  }

  .account-page .account-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .account-page .account-summary p {
    text-align: left;
  }

  .account-page .account-service-grid,
  .account-page .account-booking-grid {
    grid-template-columns: 1fr;
  }
}

.account-page .add-certificate-button {
  justify-self: start;
  width: auto;
  min-height: 24px;
  margin: -2px 0 0;
  border: 2px outset ButtonBorder;
  border-radius: 0;
  background: ButtonFace;
  color: ButtonText;
  padding: 2px 8px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  box-shadow: none;
}

@media (max-width: 980px) {
  body:not(.account-page) .portal-shell {
    display: grid;
    grid-template-columns: 1fr;
  }

  body:not(.account-page) .portal-side {
    min-height: 0;
    padding: 24px 22px 10px;
  }

  body:not(.account-page) .portal-main {
    min-width: 0;
    padding: 18px 22px 42px;
  }

  body:not(.account-page) .creditor-info-card {
    width: 100%;
    margin: 18px 0 0;
  }

  body:not(.account-page) .portal-header {
    margin-bottom: 18px;
  }
}

@media (max-width: 720px) {
  body:not(.account-page) .brand-logo {
    width: min(205px, 62vw);
  }

  body:not(.account-page) .portal-side {
    padding: 22px 18px 8px;
  }

  body:not(.account-page) .portal-main {
    padding: 16px 18px 36px;
  }

  body:not(.account-page) .portal-header h1 {
    font-size: 31px;
    line-height: 1.12;
  }

  body:not(.account-page) .portal-header p:last-child {
    font-size: 16px;
    line-height: 1.5;
  }

  body:not(.account-page) .downloads-content,
  body:not(.account-page) .contracts-content {
    grid-template-columns: 1fr;
  }

  body:not(.account-page) .info-page-section .download-placeholder,
  body:not(.account-page).contracts-page .download-placeholder {
    min-height: 0;
  }
}

.account-page .add-certificate-button:hover,
.account-page .add-certificate-button:focus-visible {
  border: 2px outset ButtonBorder;
  background: ButtonFace;
  color: ButtonText;
  text-decoration: none;
}

.account-page .account-tile-warning {
  border-color: #e1c3c0;
  background: linear-gradient(180deg, #ffffff 0%, #fff8f7 100%);
}

.account-page .account-tile-warning::before {
  background: #bf2d2d;
}

.account-page .withdrawal-action {
  color: #9f241f !important;
}

.withdrawal-modal-panel {
  max-width: 760px;
}

.withdrawal-notice {
  border: 1px solid #e1c3c0;
  border-left: 4px solid #bf2d2d;
  background: #fff8f7;
  padding: 16px 18px;
  color: #071f3a;
}

.withdrawal-notice h3 {
  margin: 0 0 10px;
  color: #071f3a;
  font-size: 18px;
}

.withdrawal-notice p {
  margin: 0 0 10px;
  color: #24364a;
  line-height: 1.55;
}

.withdrawal-notice p:last-child {
  margin-bottom: 0;
}

.withdrawal-confirm-row {
  align-items: flex-start;
  border: 1px solid #cfd8e3;
  background: #ffffff;
  padding: 12px 14px;
  font-weight: 800;
}

.withdrawal-submit-button {
  background: linear-gradient(180deg, #bf2d2d 0%, #9f241f 100%) !important;
}

.withdrawal-page .portal-main {
  padding-bottom: 96px;
}

.public-withdrawal-section {
  max-width: 860px;
}

.public-withdrawal-form {
  display: grid;
  gap: 18px;
}

.public-withdrawal-form .form-actions .secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
}

/* 20261007-mobile-profile-modal-scroll */
@media (max-width: 720px) {
  .account-page .account-modal {
    align-items: start;
    justify-items: center;
    place-items: start center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: max(42px, env(safe-area-inset-top, 0px) + 28px) 12px max(96px, env(safe-area-inset-bottom, 0px) + 72px);
  }

  .account-page .account-modal-panel,
  .account-page .profile-modal-panel {
    width: 100%;
    max-height: none;
    overflow: visible;
    margin: 0 auto;
    padding: 18px 14px 24px;
  }

  .account-page .account-modal-head {
    position: static;
    padding-top: 4px;
  }

  .account-page .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .account-page .message-form .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 18px -14px -24px;
    padding: 14px;
    border-top: 1px solid #cfd8e3;
    background: #fff;
    box-shadow: 0 -10px 22px rgba(7, 31, 58, 0.10);
  }

  .account-page .message-form .form-actions button {
    width: 100%;
    min-height: 46px;
  }
}

/* 20261007-profile-fullscreen-modal */
@media (max-width: 720px) {
  body.account-page.profile-modal-open {
    overflow: hidden !important;
    height: 100dvh;
    touch-action: none;
  }

  body.account-page.profile-modal-open .portal-shell {
    overflow: hidden !important;
  }

  .account-page #profileModal.account-modal {
    position: fixed;
    inset: 0;
    z-index: 2147482000;
    display: block;
    padding: 0;
    overflow: hidden;
    touch-action: auto;
  }

  .account-page #profileModal.account-modal[hidden] {
    display: none !important;
  }

  .account-page #profileModal .account-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 34, 0.52);
  }

  .account-page #profileModal .account-modal-panel,
  .account-page #profileModal .profile-modal-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    top: max(28px, env(safe-area-inset-top, 0px) + 18px);
    bottom: max(16px, env(safe-area-inset-bottom, 0px) + 12px);
    width: auto;
    max-height: none;
    margin: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 18px 14px 22px;
  }

  .account-page #profileModal .account-modal-head {
    position: sticky;
    top: 0;
    z-index: 3;
    margin: -18px -14px 16px;
    padding: 18px 14px 14px;
    background: #fff;
  }

  .account-page #profileModal .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .account-page #profileModal .message-form .form-actions {
    position: static !important;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 18px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid #cfd8e3;
    box-shadow: none;
    background: #fff;
  }

  .account-page #profileModal .message-form .form-actions button {
    width: 100%;
    min-height: 46px;
  }
}

/* 20261007-profile-button-erreichbar */
@media (max-width: 720px) {
  .account-page #profileModal .account-modal-panel,
  .account-page #profileModal .profile-modal-panel {
    bottom: max(34px, env(safe-area-inset-bottom, 0px) + 28px);
    padding-bottom: max(96px, env(safe-area-inset-bottom, 0px) + 84px);
    scroll-padding-bottom: 140px;
  }

  .account-page #profileModal .message-form .form-actions {
    margin-bottom: max(26px, env(safe-area-inset-bottom, 0px) + 20px);
    padding-bottom: 8px;
  }

  .account-page #profileSaveButton {
    margin-bottom: 4px;
  }
}


/* 20261007-mobile-message-modal-scroll: make message compose behave like personal account modal */
@media (max-width: 720px) {
  body.account-page.message-modal-open {
    overflow: hidden !important;
    height: 100dvh;
    touch-action: none;
  }

  body.account-page.message-modal-open .portal-shell {
    overflow: hidden !important;
  }

  .account-page #messageModal.account-modal {
    position: fixed;
    inset: 0;
    z-index: 2147482000;
    display: block;
    padding: 0;
    overflow: hidden;
    touch-action: auto;
  }

  .account-page #messageModal.account-modal[hidden] {
    display: none !important;
  }

  .account-page #messageModal .account-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 34, 0.52);
  }

  .account-page #messageModal .account-modal-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    top: max(28px, env(safe-area-inset-top, 0px) + 18px);
    bottom: max(34px, env(safe-area-inset-bottom, 0px) + 28px);
    width: auto;
    max-height: none;
    margin: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 18px 14px max(96px, env(safe-area-inset-bottom, 0px) + 84px);
    scroll-padding-bottom: 140px;
  }

  .account-page #messageModal .account-modal-head {
    position: sticky;
    top: 0;
    z-index: 3;
    margin: -18px -14px 16px;
    padding: 18px 14px 14px;
    background: #fff;
  }

  .account-page #messageModal .message-form {
    padding-top: 0;
  }

  .account-page #messageModal .message-form textarea {
    min-height: 180px;
  }

  .account-page #messageModal .message-form .form-actions {
    position: static !important;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 18px 0 max(26px, env(safe-area-inset-bottom, 0px) + 20px);
    padding: 14px 0 8px;
    border-top: 1px solid #cfd8e3;
    box-shadow: none;
    background: #fff;
  }

  .account-page #messageModal .message-form .form-actions button {
    width: 100%;
    min-height: 46px;
  }
}


/* 20261007-message-like-profile: message modal uses exactly the same mobile mechanics as personal account */
@media (max-width: 720px) {
  body.account-page.message-modal-open {
    overflow: hidden !important;
    height: 100dvh;
    touch-action: none;
  }

  body.account-page.message-modal-open .portal-shell {
    overflow: hidden !important;
  }

  .account-page #messageModal.account-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147482000 !important;
    display: block !important;
    padding: 0 !important;
    overflow: hidden !important;
    touch-action: auto !important;
  }

  .account-page #messageModal.account-modal[hidden] {
    display: none !important;
  }

  .account-page #messageModal .account-modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(10, 22, 34, 0.52) !important;
  }

  .account-page #messageModal .account-modal-panel,
  .account-page #messageModal .profile-modal-panel,
  .account-page #messageModal .message-modal-panel {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    top: max(28px, env(safe-area-inset-top, 0px) + 18px) !important;
    bottom: max(34px, env(safe-area-inset-bottom, 0px) + 28px) !important;
    width: auto !important;
    max-height: none !important;
    margin: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    padding: 18px 14px max(96px, env(safe-area-inset-bottom, 0px) + 84px) !important;
    scroll-padding-bottom: 140px !important;
  }

  .account-page #messageModal .account-modal-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 3 !important;
    margin: -18px -14px 16px !important;
    padding: 18px 14px 14px !important;
    background: #fff !important;
  }

  .account-page #messageModal .message-form {
    padding-top: 0 !important;
  }

  .account-page #messageModal .message-form .form-actions {
    position: static !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin: 18px 0 max(26px, env(safe-area-inset-bottom, 0px) + 20px) !important;
    padding: 14px 0 8px !important;
    border-top: 1px solid #cfd8e3 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .account-page #messageModal .message-form .form-actions button {
    width: 100% !important;
    min-height: 46px !important;
  }
}
