/* ---------- Schriften (lokal gehostet, kein externer Abruf) ---------- */
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("fonts/jost-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/jost-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/jost-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/jost-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }

/* ================================================================
   Atelier Gusto – App Stylesheet (Shared-Hosting-Edition)
   ================================================================ */
:root {
  /* Papier-/Grautöne (Schwarz-Weiß-CI) */
  --cream-50: #fafafa; --cream-100: #f2f2f1; --cream-200: #e4e4e3; --cream-300: #cfcfcd;
  --ink-950: #0b0b0b; --ink-900: #171615; --ink-700: #44423f; --ink-500: #78756f; --ink-400: #a6a29c;
  /* Akzent = Schwarz-Stufen (ersetzt die frühere Ember-Palette) */
  --ember-50: #f2f2f1; --ember-100: #e4e4e3; --ember-200: #cfcfcd; --ember-500: #44423f;
  --ember-600: #171615; --ember-700: #0b0b0b;
  /* Statusstufen: rein über Helligkeit unterschieden */
  --sage: #171615; --rose: #8a2020; --sky: #78756f;
  --accent: var(--ember-600);
  --serif: "Jost", "Futura", "Century Gothic", sans-serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream-50); color: var(--ink-900);
  font-family: var(--sans); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.serif { font-family: var(--serif); }
.muted { color: var(--ink-500); }
.faint { color: var(--ink-400); }
.tiny { font-size: 11.5px; }
.normal { font-weight: 400; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
a { color: inherit; text-decoration: none; }
code { background: var(--cream-100); padding: 1px 5px; border-radius: 5px; font-size: 11.5px; }
.btn svg, .link svg { vertical-align: -2px; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 40;
  background: var(--ink-950); color: var(--cream-100);
  display: flex; flex-direction: column;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 26px 22px 28px; }
.brand-icon {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(244,239,230,.25); color: var(--ember-200);
}
.brand-name { font-family: var(--serif); font-size: 17px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; }
.brand-sub { font-size: 10.5px; color: rgba(244,239,230,.4); letter-spacing: .06em; margin-top: 2px; }
.sidebar nav { flex: 1; padding: 0 12px; display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: 11px;
  color: rgba(244,239,230,.5); font-size: 13.5px; transition: all .15s;
}
.nav-item:hover { background: rgba(244,239,230,.06); color: var(--cream-100); }
.nav-item.active { background: rgba(244,239,230,.1); color: var(--cream-50); }
.nav-item.active svg { color: var(--ember-200); }
.nav-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--ember-200); }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(244,239,230,.1); }
.public-link {
  display: flex; gap: 9px; align-items: center; font-size: 11.5px; color: rgba(244,239,230,.5);
  border: 1px solid rgba(244,239,230,.12); border-radius: 11px; padding: 10px 13px; margin-bottom: 12px;
}
.public-link:hover { background: rgba(244,239,230,.06); color: var(--cream-100); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(250,250,250,.14); color: var(--cream-100);
  display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 14px; flex: none;
}
.avatar.light { background: var(--cream-100); color: var(--ink-700); width: 38px; height: 38px; font-size: 15px; }
.user-meta { flex: 1; min-width: 0; }
.user-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10.5px; color: rgba(244,239,230,.4); }
.sidebar .icon-btn { color: rgba(244,239,230,.45); }
.sidebar .icon-btn:hover { color: var(--cream-100); background: rgba(244,239,230,.1); }

