/* Demo Rissverpressung Frankfurt – hell, klar, handytauglich. Markenfarben von rissverpressung-frankfurt.de */
:root {
  --rot: #cd2122;
  --rot-hell: #fbeaea;
  --dunkel: #2b2f33;
  --text: #22262a;
  --grau: #6b7178;
  --linie: #e4e6e9;
  --flaeche: #f5f6f7;
  --weiss: #fff;
  --gruen: #1f8a5b;
  --gruen-hell: #e6f4ed;
  --gelb: #b7791f;
  --gelb-hell: #fdf3e1;
  --blau: #2463b5;
  --blau-hell: #e8f0fb;
  --radius: 12px;
  --schatten: 0 1px 3px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text); background: var(--flaeche);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--rot); }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ---------- Kopf ---------- */
.kopf {
  background: var(--dunkel); color: #fff; padding: 12px 16px;
  display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
.logo-mark { width: 6px; height: 28px; background: var(--rot); border-radius: 2px; }
.logo small { display: block; font-weight: 400; opacity: .7; font-size: 12px; letter-spacing: 0; }
.demo-badge {
  margin-left: auto; background: var(--rot); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 99px; letter-spacing: .5px;
}

main { max-width: 860px; margin: 0 auto; padding: 16px; }

/* ---------- Kennzahlen ---------- */
.zahlen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.zahl { background: var(--weiss); border-radius: var(--radius); padding: 12px; box-shadow: var(--schatten); }
.zahl b { display: block; font-size: 24px; line-height: 1.1; }
.zahl span { color: var(--grau); font-size: 12px; }
.zahl.warn b { color: var(--rot); }
@media (max-width: 560px) { .zahlen { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Knöpfe ---------- */
.btn {
  border: 1px solid var(--linie); background: var(--weiss); border-radius: 10px;
  padding: 9px 14px; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; color: var(--text); justify-content: center;
}
.btn:hover { border-color: #cfd3d7; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primaer { background: var(--rot); border-color: var(--rot); color: #fff; }
.btn.primaer:hover { background: #b51b1c; }
.btn.dunkel { background: var(--dunkel); border-color: var(--dunkel); color: #fff; }
.btn.gross { padding: 14px 18px; font-size: 16px; width: 100%; }
.btn.klein { padding: 6px 10px; font-size: 13px; }
.btn.rec { background: var(--rot); color: #fff; border-color: var(--rot); animation: puls 1.2s infinite; }
@keyframes puls { 50% { box-shadow: 0 0 0 6px rgba(205,33,34,.18); } }

.demo-leiste {
  background: var(--weiss); border: 1px dashed #d5d8dc; border-radius: var(--radius);
  padding: 10px; margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.demo-leiste .label { font-size: 12px; color: var(--grau); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-right: 4px; }

/* ---------- Filter ---------- */
.filter { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; padding-bottom: 2px; }
.chip {
  border: 1px solid var(--linie); background: var(--weiss); border-radius: 99px; padding: 5px 12px;
  font-size: 13px; cursor: pointer; white-space: nowrap;
}
.chip.aktiv { background: var(--dunkel); color: #fff; border-color: var(--dunkel); }

/* ---------- Liste ---------- */
.liste { display: flex; flex-direction: column; gap: 8px; }
.karte {
  background: var(--weiss); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--schatten);
  display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; cursor: pointer;
  border-left: 4px solid transparent; animation: rein .25s ease;
}
.karte:hover { box-shadow: 0 2px 6px rgba(0,0,0,.08), 0 8px 20px rgba(0,0,0,.06); }
.karte.prio-hoch { border-left-color: var(--rot); }
.karte.neu-markiert { animation: blink 1.6s ease; }
@keyframes rein { from { opacity: 0; transform: translateY(4px); } }
@keyframes blink { 0%,40% { background: #fff6d6; } }
.kanal-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--flaeche);
  display: grid; place-items: center; font-size: 20px;
}
.karte h3 { margin: 0; font-size: 15px; }
.karte .meta { color: var(--grau); font-size: 13px; }
.karte .kurz { font-size: 13px; margin-top: 2px; color: #444; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rechts { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.zeit { color: var(--grau); font-size: 12px; white-space: nowrap; }

.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.tag.besichtigung { background: var(--gruen-hell); color: var(--gruen); }
.tag.telefonisch { background: var(--blau-hell); color: var(--blau); }
.tag.ablehnen { background: var(--flaeche); color: var(--grau); }
.tag.status { background: var(--flaeche); color: var(--grau); }
.tag.faellig { background: var(--rot-hell); color: var(--rot); }
.tag.nachfassen { background: var(--gelb-hell); color: var(--gelb); }

.leer { text-align: center; color: var(--grau); padding: 40px 10px; }

/* ---------- Detail (Blatt von rechts / unten) ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20,22,25,.45); z-index: 40; display: flex; justify-content: flex-end; }
.blatt {
  background: var(--flaeche); width: min(640px, 100%); height: 100%; overflow-y: auto;
  animation: slide .2s ease; display: flex; flex-direction: column;
}
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.blatt-kopf {
  background: var(--weiss); padding: 14px 16px; border-bottom: 1px solid var(--linie);
  display: flex; gap: 12px; align-items: flex-start; position: sticky; top: 0; z-index: 2;
}
.blatt-kopf h2 { margin: 0; font-size: 18px; }
.blatt-kopf .meta { color: var(--grau); font-size: 13px; }
.zu { margin-left: auto; border: 0; background: var(--flaeche); width: 34px; height: 34px; border-radius: 50%; font-size: 18px; cursor: pointer; flex-shrink: 0; }
.blatt-inhalt { padding: 14px 16px 40px; display: flex; flex-direction: column; gap: 12px; }

.box { background: var(--weiss); border-radius: var(--radius); padding: 14px; box-shadow: var(--schatten); }
.box h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--grau); }
.box ul { margin: 4px 0 0; padding-left: 18px; }
.box li { margin: 2px 0; }
.box p { margin: 4px 0; }

.empfehlung { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; margin-bottom: 10px; }
.empfehlung .gross-icon { font-size: 28px; }
.empfehlung b { display: block; font-size: 16px; }
.empfehlung.besichtigung { background: var(--gruen-hell); color: #145c3c; }
.empfehlung.telefonisch { background: var(--blau-hell); color: #1a4a88; }
.empfehlung.ablehnen { background: var(--flaeche); color: var(--grau); }
.ki-hinweis { font-size: 12px; color: var(--grau); margin-top: 8px; }

.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .zwei { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { background: var(--rot-hell); color: var(--rot); font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }

.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.fotos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; cursor: zoom-in; background: var(--flaeche); }

.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle td { padding: 5px 0; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle td:first-child { color: var(--grau); width: 40%; padding-right: 10px; }
.tabelle tr:last-child td { border-bottom: 0; }

.sms {
  background: #e9e9eb; border-radius: 18px 18px 18px 4px; padding: 10px 14px; max-width: 92%;
  font-size: 14px; word-break: break-word;
}
.sms-kopf { font-size: 12px; color: var(--grau); margin-bottom: 6px; }
.original { white-space: pre-wrap; font-size: 14px; background: var(--flaeche); border-radius: 8px; padding: 10px; }
.entwurf { white-space: pre-wrap; font-size: 14px; background: #fffdf5; border: 1px solid #f1e6c4; border-radius: 8px; padding: 10px; }

.status-reihe { display: flex; flex-wrap: wrap; gap: 6px; }
.status-reihe .chip.aktiv { background: var(--rot); border-color: var(--rot); }

.aufmass-reihe { display: flex; gap: 8px; flex-wrap: wrap; }
.aufmass-reihe .btn { flex: 1; min-width: 150px; }
textarea {
  width: 100%; border: 1px solid var(--linie); border-radius: 10px; padding: 10px; min-height: 90px; resize: vertical; background: #fff;
}
.lade { display: flex; align-items: center; gap: 10px; color: var(--grau); font-size: 14px; padding: 6px 0; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--linie); border-top-color: var(--rot); border-radius: 50%; animation: dreh .8s linear infinite; flex-shrink: 0; }
@keyframes dreh { to { transform: rotate(360deg); } }
.fehler { background: var(--rot-hell); color: #8a1415; padding: 10px 12px; border-radius: 10px; font-size: 14px; }

.angebot-kurz { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.angebot-kurz .summe { font-size: 22px; font-weight: 700; }

/* ---------- Dialog ---------- */
.dialog-hg { position: fixed; inset: 0; background: rgba(20,22,25,.45); z-index: 60; display: grid; place-items: center; padding: 16px; }
.dialog { background: #fff; border-radius: 16px; padding: 18px; width: min(460px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.dialog h3 { margin: 0 0 6px; }
.dialog p { margin: 0 0 12px; color: var(--grau); font-size: 14px; }
.dialog .knoepfe { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.feld { display: block; margin-bottom: 12px; }
.feld > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.feld input, .feld select {
  width: 100%; border: 1px solid var(--linie); border-radius: 10px; padding: 11px 12px; background: #fff;
}
.feld input:focus, textarea:focus, .feld select:focus { outline: 2px solid rgba(205,33,34,.25); border-color: var(--rot); }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--dunkel); color: #fff;
  padding: 10px 16px; border-radius: 10px; z-index: 80; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2);
  animation: rein .2s ease; max-width: calc(100% - 32px);
}

.bild-gross { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 90; display: grid; place-items: center; cursor: zoom-out; }
.bild-gross img { max-width: 94vw; max-height: 90vh; border-radius: 8px; }

/* ---------- Kunden-Formular ---------- */
.kunde-seite main { max-width: 560px; }
.hero { background: var(--weiss); border-radius: var(--radius); padding: 18px; box-shadow: var(--schatten); margin-bottom: 12px; }
.hero h1 { font-size: 21px; margin: 0 0 6px; }
.hero p { margin: 0; color: var(--grau); }
.schritt { background: var(--weiss); border-radius: var(--radius); padding: 16px; box-shadow: var(--schatten); margin-bottom: 12px; }
.schritt h2 { font-size: 16px; margin: 0 0 12px; display: flex; gap: 8px; align-items: center; }
.schritt h2 .nr { background: var(--rot); color: #fff; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; }
.auswahl { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.auswahl label { cursor: pointer; }
.auswahl input { position: absolute; opacity: 0; pointer-events: none; }
.auswahl span { display: inline-block; border: 1px solid var(--linie); border-radius: 99px; padding: 8px 14px; font-size: 14px; background: #fff; }
.auswahl input:checked + span { background: var(--dunkel); color: #fff; border-color: var(--dunkel); }
.frage { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.foto-feld {
  border: 2px dashed #d5d8dc; border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; display: block; background: var(--flaeche);
}
.foto-feld b { display: block; font-size: 16px; margin-bottom: 4px; }
.foto-feld small { color: var(--grau); }
.vorschau { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.vorschau div { position: relative; }
.vorschau img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.vorschau button { position: absolute; top: 3px; right: 3px; border: 0; background: rgba(0,0,0,.6); color: #fff; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1; }
.hinweis-klein { font-size: 12px; color: var(--grau); margin-top: 10px; }
.danke { text-align: center; padding: 30px 18px; }
.danke .haken { font-size: 54px; }
.fuss { text-align: center; color: var(--grau); font-size: 12px; padding: 20px 10px 30px; }
.fuss a { color: var(--grau); }

/* ---------- Angebot (druckbar) ---------- */
.angebot-seite { background: #e9ebee; }
.papier { background: #fff; max-width: 820px; margin: 16px auto; padding: 44px 48px; box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.papier-kopf { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--rot); padding-bottom: 14px; margin-bottom: 26px; }
.papier-kopf .firma { font-weight: 800; font-size: 20px; }
.papier-kopf .firma small { display: block; font-weight: 400; font-size: 12px; color: var(--grau); }
.papier-kopf .adresse { text-align: right; font-size: 12px; color: var(--grau); }
.empfaenger { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 26px; font-size: 14px; }
.empfaenger table td { padding: 1px 0 1px 14px; }
.empfaenger table td:first-child { color: var(--grau); padding-left: 0; }
.papier h1 { font-size: 19px; margin: 0 0 10px; }
.pos-tabelle { width: 100%; border-collapse: collapse; font-size: 13px; margin: 16px 0; }
.pos-tabelle th { text-align: left; border-bottom: 2px solid var(--dunkel); padding: 6px 6px; font-size: 12px; }
.pos-tabelle td { border-bottom: 1px solid var(--linie); padding: 7px 6px; vertical-align: top; }
.pos-tabelle .r { text-align: right; white-space: nowrap; }
.pos-tabelle .hinweis { color: var(--grau); font-size: 12px; }
.summen { margin-left: auto; width: 280px; font-size: 14px; }
.summen td { padding: 4px 0; }
.summen td:last-child { text-align: right; }
.summen tr.brutto td { border-top: 2px solid var(--dunkel); font-weight: 700; font-size: 16px; padding-top: 8px; }
.entwurf-banner { background: var(--gelb-hell); color: #7a5214; border-radius: 10px; padding: 10px 14px; font-size: 13px; max-width: 820px; margin: 16px auto 0; }
.angebot-aktionen { max-width: 820px; margin: 12px auto 0; display: flex; gap: 8px; padding: 0 0; flex-wrap: wrap; }
.notiz-intern { max-width: 820px; margin: 0 auto 30px; }
@media (max-width: 640px) { .papier { padding: 24px 18px; margin: 10px; } .papier-kopf, .empfaenger { flex-direction: column; } .papier-kopf .adresse { text-align: left; } }
@media print {
  .angebot-seite { background: #fff; }
  .entwurf-banner, .angebot-aktionen, .notiz-intern, .kopf { display: none !important; }
  .papier { box-shadow: none; margin: 0; padding: 0; max-width: none; }
}
