/* =========================================================================
   Vertriebs-Tool — Gestaltung

   Farben aus zandoriasystems.de, damit sich das Werkzeug wie ein Teil des
   Hauses anfühlt.

   Für das Handy gebaut, nicht für den Schreibtisch: Der Vertriebler füllt das
   Formular beim Kunden aus, im Stehen, mit dem Daumen. Große Felder, kein
   Zoom beim Antippen (Schriftgröße 16px aufwärts), alles untereinander.
   ========================================================================= */

:root{
  --bg:#0A0B0D;
  --bg-soft:#0E1013;
  --surface:#121519;
  --surface-2:#171B21;
  --line:#232830;
  --text:#F4F7FA;
  --muted:#9AA4AF;
  --muted-2:#6B7480;
  --accent:#8B5CFF;
  --accent-2:#46B1FF;
  --gut:#34d399;
  --warn:#fbbf24;
  --schlecht:#f87171;
  --radius:14px;
  --schatten:0 10px 34px rgba(0,0,0,.45);
}

*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:16px; line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
a{ color:var(--accent-2); }
h1,h2,h3{ line-height:1.25; margin:0; letter-spacing:-.01em; }

/* ---- Kopfzeile ------------------------------------------------------- */
.kopf{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; gap:14px;
  padding:12px 16px; background:rgba(10,11,13,.92);
  backdrop-filter:blur(10px); border-bottom:1px solid var(--line);
}
.kopf__marke{ font-weight:800; letter-spacing:-.02em; white-space:nowrap; }
.kopf__marke span{
  background:linear-gradient(92deg,var(--accent),var(--accent-2));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.kopf__rest{ margin-left:auto; display:flex; align-items:center; gap:10px; font-size:.86rem; color:var(--muted); }
/* Auf dem Handy ist der Platz oben knapp: Der eigene Name ist dort verzichtbar,
   die Zeile darf auf keinen Fall umbrechen. */
@media (max-width:560px){
  .kopf{ padding:10px 12px; gap:10px; }
  .kopf__marke{ font-size:.95rem; }
  #wer{ display:none; }
}

/* ---- Grundgerüst ----------------------------------------------------- */
.huelle{ max-width:780px; margin:0 auto; padding:20px 16px 120px; }
.huelle--breit{ max-width:1120px; }

/* ---- Knöpfe ---------------------------------------------------------- */
.knopf{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 20px; border:1px solid var(--line); border-radius:100px;
  background:var(--surface-2); color:var(--text);
  font:inherit; font-weight:600; font-size:.95rem; cursor:pointer;
  transition:filter .15s, border-color .15s, opacity .15s;
  min-height:46px;                      /* Daumen-tauglich */
}
.knopf:hover:not(:disabled){ filter:brightness(1.22); }
.knopf:disabled{ opacity:.5; cursor:not-allowed; }
.knopf--wichtig{
  background:linear-gradient(92deg,var(--accent),var(--accent-2));
  border-color:transparent; color:#fff; font-weight:700;
}
.knopf--schlicht{ background:transparent; }
.knopf--gefahr{ background:transparent; border-color:rgba(248,113,113,.4); color:var(--schlecht); }
.knopf--klein{ padding:8px 14px; min-height:36px; font-size:.85rem; }
.knopf--voll{ width:100%; }

/* ---- Karten ---------------------------------------------------------- */
.karte{
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius); padding:20px;
}
.karte + .karte{ margin-top:14px; }

