/* Farben hier an das Weldyfy-Design anpassen */
:root {
  --dunkel: #1b1b1b;
  --akzent: #b3211f;
  --akzent-hell: #fbeceb;
  --grund: #f3f5f7;
  --karte: #ffffff;
  --text: #1c2630;
  --leise: #6b7785;
  --linie: #dde2e7;
  --gut: #1f8a4c;
  --schlecht: #c0392b;
  --radius: 10px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--grund); color: var(--text); line-height: 1.45; }
a { color: var(--akzent); }
h1 { font-size: 1.6rem; margin: .2rem 0 .6rem; }
h2 { font-size: 1.15rem; margin: 0 0 .8rem; }
h3 { font-size: 1rem; margin: 1.2rem 0 .5rem; }

.kopf { background: #fff; color: var(--dunkel); border-bottom: 3px solid var(--akzent); display: flex; align-items: center; justify-content: space-between; padding: .7rem 1.4rem; flex-wrap: wrap; gap: .6rem; }
.marke { color: var(--dunkel); text-decoration: none; display: flex; align-items: center; gap: .6rem; }
.auge { height: 38px; width: auto; }
.logo { font-weight: 800; font-size: 1.4rem; letter-spacing: .08em; color: var(--dunkel); }
.logo i { font-style: normal; color: var(--akzent); }
.logo .r { font-size: .55em; font-weight: 700; margin-left: .1em; vertical-align: super; letter-spacing: 0; }
.von { font-size: .8rem; color: var(--leise); align-self: flex-end; margin-bottom: .2rem; }
.login-logo { display: block; width: 300px; max-width: 80%; margin: .5rem auto 1.5rem; }
.login-logo.klein { width: 200px; }
.kopf nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.kopf nav a { color: var(--dunkel); text-decoration: none; font-size: .95rem; opacity: .9; }
.kopf nav a:hover { opacity: 1; text-decoration: underline; }
.badge { background: var(--akzent); color: #fff; border-radius: 99px; padding: 0 .45rem; font-size: .75rem; font-weight: 700; }

.inhalt { max-width: 1200px; margin: 0 auto; padding: 1.4rem; }
.fuss { text-align: center; color: var(--leise); font-size: .8rem; padding: 2rem 1rem; }
.fuss a { color: var(--leise); }

.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-bottom: 1.2rem; }
.schmal { max-width: 520px; margin-left: auto; margin-right: auto; }
.leise { color: var(--leise); }
.klein-text { font-size: .8rem; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.zwei-spalten { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 860px) { .zwei-spalten { grid-template-columns: 1fr; } }

.anlage-karte { text-decoration: none; color: inherit; display: block; transition: box-shadow .15s; }
.anlage-karte:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.anlage-karte p { margin: .2rem 0; }

.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.zahlen .karte { display: flex; flex-direction: column; }
.zahlen b { font-size: 1.8rem; color: var(--dunkel); }
.zahlen span { color: var(--leise); font-size: .9rem; }

form label { display: block; margin-bottom: .75rem; font-size: .9rem; font-weight: 600; }
form label.check { font-weight: 400; display: flex; gap: .5rem; align-items: flex-start; }
input, select, textarea { display: block; width: 100%; margin-top: .25rem; padding: .55rem .65rem; border: 1px solid var(--linie); border-radius: 7px; font: inherit; background: #fff; }
input[type=checkbox] { width: auto; margin-top: .2rem; }
textarea { resize: vertical; }
button, .knopf { display: inline-block; border: 1px solid var(--linie); background: #fff; color: var(--text); padding: .5rem .9rem; border-radius: 7px; font: inherit; cursor: pointer; text-decoration: none; }
button.haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; font-weight: 600; }
button.gefahr { color: var(--schlecht); border-color: #efc3bd; }
button.klein, .knopf.klein { padding: .25rem .55rem; font-size: .82rem; }
button:disabled { opacity: .5; cursor: wait; }
form.inline { display: inline; }
.anlage-karte .knopf { margin-top: .6rem; color: var(--akzent); border-color: var(--akzent); }

.hinweis { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.hinweis.ok { background: #e9f6ee; border-color: #b8e0c6; }
.hinweis.fehler { background: #fdecea; border-color: #f2c1bb; }
code { background: #fff; padding: .1rem .35rem; border-radius: 4px; font-size: 1rem; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { color: var(--leise); font-weight: 600; font-size: .82rem; }
tr.offen td { background: #fff7f0; }
.status { font-size: .78rem; padding: .1rem .45rem; border-radius: 99px; background: #eee; }
.status.aktiv { background: #e3f4ea; color: var(--gut); }
.status.offen { background: #fff1e0; color: #a85a12; }
.status.gesperrt { background: #fdecea; color: var(--schlecht); }

.dateiliste { padding-left: 1.1rem; }
.dateiliste li { margin-bottom: .35rem; }
.registrierung { border-top: 1px solid var(--linie); padding-top: .8rem; margin-top: .8rem; }
.freigabe { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.freigabe details, .freigabe .check, .freigabe button { grid-column: 1 / -1; }
.freigabe button { justify-self: start; }
.wissen { border-top: 1px solid var(--linie); padding: .7rem 0; }
.wissen p { margin: .3rem 0 .5rem; white-space: pre-wrap; }

/* Chat */
.ki-hinweis { font-size: .8rem; color: var(--leise); background: var(--grund); padding: .45rem .6rem; border-radius: 6px; }
.verlauf { height: 52vh; min-height: 320px; overflow-y: auto; padding: .4rem; display: flex; flex-direction: column; gap: .7rem; }
.verlauf.lang { height: auto; max-height: 75vh; }
.nachricht { max-width: 88%; padding: .6rem .8rem; border-radius: 12px; background: var(--grund); }
.nachricht .wer { font-size: .74rem; color: var(--leise); margin-bottom: .2rem; font-weight: 600; }
.nachricht .text { white-space: pre-wrap; }
.nachricht.kunde { align-self: flex-end; background: var(--dunkel); color: #fff; }
.nachricht.kunde .wer { color: #b9c4cf; }
.nachricht.sara { align-self: flex-start; background: #f2f2f2; border-left: 4px solid var(--akzent); }
.nachricht.roland { align-self: flex-start; background: #e7f0fb; border-left: 4px solid #2b6cb0; }
.nachricht.tippt { opacity: .7; font-style: italic; }
.chat-bild { max-width: 240px; max-height: 240px; border-radius: 8px; display: block; margin-bottom: .3rem; }
.frage-form { border-top: 1px solid var(--linie); padding-top: .8rem; margin-top: .4rem; }
.frage-form textarea { margin: 0 0 .5rem; }
.frage-knoepfe { display: flex; justify-content: space-between; gap: .5rem; }
.knopf.nebensache { cursor: pointer; }
.bild-vorschau { position: relative; display: inline-block; margin-bottom: .5rem; }
.bild-vorschau img { max-height: 110px; border-radius: 8px; }
.bild-vorschau button { position: absolute; top: 4px; right: 4px; padding: 0 .4rem; }
