:root {
  --bg: #eef2f7;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #516079;
  --line: #d7deea;
  --brand: #0f766e;
  --brand-2: #0b5f59;
  --danger: #b42318;
  --nav-bg: #f6f8fc;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 500px at 8% -5%, #c6efe7 0%, rgba(198, 239, 231, 0) 60%),
    radial-gradient(900px 420px at 95% 0%, #d9e5ff 0%, rgba(217, 229, 255, 0) 58%),
    var(--bg);
}

.wrap {
  width: min(1180px, 94vw);
  margin: 0 auto;
  padding: 28px 0 36px;
}

.login-shell {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}

.login-panel {
  background: linear-gradient(145deg, #0f172a 0%, #172137 60%, #1a2a41 100%);
  color: #f3f8ff;
  border-radius: 22px;
  padding: 38px;
  box-shadow: 0 20px 44px rgba(8, 15, 36, 0.28);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9dc8ff;
}

.login-panel h1 {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.02;
}

.login-copy {
  margin: 14px 0 24px;
  max-width: 54ch;
  color: #d2dcee;
  font-size: 17px;
  line-height: 1.5;
}

.login-btn {
  width: 100%;
  min-width: 0;
  max-width: 360px;
  text-align: center;
  font-size: 18px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(165deg, #16a394, #0f766e 55%, #0b5f59);
  box-shadow: 0 10px 26px rgba(14, 122, 115, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.login-btn:active {
  transform: translateY(0);
}

.login-art {
  border-radius: 22px;
  border: 1px solid #d7dfef;
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.18), rgba(11, 95, 89, 0.06)),
    repeating-linear-gradient(145deg, #ffffff, #ffffff 16px, #f4f8ff 16px, #f4f8ff 32px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), 0 12px 34px rgba(30, 55, 92, .12);
}

.topbar {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.brand strong { font-size: 17px; }

.brand-sub {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn,
.btn-link {
  border-radius: 999px;
  padding: 10px 15px;
  font-weight: 700;
  font-size: 14px;
}

.nav-btn {
  width: auto;
  border: 1px solid var(--line);
  color: #253148;
  background: var(--nav-bg);
}

.nav-btn.active {
  color: #fff;
  border-color: var(--brand);
  background: linear-gradient(160deg, var(--brand), var(--brand-2));
}

.nav-btn.locked {
  opacity: .65;
  cursor: not-allowed;
}

.user-chip {
  font-size: 13px;
  color: #253148;
  background: #eef3fb;
  border: 1px solid #d8e2f2;
  padding: 8px 12px;
  border-radius: 999px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin: 14px 0;
  box-shadow: 0 8px 28px rgba(16, 24, 40, 0.06);
}

.card.soft {
  background: #f8fbff;
  box-shadow: none;
}

.hidden { display: none; }

h2 { margin: 0 0 8px; }
h3 { margin: 10px 0; }

label { display: block; margin: 12px 0; font-weight: 600; }
.address-grid {
  display: grid;
  grid-template-columns: 1.6fr .8fr 0.8fr 1.2fr;
  gap: 10px;
}

input, textarea, button {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #8db9ff;
  box-shadow: 0 0 0 4px rgba(91, 157, 255, .16);
}

button {
  background: linear-gradient(160deg, var(--brand), var(--brand-2));
  color: #fff;
  border: 0;
  cursor: pointer;
  font-weight: 700;
}

button:hover { filter: brightness(.97); }
button:disabled { opacity: .6; cursor: not-allowed; }

.btn-secondary { background: linear-gradient(160deg, #5a6a86, #435270); }
.btn-danger,
.danger-link { background: linear-gradient(160deg, #c83c33, var(--danger)); }

.btn-link {
  display: inline-block;
  color: #fff;
  text-decoration: none;
}

.buttons-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin-top: 12px;
}

.review-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 16px;
}

.preview-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 380px;
  padding: 8px;
  background: #fff;
}

.preview-box img {
  width: 100%;
  height: 100%;
  max-height: 500px;
  object-fit: contain;
}

.account-list { display: grid; gap: 10px; margin: 10px 0; }

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  font-weight: 400;
  flex-wrap: wrap;
}

.account-row input { width: auto; margin: 0; }
.account-row button { width: auto; margin: 0; }

.opt-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.opt-check input { width: auto; margin: 0; }

.table-wrap { overflow-x: auto; }

th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
}

.sum { font-size: 18px; }
.muted { color: var(--muted); }
.status { display: inline-block; margin-top: 10px; color: var(--muted); }
.dsgvo-list { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.dsgvo-list li { color: #1e293b; line-height: 1.45; }

pre {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
}

#signaturePad {
  width: 100%;
  max-width: 920px;
  height: 220px;
  background: #fff;
  border: 2px dashed #b9c7df;
  border-radius: 12px;
  touch-action: none;
}


.final-confirm-check {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.final-confirm-check input {
  width: auto;
  margin: 3px 0 0;
}

.final-confirm-check span {
  line-height: 1.45;
  color: #0f172a;
}

#pdfPreviewWrap {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

#pdfPreviewFrame {
  width: min(900px, 100%);
  height: 640px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.final-submit-btn {
  margin-top: 16px;
  width: 100%;
  white-space: pre-line;
  text-align: left;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid #2f7a3f;
  background: #1f8b3f;
  color: #fff;
  font-weight: 700;
  line-height: 1.4;
}

.final-submit-btn:hover {
  background: #177133;
}

.final-submit-btn:disabled {
  background: #9aa4b2;
  border-color: #8792a2;
  cursor: not-allowed;
}

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-art { min-height: 180px; }
  .review-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .wrap { width: min(1180px, 96vw); padding-top: 14px; }
  .topbar { flex-direction: column; align-items: stretch; }
  .topbar-actions { flex-wrap: wrap; }
  .nav-btn, .btn-link { flex: 1 1 auto; text-align: center; }
  .user-chip { max-width: 100%; }
  .buttons-row { grid-template-columns: 1fr; }
  .address-grid { grid-template-columns: 1fr; }
  .login-panel { padding: 24px; }
}
