/* BECO Belegportal (portal.beco.at) - Kunden-Oberflaeche
   ======================================================
   Markenfarben identisch zum Kanzlei-UI (programm/ui/static/style.css) und
   zum Kunden-Programm (intake/kundenprogramm/ui.html). Keine externen
   Schriften/CDNs: die Seite laedt NICHTS von fremden Servern (DSGVO + laeuft
   auch, wenn der Kunde hinter einer strengen Firewall sitzt). */

:root {
  --marke: #142f3a;          /* Kopfleiste dunkel */
  --marke-ink: #a7bfc9;
  --brand: #1f4e5f;
  --brand-2: #2d6b80;
  --brand-weich: #e7eef1;
  --brand-band: #d2e2e9;
  --ink: #16262e;
  --muted: #64747e;
  --flaeche: #eef2f4;
  --karte: #ffffff;
  --karte-2: #f7fafb;
  --gruen: #0a7d33;
  --gruen-weich: #e9f5ec;
  --rot: #b91c1c;
  --rot-weich: #fbecec;
  --gold: #9a7b12;
  --gold-weich: #fdf4dc;
  --rand: #d2e2e9;
  --kopf-verlauf: linear-gradient(115deg, #142f3a 0%, #1f4e5f 100%);
  --schatten: 0 1px 2px rgba(20, 47, 58, .06), 0 10px 30px rgba(20, 47, 58, .08);
  --schatten-klein: 0 1px 2px rgba(20, 47, 58, .06), 0 3px 10px rgba(20, 47, 58, .05);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --marke: #0a1216; --marke-ink: #8aa0ab;
    --brand: #57a2b8; --brand-2: #7cbdd0;
    --brand-weich: #1d333d; --brand-band: #233d47;
    --ink: #e4ecf0; --muted: #94a9b3;
    --flaeche: #0e171c; --karte: #16232a; --karte-2: #1b2b33;
    --gruen: #85c98a; --gruen-weich: #17301c;
    --rot: #e58a81; --rot-weich: #3b1d1a;
    --gold: #d9bb5c; --gold-weich: #33290e;
    --rand: #263a45;
    --kopf-verlauf: linear-gradient(115deg, #081014 0%, #16323c 100%);
    --schatten: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px rgba(0, 0, 0, .3);
    --schatten-klein: 0 1px 2px rgba(0, 0, 0, .3), 0 3px 10px rgba(0, 0, 0, .22);
  }
}

* { box-sizing: border-box; }

html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0; min-height: 100%;
  display: flex; flex-direction: column;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15.5px; line-height: 1.5;
  color: var(--ink); background: var(--flaeche);
  /* dezente Markenaura im Hintergrund - gibt der Seite Tiefe ohne Bild */
  background-image:
    radial-gradient(1100px 520px at 12% -8%, rgba(45, 107, 128, .13), transparent 62%),
    radial-gradient(900px 460px at 96% 4%, rgba(31, 78, 95, .10), transparent 60%);
  background-attachment: fixed;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
.dezent { color: var(--muted); }
.klein { font-size: .86rem; }
.versteckt { display: none !important; }

/* Tastatur-Bedienung sichtbar machen (Barrierefreiheit) */
:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 6px;
}
.sprung {
  position: absolute; left: -9999px; top: 0; z-index: 20;
  background: var(--karte); color: var(--ink); padding: 10px 16px; border-radius: 0 0 10px 0;
}
.sprung:focus { left: 0; }

