/* Kundenportal – „Soft“ wie Startseite und Mitarbeiter-App: helles Soft-UI (Relief-Flächen, eingedrückte Felder, dunkle
   Pillen-Knöpfe mit warmem Lichtschein), schwebende helle Kopfleiste mit Firmenlogo.
   Eigenständig, ohne Mitarbeiter-SPA. Mobil zuerst. Keine Inline-Styles (strenge CSP), nur CSSOM-Variablen aus dem Skript. */
@font-face { font-family: "Bricolage Grotesque"; src: url("/static/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/static/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --ink: #1b1d22; --ink-2: #26292f; --glow-c: #e8892b; --hi: rgb(255 255 255 / 70%);
  --bg: #d6d9de; --surface: #eceef1; --surface-2: #e2e5e9; --border: #ccd1d8; --text: #15171c; --muted: #4f5561;
  --accent: #26292f; --accent-soft: #d3d7de; --grad: linear-gradient(110deg, #26292f, #6a5646 55%, #e8892b);
  --grad-btn: linear-gradient(180deg, #363940, #17191d);
  --press: inset 3px 3px 7px rgb(136 144 158 / 42%), inset -3px -3px 7px rgb(255 255 255 / 85%);
  --glow: 0 14px 26px -10px var(--glow-c), 0 4px 10px -2px rgb(20 22 26 / 30%);
  --warm: #9a4306; --danger: #b42318; --danger-soft: #fdecea; --ok: #15803d; --ok-soft: #e3f6e9; --warn-soft: #fff3d6;
  --display: "Bricolage Grotesque", "Geist", system-ui, sans-serif; --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 20px; --tap: 48px; --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow: 8px 8px 20px rgb(136 144 158 / 42%), -8px -8px 18px rgb(255 255 255 / 82%); --shadow-l: 14px 14px 34px rgb(120 128 142 / 45%), -12px -12px 28px rgb(255 255 255 / 85%);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 16px/1.55 var(--sans); color: var(--text);
  background: radial-gradient(900px 600px at 30% 0%, rgb(255 255 255 / 55%), transparent 65%), linear-gradient(#d9dce1, #caced5) fixed; min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
a { color: var(--accent); }
h1 { font: 750 clamp(1.7rem, 4.6vw, 2.5rem)/1.08 var(--display); letter-spacing: -.035em; margin: 4px 0 14px; text-wrap: balance; }
h2 { font: 700 1.15rem/1.25 var(--display); letter-spacing: -.015em; margin: 0 0 10px; }
p { margin: 0 0 10px; white-space: pre-line; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 22px; padding-bottom: 28px; }
main.enter { animation: enter .5s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }
.muted { color: var(--muted); } .center { text-align: center; } .small { font-size: .86rem; }
.kicker { margin: 0 0 8px; display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: normal; }
.kicker::before { content: ""; width: 20px; height: 2px; border-radius: 2px; background: var(--grad); }

/* Kopfband */
.top { position: sticky; top: 0; z-index: 5; color: var(--text); overflow: hidden; isolation: isolate;
  background: rgb(236 238 241 / 84%); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hi); box-shadow: 0 10px 26px rgb(120 128 142 / 30%); }
.top-flow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .35; }
.top-in { max-width: 900px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 16px 8px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; min-height: 48px; }
.mark { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--grad-btn); color: #fff; font: 800 1.1rem var(--display); box-shadow: var(--glow); }
.logo { height: 34px; width: auto; max-width: 96px; object-fit: contain; flex: none; }
.brand-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-t b { font: 700 1.02rem var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-t small { font-size: .72rem; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.call { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 650; border-radius: 999px; padding: 0 16px; min-height: 44px;
  background: var(--surface); border: 1px solid var(--hi); box-shadow: var(--shadow); white-space: nowrap; }
.call::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgb(52 211 153 / 25%); }
.call:hover { box-shadow: var(--press); }
.nav { max-width: 900px; margin: 0 auto; padding: 2px 10px 10px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--muted); text-decoration: none; padding: 0 14px; border-radius: 999px; white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; gap: 6px;
  font-size: .94rem; font-weight: 500; transition: background .25s, color .25s; }
.nav a:hover { color: var(--text); background: var(--surface-2); box-shadow: var(--press); }
.nav a.active { color: #fff; background: var(--grad-btn); font-weight: 650; box-shadow: var(--glow); }
.nav .count { background: #f59e0b; color: #1a1205; border-radius: 999px; padding: 0 7px; font-size: .74rem; font-weight: 800; animation: bump 2s ease-in-out infinite; }
@keyframes bump { 50% { transform: scale(1.15); } }
.foot { color: var(--muted); font-size: .8rem; padding-bottom: 26px; text-align: center; }

/* Lade-Anzeige */
.loading { display: flex; justify-content: center; gap: 8px; padding: 60px 0; }
.loading span { width: 12px; height: 12px; border-radius: 50%; background: var(--grad-btn); box-shadow: var(--glow); animation: dots 1s var(--ease) infinite; }
.loading span:nth-child(2) { animation-delay: .15s; } .loading span:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 50% { transform: translateY(-12px); opacity: .5; } }

/* Begrüßung + Kacheln */
.hello { margin: 4px 0 20px; }
.hello h1 { font-size: clamp(2rem, 6vw, 3.1rem); margin-bottom: 6px; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin: 0 0 18px; }
.tile { --mx: 50%; --my: 50%; position: relative; overflow: hidden; isolation: isolate; background: var(--surface); border: 1px solid var(--hi); border-radius: var(--radius); padding: 16px;
  text-decoration: none; color: var(--text); min-height: 128px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s, border-color .3s; animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; background: radial-gradient(240px circle at var(--mx) var(--my), rgb(232 137 43 / 14%), transparent 70%); }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow), 0 16px 30px -18px var(--glow-c); }
.tile:hover::before { opacity: 1; }
.tile-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; margin-bottom: auto; background: var(--surface-2); box-shadow: var(--press); color: var(--muted); transition: all .35s var(--ease); }
.tile.has .tile-ic { background: var(--grad-btn); color: #fff; box-shadow: var(--glow); }
.tile strong { font: 800 2rem/1.05 var(--display); letter-spacing: -.03em; margin-top: 12px; }
.tile span:last-child { color: var(--muted); font-size: .88rem; }

/* Karten, Listen */
.box { background: var(--surface); border: 1px solid var(--hi); border-radius: var(--radius); padding: 18px; margin: 0 0 14px; box-shadow: var(--shadow); animation: rise .5s var(--ease) both; }
.box:nth-of-type(2) { animation-delay: .05s; } .box:nth-of-type(3) { animation-delay: .1s; } .box:nth-of-type(4) { animation-delay: .15s; }
.box.ok { background: var(--ok-soft); border-color: transparent; }
.box.danger { background: var(--danger-soft); border-color: color-mix(in oklab, var(--danger) 45%, transparent); }
.box.note { position: relative; overflow: hidden; color: #fff; border: 0; background: radial-gradient(500px 200px at 100% 120%, rgb(232 137 43 / 45%), transparent 70%), linear-gradient(180deg, #33363d, #17191d);
  box-shadow: var(--shadow), 0 18px 34px -16px var(--glow-c); }
.box.note .muted, .box.note .item .muted { color: #c4c8cf; }
.box.note .item { border-bottom-color: rgb(255 255 255 / 14%); color: #fff; }
.box.note .badge.info { background: rgb(255 255 255 / 18%); color: #fff; }
.box.warn { background: var(--warn-soft); border-color: transparent; }
.list { display: flex; flex-direction: column; }
.item { display: flex; gap: 12px; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; min-height: var(--tap); border-radius: 10px; transition: background .2s, padding .25s var(--ease); }
.item:last-child { border-bottom: 0; }
a.item:hover { background: var(--surface-2); padding-left: 10px; }
.item .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.badge { display: inline-block; font-size: .76rem; font-weight: 700; border-radius: 999px; padding: 3px 11px; background: var(--surface-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.info { background: var(--accent-soft); color: var(--accent); }
.badge.warn { background: var(--warn-soft); color: var(--warm); } .badge.danger { background: var(--danger-soft); color: var(--danger); }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 8px 0 0; font-size: .92rem; }
.meta dt { color: var(--muted); } .meta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.photos { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.photos a { display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--hi); background: var(--surface-2); box-shadow: var(--shadow); }
.photos img { width: 100%; height: 110px; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.photos a:hover img { transform: scale(1.06); }
.tabs { display: inline-flex; gap: 4px; margin: 0 0 14px; padding: 5px; flex-wrap: wrap; border-radius: 999px; background: var(--surface-2); box-shadow: var(--press); }
.tabs button { font: inherit; font-weight: 500; border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 0 16px; min-height: 42px; cursor: pointer; transition: all .25s var(--ease); }
.tabs button.active { background: var(--grad-btn); color: #fff; font-weight: 650; box-shadow: var(--glow); }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 18px 18px 18px 6px; margin: 0 0 10px; background: var(--surface); box-shadow: 4px 4px 10px rgb(136 144 158 / 35%), -4px -4px 10px rgb(255 255 255 / 80%); white-space: pre-line; overflow-wrap: anywhere; animation: rise .4s var(--ease) both; }
.msg.mine { margin-left: auto; border-radius: 18px 18px 6px 18px; color: #fff; background: var(--grad-btn); box-shadow: var(--glow); }
.msg small { display: block; color: var(--muted); }
.msg.mine small { color: #c4c8cf; }

/* Angebot */
.items { width: 100%; border-collapse: collapse; font-size: .92rem; }
.items th, .items td { padding: 9px 6px; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; }
.items th { font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.items .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.items tr.title td { background: var(--surface-2); font-weight: 700; }
.items tr.sum td { font-weight: 700; border-bottom: 2px solid var(--border); }
.items tr.opt td { color: var(--muted); }
.items .sub { display: block; color: var(--muted); font-size: .8rem; white-space: pre-line; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 6px; padding: 1px 6px; background: var(--surface-2); margin-right: 4px; }
.totals { width: 100%; font-size: .95rem; border-collapse: collapse; margin-top: 10px; }
.totals td { padding: 5px 0; } .totals td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.totals tr.grand td { font: 800 1.25rem var(--display); border-top: 2px solid var(--text); padding-top: 10px; }
@media (max-width: 560px) {
  .items thead { display: none; }
  .items tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; border-bottom: 1px solid var(--border); padding: 8px 0; }
  .items td { border: 0; padding: 0 4px; }
  .items td.pos, .items td.ep { display: none; }
  .items td.desc { grid-column: 1 / -1; }
  .items td.qty { color: var(--muted); text-align: left; }
}

/* Formulare */
label.field { display: block; margin: 0 0 14px; font-weight: 600; font-size: .92rem; }
label.field small { display: block; font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=tel], select, textarea { width: 100%; font: inherit; font-weight: 400;
  padding: 11px 14px; border: 1px solid transparent; border-radius: 16px; background: var(--surface-2); box-shadow: var(--press); color: var(--text); min-height: var(--tap); margin-top: 6px;
  transition: border-color .25s, box-shadow .25s, background .25s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--glow-c); box-shadow: var(--press), 0 0 0 4px rgb(232 137 43 / 25%); }
textarea { min-height: 110px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; margin: 0 0 14px; }
.check input { width: 24px; height: 24px; flex: none; margin-top: 2px; accent-color: #26292f; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.choices label { border: 1px solid var(--hi); border-radius: 999px; padding: 0 16px; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; font-weight: 500;
  cursor: pointer; background: var(--surface); box-shadow: 4px 4px 10px rgb(136 144 158 / 35%), -4px -4px 10px rgb(255 255 255 / 80%); transition: all .25s var(--ease); }
.choices label:has(input:checked) { background: var(--grad-btn); border-color: transparent; color: #fff; font-weight: 650; box-shadow: var(--glow); }
.choices input { width: 18px; height: 18px; accent-color: #e8892b; }
.sign { border: 2px dashed var(--border); border-radius: 18px; background: #f7f8f9; box-shadow: var(--press); touch-action: none; width: 100%; height: 180px; display: block; margin-top: 8px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn { position: relative; overflow: hidden; font: inherit; font-weight: 650; border: 1px solid transparent; border-radius: 999px; min-height: var(--tap); padding: 0 20px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform .25s var(--ease), box-shadow .3s, background .3s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad-btn); color: #fff; box-shadow: var(--glow), inset 0 1px 0 rgb(255 255 255 / 14%); }
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 14%) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.btn-primary:hover { box-shadow: 0 18px 30px -10px var(--glow-c), 0 4px 10px -2px rgb(20 22 26 / 30%); } .btn-primary:hover::after { transform: translateX(120%); }
.btn-wide { width: 100%; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--hi); box-shadow: 4px 4px 10px rgb(136 144 158 / 38%), -4px -4px 10px rgb(255 255 255 / 80%); }
.btn-ghost:hover { box-shadow: var(--press); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn:disabled { opacity: .6; cursor: progress; }
.err { color: var(--danger); font-weight: 600; background: var(--danger-soft); border-radius: 12px; padding: 10px 12px; animation: shake .45s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
details summary { cursor: pointer; }

/* Anmelden: großes Glas-Formular */
.login { max-width: 460px; margin: 30px auto; padding: 28px; border-radius: 30px; box-shadow: var(--shadow-l); }
.login h1 { font-size: clamp(2rem, 6vw, 2.6rem); }
.fx-confetti { position: fixed; inset: 0; z-index: 100; pointer-events: none; }

/* Widerrufsbelehrung (Verbraucher) */
.legal summary { min-height: 44px; display: flex; align-items: center; }
.legal p { white-space: pre-line; }
.legal .form-text { border-top: 1px solid var(--border); padding-top: 10px; }
.block { display: block; font-weight: 400; }

/* Übersicht je Projekt */
h2.section { margin: 22px 0 12px; }
a.project { display: block; color: var(--text); text-decoration: none; transition: transform .35s var(--ease), box-shadow .35s; }
a.project:hover { transform: translateY(-3px); box-shadow: var(--shadow), 0 16px 30px -18px var(--glow-c); }
.project-head { align-items: flex-start; margin-bottom: 8px; }
.project-head h2 { margin: 0 0 2px; }
.project-head .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.project-next { display: flex; gap: 10px; align-items: center; margin: 6px 0 10px; }
.project-next svg { flex: none; color: var(--muted); }
.photos-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 10px; }
.photos-sm span { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--hi); background: var(--surface-2); }
.photos-sm img { width: 100%; height: 84px; object-fit: cover; display: block; }
.item.cancelled strong { text-decoration: line-through; color: var(--muted); }