/* ---------- Main ---------- */
.main { margin-left: 250px; padding: 36px 40px 60px; max-width: 1180px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; animation: rise .45s cubic-bezier(.22,1,.36,1) both; }
.page-head > div:first-child, .page-head .grow { flex: 1; min-width: 220px; }
.eyebrow { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--ember-600); font-weight: 500; }
h1.serif { font-size: 33px; font-weight: 600; margin-top: 6px; line-height: 1.15; }
.page-head .muted { margin-top: 6px; font-size: 13px; }
.back-link { display: inline-block; font-size: 12px; color: var(--ink-500); margin-bottom: 14px; }
.back-link:hover { color: var(--ember-600); }
.headline-input {
  font-size: 27px; font-weight: 600; background: transparent; border: 0; border-bottom: 2px dashed transparent;
  width: 100%; max-width: 460px; color: var(--ink-900); padding: 4px 0; margin-top: 4px;
}
.headline-input:focus { outline: none; border-bottom-color: var(--ember-500); }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--cream-200); border-radius: 16px;
  animation: rise .5s cubic-bezier(.22,1,.36,1) both;
  transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s, border-color .25s;
}
a.card:hover, .card.hover:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -16px rgba(28,25,23,.18); }
.card.pad { padding: 22px; }
.card.soft { background: var(--ember-50); border-color: var(--ember-200); }
.card.tip { background: var(--ember-50); border-color: var(--ember-200); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { font-size: 18px; font-weight: 600; }
.link { color: var(--ember-600); font-size: 12px; font-weight: 500; }
.link:hover { text-decoration: underline; }

/* ---------- Stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { padding: 20px; display: block; }
.stat-icon {
  width: 34px; height: 34px; border-radius: 10px; background: var(--cream-100); color: var(--ink-700);
  display: inline-flex; align-items: center; justify-content: center;
}
.stat-num { font-size: 27px; font-weight: 600; margin-top: 14px; }
.stat-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-700); margin-top: 4px; }
.stat-sub { font-size: 11.5px; color: var(--ink-400); }

/* ---------- Workflow-Balken ---------- */
.grid-2 { display: grid; grid-template-columns: 2fr 3fr; gap: 20px; }
.wf-row { margin-bottom: 14px; }
.wf-meta { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 5px; color: var(--ink-700); }
.wf-bar { height: 8px; border-radius: 99px; background: var(--cream-100); overflow: hidden; }
.wf-fill { display: block; height: 100%; border-radius: 99px; transition: width .7s; }
.wf-fill.entwurf { background: var(--cream-300); } .wf-fill.gesendet { background: var(--ink-500); }
.wf-fill.angenommen { background: var(--ink-950); } .wf-fill.abgelehnt { background: var(--rose); }
.wf-fill.abgelaufen { background: var(--ink-400); }

.notice {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; margin-bottom: 18px;
  border: 1px solid var(--ember-200); background: var(--ember-50); color: var(--ember-700);
  border-radius: 13px; padding: 14px 16px; font-size: 12.5px; line-height: 1.6;
}
.notice svg { margin-top: 2px; }

/* ---------- Zeilen-Listen ---------- */
.rows, .list { display: flex; flex-direction: column; }
.list { overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 14px; padding: 13px 18px;
  border-bottom: 1px solid var(--cream-100);
}
.row:last-child { border-bottom: 0; }
a.row:hover { background: var(--cream-100); }
a.row:hover .row-title { color: var(--ember-600); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 13.5px; font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 11.5px; color: var(--ink-400); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.row-side { text-align: right; flex: none; }
.block { display: block; }
.row-arrow { color: var(--ink-400); flex: none; }
a.row:hover .row-arrow { color: var(--ember-600); transform: translateX(3px); transition: transform .15s; }
.row.linked { justify-content: space-between; border: 1px solid var(--cream-200); border-radius: 11px; margin-bottom: 8px; }
.empty { text-align: center; padding: 42px 20px; color: var(--ink-400); font-size: 13px; }
.empty.small { padding: 24px; border: 2px dashed var(--cream-200); border-radius: 13px; }
.empty-box {
  grid-column: 1/-1; display: flex; flex-direction: column; align-items: center; gap: 12px;
  border: 2px dashed var(--cream-200); border-radius: 16px; padding: 56px 20px; color: var(--ink-400);
}

/* ---------- Badges / Chips / Pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; border: 1px solid;
  padding: 4px 11px; font-size: 10.5px; font-weight: 600; letter-spacing: .03em; white-space: nowrap; flex: none;
}
.badge.entwurf { background: rgba(28,25,23,.05); color: var(--ink-700); border-color: rgba(28,25,23,.1); }
.badge.gesendet { background: var(--ember-50); color: var(--ember-700); border-color: var(--ember-200); }
.badge.angenommen { background: var(--ink-950); color: #fff; border-color: var(--ink-950); }
.badge.abgelehnt { background: #fff; color: var(--ink-900); border-color: var(--ink-900); }
.badge.abgelaufen { background: var(--cream-100); color: var(--ink-500); border-color: var(--cream-200); }
.badge.neu { background: var(--ember-50); color: var(--ember-700); border-color: var(--ember-200); }
.badge.in_bearbeitung { background: var(--cream-200); color: var(--ink-900); border-color: var(--cream-300); }
.badge.angebot_erstellt { background: var(--ink-950); color: #fff; border-color: var(--ink-950); }
.badge.erledigt { background: rgba(28,25,23,.05); color: var(--ink-500); border-color: rgba(28,25,23,.1); }
.badge.archiviert { background: var(--cream-100); color: var(--ink-400); border-color: var(--cream-200); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; background: var(--cream-100); color: var(--ink-500);
  border-radius: 99px; padding: 4px 10px; font-size: 10.5px; font-weight: 500;
}
.chip.accent { background: var(--ember-50); color: var(--ember-700); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pill {
  border: 1px solid var(--cream-200); background: #fff; color: var(--ink-700);
  border-radius: 99px; padding: 7px 15px; font-size: 12px; font-weight: 500; transition: all .15s;
}
.pill:hover { border-color: var(--ink-400); }
.pill.active { background: var(--ink-900); border-color: var(--ink-900); color: var(--cream-50); }

/* ---------- Buttons / Inputs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; border-radius: 11px; padding: 11px 18px;
  font-size: 13px; font-weight: 500; font-family: var(--sans); cursor: pointer; border: 1px solid transparent; transition: all .15s;
}
.btn.dark { background: var(--ink-900); color: var(--cream-50); }
.btn.dark:hover { background: var(--ember-600); }
.btn.light { background: #fff; border-color: var(--cream-200); color: var(--ink-700); }
.btn.light:hover { border-color: var(--ember-500); color: var(--ember-600); }
.btn.accent { background: var(--ember-600); color: #fff; }
.btn.accent:hover { background: var(--ember-700); }
.btn.ghost { background: transparent; border-color: var(--cream-200); color: var(--ink-500); }
.btn.slim { padding: 7px 12px; font-size: 12px; border-radius: 9px; }
.btn.full { width: 100%; justify-content: center; margin-top: 4px; }
.danger-text { color: var(--rose); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 7px; border-radius: 9px;
  border: 0; background: transparent; color: var(--ink-400); cursor: pointer;
}
.icon-btn:hover { background: var(--cream-100); color: var(--ink-900); }
.icon-btn.danger:hover { background: var(--cream-100); color: var(--rose); }

.lbl { display: block; font-size: 11.5px; color: var(--ink-500); margin: 12px 0 5px; }
.lbl:first-child { margin-top: 0; }
.input {
  width: 100%; background: #fff; border: 1px solid var(--cream-200); border-radius: 10px;
  padding: 10px 13px; font-size: 13.5px; font-family: var(--sans); color: var(--ink-900); transition: all .15s;
}
.input:focus { outline: none; border-color: var(--ember-500); box-shadow: 0 0 0 3px var(--ember-100); }
.input.slim { width: auto; padding: 7px 10px; font-size: 12px; }
.input.soft { background: var(--cream-100); }
.minihead { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-400); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.accent-text { color: var(--ember-700); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .span2 { grid-column: span 2; }
.grid-detail { display: grid; grid-template-columns: 1fr 330px; gap: 18px; align-items: start; margin-top: 18px; }
.grid-detail > div:first-child { display: flex; flex-direction: column; gap: 18px; }
.side-col { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Flash ---------- */
.flash {
  display: flex; align-items: center; gap: 9px; border-radius: 12px; padding: 12px 16px;
  font-size: 13px; margin-bottom: 18px; animation: rise .3s both;
}
.flash.ok { background: var(--cream-100); border: 1px solid var(--cream-300); color: var(--ink-900); }
.flash.err { background: #fff; border: 1px solid var(--rose); color: var(--rose); }

/* ---------- Daten-Liste (Anfrage-Detail) ---------- */
.data-list { margin-top: 6px; }
.data-row { display: grid; grid-template-columns: 190px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--cream-100); }
.data-row:last-child { border-bottom: 0; }
.data-row dt { font-size: 13px; color: var(--ink-500); }
.data-row dd { font-size: 13px; font-weight: 500; word-break: break-word; }
.status-list { margin: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.status-list form { margin: 0; }
.status-btn {
  width: 100%; text-align: left; border: 1px solid var(--cream-200); background: #fff; border-radius: 10px;
  padding: 9px 13px; font-size: 13px; color: var(--ink-700); cursor: pointer; font-family: var(--sans);
}
.status-btn:hover { border-color: var(--ink-400); }
.status-btn.active { border-color: var(--ember-500); background: var(--ember-50); color: var(--ember-700); font-weight: 600; }

/* ---------- Formular-Karten ---------- */
.forms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-card { padding: 22px; }
.form-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.form-icon {
  width: 38px; height: 38px; border-radius: 11px; background: var(--ember-50); color: var(--ember-600);
  display: inline-flex; align-items: center; justify-content: center;
}
.form-actions { display: flex; gap: 2px; }
.form-title { display: block; font-size: 19px; font-weight: 600; margin-top: 14px; }
.form-title:hover { color: var(--ember-600); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.form-card-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  border-top: 1px solid var(--cream-100); margin-top: 14px; padding-top: 12px;
}

/* ---------- Builder ---------- */
.builder-grid { display: grid; grid-template-columns: 230px 1fr 300px; gap: 16px; align-items: start; margin-bottom: 40px; }
.builder-grid > div { display: flex; flex-direction: column; gap: 14px; }
.builder-grid > .card, .builder-grid > div > .card { animation: none; }
.palette { display: flex; flex-direction: column; gap: 3px; }
.palette button {
  display: flex; align-items: center; gap: 9px; text-align: left; border: 0; background: transparent;
  border-radius: 9px; padding: 8px 10px; font-size: 12.5px; color: var(--ink-700); cursor: pointer; font-family: var(--sans);
}
.palette button:hover { background: var(--cream-100); }
.palette button svg { color: var(--ink-400); }
.palette button:hover svg { color: var(--ember-600); }
.canvas-wrap { min-height: 560px; }
.canvas-title { font-size: 19px; font-weight: 600; margin-bottom: 16px; }
.canvas { display: flex; flex-direction: column; gap: 10px; }
.canvas-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink-400);
  border: 2px dashed var(--cream-200); border-radius: 14px; padding: 60px 20px; text-align: center; font-size: 13px;
}
.field-card {
  border: 1px solid var(--cream-200); border-radius: 12px; padding: 13px 14px; cursor: pointer; position: relative;
  transition: all .15s; background: #fff;
}
.field-card:hover { border-color: var(--ink-400); }
.field-card.active { border-color: var(--ink-900); background: var(--cream-50); box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.field-card .fc-head { display: flex; gap: 10px; align-items: flex-start; }
.field-card .fc-icon {
  width: 28px; height: 28px; border-radius: 8px; background: var(--cream-100); color: var(--ink-500);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.field-card .fc-label { font-size: 13px; font-weight: 500; }
.field-card .fc-label .req { color: var(--ember-600); font-style: normal; }
.field-card .fc-meta { font-size: 11px; color: var(--ink-400); margin-top: 2px; }
.field-card .fc-cond {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 7px; background: var(--ember-100);
  color: var(--ember-700); border-radius: 99px; padding: 3px 9px; font-size: 10px; font-weight: 600;
}
.field-card .fc-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; flex: none; }
.field-card:hover .fc-actions, .field-card.active .fc-actions { opacity: 1; }
.canvas-submit {
  margin-top: 8px; border: 0; border-radius: 11px; padding: 13px; color: #fff; font-weight: 500;
  font-size: 13px; text-align: center; opacity: .95; cursor: default;
}
.inspector-empty { display: flex; align-items: center; justify-content: center; min-height: 300px; text-align: center; }
.toggle-wrap { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--cream-200); border-radius: 11px; padding: 10px 13px; cursor: pointer; margin-top: 12px; }
.toggle { position: relative; width: 34px; height: 19px; border-radius: 99px; background: var(--cream-200); transition: background .2s; flex: none; }
.toggle.on { background: var(--ember-500); }
.toggle i { position: absolute; top: 2.5px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .2s; }
.toggle.on i { left: 17px; }
.cond-box { border: 1px solid var(--cream-200); border-radius: 12px; padding: 13px; margin-top: 14px; }
.cond-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cond-logic-btn { border: 0; background: var(--cream-100); border-radius: 99px; padding: 4px 10px; font-size: 10px; font-weight: 600; cursor: pointer; color: var(--ink-700); }
.cond-row { background: var(--cream-100); border-radius: 10px; padding: 9px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.cond-row select, .cond-row input { font-size: 11.5px; padding: 7px 9px; }
.cond-row .cond-row-top { display: flex; gap: 6px; }
.cond-row .cond-row-top select { flex: 1; }
.cond-add {
  width: 100%; margin-top: 10px; border: 1px dashed var(--cream-300); background: transparent; color: var(--ink-500);
  border-radius: 9px; padding: 8px; font-size: 11.5px; cursor: pointer; font-family: var(--sans);
}
.cond-add:hover:not(:disabled) { border-color: var(--ember-500); color: var(--ember-600); }
.cond-add:disabled { opacity: .4; cursor: default; }

/* ---------- Embed-Overlay ---------- */
.embed-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(20,17,16,.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.embed-card { width: 100%; max-width: 560px; }
.embed-code {
  background: var(--ink-950); color: var(--cream-100); border-radius: 12px; padding: 15px;
  font-size: 11.5px; line-height: 1.6; overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 8px 0 10px;
}

/* ---------- Stepper ---------- */
.stepper { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.step-form { margin: 0; }
.step {
  display: inline-flex; align-items: center; gap: 9px; border-radius: 99px; border: 1px solid var(--cream-200);
  background: var(--cream-50); padding: 7px 15px 7px 7px; font-size: 11.5px; font-weight: 600; color: var(--ink-500);
  font-family: var(--sans); cursor: default;
}
.step[disabled] { cursor: default; }
.step:not([disabled]) { cursor: pointer; }
.step.active { border-color: var(--ember-500); background: var(--ember-50); color: var(--ember-700); }
.step.done { border-color: var(--ink-900); background: #fff; color: var(--ink-900); }
.step-num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--cream-200); color: var(--ink-500);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px;
}
.step.active .step-num { background: var(--ember-600); color: #fff; }
.step.done .step-num { background: var(--sage); color: #fff; }
.step.negative { padding: 7px 13px; }
.step.negative.active { border-color: rgba(190,18,60,.4); background: #fff1f2; color: var(--rose); }
.step.negative:not([disabled]):hover { border-color: rgba(190,18,60,.4); color: var(--rose); }
.step-line { flex: 1; min-width: 26px; height: 1px; background: var(--cream-200); }
.step-line.done { background: rgba(77,124,15,.4); }
.step-sep { width: 1px; align-self: stretch; background: var(--cream-200); margin: 0 10px; }

/* ---------- Positionen ---------- */
.items-head, .item-row {
  display: grid; grid-template-columns: 1fr 84px 104px 104px 32px; gap: 8px; align-items: center;
}
.items-head { font-size: 9.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-400); padding: 0 4px 8px; }
.item-row { margin-bottom: 7px; }
.item-row .input { padding: 8px 10px; font-size: 12px; }
.item-total { text-align: right; font-size: 12px; font-weight: 600; }
.item-total small { display: block; font-weight: 400; color: var(--ink-400); font-size: 10px; }
.totals { border-top: 1px solid var(--cream-100); margin-top: 14px; padding-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.tot-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-500); }
.tot-row.total { border-top: 1px solid var(--cream-100); padding-top: 11px; color: var(--ink-900); }
.grand { font-size: 22px; color: var(--ember-600); font-weight: 600; }
.neg { color: var(--rose); }
.inline-num {
  width: 62px; border: 1px solid var(--cream-200); border-radius: 8px; padding: 4px 7px; font-size: 12px;
  text-align: center; font-family: var(--sans);
}
select.inline-num { width: 72px; }
.inline-num:focus { outline: none; border-color: var(--ember-500); }

/* ---------- Historie ---------- */
.history { display: flex; flex-direction: column; gap: 12px; }
.hist-row { display: flex; gap: 10px; }
.hist-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ember-500); margin-top: 6px; flex: none; }
.hist-status { font-size: 12px; font-weight: 600; }

/* ---------- Tabellen (Angebote) ---------- */
.table-card { padding: 0; }
.table-head, .table-row {
  display: grid; grid-template-columns: 120px 1fr 100px 105px 125px 26px; gap: 14px; align-items: center;
}
.table-head {
  padding: 11px 20px; font-size: 9.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-500); background: rgba(244,239,230,.4); border-bottom: 1px solid var(--cream-100);
}
.table-row { padding: 14px 20px; }
.qnum { font-weight: 600; font-size: 14px; }
.qmain { min-width: 0; }
.qtotal { font-size: 13.5px; font-weight: 600; }
.remind-tag { display: inline-flex; align-items: center; gap: 3px; color: var(--ember-600); font-weight: 600; }

/* ---------- Postausgang ---------- */
.mail-list { display: flex; flex-direction: column; gap: 10px; }
.mail-item { padding: 0; }
.mail-item summary {
  display: flex; align-items: center; gap: 14px; padding: 15px 18px; cursor: pointer; list-style: none;
}
.mail-item summary::-webkit-details-marker { display: none; }
.mail-icon {
  width: 36px; height: 36px; border-radius: 11px; background: var(--cream-100); color: var(--ink-700);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.mail-icon.accent { background: var(--ember-50); color: var(--ember-600); }
.mail-main { flex: 1; min-width: 0; }
.link-chip { border: 1px solid var(--cream-200); background: #fff; font-size: 10.5px; }
.link-chip:hover { border-color: var(--ember-500); color: var(--ember-600); }
.mail-status { border-radius: 99px; padding: 4px 11px; font-size: 10.5px; font-weight: 600; border: 1px solid; flex: none; }
.mail-status.gesendet { background: #f7fee7; color: var(--sage); border-color: #d9f99d; }
.mail-status.fehler { background: #fff1f2; color: var(--rose); border-color: rgba(190,18,60,.25); }
.mail-status.geloggt { background: var(--cream-100); color: var(--ink-500); border-color: var(--cream-200); }
.mail-body {
  margin: 0 18px 16px; background: var(--cream-100); border-radius: 11px; padding: 14px;
  font-size: 12px; line-height: 1.65; white-space: pre-wrap; color: var(--ink-700);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- Login ---------- */
.login-body { display: flex; min-height: 100vh; background: var(--ink-950); }
.login-image { width: 50%; position: relative; overflow: hidden; display: none; }
@media (min-width: 1000px) { .login-image { display: block; } }
.login-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.login-overlay {
  position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,17,16,.92), rgba(20,17,16,.35) 55%, rgba(20,17,16,.15));
  display: flex; flex-direction: column; justify-content: space-between; padding: 44px;
}
.login-brand { color: var(--cream-100); font-family: var(--serif); letter-spacing: .2em; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.login-claim p.serif { color: var(--cream-50); font-size: 42px; line-height: 1.1; font-style: italic; }
.login-claim em { font-style: normal; color: var(--ember-200); }
.login-sub { color: rgba(244,239,230,.6); font-size: 13px; max-width: 360px; margin-top: 20px; line-height: 1.65; }
.login-panel { flex: 1; background: var(--cream-50); display: flex; align-items: center; justify-content: center; padding: 28px; }
.login-card { width: 100%; max-width: 390px; }
.login-card h1 { font-size: 31px; font-weight: 600; }
.login-card > .muted { margin: 8px 0 26px; }
.login-card label { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 6px; }
.login-card .input { margin-bottom: 16px; padding: 12px 14px; }
.login-error { background: #fff1f2; border: 1px solid rgba(190,18,60,.2); color: var(--rose); border-radius: 10px; padding: 9px 13px; font-size: 13px; margin-bottom: 12px; }
.login-hint { margin-top: 22px; border: 1px solid var(--cream-200); background: rgba(244,239,230,.6); border-radius: 12px; padding: 13px 15px; font-size: 11.5px; line-height: 1.65; color: var(--ink-700); }

/* ---------- Öffentliches Formular ---------- */
.public-body { background: var(--cream-50); min-height: 100vh; padding: 40px 18px; }
.public-wrap { max-width: 560px; margin: 0 auto; }
.public-card { background: #fff; border: 1px solid var(--cream-200); border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px -30px rgba(28,25,23,.25); animation: rise .5s both; }
.public-accent { height: 6px; background: var(--accent); }
.public-inner { padding: 34px 34px 38px; }
.public-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.public-inner h1.serif { font-size: 30px; margin: 8px 0 10px; }
.public-intro { border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); padding: 12px 15px; border-radius: 0 10px 10px 0; font-size: 13px; color: var(--ink-700); margin-top: 16px; }
#pub-form { margin-top: 26px; display: flex; flex-direction: column; gap: 20px; }
.pub-field.hidden { display: none; }
.pub-label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 7px; }
.req { color: var(--accent); font-style: normal; }
.pub-input { background: rgba(250,247,241,.5); }
.pub-input:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.pub-radios { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-radio input { position: absolute; opacity: 0; }
.pub-radio span {
  display: inline-block; border: 1px solid var(--cream-200); border-radius: 99px; padding: 8px 16px;
  font-size: 13px; cursor: pointer; transition: all .15s; background: #fff;
}
.pub-radio input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, #fff); color: var(--accent); font-weight: 600; }
.pub-check { display: flex; align-items: center; gap: 11px; border: 1px solid var(--cream-200); border-radius: 12px; padding: 13px 15px; cursor: pointer; font-size: 13.5px; }
.pub-check input { position: absolute; opacity: 0; }
.pub-check-box {
  width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--cream-300); flex: none;
  display: inline-flex; align-items: center; justify-content: center; transition: all .15s;
}
.pub-check input:checked ~ .pub-check-box { background: var(--accent); border-color: var(--accent); }
.pub-check input:checked ~ .pub-check-box::after { content: ""; width: 10px; height: 6px; border-left: 2.2px solid #fff; border-bottom: 2.2px solid #fff; transform: rotate(-45deg) translate(0.5px, -1.5px); }
.pub-submit {
  background: var(--accent); color: #fff; border: 0; border-radius: 12px; padding: 15px; font-size: 14px;
  font-weight: 500; cursor: pointer; font-family: var(--sans); transition: opacity .15s; justify-content: center;
}
.pub-submit:hover { opacity: .9; }
.public-success { text-align: center; padding: 46px 10px; animation: rise .5s both; }
.success-icon {
  width: 62px; height: 62px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent);
}
.public-success h2 { font-size: 26px; margin: 18px 0 10px; font-weight: 600; }
.public-foot {
  display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 22px;
  font-size: 11.5px; color: var(--ink-400);
}
.public-foot svg { color: var(--accent); }
.public-foot .brand-logo { display: inline-block; vertical-align: middle; margin-right: 4px; }
.field-error { color: var(--rose); font-size: 11.5px; margin-top: 5px; }
.invalid { border-color: var(--rose) !important; }

/* ---------- Animation & Responsive ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--cream-300); border-radius: 8px; }


/* ---------- Splitansicht: Anfrage neben dem Angebot ---------- */
.main.wide { max-width: 1520px; }
.grid-detail.with-inquiry { grid-template-columns: 320px minmax(0, 1fr) 330px; }
.inquiry-col { display: flex; flex-direction: column; gap: 14px; }
.inquiry-panel { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; }
.inquiry-panel .card-head { margin-bottom: 12px; }

.iq-list { margin: 4px 0 14px; }
.iq-row { padding: 10px 0; border-bottom: 1px solid var(--cream-100); }
.iq-row:last-child { border-bottom: 0; }
.iq-label { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-400); }
.iq-value { font-size: 13px; font-weight: 500; color: var(--ink-900); margin: 3px 0 6px; word-break: break-word; }
.iq-apply {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--cream-200);
  background: #fff; border-radius: 8px; padding: 4px 9px; font-size: 11.5px; cursor: pointer;
  color: var(--accent); font-family: var(--sans); transition: background .15s, color .15s;
}
.iq-apply:hover { background: var(--cream-100); }
.iq-apply.ghost { color: var(--ink-500); }
.iq-apply.done { background: var(--accent); border-color: var(--accent); color: #fff; }
.iq-row.plain .iq-value { color: var(--ink-700); font-weight: 400; }

.input.filled-flash, textarea.input.filled-flash { background: var(--cream-100); border-color: var(--ink-900); transition: background .4s, border-color .4s; }

/* Rollen-Badge im Formular-Builder */
.fc-role {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; margin-right: 5px;
  background: var(--cream-100); color: var(--ink-700); border-radius: 99px;
  padding: 2px 8px; font-size: 10.5px; font-weight: 500;
}
.role-box { border-top: 1px solid var(--cream-100); margin-top: 14px; padding-top: 12px; }

@media (max-width: 1280px) {
  .grid-detail.with-inquiry { grid-template-columns: 280px minmax(0, 1fr); }
  .grid-detail.with-inquiry > .side-col { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-detail, .grid-detail.with-inquiry { grid-template-columns: 1fr; }
  .inquiry-panel { position: static; max-height: none; }
  .builder-grid { grid-template-columns: 1fr; }
  .forms-grid { grid-template-columns: 1fr; }
  .table-head { display: none; }
  .table-row { grid-template-columns: 1fr auto; gap: 6px; }
  .table-row > .right, .table-row > .row-arrow { display: none; }
}
@media (max-width: 820px) {
  .sidebar { position: static; width: 100%; flex-direction: column; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .main { margin-left: 0; padding: 24px 18px 50px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: span 1; }
  .data-row { grid-template-columns: 1fr; gap: 2px; }
  .login-claim p.serif { font-size: 30px; }
}

/* ---------- Logo ---------- */
.brand-logo { display: block; width: auto; flex: none; }
.brand { align-items: center; }
.login-brand { display: flex; align-items: center; gap: 10px; letter-spacing: .28em; }

/* ---------- Honigtopf & Einwilligung ---------- */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.pub-consent { border-top: 1px solid var(--cream-200); padding-top: 16px; margin-top: 4px; }
.pub-consent .pub-check span:last-child { font-size: 12.5px; line-height: 1.5; color: var(--ink-700); }
.pub-consent a { text-decoration: underline; }

/* ---------- Leistungskatalog ---------- */
.cat-row {
  display: grid; grid-template-columns: 1fr 110px 110px 90px 70px; gap: 14px;
  align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--cream-100); font-size: 13.5px;
}
.cat-row:last-child { border-bottom: 0; }
.table-head.cat-row { padding: 11px 20px; }
.cat-title { font-weight: 500; }
.cat-row.inactive .cat-title, .cat-row.inactive .mono { color: var(--ink-400); text-decoration: line-through; }
.cat-actions { display: flex; gap: 2px; justify-content: flex-end; }
.mono { font-variant-numeric: tabular-nums; }
.empty-hint { padding: 26px 20px; color: var(--ink-500); font-size: 13px; text-align: center; }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; color: var(--ink-700); margin: 16px 0 14px;
}
@media (max-width: 760px) {
  .cat-row { grid-template-columns: 1fr auto; row-gap: 6px; }
  .table-head.cat-row { display: none; }
}

/* ---------- Öffentliche Angebotsansicht ---------- */
.quote-view .public-inner { padding-bottom: 30px; }
.qv-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; margin: 20px 0 24px; }
.qv-facts > div { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.qv-key { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-500); }
.qv-items { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.qv-items th {
  text-align: left; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-500); font-weight: 600; padding: 8px 0; border-bottom: 1px solid var(--cream-200);
}
.qv-items td { padding: 11px 0; border-bottom: 1px solid var(--cream-100); vertical-align: top; }
.qv-items .right, .qv-sums span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.qv-sums { margin: 16px 0 6px; font-size: 13.5px; }
.qv-sums > div { display: flex; justify-content: space-between; padding: 5px 0; color: var(--ink-700); }
.qv-total { border-top: 1px solid var(--ink-900); margin-top: 6px; padding-top: 12px !important; font-size: 17px; font-weight: 600; color: var(--ink-950); }
.qv-actions { margin-top: 26px; border-top: 1px solid var(--cream-200); padding-top: 20px; }
.qv-decline { margin-top: 10px; }
.qv-note { margin-top: 24px; padding: 14px 16px; background: var(--cream-100); border-radius: 12px; font-size: 13px; color: var(--ink-700); }
@media (max-width: 560px) { .qv-facts { grid-template-columns: 1fr; } }

.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; justify-content: center; }
#accept-url { font-size: 11px; }
.reply-box { margin-top: 12px; padding: 11px 13px; background: var(--cream-100); border-radius: 11px; }
.qv-actions .pub-submit { width: 100%; justify-content: center; margin-top: 12px; }
.dsgvo-box { margin: 16px 0 12px; padding: 12px 13px; background: var(--cream-100); border-radius: 12px; }

/* ---------- Konto & Anmeldung ---------- */
.code-input { font-size: 20px; letter-spacing: .32em; text-align: center; font-variant-numeric: tabular-nums; }
.login-alt { margin-top: 12px; text-align: center; font-size: 12.5px; }
.login-alt a { color: var(--ink-500); text-decoration: underline; }
.totp-setup { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 14px; }
.qr-box { width: 190px; background: #fff; padding: 8px; border: 1px solid var(--cream-200); border-radius: 12px; margin: 8px 0; }
.qr-box svg { width: 100%; height: auto; display: block; }
.secret { font-size: 12px; letter-spacing: .08em; word-break: break-all; }
.codes-box { background: var(--cream-100); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.codes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; margin: 10px 0 12px; }
.codes-grid code { font-size: 13.5px; letter-spacing: .06em; }
.two-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
@media (max-width: 760px) { .totp-setup, .two-forms { grid-template-columns: 1fr; } }
.user-meta { display: block; text-decoration: none; min-width: 0; flex: 1; }
.count-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 12px; }
.count-num { display: block; font-size: 22px; font-weight: 600; font-family: var(--serif); }
.count-lbl { font-size: 11px; color: var(--ink-500); }
.smtp-log {
  background: var(--ink-950); color: #e6e6e4; border-radius: 10px; padding: 12px 14px;
  font-size: 11.5px; line-height: 1.6; overflow-x: auto; white-space: pre; margin-top: 8px;
}
