/* =========================================================
   NIVORA – style.css
   Mobile first · keine externen Fonts/Bibliotheken
   ========================================================= */

:root {
  /* Farben */
  --petrol-950: #052322;
  --petrol-900: #073130;
  --petrol-800: #0b3a39;   /* Hauptfarbe */
  --petrol-700: #0f4a48;
  --petrol-600: #155e5a;
  --green-600:  #12805f;   /* Hervorhebung auf Weiß (AA) */
  --green-500:  #1a9b74;
  --green-300:  #7fd4b5;
  --mint-50:    #f4f8f6;
  --mint-100:   #e9f1ed;
  --mint-200:   #d9e6e0;
  --line:       #dfe8e4;
  --ink:        #0d1f1e;
  --ink-2:      #344946;
  --muted:      #5d706c;
  --white:      #ffffff;
  --danger:     #b4232c;

  /* Typo */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Form */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(7, 49, 48, .06), 0 2px 8px rgba(7, 49, 48, .05);
  --shadow-lg: 0 2px 6px rgba(7, 49, 48, .06), 0 18px 48px -12px rgba(7, 49, 48, .22);
  --gutter: 20px;
  --header-h: 64px;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--petrol-700); text-underline-offset: 3px; }
a:hover { color: var(--green-600); }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.025em; }
p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--green-500); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 8px 14px; background: var(--petrol-800); color: #fff; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 15px; line-height: 1; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.btn--primary { background: var(--petrol-800); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 6px 16px -6px rgba(7, 49, 48, .5); }
.btn--primary:hover { background: var(--petrol-700); color: #fff; }
.btn--primary:active { transform: translateY(1px); }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn--block { width: 100%; }
.btn__arrow { transition: transform .18s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn[disabled] { opacity: .65; cursor: progress; }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.tag--demo { background: #fff4dc; color: #8a5a00; border: 1px solid #f3dfb0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(223, 232, 228, .7);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--petrol-800); text-decoration: none; }
.logo:hover { color: var(--petrol-800); }
.logo__word { font-weight: 750; font-size: 17px; letter-spacing: .16em; color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav__link { display: none; padding: 8px 12px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); text-decoration: none; border-radius: 999px; }
.site-nav__link:hover { color: var(--petrol-800); background: var(--mint-50); }
@media (min-width: 640px) { .site-nav__link { display: inline-block; } .site-nav .btn { margin-left: 8px; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 40px 0 56px;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(26, 155, 116, .08), transparent 60%),
    linear-gradient(180deg, var(--white) 0%, var(--mint-50) 100%);
  overflow: hidden;
}
.hero__grid { display: grid; gap: 36px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; margin-bottom: 20px;
  font-size: 13px; font-weight: 600; color: var(--petrol-700);
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
}
.eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); box-shadow: 0 0 0 3px rgba(26, 155, 116, .16); }
.hero__title {
  font-size: clamp(2.15rem, 1.35rem + 3.6vw, 4.1rem);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--petrol-950);
  max-width: 14ch;
  text-wrap: balance;
}
.hl { color: var(--green-600); }
.hero__lead { margin-top: 18px; font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); color: var(--ink-2); font-weight: 450; }
.hero__actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__points { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 10px; }
.hero__points li { position: relative; padding-left: 30px; font-size: 15px; color: var(--ink-2); }
.hero__points li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--mint-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.2l2.6 2.6L14 7.4' fill='none' stroke='%2312805f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat;
}
.hero__fineprint { margin-top: 18px; font-size: 13.5px; color: var(--muted); }

/* ---------- Bühne: Foto + Chat + Anfrage ---------- */
.stage { position: relative; display: grid; gap: 16px; scroll-margin-top: calc(var(--header-h) + 16px); }
.stage__photo {
  position: relative; margin: 0;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--mint-100);
  box-shadow: var(--shadow-sm);
}
.stage__photo img { width: 100%; height: 100%; object-fit: cover; }
.stage__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 35, 34, 0) 50%, rgba(5, 35, 34, .18) 100%); pointer-events: none; }
.placeholder-tag {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: rgba(255, 255, 255, .9); color: #8a5a00; border: 1px dashed #d9b25c;
}

