/* Kundenportal leomore – mobil zuerst. Verlauf nur als Akzent. */
@font-face { font-family: 'Clash Display'; src: url('/fonts/clash-display-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Clash Display'; src: url('/fonts/clash-display-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'General Sans'; src: url('/fonts/general-sans-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'General Sans'; src: url('/fonts/general-sans-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'General Sans'; src: url('/fonts/general-sans-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --bg: #FBF8F3; --card: #FFFFFF; --alt: #F4EFE6; --ink: #211A12; --soft: #5C544A; --faint: #6F6659;
  --line: rgba(33, 26, 18, .10); --line2: rgba(33, 26, 18, .16);
  --c3: #F85701; --c3t: #BC4200;
  --grad: linear-gradient(100deg, #F9DD00 0%, #F8950A 38%, #F85701 70%, #F70806 100%);
  --ok: #1F6B3A; --okbg: #E3F1E7; --warn: #A32118; --warnbg: #FBE3E0; --info: #1E4E8C; --infobg: #E3ECF8; --wait: #7A5A00; --waitbg: #FDF3CC;
  --sh: 0 1px 2px rgba(33, 26, 18, .04), 0 2px 8px rgba(33, 26, 18, .04);
  --r: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 'General Sans', system-ui, sans-serif; }
h1, h2 { font-family: 'Clash Display', 'General Sans', system-ui, sans-serif; font-weight: 600; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 26px; margin-top: 6px; }
a { color: var(--c3t); }
:focus-visible { outline: 2px solid var(--c3); outline-offset: 2px; }

.kopf { position: sticky; top: 0; z-index: 5; background: rgba(251, 248, 243, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.kopf-in { max-width: 560px; margin: 0 auto; padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wortmarke { font-family: 'Clash Display', sans-serif; font-weight: 700; font-size: 18px; }
.akzent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chip, .ki { font-size: 12px; background: var(--alt); border-radius: 999px; padding: 3px 10px; color: var(--soft); white-space: nowrap; }

.seite { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(48px + env(safe-area-inset-bottom)); }
.sub { color: var(--soft); font-size: 14px; margin: 4px 0 0; }
.notiz { font-size: 12px; color: var(--faint); margin: 14px 2px 0; }
.laedt { color: var(--faint); }
.rel { font-size: 13px; color: var(--faint); margin: 6px 0 0; }
.voll { width: 100%; }

.karte { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); padding: 14px; margin-top: 14px; }
.karte-h { font-size: 17px; }
.zeile { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
input, textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--line2); border-radius: 12px; padding: 10px 14px; }
input { min-height: 46px; }
textarea { resize: vertical; min-height: 46px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line2);
  background: #fff; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; color: var(--ink); text-decoration: none; }
.btn.pri { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.no { color: var(--warn); border-color: rgba(163, 33, 24, .35); }
.btn[disabled] { opacity: .55; cursor: default; }
.link { border: 0; background: none; padding: 0; font: inherit; color: var(--faint); text-decoration: underline; cursor: pointer; }
#login-form .btn { margin-top: 12px; width: 100%; }
.meldung { font-size: 14px; color: var(--soft); margin: 10px 0 0; min-height: 1em; }
.meldung.fehler { color: var(--warn); }
.meldung:empty { display: none; }

.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.b-ok { background: var(--okbg); color: var(--ok); }
.b-warn { background: var(--warnbg); color: var(--warn); }
.b-info { background: var(--infobg); color: var(--info); }
.b-wait { background: var(--waitbg); color: var(--wait); }
.b-neutral { background: var(--alt); color: var(--soft); }

progress { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border: 0; border-radius: 999px; background: var(--alt); overflow: hidden; margin: 10px 0 0; display: block; }
progress::-webkit-progress-bar { background: var(--alt); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--grad); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--grad); border-radius: 999px; }

.auftraege { list-style: none; margin: 8px 0 0; padding: 0; }
.auftraege li { padding: 10px 0; border-top: 1px solid var(--line); }
.auftraege li:first-child { border-top: 0; }
.a-titel { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
details summary { cursor: pointer; font-size: 14px; color: var(--soft); margin-top: 8px; min-height: 32px; }

.freigabe { border-color: var(--c3); box-shadow: 0 0 0 3px rgba(248, 87, 1, .10); }
.freigabe .f-vorschau { margin-top: 12px; }
.knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.f-grund { margin-top: 10px; display: grid; gap: 8px; }

.chat { list-style: none; margin: 12px 0 0; padding: 0 2px 0 0; display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow-y: auto; overscroll-behavior: contain; }
.msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .w { display: block; font-size: 11px; color: var(--faint); margin-bottom: 2px; font-weight: 600; }
.msg.kunde { background: var(--alt); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.leo { background: #fff; border: 1px solid var(--line2); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.leon { background: var(--ink); color: #fff; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.leon .w { color: #d9d2c7; }
.msg.system { align-self: center; background: none; font-size: 13px; color: var(--soft); text-align: center; }
.msg.leer { align-self: center; color: var(--faint); font-size: 14px; }
.compose { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: flex-end; }
.compose textarea { flex: 1 1 200px; border-radius: 22px; }

@media (min-width: 720px) {
  .seite { padding-top: 28px; }
  h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
