:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#172824;background:#dbe7df;font-size:15px}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer}a{color:#086549}input,textarea,select{width:100%;padding:11px 12px;border:1px solid #c8d5ce;border-radius:9px;background:#fff;color:#172824;outline:none}input:focus,textarea:focus,select:focus{border-color:#148064;box-shadow:0 0 0 3px #14806422}textarea{min-height:90px;resize:vertical}label{display:block;margin:0 0 13px;color:#365049;font-size:.88rem;font-weight:700}label input,label textarea,label select{margin-top:5px;font-weight:400}.primary{border:0;border-radius:9px;background:#0b7658;color:#fff;padding:11px 18px;font-weight:750}.primary:hover{background:#07583f}.secondary{border:1px solid #c8d8d0;border-radius:9px;background:#fff;color:#145c49;padding:9px 13px;font-weight:700}.secondary:hover{background:#eaf4ee}.danger{border:1px solid #e9bec0;background:#fff5f5;color:#ad343b}.icon-button{border:0;background:transparent;color:inherit;font-size:1.5rem;padding:4px 10px}.error,.success{padding:10px 12px;border-radius:8px}.error{color:#9a2430;background:#fff0f0}.success{color:#146144;background:#e8f6ee}.muted{color:#6b8178}.login-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(130deg,#07533f,#1e9070 46%,#d4e8d8)}.login-card{width:min(420px,calc(100% - 28px));padding:34px;background:#fff;border-radius:18px;box-shadow:0 24px 70px #073c3150}.login-card h1{margin:14px 0 4px;font-size:1.9rem}.login-card>p{color:#638075}.login-card .primary{width:100%}.brand-mark{width:46px;height:46px;display:grid;place-items:center;border-radius:14px;background:#0b7658;color:white;font-size:1.5rem;font-weight:900;box-shadow:0 6px 16px #0b76583c}.brand-mark.small{width:38px;height:38px;font-size:1.2rem;border-radius:12px;flex:none}.app-page{height:100vh;overflow:hidden}.shell{height:100vh;display:grid;grid-template-columns:minmax(300px,355px) minmax(0,1fr);background:#f3f5f1}.shell.with-trainer{grid-template-columns:minmax(290px,320px) minmax(0,1fr) minmax(300px,380px)}.sidebar{display:flex;flex-direction:column;min-width:0;background:#fff;border-right:1px solid #dbe5df}.side-head{height:72px;display:flex;align-items:center;gap:11px;padding:12px 16px;background:#eef4ef}.side-head>div:nth-child(2){display:grid;min-width:0;flex:1}.side-head strong{font-size:1rem}.side-head small{color:#698078;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.side-tabs{display:flex;gap:3px;padding:8px 10px;border-bottom:1px solid #e3ebe5}.side-tabs button{flex:1;border:0;background:transparent;border-radius:8px;padding:10px 7px;color:#557067;font-weight:750}.side-tabs button.active{background:#e4f3eb;color:#0a624a}.side-content{overflow:auto;flex:1}.side-foot{padding:11px 16px;border-top:1px solid #e5eee8;display:flex;justify-content:space-between;color:#80968b;font-size:.78rem}.section-label{margin:18px 17px 7px;color:#638176;font-size:.72rem;letter-spacing:.11em;text-transform:uppercase;font-weight:850}.chat-item,.user-item{width:100%;border:0;border-bottom:1px solid #eff2f0;background:transparent;text-align:left;padding:13px 16px;display:flex;gap:12px;align-items:center;color:#21382f}.chat-item:hover,.user-item:hover{background:#f4f8f5}.chat-item.active,.user-item.active{background:#e8f3ec}.avatar{width:45px;height:45px;flex:none;border-radius:50%;display:grid;place-items:center;background:#cfe8d9;color:#095641;font-weight:900;font-size:1.2rem}.chat-item strong,.user-item strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-item small,.user-item small{display:block;color:#7b9186;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}.list-text{min-width:0;flex:1}.list-time{font-size:.69rem;color:#8ba095;align-self:flex-start}.online{display:inline-block;width:8px;height:8px;border-radius:50%;background:#36b573;margin-right:6px}.offline{background:#c7d0ca}.badge{display:inline-block;padding:3px 8px;border-radius:20px;background:#e8f2ed;color:#32765d;font-size:.7rem;font-weight:800}.badge.running{background:#d8f4e3;color:#0d7849}.badge.paused{background:#fff0cf;color:#946305}.chat-area{display:flex;flex-direction:column;min-width:0;background:#e8e9dc;background-image:radial-gradient(#d3dccd 1px,transparent 1px);background-size:24px 24px}.welcome{margin:auto;max-width:470px;text-align:center;padding:28px;color:#435b50}.welcome h1{color:#15392c}.welcome-symbol{font-size:3.5rem;color:#25805d}.chat-head{height:72px;display:flex;align-items:center;gap:12px;padding:10px 18px;background:#f4f8f4;border-bottom:1px solid #d9e4dd}.chat-head>div:nth-child(2){flex:1;min-width:0}.chat-head strong{display:block}.chat-head small{display:block;color:#74897d}.back-mobile{display:none}.message-list{flex:1;overflow:auto;padding:24px max(20px,9%);display:flex;flex-direction:column;gap:7px}.bubble{max-width:min(75%,560px);padding:9px 12px 7px;border-radius:12px;background:#fff;box-shadow:0 1px 3px #23402c19;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45}.bubble.incoming{align-self:flex-start;border-top-left-radius:3px}.bubble.outgoing{align-self:flex-end;background:#d9f7dc;border-top-right-radius:3px}.bubble time{display:block;text-align:right;color:#789285;font-size:.68rem;margin-top:3px}.bubble img{max-width:100%;max-height:310px;display:block;border-radius:8px;margin:8px 0}.composer{display:flex;align-items:flex-end;gap:9px;padding:12px 18px;background:#f2f6f2}.composer textarea{flex:1;min-height:43px;max-height:110px;height:43px;margin:0;resize:none}.composer button{height:43px}.trainer-panel{overflow:auto;background:#fafcf9;border-left:1px solid #dbe6de;padding:20px}.trainer-panel h2{margin:2px 0 15px;font-size:1.1rem}.trainer-panel h3{font-size:.95rem;margin:20px 0 8px}.trainer-panel p{color:#688077;line-height:1.45}.panel-card{padding:15px;border:1px solid #dce8df;border-radius:12px;background:#fff;margin-bottom:12px}.button-row{display:flex;gap:6px;flex-wrap:wrap}.button-row button{flex:1;min-width:72px}.case-list{padding:12px}.case-list button{display:block;width:100%;margin:0 0 7px;text-align:left}.small-form{padding:15px}.small-form h3{margin-top:0}.case-form{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.case-form .wide{grid-column:1/-1}.case-form button{grid-column:1/-1}.case-form textarea{min-height:75px}.toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);padding:11px 18px;background:#173c2d;color:white;border-radius:9px;box-shadow:0 8px 30px #1235;z-index:9}.toast.error{background:#96323b;color:#fff}.instruction{font-size:.82rem;background:#f1f6f2;padding:8px;margin:6px 0;border-left:3px solid #4f9b71}.case-facts{margin:0;display:grid;gap:7px}.case-facts dt{font-size:.72rem;color:#708c7d;text-transform:uppercase}.case-facts dd{margin:0;font-weight:650;white-space:pre-wrap}.empty-list{padding:20px;color:#789084;text-align:center}.form-error{color:#a1333b}button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:1150px){.shell.with-trainer{grid-template-columns:285px minmax(0,1fr)}.trainer-panel{position:absolute;right:0;top:72px;bottom:0;width:min(380px,90vw);box-shadow:-14px 0 35px #153d2c21;z-index:3}.trainer-panel[hidden]{display:none}}@media(max-width:700px){.shell,.shell.with-trainer{display:block}.sidebar{position:absolute;inset:0;z-index:2}.shell.chat-open .sidebar{display:none}.chat-area{height:100vh}.back-mobile{display:block}.message-list{padding:16px}.bubble{max-width:87%}.trainer-panel{top:0}.case-form{grid-template-columns:1fr}}