/* ---------- Chat ---------- */
.chat {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  height: 540px; max-height: calc(100svh - var(--header-h) - 24px);
  min-height: 440px;
  margin-top: -72px;  /* überlappt das Foto */
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.chat__head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line); }
.chat__avatar {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--petrol-800); color: #fff;
}
.chat__who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; margin-right: auto; }
.chat__who strong { font-size: 15px; }
.chat__sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__reset {
  display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.chat__reset:hover { background: var(--mint-50); color: var(--petrol-800); }

.chat__log {
  flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 14px 8px;
  display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(180deg, var(--white), var(--mint-50));
  scrollbar-width: thin; scrollbar-color: var(--mint-200) transparent;
}
.msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; animation: msg-in .28s ease both; }
.msg--bot { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 6px; color: var(--ink); }
.msg--user { align-self: flex-end; background: var(--petrol-800); color: #fff; border-bottom-right-radius: 6px; }
.msg--note {
  align-self: center; max-width: 92%; padding: 6px 12px;
  font-size: 12.5px; color: #7a5300; background: #fff8e8; border: 1px dashed #ecd29a; border-radius: 10px; text-align: center;
}
.msg--error { align-self: flex-start; background: #fdf0f0; border: 1px solid #f2caca; color: var(--danger); }
.msg__images { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.msg__images img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 2px solid rgba(255,255,255,.35); }
.msg--typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.msg--typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--petrol-600); opacity: .35; animation: blink 1.1s infinite ease-in-out; }
.msg--typing span:nth-child(2) { animation-delay: .15s; }
.msg--typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: .9; transform: translateY(-2px); } }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.chat__chips {
  display: flex; gap: 6px; padding: 8px 12px 2px;
  overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
          mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.chat__chips::-webkit-scrollbar { display: none; }
.chat__chips:empty { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 14px;
  border: 1px solid var(--mint-200); border-radius: 999px;
  background: var(--white); color: var(--petrol-800);
  font-size: 14px; font-weight: 550; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.chip:hover { background: var(--mint-50); border-color: var(--green-300); }
.chip--accent { background: var(--petrol-800); border-color: var(--petrol-800); color: #fff; }
.chip--accent:hover { background: var(--petrol-700); border-color: var(--petrol-700); }

.chat__form { display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px; }
.chat__input {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px;
  font-size: 16px; /* verhindert Zoom auf iOS */
  background: var(--mint-50); border: 1px solid var(--line); border-radius: 999px; outline: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.chat__input:focus { background: var(--white); border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(26, 155, 116, .14); }
.chat__attach, .chat__send {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px;
  border: 0; border-radius: 50%; cursor: pointer;
}
.chat__attach { background: transparent; color: var(--muted); }
.chat__attach:hover { background: var(--mint-50); color: var(--petrol-800); }
.chat__send { background: var(--petrol-800); color: #fff; }
.chat__send:hover { background: var(--petrol-700); }
.chat__note { padding: 0 14px 10px; font-size: 11.5px; color: var(--muted); text-align: center; }

/* ---------- Projektanfrage-Karte ---------- */
.request {
  position: relative; z-index: 2;
  padding: 16px 16px 14px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.request__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.request__title { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; color: var(--petrol-800); }
.request__status { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 3px 9px; border-radius: 999px; background: var(--mint-50); white-space: nowrap; }
.request__status.is-active { color: var(--petrol-700); background: var(--mint-100); }
.request__status.is-done { color: #fff; background: var(--green-600); }
.request__progress { height: 4px; margin: 12px 0 12px; border-radius: 4px; background: var(--mint-100); overflow: hidden; }
.request__progress span { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--petrol-600), var(--green-500)); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.request__empty { font-size: 13.5px; color: var(--muted); }
.request__list { margin: 0; display: grid; gap: 2px; }
.request__row { display: grid; grid-template-columns: 104px 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--mint-100); font-size: 13.5px; animation: row-in .5s ease both; }
.request__row:first-child { border-top: 0; }
.request__row dt { color: var(--muted); }
.request__row dd { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.request__row.is-new dd { animation: flash 1.4s ease; }
@keyframes row-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes flash { 0% { background: rgba(26, 155, 116, .18); } 100% { background: transparent; } }
.request__row dd { border-radius: 4px; }
.request__foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* ---------- Kontakt ---------- */
.contact { padding: 72px 0 80px; background: var(--white); scroll-margin-top: var(--header-h); }
.contact__grid { display: grid; gap: 32px; }
.contact__title { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); font-weight: 750; letter-spacing: -0.03em; color: var(--petrol-950); max-width: 16ch; }
.contact__lead { margin-top: 14px; font-size: 1.125rem; color: var(--ink-2); }
.contact__mail { margin-top: 28px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--muted); }
.contact__mail a { font-size: 17px; font-weight: 600; color: var(--petrol-800); text-decoration: none; border-bottom: 1px solid var(--mint-200); align-self: flex-start; }
.contact__mail a:hover { border-color: var(--green-500); color: var(--petrol-700); }
.contact__card {
  padding: 22px 18px;
  background: var(--mint-50);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}

.form { display: grid; gap: 14px; }
.form__row { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"] {
  width: 100%; height: 48px; padding: 0 14px;
  font-size: 16px; background: var(--white);
  border: 1px solid var(--mint-200); border-radius: var(--r-md); outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(26, 155, 116, .14); }
.field.has-error input { border-color: var(--danger); }
.field__error { min-height: 0; font-size: 13px; color: var(--danger); }
.field__error:empty { display: none; }
.field--check { grid-template-columns: 22px 1fr; align-items: start; gap: 10px; }
.field--check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--petrol-800); }
.field--check label { font-weight: 400; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.field--check .field__error { grid-column: 2; }
.form__alert { padding: 10px 14px; font-size: 14px; border-radius: var(--r-md); background: #fdf0f0; color: var(--danger); border: 1px solid #f2caca; }
.form__hint { font-size: 12.5px; color: var(--muted); text-align: center; }
.form-success { padding: 28px 8px; text-align: center; }
.form-success h3 { font-size: 1.4rem; color: var(--petrol-800); }
.form-success p { margin-top: 8px; color: var(--ink-2); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--white); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 22px; padding-bottom: 22px; font-size: 13px; color: var(--muted); }
.site-footer__brand { font-weight: 700; letter-spacing: .14em; color: var(--ink); }
.site-footer__year { font-weight: 400; letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.site-footer__nav { display: flex; gap: 20px; }
.site-footer__nav a { color: var(--muted); text-decoration: none; }
.site-footer__nav a:hover { color: var(--petrol-800); }

/* ---------- Rechtliche Seiten ---------- */
.legal { padding: 48px 0 80px; background: linear-gradient(180deg, var(--white), var(--mint-50)); }
.legal__inner { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); color: var(--petrol-950); margin-bottom: 24px; }
.legal h2 { font-size: 1.2rem; margin: 36px 0 10px; color: var(--petrol-900); letter-spacing: -0.01em; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 1.2em; }
.legal .placeholder-box {
  padding: 14px 16px; margin-bottom: 28px; font-size: 14px;
  background: #fff8e8; border: 1px dashed #e4c27a; border-radius: var(--r-md); color: #6e4b00;
}
.ph { background: #fff4dc; padding: 0 4px; border-radius: 4px; color: #6e4b00; }

/* =========================================================
   Tablet (≥ 720px)
   ========================================================= */
@media (min-width: 720px) {
  :root { --gutter: 32px; --header-h: 72px; }
  .hero { padding: 64px 0 80px; }
  .stage { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; gap: 20px; }
  .stage__photo { grid-column: 1 / -1; aspect-ratio: 21 / 9; }
  .chat { margin-top: -140px; margin-left: 20px; }
  .request { margin-top: -140px; margin-right: 20px; }
  .form__row { grid-template-columns: 1fr 1fr; }
  .contact { padding: 104px 0 112px; }
  .contact__card { padding: 32px; }
}

/* =========================================================
   Desktop (≥ 1180px): Text links, Bühne rechts mit Overlays
   ========================================================= */
@media (min-width: 1180px) {
  .hero { padding: 56px 0 96px; }
  .hero .container { max-width: 1320px; }
  .hero__grid { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); align-items: center; gap: 48px; }
  .hero__copy { padding-bottom: 24px; }
  .hero__title { font-size: clamp(2.6rem, .75rem + 3vw, 3.25rem); }
  .stage { display: block; height: 680px; }
  .stage__photo { position: absolute; inset: 0 0 0 88px; aspect-ratio: auto; border-radius: var(--r-xl); }
  .chat { position: absolute; left: 0; top: 50px; width: 360px; height: 580px; max-height: none; margin: 0; }
  .request { position: absolute; right: 24px; bottom: 24px; width: 250px; margin: 0; max-height: calc(100% - 48px); overflow: auto; }
  .request__row { grid-template-columns: 92px 1fr; }
  .placeholder-tag { top: 16px; right: 16px; }
  .contact__grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
  .contact__intro { position: sticky; top: calc(var(--header-h) + 40px); }
  .contact__card { padding: 40px; }
}
@media (min-width: 1280px) {
  .chat { width: 384px; }
  .request { width: 262px; }
}

/* Kopf, Schnellantworten und Eingabe nie stauchen – nur der Verlauf scrollt */
.chat__head, .chat__chips, .chat__form, .chat__note { flex: none; }
.chat__chips { padding-top: 10px; padding-bottom: 4px; }
.request__row dd a, .request__row dd { word-break: break-word; }
.request__title svg { flex: none; }

/* ---------- Nutzen für den Meister ---------- */
.benefit { margin-top: 32px; padding: 18px 18px 18px 20px; background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--green-500); border-radius: var(--r-md); box-shadow: var(--shadow-sm); max-width: 520px; }
.benefit__title { font-weight: 700; font-size: 16.5px; letter-spacing: -0.01em; color: var(--petrol-900); }
.benefit .hero__points { margin-top: 12px; }
.hero__points strong { color: var(--ink); font-weight: 650; }

/* =========================================================
   Ansichtswechsel Kunde / Chef
   ========================================================= */
.viewswitch {
  position: relative; z-index: 3;
  display: inline-flex; gap: 4px; padding: 4px; justify-self: start;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm);
}
.viewswitch button {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-2);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .15s ease, color .15s ease;
}
.viewswitch button:hover { color: var(--petrol-800); background: var(--mint-50); }
.viewswitch button[aria-selected="true"] { background: var(--petrol-800); color: #fff; }

.inbox {
  position: relative; z-index: 2; display: none; flex-direction: column;
  margin-top: -72px; max-height: 640px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.stage.is-owner .inbox { display: flex; animation: msg-in .3s ease both; }
.stage.is-owner .chat, .stage.is-owner .request { display: none; }
.inbox__bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--mint-50); }
.inbox__dots { display: inline-flex; gap: 5px; }
.inbox__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--mint-200); }
.inbox__title { margin-right: auto; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.inbox__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px 20px; display: grid; gap: 14px; align-content: start; }
.inbox__empty { display: grid; gap: 10px; justify-items: start; padding: 24px 4px; color: var(--muted); font-size: 14.5px; }
.inbox__empty-title { font-weight: 700; color: var(--ink); font-size: 16px; }