/* ------------------------------------------------------------- Kopfleiste */
.kopf {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 13px clamp(16px, 4vw, 34px);
  background: var(--kopf-verlauf);
  color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 6px 22px rgba(20, 47, 58, .16);
  position: sticky; top: 0; z-index: 10;
}
.marke { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.marke:hover { text-decoration: none; }
.marke-zeichen {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  display: grid; place-items: center;
}
.marke-text { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.marke-name { font-weight: 700; font-size: 1.28rem; letter-spacing: .04em; }
.marke-sub { color: var(--marke-ink); font-size: .95rem; font-weight: 500; white-space: nowrap; }

.kopf-rechts { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kopf-ges { display: flex; align-items: center; gap: 8px; color: var(--marke-ink); font-size: .9rem; }
.kopf-ges b { color: #fff; font-weight: 600; }
.kopf-ges select {
  max-width: 46vw; background: rgba(255, 255, 255, .14); color: #fff; font: inherit;
  font-size: .9rem; border: 1px solid rgba(255, 255, 255, .3); border-radius: 8px;
  padding: 7px 10px; cursor: pointer;
}
.kopf-ges select option { color: #16262e; background: #fff; }
.abmelden {
  display: inline-flex; align-items: center; gap: 7px; color: var(--marke-ink);
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px; padding: 7px 12px; font-size: .88rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.abmelden:hover { background: rgba(255, 255, 255, .18); color: #fff; text-decoration: none; }

/* ------------------------------------------------------------------ Buehne */
.buehne {
  flex: 1; width: 100%; max-width: 1120px; margin: 0 auto;
  padding: clamp(20px, 4vw, 46px) clamp(16px, 4vw, 34px) 44px;
}
.buehne.schmal { max-width: 760px; }
/* Kurze Seiten (Anmelden/Aktivieren) optisch mittig setzen. auto-Raender statt
   justify-content: sonst wuerde bei kleinen Fenstern oben abgeschnitten. */
.buehne.mitte { display: flex; flex-direction: column; }
.buehne.mitte > * { margin-block: auto; width: 100%; }

/* Zweispaltig: links Nutzenversprechen, rechts Formular */
.split { display: grid; grid-template-columns: 1fr 420px; gap: clamp(24px, 5vw, 64px); align-items: center; }
.pitch { max-width: 34rem; }
.pitch h1 { font-size: clamp(1.65rem, 1.15rem + 1.6vw, 2.3rem); font-weight: 700; }
.pitch h1 .akzent {
  background: linear-gradient(96deg, var(--brand-2), var(--brand));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pitch .unterzeile { margin-top: 12px; color: var(--muted); font-size: 1.03rem; }

.vorteile { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.vorteile li { display: flex; align-items: flex-start; gap: 13px; }
.vorteile .sym {
  flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-weich); color: var(--brand-2); border: 1px solid var(--brand-band);
}
.vorteile b { display: block; font-size: .97rem; }
.vorteile span { color: var(--muted); font-size: .89rem; }

/* ------------------------------------------------------------------ Karten */
.karte {
  background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius);
  box-shadow: var(--schatten); padding: clamp(22px, 3vw, 30px);
}
.karte + .karte { margin-top: 18px; }
.karte h2 { font-size: 1.22rem; font-weight: 700; }
.karte > .dezent:first-of-type { margin-top: 4px; }
.karte-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* --------------------------------------------------------------- Formulare */
label { display: block; margin: 16px 0 6px; font-weight: 600; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input:not([type]), select {
  width: 100%; padding: 12px 13px; font: inherit; font-size: 1rem;
  color: var(--ink); background: var(--karte);
  border: 1.5px solid var(--rand); border-radius: 10px;
}
input::placeholder { color: var(--muted); opacity: .7; }
input:focus, select:focus {
  outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-weich);
}
input.code { font-family: Consolas, "Cascadia Mono", monospace; letter-spacing: .06em; }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 20px; border: 1.5px solid transparent; border-radius: 10px;
  font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s;
}
.knopf:active:not(:disabled) { transform: translateY(1px); }
.knopf.primaer { background: var(--brand); color: #fff; width: 100%; margin-top: 20px; }
.knopf.primaer:hover:not(:disabled) { background: var(--brand-2); text-decoration: none; }
.knopf.primaer:disabled { background: var(--brand-band); color: var(--muted); cursor: default; }
.knopf.geist {
  background: var(--karte); color: var(--brand-2); border-color: var(--rand); padding: 10px 16px; font-size: .93rem;
}
.knopf.geist:hover { background: var(--brand-weich); border-color: var(--brand-band); text-decoration: none; }
@media (prefers-color-scheme: dark) {
  .knopf.primaer { color: #0e171c; }
  .knopf.primaer:disabled { color: var(--muted); }
}

.formular-fuss { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rand);
  color: var(--muted); font-size: .89rem; }

/* Meldungen */
.meldung { margin-top: 14px; border-radius: 10px; padding: 11px 13px; font-size: .92rem; }
.meldung:empty { display: none; }
.meldung.fehler { background: var(--rot-weich); color: var(--rot); font-weight: 600; }
.meldung.info { background: var(--brand-weich); color: var(--brand-2); }
.hinweis {
  display: flex; gap: 11px; align-items: flex-start; margin-top: 18px;
  background: var(--karte-2); border: 1px solid var(--rand); border-radius: 11px;
  padding: 12px 14px; font-size: .88rem; color: var(--muted);
}
.hinweis svg { flex: none; margin-top: 1px; color: var(--brand-2); }

/* ------------------------------------------------------ Schritte (Aktivieren) */
.schritt-leiste { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.schritt { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .88rem; font-weight: 600; }
.schritt .nr {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-weich); color: var(--brand-2); font-size: .82rem; font-weight: 700;
  border: 1.5px solid var(--brand-band);
}
.schritt.aktiv { color: var(--ink); }
.schritt.aktiv .nr { background: var(--brand); color: #fff; border-color: var(--brand); }
.schritt.fertig .nr { background: var(--gruen-weich); color: var(--gruen); border-color: var(--gruen); }
.schritt-strich { flex: 1; height: 2px; background: var(--rand); border-radius: 2px; }

/* Passwort-Regeln (leben mit der Eingabe) */
.regeln { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 5px; }
.regeln li { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.regeln .haken {
  flex: none; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--rand);
  display: grid; place-items: center; font-size: .62rem; color: transparent;
}
.regeln li.ok { color: var(--gruen); }
.regeln li.ok .haken { background: var(--gruen); border-color: var(--gruen); color: #fff; }
@media (prefers-color-scheme: dark) { .regeln li.ok .haken { color: #0e171c; } }

/* -------------------------------------------------------------- Belegupload */
.upload-kopf { margin-bottom: 20px; }
.upload-kopf h1 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem); font-weight: 700; }
.upload-kopf .unterzeile { margin-top: 5px; color: var(--muted); }
.fuer-firma {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  background: var(--brand-weich); border: 1px solid var(--brand-band); color: var(--brand-2);
  border-radius: 999px; padding: 5px 13px 5px 10px; font-size: .88rem; font-weight: 600;
}
.fuer-firma svg { flex: none; }

.feld-titel { font-weight: 600; font-size: .92rem; margin-bottom: 8px; }
.segment { display: inline-flex; background: var(--karte-2); border: 1.5px solid var(--rand);
  border-radius: 11px; padding: 3px; gap: 3px; }
.segment button {
  border: 0; background: none; color: var(--muted); font: inherit; font-size: .93rem; font-weight: 600;
  padding: 9px 18px; border-radius: 8px; cursor: pointer; transition: background .15s, color .15s;
}
.segment button:hover:not(.aktiv) { background: var(--brand-weich); color: var(--brand-2); }
.segment button.aktiv { background: var(--brand); color: #fff; box-shadow: var(--schatten-klein); }
@media (prefers-color-scheme: dark) { .segment button.aktiv { color: #0e171c; } }
.segment-erklaerung { margin-top: 9px; color: var(--muted); font-size: .87rem; }

.zone {
  margin-top: 20px; border: 2px dashed var(--brand-band); border-radius: var(--radius);
  background: var(--karte-2); color: var(--muted);
  padding: clamp(26px, 5vw, 40px) 20px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.zone:hover, .zone.aktiv { border-color: var(--brand-2); background: var(--brand-weich); color: var(--brand-2); }
.zone.aktiv { border-style: solid; }
.zone .wolke { color: var(--brand-2); opacity: .9; }
.zone .haupt { display: block; margin-top: 10px; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.zone .haupt b { color: var(--brand-2); }
.zone .neben { display: block; margin-top: 5px; font-size: .86rem; }
.zone-knoepfe { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
/* Am Handy ist Fotografieren der Hauptweg: eigener voller Knopf, und die
   Ablagezone tritt zurueck (ziehen kann man dort ohnehin nicht). */
.knopf.primaer.foto-knopf { width: auto; margin-top: 0; padding: 12px 20px; }
.zone.touch { padding: 20px 16px; }
.zone.touch .wolke, .zone.touch .haupt { display: none; }
.foto-tipp { display: block; margin-top: 12px; font-size: .84rem; line-height: 1.45; }

.dateien { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.dateien li {
  display: flex; align-items: center; gap: 12px; padding: 9px 11px;
  background: var(--karte); border: 1px solid var(--rand); border-radius: 11px;
  animation: rein .2s ease-out;
}
.dateien .vorschau {
  flex: none; width: 42px; height: 42px; border-radius: 8px; overflow: hidden;
  background: var(--brand-weich); border: 1px solid var(--brand-band);
  display: grid; place-items: center; color: var(--brand-2);
  font-size: .62rem; font-weight: 700; letter-spacing: .04em;
}
.dateien .vorschau img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dateien .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: .94rem; font-weight: 500; }
.dateien .groesse { flex: none; color: var(--muted); font-size: .83rem;
  font-variant-numeric: tabular-nums; }
.dateien .groesse s { opacity: .6; margin-right: 2px; }
.dateien .weg {
  flex: none; border: 0; background: none; color: var(--muted); cursor: pointer;
  border-radius: 8px; padding: 5px 9px; font-size: 1rem; line-height: 1; font-family: inherit;
}
.dateien .weg:hover { background: var(--rot-weich); color: var(--rot); }
.dateien li.abgelehnt { border-color: var(--rot); background: var(--rot-weich); }
.dateien li.abgelehnt .vorschau { background: var(--rot-weich); border-color: var(--rot); color: var(--rot); }
.dateien li.abgelehnt .grund { color: var(--rot); font-size: .83rem; }

/* Angebot: mehrere Fotos gehoeren zu EINER (mehrseitigen) Rechnung */
.sammel { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-top: 12px; padding: 11px 13px; border-radius: 11px;
  background: var(--brand-weich); border: 1px solid var(--brand-band); }
.sammel-text { font-size: .89rem; color: var(--ink); }
.sammel .knopf { flex: none; background: var(--karte); }
.dateien .seiten-chip { flex: none; font-size: .72rem; font-weight: 700; letter-spacing: .03em;
  color: var(--brand-2); background: var(--brand-weich); border: 1px solid var(--brand-band);
  border-radius: 999px; padding: 2px 9px; }
.dateien .trennen { flex: none; border: 0; background: none; color: var(--muted);
  font: inherit; font-size: .82rem; text-decoration: underline; cursor: pointer;
  padding: 4px 6px; border-radius: 7px; }
.dateien .trennen:hover { color: var(--brand-2); background: var(--karte-2); }

.bereit-zeile { display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.bereit-zahl { font-size: .9rem; color: var(--muted); }
.bereit-zahl b { color: var(--ink); }
.knopf.primaer.senden { width: auto; min-width: 220px; margin-top: 0; }

.fortschritt { margin-top: 16px; }
.fortschritt-balken { height: 8px; border-radius: 999px; background: var(--brand-weich); overflow: hidden; }
.fortschritt-balken i { display: block; height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand)); transition: width .18s ease-out; }
.fortschritt-text { margin-top: 7px; font-size: .86rem; color: var(--muted); }

/* Ergebnis nach dem Senden */
.ergebnis { text-align: center; padding: clamp(18px, 4vw, 30px) 6px 6px; }
.ergebnis .siegel {
  width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--gruen-weich); color: var(--gruen); display: grid; place-items: center;
  animation: pop .34s cubic-bezier(.2, 1.4, .5, 1);
}
.ergebnis h2 { font-size: 1.3rem; }
.ergebnis .unterzeile { margin-top: 6px; color: var(--muted); }
.ergebnis-liste { list-style: none; margin: 20px auto 0; padding: 0; max-width: 460px;
  display: grid; gap: 6px; text-align: left; }
.ergebnis-liste li { display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 10px; background: var(--karte-2); border: 1px solid var(--rand); font-size: .91rem; }
.ergebnis-liste .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ergebnis-liste .status { flex: none; font-size: .82rem; font-weight: 600; color: var(--muted); }
.ergebnis-liste li.gut .zeichen { color: var(--gruen); }
.ergebnis-liste li.doppelt .zeichen { color: var(--gold); }
.ergebnis-liste li.schlecht { background: var(--rot-weich); border-color: var(--rot); }
.ergebnis-liste li.schlecht .zeichen, .ergebnis-liste li.schlecht .status { color: var(--rot); }
.ergebnis .knopf { margin-top: 22px; }

/* -------------------------------------------- Einladung: App-Icon anlegen */
.install-banner {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  background: var(--karte); border: 1px solid var(--brand-band); border-left: 4px solid var(--brand-2);
  border-radius: 12px; padding: 12px 14px; box-shadow: var(--schatten-klein);
  animation: rein .25s ease-out;
}
.install-icon { flex: none; width: 38px; height: 38px; border-radius: 9px; }
.install-text { flex: 1; min-width: 0; font-size: .89rem; color: var(--muted); line-height: 1.45; }
.install-text b { color: var(--ink); }
.install-banner .knopf { flex: none; }
.install-zu { flex: none; border: 0; background: none; color: var(--muted); cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 6px 8px; border-radius: 7px; font-family: inherit; }
.install-zu:hover { background: var(--brand-weich); color: var(--brand-2); }

/* -------------------------------------------------------------------- Fuss */
.fuss {
  flex: none; text-align: center; color: var(--muted); font-size: .82rem;
  padding: 16px 18px 22px; border-top: 1px solid var(--rand); background: var(--karte);
}
.fuss .schloss { display: inline-flex; align-items: center; gap: 6px; }
.fuss svg { vertical-align: -2px; }
.fuss .trenner { margin: 0 8px; opacity: .5; }

/* --------------------------------------------------------------- Bewegung */
@keyframes rein { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes dreh { to { transform: rotate(360deg); } }
@keyframes schweben { 50% { transform: translateY(-7px); } }
.dreher {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: dreh .7s linear infinite;
}
.beleg-bild { display: block; margin: 26px 0 0; max-width: 330px; width: 100%;
  animation: schweben 5.5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------- Schmale Geraete */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 26px; }
  .pitch { max-width: none; }
  .pitch .vorteile, .beleg-bild { display: none; }
  .marke-sub { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 15px; overflow-x: hidden; }
  /* Belegart-Umschalter auf die volle Breite legen - sonst schiebt er die
     Seite auf dem Handy quer (zwei lange Woerter passen nicht nebeneinander) */
  .segment { display: flex; width: 100%; }
  .segment button { flex: 1; min-width: 0; padding: 10px 4px; font-size: .84rem; }
  .kopf { padding: 11px 14px; gap: 10px; }
  .marke-name { font-size: 1.12rem; }
  .kopf-ges span { display: none; }
  .abmelden span { display: none; }
  .abmelden { padding: 8px 10px; }
  .karte { padding: 18px 16px; border-radius: 12px; }
  .knopf.primaer.senden { width: 100%; }
  .bereit-zeile { flex-direction: column; align-items: stretch; }
  .zone-knoepfe { flex-direction: column; }
  .zone-knoepfe .knopf { width: 100%; }
  .install-banner { padding: 10px 12px; gap: 10px; }
  .install-icon { width: 32px; height: 32px; }
}