/* Vereinsdesign: dunkler Kopf, helle Arbeitsflächen und limettengrüne Akzente. */
:root{--deep:#0d3e31;--green:#155743;--lime:#8bc319;--surface:#fff;--bg:#f2f6f4;--line:#d8e4de;--ink:#17211e;--muted:#65736e;color:var(--ink);background:var(--bg);font-family:Inter,Arial,Helvetica,sans-serif}
body{color:var(--ink)}
a{color:var(--green)}
button,input,textarea,select{font-family:inherit}
input,textarea,select{border:2px solid #cbd9d2;border-radius:5px;color:var(--ink)}
input:focus,textarea:focus,select:focus{border-color:var(--green);box-shadow:0 0 0 3px #8bc31935}
.primary{background:var(--green);border-radius:5px}
.primary:hover{background:var(--deep)}
.secondary{border:2px solid var(--green);border-radius:5px;color:var(--green)}
.secondary:hover{background:#eef6f2}
.login-page{background:linear-gradient(135deg,var(--deep),var(--green));padding:20px}
.login-card{border-radius:8px;box-shadow:0 24px 70px #0004}
.login-logo{display:block;width:80px;height:80px;object-fit:contain;margin:0 auto 14px}
.login-card h1{text-align:center;color:var(--deep);font-size:1.8rem}
.login-card>p{text-align:center}
.login-card .eyebrow{color:var(--green);font-size:.75rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;margin:0}
.login-card label{text-align:left}
.shell,.shell.with-trainer{background:var(--bg)}
.sidebar{border-right:1px solid var(--line)}
.side-head{background:var(--deep);color:#fff;min-height:74px}
.side-head strong{letter-spacing:.02em}
.side-head small{color:#bad4c8}
.header-logo{width:48px;height:48px;object-fit:contain;flex:none}
.side-head .icon-button{color:#eaf3ed}
.side-head .icon-button:hover{background:#ffffff20}
.side-tabs{background:var(--deep);border-bottom:0;padding:0 9px 9px}
.side-tabs button{color:#d2e5db;border-radius:0;border-bottom:3px solid transparent}
.side-tabs button:hover{background:#ffffff13;color:#fff}
.side-tabs button.active{background:#ffffff12;border-color:var(--lime);color:#fff}
.side-tabs .badge{color:#d4efdc;background:#ffffff1b}
.side-content{background:#fff}
.side-foot{background:var(--deep);border:0;color:#b9d3c6}
.side-foot a{color:#f1f8f3;font-weight:700}
.section-heading{display:flex;align-items:center;justify-content:space-between;padding:14px 14px 9px;border-bottom:1px solid var(--line)}
.section-heading .section-label{margin:0}
.section-label{color:var(--green)}
.add-user{font-size:.8rem;padding:8px 10px;white-space:nowrap}
.user-item,.chat-item{border-bottom:1px solid #e6eee9}
.user-item.active,.chat-item.active{background:#eef6f2;box-shadow:inset 4px 0 var(--lime)}
.user-item:hover,.chat-item:hover{background:#f5f9f6}
.avatar{background:#e1eddf;color:var(--green)}
.chat-area{background-color:#e9eee8;background-image:radial-gradient(#cfddd0 1px,transparent 1px)}
.chat-head{background:var(--deep);color:#fff;border:0}
.chat-head small{color:#c4dbcf}
.chat-head .avatar{background:#cce6cf}
.welcome{background:#ffffffdf;border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 28px #0d3e310e}
.welcome h1{color:var(--deep)}
.welcome-logo{display:block;width:76px;height:76px;object-fit:contain;margin:0 auto 10px}
.bubble{border-radius:8px}
.bubble.outgoing{background:#e0f3dc}
.composer{background:#f5f8f5;border-top:1px solid var(--line)}
.trainer-panel{background:var(--bg);border-color:var(--line);padding:21px 18px}
.trainer-panel h2,.trainer-panel h3{color:var(--deep)}
.panel-card{border-color:var(--line);border-radius:8px;box-shadow:0 8px 28px #0d3e310a}
.panel-close{float:right;line-height:1;margin:-5px -5px 4px 8px;color:var(--deep)}
.panel-close:hover{background:#e6f0e9}
.credential{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere;background:#f1f6f2;padding:8px}
.account-created{border-top:4px solid var(--lime)}
.account-created .case-facts{margin:16px 0}
.case-list button{border-radius:5px}
.badge.running{background:#e5f4e7;color:#176c35}
.badge.paused{background:#fff4cf;color:#705400}
@media(max-width:700px){.side-head{height:70px}.trainer-panel{width:min(420px,100vw);box-shadow:-14px 0 35px #0d3e3133}.section-heading{padding:12px}}
.chat-head>div:last-child{flex:1;min-width:0}
.ai-note{margin:12px;padding:10px 12px;border-left:4px solid #d98200;background:#fff7e8;color:#704600;font-size:.82rem;line-height:1.4}
.panel-card .ai-note{margin:12px 0}
/* Die Chatliste und der Verlauf scrollen innerhalb der festen App-Hoehe. */
.shell{min-height:0;overflow:hidden}
.sidebar{min-height:0}
.side-content{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.chat-area{min-height:0;height:100vh;overflow:hidden}
.message-list{min-height:0;overflow-y:auto;overscroll-behavior:contain}
@media(max-width:700px){.app-page,.shell{height:100dvh}.sidebar,.chat-area{height:100dvh}}