.mail__head { display: flex; align-items: center; gap: 10px; }
.mail__avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--petrol-800); color: #fff; font-weight: 700; font-size: 14px; }
.mail__meta { min-width: 0; margin-right: auto; line-height: 1.3; }
.mail__from { font-size: 14px; } .mail__from span { color: var(--muted); }
.mail__to { font-size: 12px; color: var(--muted); }
.mail__pill { flex: none; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--mint-100); color: var(--petrol-700); }
.mail__pill.is-done { background: var(--green-600); color: #fff; }
.mail__subject { font-size: 18px; line-height: 1.3; letter-spacing: -0.015em; color: var(--petrol-950); }
.mail__summary { font-size: 14.5px; color: var(--ink-2); }
.mail__label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.mail__contact { padding: 12px 14px; border-radius: var(--r-md); background: var(--mint-50); border: 1px solid var(--line); font-size: 14.5px; overflow-wrap: anywhere; }
.mail__facts { margin: 0; display: grid; grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.mail__fact { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 8px 14px; font-size: 13.5px; border-top: 1px solid var(--mint-100); }
.mail__fact:first-child { border-top: 0; }
.mail__fact dt { color: var(--muted); }
.mail__fact dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.mail__fact dd.is-open { color: #8a5a00; font-weight: 500; }
.mail__photos { display: flex; flex-wrap: wrap; gap: 8px; }
.mail__photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.mail__note p { font-size: 14px; color: var(--ink-2); }
.mail__todo { padding: 12px 14px; border-radius: var(--r-md); border: 1px dashed var(--mint-200); }
.mail__todo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mail__todo li { position: relative; padding-left: 24px; font-size: 14px; color: var(--ink); }
.mail__todo li::before { content: ""; position: absolute; left: 0; top: 3px; width: 15px; height: 15px; border-radius: 4px; border: 1.6px solid var(--petrol-600); }
.mail__transcript { font-size: 13.5px; }
.mail__transcript summary { cursor: pointer; font-weight: 600; color: var(--petrol-700); }
.mail__line { margin-top: 8px; color: var(--ink-2); }
.mail__line span { display: inline-block; min-width: 52px; margin-right: 8px; font-weight: 700; font-size: 12px; color: var(--muted); }
.mail__line--kunde span { color: var(--petrol-700); }
.mail__demo { font-size: 12px; color: var(--muted); padding-top: 4px; border-top: 1px solid var(--line); }

@media (min-width: 720px) {
  .viewswitch { grid-column: 1 / -1; }
  .inbox { grid-column: 1 / -1; margin: -140px 20px 0; }
  .mail__facts { grid-template-columns: 1fr 1fr; }
  .mail__fact:nth-child(2) { border-top: 0; }
  .mail__fact:nth-child(odd) { border-right: 1px solid var(--mint-100); }
}
@media (min-width: 1180px) {
  .stage { padding-top: 0; }
  .viewswitch { position: absolute; left: 0; top: -2px; }
  .chat { top: 56px; height: 600px; }
  .inbox { position: absolute; left: 0; right: 24px; top: 56px; bottom: 24px; max-height: none; margin: 0; }
}
/* Inhalte der Chef-Ansicht nie stauchen – die Box scrollt stattdessen */
.inbox__body { display: flex; flex-direction: column; }
.inbox__body > * { flex-shrink: 0; }
.inbox__body .btn { align-self: stretch; }
@media (max-width: 479px) { .mail__from span { display: none; } .mail__subject { font-size: 17px; } }
@media (min-width: 1180px) { .inbox:has(.inbox__empty) { bottom: auto; } }

/* Chef-Ansicht-Button hervorheben, solange er nicht aktiv ist */
.viewswitch [data-view="owner"][aria-selected="false"] {
  position: relative;
  background: #d3f1e4;
  color: #0b6b4f;
  box-shadow: inset 0 0 0 1px #a6e0c8;
}
.viewswitch [data-view="owner"][aria-selected="false"]:hover { background: #c2ebd9; color: #08573f; }
.viewswitch [data-view="owner"][aria-selected="false"]::after {
  content: ""; position: absolute; top: 3px; right: 5px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-500); box-shadow: 0 0 0 0 rgba(26, 155, 116, .55);
  animation: nudge 1.8s ease-out infinite;
}
.viewswitch.was-opened [data-view="owner"]::after { display: none; }
@keyframes nudge { 0% { box-shadow: 0 0 0 0 rgba(26, 155, 116, .55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(26, 155, 116, 0); } }

/* =========================================================
   Rechnung (Chef-Ansicht, Demo-Muster)
   ========================================================= */
.btn--accent { background: var(--green-500); color: #fff; box-shadow: 0 6px 16px -6px rgba(18, 128, 95, .6); }
.btn--accent:hover { background: var(--green-600); color: #fff; }
.btn__icon { font-size: 16px; line-height: 1; }
.btn--ghost { background: var(--white); color: var(--petrol-800); border-color: var(--line); }
.btn--ghost:hover { background: var(--mint-50); color: var(--petrol-800); }

.invoice-bar { display: flex; justify-content: space-between; gap: 8px; }
.invoice-hint { font-size: 12.5px; color: #6e4b00; background: #fff8e8; border: 1px dashed #ecd29a; border-radius: 10px; padding: 8px 12px; }

.invoice {
  position: relative; overflow: hidden;
  padding: 22px 18px; background: #fff; color: #1b1b1b;
  border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 30px -14px rgba(7, 49, 48, .25);
  font-size: 12.5px; line-height: 1.5;
}
.invoice__watermark {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font-size: clamp(64px, 16vw, 130px); font-weight: 800; letter-spacing: .1em;
  color: rgba(11, 58, 57, .05); transform: rotate(-24deg);
}
.invoice__top { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--petrol-800); }
.invoice__brand strong { display: block; font-size: 15px; color: var(--petrol-900); }
.invoice__brand span, .invoice__sender { color: #555; font-size: 11.5px; }
.invoice__sender { text-align: right; }
.invoice__small { display: block; font-size: 9.5px; color: #777; text-decoration: underline; text-underline-offset: 2px; }
.invoice__addr { margin-top: 18px; }
.invoice__addr p { margin-top: 4px; font-size: 13px; }
.invoice__ph { background: #fff4dc; color: #6e4b00; padding: 0 3px; border-radius: 3px; }
.invoice__head { display: grid; gap: 10px; margin-top: 18px; }
.invoice__head h4 { margin: 0; font-size: 20px; letter-spacing: -0.01em; color: var(--petrol-950); }
.invoice__head dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.invoice__head dt { color: #777; font-size: 11px; }
.invoice__head dd { margin: 0; font-weight: 600; }
.invoice__intro { margin-top: 16px; }

.invoice__table { margin-top: 14px; border-top: 1px solid #ddd; }
.invoice__row {
  display: grid; grid-template-columns: 24px 1fr; gap: 4px 8px;
  padding: 9px 0; border-bottom: 1px solid #eee;
}
.invoice__row--head { display: none; }
.invoice__pos { color: #777; }
.invoice__desc small { display: block; color: #8a5a00; font-size: 11px; }
.invoice__qty, .invoice__price, .invoice__sum { grid-column: 2; }
.invoice__qty, .invoice__price { display: inline-flex; align-items: center; gap: 4px; color: #555; }
.invoice__sum { font-weight: 700; }
.invoice input {
  width: 72px; height: 28px; padding: 0 6px; text-align: right;
  font: inherit; font-size: 12.5px; color: #1b1b1b;
  border: 1px solid var(--mint-200); border-radius: 6px; background: #fbfdfc;
}
.invoice input:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 2px rgba(26, 155, 116, .15); }
.invoice__totals { margin: 12px 0 0 auto; max-width: 280px; display: grid; gap: 4px; }
.invoice__totals div { display: flex; justify-content: space-between; gap: 12px; }
.invoice__grand { margin-top: 4px; padding-top: 6px; border-top: 2px solid var(--petrol-800); font-weight: 800; font-size: 14px; color: var(--petrol-950); }
.invoice__note { margin-top: 10px; color: #444; }
.invoice__foot {
  display: grid; gap: 10px; margin-top: 20px; padding-top: 12px; border-top: 1px solid #ddd;
  font-size: 10.5px; color: #666;
}
.invoice__mailto { margin-top: 10px; text-decoration: none; }

@media (min-width: 560px) {
  .invoice { padding: 32px 30px; }
  .invoice__head { grid-template-columns: auto 1fr; align-items: end; }
  .invoice__head dl { justify-self: end; }
  .invoice__row { grid-template-columns: 26px 1fr 110px 110px 84px; align-items: center; }
  .invoice__row--head { display: grid; font-size: 10.5px; font-weight: 700; color: #777; text-transform: uppercase; letter-spacing: .04em; }
  .invoice__qty, .invoice__price, .invoice__sum { grid-column: auto; }
  .invoice__sum, .invoice__row--head span:last-child { text-align: right; }
  .invoice__foot { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 559px) { .invoice__top { flex-direction: column; gap: 6px; } .invoice__sender { text-align: left; } }

/* =========================================================
   Reihenfolge: zuerst Chat, dann Nutzen (Mobil/Tablet)
   Desktop: Text + Nutzen links, Demo rechts
   ========================================================= */
.hero__benefit { margin-top: 0; }
@media (min-width: 1180px) {
  .hero__grid {
    grid-template-areas: "copy stage" "benefit stage";
    grid-template-rows: auto 1fr;
    row-gap: 32px;
  }
  .hero__copy { grid-area: copy; align-self: end; padding-bottom: 0; }
  .stage { grid-area: stage; align-self: center; }
  .hero__benefit { grid-area: benefit; align-self: start; }
}

/* Kurze Erklärung oben im Chat */
.chat-intro {
  align-self: stretch; padding: 12px 14px; margin-bottom: 4px;
  border-radius: 14px; background: var(--mint-100); border: 1px solid var(--mint-200);
  font-size: 13.5px; line-height: 1.45; color: var(--ink-2);
  animation: msg-in .28s ease both;
}
.chat-intro strong { display: block; margin-bottom: 2px; font-size: 13.5px; color: var(--petrol-800); }

/* Hinweis-Punkt am Chef-Button erst zeigen, wenn eine Anfrage fertig ist */
.viewswitch:not(.is-ready) [data-view="owner"]::after { display: none; }

/* Preis-Hinweis (markiert) */
.price-note { margin-top: 18px; font-size: 1.1rem; font-weight: 700; color: var(--petrol-950); }
.price-note mark {
  padding: 4px 12px; border-radius: 8px;
  background: linear-gradient(180deg, #d3f1e4, #bfe9d6); color: var(--petrol-900);
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* Anpassbarkeit des Assistenten */
.custom { margin-top: 26px; max-width: 480px; }
.custom__title { font-weight: 700; font-size: 15.5px; color: var(--petrol-900); margin-bottom: 12px; }
.custom__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.custom__item {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 12px; background: var(--mint-50); border: 1px solid var(--line); border-radius: var(--r-md);
}
.custom__item svg { color: var(--green-600); margin-bottom: 4px; }
.custom__item strong { font-size: 14.5px; color: var(--petrol-900); }
.custom__item span { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
@media (max-width: 380px) { .custom__grid { gap: 8px; } .custom__item { padding: 12px 10px; } }
@media (max-width: 559px) {
  .custom__grid { grid-template-columns: 1fr; gap: 8px; }
  .custom__item { display: grid; grid-template-columns: 28px auto 1fr; align-items: center; column-gap: 10px; padding: 11px 14px; }
  .custom__item svg { margin: 0; }
  .custom__item span { text-align: right; }
}
