/* GWG Störungsmanagement – Frontend & Hauswart-App. Nutzt die Theme-Farben, falls vorhanden. */
.gwgst { --g-p: var(--c-primary, #2e6b3a); --g-a: var(--c-accent, #c9a227); --g-e: var(--c-emergency, #c0392b); --g-line: var(--c-line, #e2e5e1); --g-alt: var(--c-bg-alt, #f4f6f2); --g-muted: var(--c-muted, #5f676d); --g-r: var(--radius, 6px); max-width: 860px; }
.gwgst * { box-sizing: border-box; }
.gwgst-ico { width: 1.15em; height: 1.15em; fill: currentColor; vertical-align: -.2em; flex: none; }
.gwgst input[type=text], .gwgst input[type=email], .gwgst input[type=tel], .gwgst input[type=number], .gwgst input[type=date], .gwgst input[type=search], .gwgst select, .gwgst textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #c8cec9; border-radius: var(--g-r); min-height: 46px; background: #fff; }
.gwgst textarea { min-height: 110px; }
.gwgst [aria-invalid=true] { border-color: var(--g-e); }
.gwgst-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--g-p); color: #fff; border: 2px solid var(--g-p); border-radius: var(--g-r); padding: 11px 20px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; min-height: 48px; }
.gwgst-btn:hover { filter: brightness(.92); color: #fff; }
.gwgst-btn:disabled { opacity: .6; cursor: wait; }
.gwgst-btn--ghost { background: transparent; color: var(--g-p); }
.gwgst-btn--ghost:hover { background: var(--g-p); color: #fff; }
.gwgst-btn--accent { background: var(--g-a); border-color: var(--g-a); color: #1d1d1b; }
.gwgst-btn--block { width: 100%; margin: 8px 0; }
.gwgst-field { display: block; margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.gwgst-field > span, .gwgst-field > legend, .gwgst-label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.gwgst-field abbr, .gwgst-check abbr { color: var(--g-e); text-decoration: none; }
.gwgst-error { display: block; color: var(--g-e); font-size: .86rem; margin-top: 4px; }
.gwgst-check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; cursor: pointer; }
.gwgst-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--g-p); flex: none; }
.gwgst-check--consent { font-size: .9rem; color: var(--g-muted); }
.gwgst-hp { position: absolute; left: -9999px; }
.gwgst-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.gwgst-field--full { grid-column: 1 / -1; }
@media (max-width: 600px) { .gwgst-grid { grid-template-columns: 1fr; } }
.gwgst-intro { font-size: 1.05rem; }
.gwgst-hint { font-size: .82rem; color: var(--g-muted); margin: 6px 0 0; }

.gwgst-emergency { background: #fdecea; border-left: 5px solid var(--g-e); padding: 14px 18px; border-radius: 0 var(--g-r) var(--g-r) 0; margin-bottom: 22px; }
.gwgst-emergency a { color: var(--g-e); font-weight: 700; }
.gwgst-alert { padding: 14px 18px; border-radius: var(--g-r); margin: 0 0 18px; }
.gwgst-alert--error { background: #fdecea; color: #8d2318; }
.gwgst-alert--success { background: #e8f4ea; color: #1d5a2a; }
.gwgst-alert--emergency { background: var(--g-e); color: #fff; margin-top: 12px; }
.gwgst-alert--emergency a { color: #fff; }

.gwgst-steps { list-style: none; counter-reset: s; display: flex; gap: 6px; padding: 0; margin: 0 0 24px; }
.gwgst-steps li { counter-increment: s; flex: 1; font-size: .82rem; font-weight: 600; color: var(--g-muted); padding-top: 10px; border-top: 4px solid var(--g-line); }
.gwgst-steps li::before { content: counter(s) ". "; }
.gwgst-steps li.is-active, .gwgst-steps li.is-done { color: var(--g-p); border-color: var(--g-p); }
.gwgst-step { border: 0; padding: 0; margin: 0; min-width: 0; display: none; }
.gwgst-step.is-active { display: block; }
.gwgst-step > legend { font-size: 1.3rem; font-weight: 700; margin-bottom: 14px; padding: 0; }
.gwgst-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }

.gwgst-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 20px; }
.gwgst-cat { cursor: pointer; }
.gwgst-cat input { position: absolute; opacity: 0; }
.gwgst-cat span { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 108px; padding: 12px 8px; border: 2px solid var(--g-line); border-radius: 10px; font-size: .88rem; font-weight: 600; line-height: 1.25; transition: border-color .15s, background .15s; background: #fff; }
.gwgst-cat .gwgst-ico { width: 32px; height: 32px; color: var(--g-p); }
.gwgst-cat:hover span { border-color: var(--g-p); }
.gwgst-cat input:checked + span { border-color: var(--g-p); background: color-mix(in srgb, var(--g-p) 9%, #fff); box-shadow: inset 0 0 0 1px var(--g-p); }
.gwgst-cat input:focus-visible + span { outline: 3px solid var(--g-a); }

.gwgst-urgency { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gwgst-urgency label { cursor: pointer; }
.gwgst-urgency input { position: absolute; opacity: 0; }
.gwgst-urgency span { display: block; padding: 12px 14px; border: 2px solid var(--g-line); border-radius: 10px; height: 100%; }
.gwgst-urgency small { display: block; color: var(--g-muted); font-size: .82rem; }
.gwgst-urgency input:checked + span { border-color: var(--g-p); background: color-mix(in srgb, var(--g-p) 8%, #fff); }
.gwgst-urgency .is-emergency input:checked + span { border-color: var(--g-e); background: #fdecea; }
.gwgst-urgency input:focus-visible + span { outline: 3px solid var(--g-a); }
@media (max-width: 600px) { .gwgst-urgency { grid-template-columns: 1fr; } }

.gwgst-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gwgst-chips label { cursor: pointer; }
.gwgst-chips input { position: absolute; opacity: 0; }
.gwgst-chips span { display: inline-block; padding: 8px 14px; border: 1px solid #c8cec9; border-radius: 20px; font-size: .9rem; background: #fff; }
.gwgst-chips input:checked + span { background: var(--g-p); border-color: var(--g-p); color: #fff; }
.gwgst-chips input:focus-visible + span { outline: 3px solid var(--g-a); }

.gwgst-upload { display: flex; cursor: pointer; }
.gwgst-upload input { position: absolute; opacity: 0; width: 1px; }
.gwgst-upload span { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 26px; border: 2px dashed #b9c2bb; border-radius: 10px; color: var(--g-p); font-weight: 600; background: var(--g-alt); }
.gwgst-upload svg { width: 28px; height: 28px; fill: currentColor; }
.gwgst-upload:hover span, .gwgst-upload input:focus-visible + span { border-color: var(--g-p); }
.gwgst-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.gwgst-prev { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--g-alt); }
.gwgst-prev img { width: 100%; height: 100%; object-fit: cover; }
.gwgst-prev button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }

.gwgst-success { text-align: center; background: var(--g-alt); border-radius: 12px; padding: 40px 24px; }
.gwgst-success__icon { width: 64px; height: 64px; fill: #fff; background: var(--g-p); border-radius: 50%; padding: 12px; margin: 0 auto 12px; }
.gwgst-nr { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 2rem; font-weight: 800; color: var(--g-p); letter-spacing: .04em; margin: 0 0 16px; }
.gwgst-nr--sm { font-size: 1.3rem; margin: 0; display: block; }

.gwgst-card { background: #fff; border: 1px solid var(--g-line); border-radius: 12px; padding: 22px; }
.gwgst-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.gwgst-card__head small { color: var(--g-muted); }
.gwgst-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .78rem; font-weight: 700; color: var(--c, #555); background: color-mix(in srgb, var(--c, #555) 13%, #fff); border: 1px solid color-mix(in srgb, var(--c, #555) 30%, #fff); white-space: nowrap; }
.gwgst-progress { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; margin: 22px 0; counter-reset: p; }
.gwgst-progress li { position: relative; text-align: center; font-size: .8rem; color: var(--g-muted); padding-top: 30px; counter-increment: p; }
.gwgst-progress li::before { content: counter(p); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; background: var(--g-line); color: #fff; font-weight: 700; display: grid; place-items: center; z-index: 1; }
.gwgst-progress li::after { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 3px; background: var(--g-line); }
.gwgst-progress li:first-child::after { display: none; }
.gwgst-progress li.is-done::before, .gwgst-progress li.is-done::after { background: var(--g-p); }
.gwgst-progress li.is-current { color: var(--g-p); font-weight: 700; }
.gwgst-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 20px; margin: 0 0 16px; }
.gwgst-dl dt { font-size: .78rem; color: var(--g-muted); }
.gwgst-dl dd { margin: 0; font-weight: 600; }
.gwgst-timeline { list-style: none; margin: 0 0 20px; padding: 0 0 0 16px; border-left: 2px solid var(--g-line); }
.gwgst-timeline li { position: relative; padding: 0 0 14px 14px; }
.gwgst-timeline li::before { content: ""; position: absolute; left: -23px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--g-p); }
.gwgst-timeline time { font-size: .78rem; color: var(--g-muted); }
.gwgst-timeline p { margin: 2px 0 0; }
.gwgst-timeline li.is-public::before { background: var(--g-p); }

/* ---------------- Hauswart-App ---------------- */
.gwgst-app { max-width: 720px; margin: 0 auto; position: relative; padding-bottom: 90px; }
.gwgst-appbar { position: sticky; top: var(--header-h, 0); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--g-p); color: #fff; padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.12); border-bottom: 4px solid var(--p, transparent); }
.gwgst-appbar > div:first-of-type { flex: 1; line-height: 1.2; }
.gwgst-appbar strong { display: block; font-size: 1.1rem; }
.gwgst-appbar small { opacity: .85; font-size: .8rem; }
.gwgst-appbar__actions { display: flex; gap: 4px; }
.gwgst-iconbtn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; background: rgba(255,255,255,.12); border: 0; cursor: pointer; }
.gwgst-iconbtn:hover { background: rgba(255,255,255,.25); color: #fff; }
.gwgst-iconbtn .gwgst-ico { width: 22px; height: 22px; }
.gwgst-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--g-alt); padding: 4px; border-radius: 10px; margin-bottom: 10px; }
.gwgst-tabs button { border: 0; background: transparent; padding: 10px 4px; border-radius: 8px; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--g-muted); }
.gwgst-tabs button.is-active { background: #fff; color: var(--g-p); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.gwgst-search { display: flex; align-items: center; gap: 8px; border: 1px solid #c8cec9; border-radius: 10px; padding: 0 12px; background: #fff; margin-bottom: 12px; }
.gwgst-search input { border: 0 !important; box-shadow: none !important; padding-left: 0 !important; }
.gwgst-list { display: grid; gap: 10px; }
.gwgst-item { display: flex; flex-direction: column; gap: 3px; background: #fff; border: 1px solid var(--g-line); border-left: 6px solid var(--p); border-radius: 10px; padding: 12px 14px; text-decoration: none; color: inherit; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.gwgst-item:hover { border-color: var(--p); color: inherit; }
.gwgst-item.is-overdue { background: #fff8f6; }
.gwgst-item__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gwgst-item__nr { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; color: var(--g-muted); }
.gwgst-item__title { font-size: 1.05rem; }
.gwgst-item__addr { font-weight: 600; color: var(--g-p); display: flex; gap: 4px; align-items: center; }
.gwgst-item__text { color: var(--g-muted); font-size: .9rem; }
.gwgst-item__meta { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; color: var(--g-muted); margin-top: 4px; flex-wrap: wrap; }
.gwgst-fab { position: fixed; right: 20px; bottom: 24px; width: 60px; height: 60px; border-radius: 50%; background: var(--g-a); color: #1d1d1b; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 30; }
.gwgst-fab .gwgst-ico { width: 30px; height: 30px; }
.gwgst-empty, .gwgst-loading { text-align: center; padding: 36px 16px; color: var(--g-muted); background: var(--g-alt); border-radius: 10px; }
.gwgst-foot { text-align: center; font-size: .85rem; margin-top: 24px; }
.gwgst-sheet { background: #fff; border: 1px solid var(--g-line); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.gwgst-sheet h3 { font-size: 1rem; margin: 0 0 10px; }
.gwgst-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.gwgst-addr { font-size: 1.25rem; margin: 6px 0 2px; }
.gwgst-addr a { text-decoration: none; display: inline-flex; gap: 6px; align-items: center; color: var(--g-p); }
.gwgst-muted { color: var(--g-muted); margin: 0 0 8px; }
.gwgst-desc { background: var(--g-alt); padding: 12px 14px; border-radius: 8px; margin: 12px 0; white-space: normal; }
.gwgst-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0; }
.gwgst-photos a { aspect-ratio: 1; border-radius: 8px; overflow: hidden; display: block; background: var(--g-alt); }
.gwgst-photos img { width: 100%; height: 100%; object-fit: cover; }
.gwgst-call { display: inline-flex; gap: 6px; align-items: center; background: var(--g-p); color: #fff !important; padding: 6px 12px; border-radius: 20px; text-decoration: none; }
.gwgst-statusgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 14px; }
.gwgst-statusgrid button { border: 2px solid color-mix(in srgb, var(--c) 35%, #fff); background: #fff; color: var(--c); border-radius: 8px; padding: 10px 6px; font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; min-height: 48px; }
.gwgst-statusgrid button.is-active { background: var(--c); color: #fff; border-color: var(--c); }
.gwgst-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.gwgst-upload-btn { position: relative; }
.gwgst-more { margin: 8px 0 14px; }
.gwgst-more summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.gwgst-toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: #1b2420; color: #fff; padding: 12px 20px; border-radius: 30px; z-index: 999; box-shadow: 0 6px 20px rgba(0,0,0,.3); transition: opacity .4s, transform .4s; max-width: 90vw; text-align: center; }
.gwgst-toast.is-error { background: var(--c-emergency, #c0392b); }
.gwgst-toast.is-out { opacity: 0; transform: translate(-50%, 10px); }
.gwgst-login { max-width: 440px; }
.gwgst-login input[type=text], .gwgst-login input[type=password] { width: 100%; padding: 10px; min-height: 46px; }
.gwgst-login .button { background: var(--g-p); color: #fff; border: 0; padding: 12px 20px; border-radius: 6px; font-weight: 700; cursor: pointer; }
.gwgst .small { font-size: .85rem; }
