@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/ibm-plex-mono-400.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/ibm-plex-mono-500.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Lora';font-style:italic;font-weight:500;font-display:swap;src:url(/fonts/lora-500-italic.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Lora';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/lora-400.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Lora';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/lora-400.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Poppins';font-style:normal;font-weight:300;font-display:swap;src:url(/fonts/poppins-300.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Poppins';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/poppins-400.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Poppins';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/poppins-500.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Poppins';font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/poppins-600.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
:root {
  --navy: #0a1628;
  --gold: #c9a84c;
  --bg: #f8f6f1;
  --line: #e5dfd4;
  --muted: #687380;
  --card: #fff;
  --soft: #f5f3ee;
  color: var(--navy);
  background: var(--bg);
  font:
    400 15px/1.65 Poppins,
    system-ui,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
header {
  border-bottom: 1px solid var(--line);
  padding: 22px max(24px, calc((100vw - 1160px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  font:
    500 26px Lora,
    Georgia,
    serif;
  gap: 10px;
  border-top: 1px solid var(--gold);
  padding-top: 8px;
}
.brand span {
  font-size: 36px;
  border-right: 1px solid var(--gold);
  padding-right: 10px;
}
.brand i {
  font-style: normal;
  color: var(--gold);
}
.brand small {
  font:
    8px "IBM Plex Mono",
    monospace;
  display: block;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
main {
  max-width: 1160px;
  margin: auto;
  padding: 42px 24px 80px;
}
h1 {
  font:
    300 clamp(28px, 4vw, 42px) / 1.3 Poppins,
    system-ui;
  text-transform: uppercase;
  margin: 9px 0 18px;
}
h1 em {
  font:
    italic 500 1em Lora,
    Georgia;
  text-transform: none;
  color: #a58b40;
}
h2 {
  font:
    500 25px/1.35 Lora,
    Georgia;
  margin: 0 0 13px;
}
h3 {
  font-size: 16px;
  margin: 0 0 8px;
  font-weight: 500;
}
p {
  margin: 8px 0 18px;
}
.eyebrow {
  font:
    12px "IBM Plex Mono",
    monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 12px;
}
.eyebrow:before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 14px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  margin-bottom: 22px;
}
.navy {
  background: var(--navy);
  color: white;
}
.navy .muted {
  color: #c6ced8;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.grid > .card {
  margin-bottom: 0;
}
.stack > * + * {
  margin-top: 18px;
}
.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 20px;
  text-decoration: none;
  font:
    500 12px "IBM Plex Mono",
    monospace;
  letter-spacing: 0.04em;
  min-height: 44px;
}
.primary {
  background: var(--gold);
  border-color: var(--gold);
}
.navy button {
  color: white;
  border-color: #657083;
}
.text {
  border: 0;
  padding: 8px 0;
  text-decoration: underline;
}
.small {
  font-size: 13px;
}
.muted {
  color: var(--muted);
}
.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.between {
  justify-content: space-between;
}
.mt {
  margin-top: 22px;
}
.badge {
  font:
    12px "IBM Plex Mono",
    monospace;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  display: inline-block;
  background: var(--soft);
}
.badge.ok {
  color: #286047;
  background: #edf6ee;
}
.badge.warn {
  color: #8e5324;
  background: #fff3e7;
}
.note {
  padding: 16px 18px;
  border-left: 3px solid var(--gold);
  background: var(--soft);
  border-radius: 0 10px 10px 0;
  font-size: 14px;
}
.error {
  color: #9e3529;
  background: #fff0ec;
  padding: 14px;
  border-radius: 9px;
  margin: 14px 0;
  overflow-wrap: anywhere;
}
.success {
  color: #256145;
  background: #edf6ee;
  padding: 14px;
  border-radius: 9px;
  margin: 14px 0;
}
label {
  display: block;
  font-size: 14px;
  margin: 16px 0 6px;
}
input:not([type="checkbox"]),
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: inherit;
  padding: 12px 14px;
}
textarea {
  min-height: 120px;
  resize: vertical;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
  flex-shrink: 0;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.check input {
  margin-top: 3px;
}
.fieldrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.status-list > div,
.list-item {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.status-list > div:last-child,
.list-item:last-child {
  border-bottom: 0;
}
.status-list > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.mono,
code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}
nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0;
}
nav button[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}
.nav-tag {
  font-size: 10px;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 6px;
  background: #fff6db;
  color: #594418;
  border: 1px solid var(--gold);
}
nav button[aria-pressed="true"] .nav-tag {
  background: var(--gold);
  color: var(--navy);
}
.amount {
  font: 300 30px Poppins;
  letter-spacing: -0.04em;
}
.hidden,
[hidden] {
  display: none !important;
}
details > summary {
  cursor: pointer;
  list-style-position: outside;
  font-weight: 500;
}
details > div {
  margin-top: 20px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  width: min(650px, calc(100% - 32px));
  max-height: 90dvh;
  overflow: auto;
  color: var(--navy);
  background: var(--card);
}
dialog::backdrop {
  background: #0a1628b5;
}
dialog h2 {
  margin-top: 14px;
}
.close {
  float: right;
  padding: 8px;
  width: 44px;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th,
.table td {
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: top;
}
.scroll {
  overflow: auto;
}
.empty {
  text-align: center;
  padding: 38px 20px;
}
.split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}
footer {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: var(--muted);
  font-size: 12px;
}
.access {
  max-width: 560px;
  margin: 40px auto;
}
.codebox {
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-wrap: anywhere;
}
#flash:empty {
  display: none;
}
.bankline {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin-top: 14px;
}
.bankline .amount {
  font-size: 25px;
}
.sandbox-notice {
  background: #fff6db;
  color: #594418;
  border: 1px solid var(--gold);
  border-left-width: 5px;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0 0 22px;
  overflow-wrap: anywhere;
}
.sandbox-notice strong {
  display: inline-block;
  margin-bottom: 6px;
}
.sandbox-notice p {
  margin: 0;
  font-size: 13px;
}
.sandbox-badge {
  background: #fff6db;
  border-color: var(--gold);
  color: #594418;
}
.bank-balance-label {
  margin: 14px 0 0;
}
.bankline .amount {
  margin-top: 0;
}
.bank-transaction strong,
.bank-transaction p {
  overflow-wrap: anywhere;
}
#bank-account-filter {
  margin-bottom: 18px;
}
.group-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.group-item {
  display: block;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: var(--soft);
}
.group-item strong {
  display: block;
  font: 500 17px Lora, Georgia, serif;
  margin-bottom: 6px;
}
.group-item:hover {
  border-color: var(--gold);
}
.consent-text {
  font: 400 14px/1.6 Lora, Georgia, serif;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  max-height: 40dvh;
  overflow: auto;
  white-space: pre-wrap;
}
.consent .actions,
.hint .actions {
  margin-top: 12px;
}
.consent p {
  margin: 4px 0 6px;
}
.text.mt {
  margin-top: 12px;
  min-height: 0;
}
@media (max-width: 700px) {
  main {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
  nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    margin: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    gap: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #fffdfa;
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px #0a162814;
  }
  nav button {
    border: 0;
    border-radius: 10px;
    min-height: 52px;
    padding: 8px 2px;
    font-size: 10px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  nav button[aria-pressed="true"] {
    background: var(--navy);
    color: white;
  }
  .nav-tag {
    display: none;
  }
  #content > .row.between:first-child {
    margin-bottom: 22px;
  }
  .group-list {
    grid-template-columns: 1fr;
  }
  dialog {
    width: calc(100% - 20px);
    max-height: 92dvh;
    padding: 20px;
  }
  h1 {
    font-size: 26px;
  }
}
@media (max-width: 700px) {
  header {
    padding: 18px 20px;
  }
  .brand {
    font-size: 21px;
  }
  .brand span {
    font-size: 28px;
  }
  main {
    padding: 28px 20px 70px;
  }
  .grid,
  .split,
  .fieldrow {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 21px;
  }
  .status-list > div {
    flex-direction: column;
    gap: 5px;
  }
  .desktop-only {
    display: none;
  }
  .actions .btn,
  .actions button {
    flex: 1;
  }
  .table {
    min-width: 550px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* Vertragsstatus-Reiter */
.subnav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.subnav button {
  font-size: 13px;
}
.subnav button[aria-selected="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}
.subnav .count {
  font: 11px "IBM Plex Mono", monospace;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--navy);
}
.subnav button[aria-selected="true"] .count {
  background: var(--gold);
}
.card.cancelled {
  opacity: 0.88;
  border-style: dashed;
}
.card.cancelled .amount {
  color: #6b6b6b;
}
.badge.muted-badge {
  color: #6b6b6b;
  background: #f1efea;
}
.onboarding-list .list-item:last-child {
  border-bottom: 1px solid var(--line);
}

.consent-text.legal {
  white-space: normal;
  max-height: 55dvh;
}
.consent-text.legal h2 { font: 600 18px/1.3 Poppins, sans-serif; margin: 0 0 12px; }
.consent-text.legal h3 { font: 600 15px/1.3 Poppins, sans-serif; margin: 18px 0 6px; }
.consent-text.legal h4 { font: 600 14px/1.3 Poppins, sans-serif; margin: 14px 0 4px; }
.consent-text.legal h5, .consent-text.legal h6 { font: 600 13px/1.3 Poppins, sans-serif; margin: 10px 0 4px; color: #4a4a4a; }
.consent-text.legal p { margin: 0 0 8px; }
.consent-text.legal ul { margin: 4px 0 10px; padding-left: 20px; columns: 2; column-gap: 24px; }
.consent-text.legal ul li { break-inside: avoid; margin: 0 0 2px; }
@media (max-width: 700px) { .consent-text.legal ul { columns: 1; } }

/* Vorgangsverfolgung */
.vorgang { padding: 16px 0; }
.vorgang-head { display: flex; gap: 16px; align-items: flex-start; }
.vorgang-art { flex: 0 0 96px; width: 96px; height: 64px; }
.vorgang-body { flex: 1; min-width: 0; }
.vorgang-now { margin: 6px 0 4px; font: 500 15px/1.45 Poppins, sans-serif; color: var(--navy); }
.vorgang-meta { margin-top: 8px; }
.activity .live { white-space: nowrap; }
.activity .live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2f8f5b; margin-right: 6px; animation: pulse 1.6s ease-in-out infinite; }
.recent { margin-top: 12px; }
.recent summary { cursor: pointer; font-size: 13px; color: #6b6b6b; }
.tracker { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 0; }
.tracker .step { flex: 1; position: relative; text-align: center; font-size: 12px; padding-top: 18px; }
.tracker .step::before { content: ""; position: absolute; top: 6px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.tracker .step:first-child::before { display: none; }
.tracker .step.done::before, .tracker .step.active::before { background: var(--gold); }
.tracker .dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--paper, #fff); border: 2px solid var(--line); }
.tracker .step.done .dot { background: var(--gold); border-color: var(--gold); }
.tracker .step.active .dot { border-color: var(--gold); box-shadow: 0 0 0 0 rgba(201,168,76,.55); animation: ring 1.6s ease-out infinite; }
.tracker .step.error .dot { border-color: #b3412c; background: #b3412c; }
.tracker .label { display: block; color: var(--navy); }
.tracker .step.todo .label { color: #9a9a9a; }
.tracker .when { display: block; color: #8a8a8a; font-size: 11px; margin-top: 2px; }
.consent-progress { margin: 6px 0 4px; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(201,168,76,.55); } 100% { box-shadow: 0 0 0 10px rgba(201,168,76,0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
/* animierte Statusgrafiken (SVG) */
.art { width: 96px; height: 64px; fill: none; stroke: var(--navy); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.art-envelope { animation: float 2.4s ease-in-out infinite; }
.art-trail line { stroke: var(--gold); animation: trail 1.2s linear infinite; }
.art-trail line:nth-child(2) { animation-delay: .3s; } .art-trail line:nth-child(3) { animation-delay: .6s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes trail { 0% { transform: translateX(8px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateX(-14px); opacity: 0; } }
.art-received .art-tray { fill: #fff6db; stroke: var(--gold); }
.art-received .art-check, .art-done .art-check { stroke: var(--navy); stroke-width: 3.5; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 1.1s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.art-working .art-head, .art-working .art-body { stroke: var(--navy); }
.art-working .art-dots circle { fill: var(--gold); stroke: none; animation: pulse 1.2s ease-in-out infinite; }
.art-working .art-dots circle:nth-child(2) { animation-delay: .2s; } .art-working .art-dots circle:nth-child(3) { animation-delay: .4s; }
.art-done .art-ring { stroke: var(--gold); fill: #fff6db; }
.art-done .art-spark circle { fill: var(--gold); stroke: none; animation: spark 1.8s ease-in-out infinite; }
.art-done .art-spark circle:nth-child(2) { animation-delay: .4s; } .art-done .art-spark circle:nth-child(3) { animation-delay: .8s; } .art-done .art-spark circle:nth-child(4) { animation-delay: 1.2s; }
@keyframes spark { 0%,100% { opacity: 0; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.3); } }
.art-attention .art-tri { fill: #fff3e7; stroke: #b3412c; animation: pulse 1.6s ease-in-out infinite; }
.art-attention line, .art-attention circle { stroke: #b3412c; }
.art-waiting .art-ring { stroke: var(--gold); }
.art-waiting .art-hand { transform-origin: 48px 32px; transform-box: view-box; }
.art-waiting .art-hand-min { animation: spin 6s linear infinite; }
.art-waiting .art-hand-hour { animation: spin 72s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.art-calm .art-wave { stroke: var(--gold); animation: wave 3s ease-in-out infinite; }
.art-calm .art-wave-2 { opacity: .5; animation-delay: .6s; }
.art-calm .art-sun { fill: #fff6db; stroke: var(--gold); }
@keyframes wave { 0%,100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .art *, .tracker .dot, .activity .live::before { animation: none !important; } }
@media (max-width: 700px) {
  .vorgang-art { flex-basis: 64px; width: 64px; height: 44px; }
  .art { width: 64px; height: 44px; }
  .tracker .step { font-size: 11px; }
  .tracker .when { display: none; }
}

/* Interaktive Vorgänge */
.vorgang[data-open] { cursor: pointer; transition: background .15s; border-radius: 12px; margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
.vorgang[data-open]:hover, .vorgang[data-open]:focus-visible { background: var(--soft); outline: none; }
.vorgang-foot { margin-top: 10px; flex-wrap: wrap; gap: 8px; }
.vorgang-actions { display: flex; gap: 6px; align-items: center; }
button.mini { font-size: 12px; padding: 5px 10px; }
.vorgang-text { white-space: pre-wrap; }
.timeline { list-style: none; margin: 8px 0 16px; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 12px 14px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; }
.timeline li:last-child::before { animation: ring 1.6s ease-out infinite; }
.tl-when { display: block; font: 11px "IBM Plex Mono", monospace; color: #8a8a8a; }
.bubble { background: var(--soft); border-radius: 14px; padding: 12px 14px; margin: 6px 0; white-space: pre-wrap; font-size: 14px; }
.bubble.me { background: #fff6db; border: 1px solid #efe1b6; }
.feedback { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.chip { font-size: 12px; padding: 6px 12px; border-radius: 999px; }
#dialog h3 { font: 600 14px Poppins, sans-serif; margin: 16px 0 6px; }

/* v0.6 – Antworten von NC Finance, Schadenfälle, Hinweise aus Umsätzen */
.badges { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge.new { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 600; animation: pulse 2s ease-in-out infinite; }
.conversation { display: flex; flex-direction: column; gap: 8px; }
.bubble.nc { background: var(--navy); color: #f8f6f1; align-self: flex-start; margin-right: 12%; border-radius: 14px 14px 14px 4px; padding: 10px 14px; }
.bubble.nc .muted { color: rgba(248, 246, 241, 0.72); }
.conversation .bubble.me { align-self: flex-end; margin-left: 12%; border-radius: 14px 14px 4px 14px; }
.claims .claim.open { border-left: 3px solid var(--gold); }
.claims .claim.closed { opacity: 0.8; }
.hint-managed { color: #2f6b3f; }
.hint-external { color: #8a6a12; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .badge.new { animation: none; } }
.files { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; }
.files li { padding: 2px 0; }
input[type=file] { width: 100%; padding: 10px; border: 1px dashed var(--gold); border-radius: 12px; background: #fffdf6; }
/* v0.8 – Beta, Login mit Passwort, Web-App */
.beta-badge {
  margin-left: auto;
  font: 500 10px "IBM Plex Mono", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  background: #c9a84c33;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 3px 9px;
}
.beta-badge[hidden] { display: none; }
header { padding-top: max(22px, calc(env(safe-area-inset-top) + 10px)); }
.login-alt {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.install-hint {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px dashed var(--gold);
  border-radius: 12px;
  background: #fffdfa;
}
.install-hint p { margin: 6px 0 0; }
footer p { margin: 4px 0; }
footer a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.legal-page h1 { margin-bottom: 8px; }
.legal-page h2 { margin-top: 28px; font-size: 18px; }
.legal-page p, .legal-page li { line-height: 1.6; }
.legal-page .back { display: inline-block; margin-bottom: 18px; }
input, select, textarea { font-size: 16px; } /* verhindert Auto-Zoom auf dem iPhone */
@media (max-width: 700px) {
  main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
  header { padding-top: max(18px, calc(env(safe-area-inset-top) + 8px)); }
  .beta-badge { font-size: 9px; padding: 2px 7px; }
}
.brand-link { text-decoration: none; color: inherit; }
@media (max-width: 700px) { .access { margin: 8px auto 24px; } }
/* v0.9 – Portal-Chat */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chat-card { display: flex; flex-direction: column; }
.chat-log { display: flex; flex-direction: column; gap: 8px; max-height: min(60vh, 560px); overflow-y: auto; padding: 8px 2px 12px; margin: 12px 0; scroll-behavior: smooth; }
.chat-log .bubble { max-width: 88%; }
.chat-log .bubble.me { align-self: flex-end; border-radius: 14px 14px 4px 14px; }
.chat-log .bubble.nc { align-self: flex-start; }
.chat-log .bubble.team { background: #1d3354; border-left: 3px solid var(--gold); }
.chat-log .bubble.pending { opacity: 0.6; }
.chat-system { align-self: center; text-align: center; color: var(--muted); background: #fffdfa; border: 1px dashed var(--line); border-radius: 999px; padding: 6px 14px; max-width: 92%; }
.chat-form { display: flex; gap: 10px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 12px; }
.chat-form textarea { flex: 1; min-height: 48px; max-height: 160px; resize: vertical; margin: 0; }
.chat-form button { flex: none; }
.typing { display: inline-flex; gap: 5px; padding: 14px 16px !important; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: #f8f6f1; opacity: 0.4; animation: typing 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 700px) {
  .chat-log { max-height: calc(100dvh - 330px - env(safe-area-inset-bottom)); }
  .chat-form { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); background: #fff; }
}
@media (prefers-reduced-motion: reduce) { .typing span { animation: none; } }

/* Signature pad */
.sig-field { margin-top: 14px; }
.sig-field .row { align-items: center; }
.sig-field label { margin: 0; }
.sig-box { position: relative; height: 180px; margin-top: 6px; background: #fff; border: 1.5px dashed #9aa7b8; border-radius: 12px; touch-action: none; overflow: hidden; }
.sig-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sig-hint { position: absolute; left: 0; right: 0; top: 42%; text-align: center; color: #8a96a8; font-size: 15px; pointer-events: none; }
.sig-hint[hidden] { display: none; }
.sig-line { position: absolute; left: 7%; right: 7%; bottom: 36px; border-bottom: 1px solid #c5ced9; pointer-events: none; }
.sig-box.sig-missing { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192, 57, 43, .15); }
@media (orientation: landscape) and (max-height: 500px) { .sig-box { height: 150px; } }
.dialog-flash { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #fdecea; color: #8a1f14; font-size: 14px; }
.consent-option { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #faf8f3; }
.consent-option .small { color: #5b6677; }
.erstinfo { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.erstinfo summary { cursor: pointer; font-weight: 600; }
.erstinfo .consent-text { margin-top: 10px; max-height: 320px; overflow: auto; }
.pitch-box { margin: 4px 0 14px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, #0a1628, #1b2d4a); color: #fff; }
.pitch-box .pitch li { color: #fff; }
.pitch { list-style: none; margin: 8px 0 0; padding: 0; }
.pitch li { position: relative; padding-left: 26px; margin: 6px 0; font-size: 15px; line-height: 1.4; }
.pitch li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: #c9a84c; color: #0a1628; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.consent-option { border-color: #c9a84c; border-width: 1.5px; }
.consent-option .eyebrow { margin-bottom: 4px; }
.consent-option .fine { margin-top: 8px; }
.consent-option .fine summary { cursor: pointer; font-size: 13px; color: #5b6677; }
/* Le Cercle */
.cercle-card { border-radius: 18px; padding: 24px; min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; box-shadow: 0 12px 32px rgba(10, 22, 40, .14); position: relative; overflow: hidden; }
.cercle-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .28) 50%, transparent 60%); pointer-events: none; }
.cercle-card.perlmutt { background: linear-gradient(135deg, #fbf9f4, #ece6f0 45%, #e3eef0 70%, #f6efe4); color: var(--navy); }
.cercle-card.silber { background: linear-gradient(135deg, #f1f2f4, #c7ccd3 50%, #eef0f2); color: var(--navy); }
.cercle-card.gold { background: linear-gradient(135deg, #e9d59a, var(--gold) 50%, #a88a36); color: var(--navy); }
.cercle-card.schwarz { background: linear-gradient(135deg, #1a2436, var(--navy) 60%, #000); color: #f8f6f1; }
.cercle-card.schwarz .cercle-brand, .cercle-card.schwarz .cercle-tier { color: var(--gold); }
.cercle-brand { font-family: "Lora", serif; font-style: italic; font-size: 1.35rem; letter-spacing: .02em; }
.cercle-tier { font-family: "IBM Plex Mono", monospace; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; }
.cercle-points { font-size: 1rem; }
.cercle-points .mono { font-size: 2.2rem; font-weight: 500; margin-right: 6px; }
.cercle-foot { opacity: .8; }
.cercle-hero { font-family: "Lora", serif; font-weight: 400; margin: 8px 0; }
.cercle-bar { appearance: none; width: 100%; height: 10px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); overflow: hidden; margin: 12px 0; }
.cercle-bar::-webkit-progress-bar { background: var(--soft); }
.cercle-bar::-webkit-progress-value { background: linear-gradient(90deg, var(--gold), #e2c774); }
.cercle-bar::-moz-progress-bar { background: linear-gradient(90deg, var(--gold), #e2c774); }
.cercle-steps { display: flex; justify-content: space-between; gap: 6px; text-align: center; }
.cercle-steps .on { color: var(--gold); font-weight: 600; }
.cercle-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cercle-reward { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--card); display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.cercle-teaser { border-left: 3px solid var(--gold); }
.mono.gold { color: #9a7b2c; }
.legal { max-height: 40vh; overflow: auto; background: var(--soft); padding: 12px; border-radius: 8px; white-space: pre-wrap; }
@media (max-width: 640px) { .cercle-points .mono { font-size: 1.7rem; } .cercle-steps { font-size: .72rem; } }
.card h2 .mono, .cercle-teaser h2 .mono { font-size: inherit; }
.login-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; }
#referral-box { margin-top: 4px; }
/* Empfehlungsprogramm */
.invite-banner { margin: 6px 0 18px; padding: 18px; border-radius: 16px; background: linear-gradient(135deg, #0a1628, #1b2d4a); color: #fff; }
.invite-banner h2 { color: #fff; margin: 4px 0 6px; }
.invite-banner .pitch li { color: #fff; }
.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.points-big { font-size: 44px; font-weight: 700; color: #c9a84c; margin-top: 10px; line-height: 1; }
.points-big small { font-size: 14px; margin-left: 8px; color: #d8dde6; font-weight: 400; }
.ref-link { display: flex; gap: 8px; }
.ref-link input { flex: 1; min-width: 0; }
.ref-steps { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 13px; color: #6b7686; }
.ref-step.done { color: #1f7a4d; font-weight: 600; }
.ref-teaser { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border: 1.5px solid #c9a84c; }
#ref-letter { width: 100%; font: inherit; }