/* ---- Anmeldung ------------------------------------------------------- */
.anmeldung{
  min-height:100dvh; display:grid; place-items:center; padding:24px 16px;
}
.anmeldung__box{ width:100%; max-width:400px; }
.anmeldung__marke{ text-align:center; margin-bottom:26px; }
.anmeldung__marke b{ font-size:1.5rem; font-weight:800; letter-spacing:-.02em; }
.anmeldung__marke b span{
  background:linear-gradient(92deg,var(--accent),var(--accent-2));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.anmeldung__marke p{ color:var(--muted); font-size:.92rem; margin:6px 0 0; }

/* ---- Felder ---------------------------------------------------------- */
.feld{ margin-bottom:20px; }
.feld__label{ display:block; font-weight:600; font-size:.95rem; margin-bottom:7px; }
.feld__stern{ color:var(--accent); margin-left:3px; }
.feld input[type=text], .feld input[type=email], .feld input[type=tel],
.feld input[type=password], .feld input[type=date], .feld select, .feld textarea{
  width:100%; padding:13px 14px;
  background:var(--bg-soft); color:var(--text);
  border:1px solid var(--line); border-radius:11px;
  font:inherit; font-size:16px;         /* unter 16px zoomt iOS beim Antippen */
  transition:border-color .15s, background .15s;
}
.feld textarea{ resize:vertical; min-height:88px; line-height:1.6; }
.feld input:focus, .feld select:focus, .feld textarea:focus{
  outline:none; border-color:var(--accent); background:var(--surface);
}
.feld--fehlt input, .feld--fehlt select, .feld--fehlt textarea{
  border-color:rgba(248,113,113,.55);
}
.feld select{ appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%239AA4AF' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 14px center; background-size:12px;
  padding-right:38px;
}

/* Ankreuzfeld — großzügig, damit man es mit dem Daumen trifft */
.feld--haken label{
  display:flex; gap:12px; align-items:flex-start; cursor:pointer;
  padding:14px; background:var(--bg-soft); border:1px solid var(--line); border-radius:11px;
}
.feld--haken input{ width:22px; height:22px; margin:1px 0 0; accent-color:var(--accent); flex:0 0 auto; }
.feld--haken.feld--fehlt label{ border-color:rgba(248,113,113,.55); }

/* Das „wofür brauchen wir das" — eingeklappt, damit das Formular ruhig
   bleibt, aber jederzeit erreichbar, wenn der Kunde nachfragt. */
.warum{ margin-top:7px; }
.warum summary{
  list-style:none; cursor:pointer; display:inline-flex; align-items:center; gap:5px;
  color:var(--muted-2); font-size:.83rem;
}
.warum summary::-webkit-details-marker{ display:none; }
.warum summary::before{ content:"ⓘ"; }
.warum summary:hover{ color:var(--accent-2); }
.warum p{
  margin:8px 0 0; padding:11px 13px; font-size:.87rem; line-height:1.6;
  color:var(--muted); background:var(--bg-soft);
  border-left:2px solid var(--accent); border-radius:0 9px 9px 0;
}

/* ---- Abschnitte ------------------------------------------------------ */
.abschnitt{ margin-bottom:16px; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; background:var(--surface); }
.abschnitt__kopf{
  display:flex; align-items:center; gap:12px; width:100%;
  padding:17px 18px; background:var(--surface-2); border:0;
  color:var(--text); font:inherit; text-align:left; cursor:pointer;
}
.abschnitt__nr{
  flex:0 0 auto; width:27px; height:27px; border-radius:50%;
  display:grid; place-items:center; font-size:.8rem; font-weight:700;
  background:var(--bg-soft); color:var(--muted); border:1px solid var(--line);
}
.abschnitt--fertig .abschnitt__nr{ background:var(--gut); color:#04240f; border-color:transparent; }
.abschnitt--offen  .abschnitt__nr{ background:rgba(251,191,36,.16); color:var(--warn); border-color:rgba(251,191,36,.4); }
.abschnitt__titel{ flex:1 1 auto; font-weight:700; font-size:1rem; }
.abschnitt__zaehler{ flex:0 0 auto; font-size:.8rem; color:var(--muted); }
.abschnitt__pfeil{ flex:0 0 auto; color:var(--muted); transition:transform .2s; }
.abschnitt[open] .abschnitt__pfeil{ transform:rotate(180deg); }
.abschnitt__inhalt{ padding:20px 18px 6px; }
.abschnitt__hinweis{
  margin:0 0 20px; color:var(--muted); font-size:.9rem; line-height:1.6;
  padding-bottom:16px; border-bottom:1px solid var(--line);
}

/* ---- Speicherleiste am unteren Rand ---------------------------------- */
.leiste{
  position:fixed; left:0; right:0; bottom:0; z-index:60;
  padding:12px 16px calc(12px + env(safe-area-inset-bottom));
  background:rgba(10,11,13,.95); backdrop-filter:blur(10px);
  border-top:1px solid var(--line);
}
.leiste__innen{
  max-width:780px; margin:0 auto; display:flex; align-items:center; gap:12px;
}
.leiste__stand{ flex:1 1 auto; min-width:0; font-size:.85rem; color:var(--muted); }
.leiste__stand b{ color:var(--text); }

/* ---- Fortschritt ----------------------------------------------------- */
.balken{ height:5px; background:var(--surface-2); border-radius:100px; overflow:hidden; margin-top:7px; }
.balken__fuell{
  height:100%; width:0; border-radius:100px;
  background:linear-gradient(92deg,var(--accent),var(--accent-2));
  transition:width .35s ease;
}

/* ---- Auftragsliste --------------------------------------------------- */
.liste{ display:grid; gap:12px; }
.zeile{
  display:flex; align-items:center; gap:14px; width:100%;
  padding:16px 18px; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius); color:var(--text); font:inherit; text-align:left; cursor:pointer;
  transition:border-color .15s, transform .1s;
}
.zeile:hover{ border-color:var(--accent); }
.zeile:active{ transform:scale(.995); }
.zeile__haupt{ flex:1 1 auto; min-width:0; }
.zeile__titel{ font-weight:700; font-size:1.02rem; margin-bottom:3px; }
.zeile__unter{ font-size:.85rem; color:var(--muted); display:flex; flex-wrap:wrap; gap:4px 12px; }
.zeile__rechts{ flex:0 0 auto; text-align:right; display:flex; flex-direction:column; align-items:flex-end; gap:6px; }

.merkmal{
  display:inline-flex; align-items:center; gap:5px;
  padding:4px 11px; border-radius:100px; font-size:.76rem; font-weight:700;
  white-space:nowrap;
}
.merkmal--entwurf     { background:rgba(154,164,175,.16); color:var(--muted); }
.merkmal--eingereicht { background:rgba(139,92,255,.18);  color:#c4b0ff; }
.merkmal--in_arbeit   { background:rgba(70,177,255,.16);  color:#8fd0ff; }
.merkmal--fragen_offen{ background:rgba(251,191,36,.16);  color:var(--warn); }
.merkmal--fertig      { background:rgba(52,211,153,.16);  color:var(--gut); }

/* ---- Nachrichten am Auftrag ------------------------------------------ */
.nachricht{
  padding:13px 15px; background:var(--bg-soft); border:1px solid var(--line);
  border-radius:11px; margin-bottom:10px;
}
.nachricht--intern{ border-left:3px solid var(--accent); }
.nachricht__kopf{ font-size:.8rem; color:var(--muted); margin-bottom:5px; }
.nachricht__kopf b{ color:var(--text); }
.nachricht__text{ white-space:pre-wrap; font-size:.93rem; line-height:1.6; }

/* ---- Dateien --------------------------------------------------------- */
.datei{
  display:flex; align-items:center; gap:12px;
  padding:11px 14px; background:var(--bg-soft);
  border:1px solid var(--line); border-radius:11px; margin-bottom:8px;
}
.datei__name{ flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.9rem; }
.datei__groesse{ flex:0 0 auto; font-size:.8rem; color:var(--muted); }

.ablage{
  border:2px dashed var(--line); border-radius:var(--radius);
  padding:26px 18px; text-align:center; cursor:pointer;
  transition:border-color .15s, background .15s;
}
.ablage:hover, .ablage--drueber{ border-color:var(--accent); background:var(--surface-2); }
.ablage b{ display:block; margin-bottom:4px; }
.ablage span{ color:var(--muted); font-size:.87rem; }

/* ---- Hinweise -------------------------------------------------------- */
.hinweis{
  position:fixed; left:50%; bottom:88px; transform:translate(-50%,16px);
  max-width:min(520px,calc(100vw - 32px));
  padding:13px 20px; border-radius:12px; text-align:center;
  background:var(--surface-2); border:1px solid var(--line);
  box-shadow:var(--schatten); font-size:.93rem;
  opacity:0; pointer-events:none; z-index:200;
  transition:opacity .22s, transform .22s;
}
.hinweis--an{ opacity:1; transform:translate(-50%,0); }
.hinweis--fehler{ border-color:rgba(248,113,113,.5); }

.kasten{
  padding:14px 16px; border-radius:11px; font-size:.9rem; line-height:1.6;
  margin-bottom:16px;
}
.kasten--warn{ background:rgba(251,191,36,.09); border:1px solid rgba(251,191,36,.28); color:#f5deb0; }
.kasten--fehler{ background:rgba(248,113,113,.09); border:1px solid rgba(248,113,113,.28); color:#f7c5c5; }
.kasten--info{ background:rgba(70,177,255,.08); border:1px solid rgba(70,177,255,.24); color:#bfe0fa; }
.kasten--gut{ background:rgba(52,211,153,.09); border:1px solid rgba(52,211,153,.26); color:#b3e6d0; }
.kasten b{ color:#fff; }

.leer{ text-align:center; padding:60px 20px; color:var(--muted); }
.leer__gross{ font-size:2.4rem; margin-bottom:12px; opacity:.5; }

/* ---- Anzeige eines eingereichten Auftrags ---------------------------- */
.werte{ display:grid; gap:1px; background:var(--line); border-radius:11px; overflow:hidden; }
.wert{ display:grid; grid-template-columns:1fr; gap:2px; padding:12px 15px; background:var(--surface); }
.wert__label{ font-size:.78rem; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.wert__inhalt{ white-space:pre-wrap; font-size:.95rem; }
.wert--geheim .wert__inhalt{ font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.88rem; color:var(--warn); }

/* ---- Reiter ---------------------------------------------------------- */
.reiter{ display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; margin-bottom:18px; scrollbar-width:none; }
.reiter::-webkit-scrollbar{ display:none; }
.reiter__knopf{
  flex:0 0 auto; padding:9px 16px; border-radius:100px;
  background:var(--surface); border:1px solid var(--line);
  color:var(--muted); font:inherit; font-size:.87rem; font-weight:600; cursor:pointer;
}
.reiter__knopf--aktiv{ background:var(--surface-2); color:var(--text); border-color:var(--accent); }

.verstecken{ display:none !important; }

@media (min-width:720px){
  .wert{ grid-template-columns:220px 1fr; gap:18px; align-items:baseline; }
  .huelle{ padding:28px 24px 120px; }
}
