*{box-sizing:border-box}
html,body{margin:0;padding:0;height:100%}
body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:linear-gradient(160deg,#eef2ff,#f8fafc);color:#1e293b;font-size:16px}
input,textarea,select{-webkit-user-select:text;user-select:text;font:inherit;color:inherit}
button{font:inherit;cursor:pointer;border:none;-webkit-tap-highlight-color:transparent}
#app{min-height:100%;padding:clamp(12px,4vw,24px);max-width:720px;margin:0 auto}
header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
h1{font-size:22px;margin:0;font-weight:700;color:#312e81}
h2{font-size:18px;margin:0 0 10px;color:#312e81}
.btn{min-height:44px;min-width:44px;padding:0 16px;border-radius:12px;background:#4f46e5;color:#fff;font-weight:600;transition:transform .1s,background .15s;box-shadow:0 4px 12px rgba(79,70,229,.25)}
.btn:active{transform:scale(.97);background:#4338ca}
.btn.ghost{background:#fff;color:#4f46e5;box-shadow:0 2px 6px rgba(15,23,42,.08)}
.btn.danger{background:#e11d48;box-shadow:0 4px 12px rgba(225,29,72,.25)}
.btn.danger:active{background:#be123c}
.btn.sm{min-height:36px;padding:0 12px;font-size:14px}
.btn:disabled{opacity:.5}
.card{background:#fff;border-radius:16px;padding:14px;margin-bottom:12px;box-shadow:0 4px 14px rgba(15,23,42,.07);transition:transform .1s}
.card:active{transform:scale(.99)}
.agent-head{display:flex;align-items:center;gap:12px}
.avatar{width:44px;height:44px;border-radius:14px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:18px;flex-shrink:0}
.meta{flex:1;min-width:0}
.name{font-weight:700;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.task{font-size:13px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.badge{font-size:12px;background:#eef2ff;color:#4338ca;padding:3px 8px;border-radius:999px;white-space:nowrap}
.badge.ok{background:#dcfce7;color:#15803d}
.badge.off{background:#f1f5f9;color:#64748b}
.actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
.empty{text-align:center;padding:40px 16px;color:#64748b}
.empty .icon{font-size:44px;margin-bottom:8px}
.field{margin-bottom:12px}
label{display:block;font-size:13px;font-weight:600;color:#475569;margin-bottom:6px}
input[type=text],input[type=password],textarea,select{width:100%;padding:12px;border-radius:12px;border:1.5px solid #cbd5e1;background:#fff;outline:none;transition:border-color .15s}
input:focus,textarea:focus,select:focus{border-color:#6366f1}
textarea{min-height:90px;resize:vertical}
.err{color:#e11d48;font-size:13px;margin-top:4px;min-height:0}
.row{display:flex;gap:8px}
.row>*{flex:1}
.list-item{display:flex;align-items:flex-start;gap:8px;padding:8px 0;border-bottom:1px solid #f1f5f9}
.list-item:last-child{border-bottom:none}
.list-item .txt{flex:1;font-size:14px;line-height:1.4;word-break:break-word}
.num{width:26px;height:26px;border-radius:50%;background:#eef2ff;color:#4338ca;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;flex-shrink:0}
.mini{min-width:36px;min-height:36px;border-radius:10px;background:#f1f5f9;color:#475569;font-size:16px}
.mini:active{background:#e2e8f0}
.chat{display:flex;flex-direction:column;gap:8px;max-height:260px;overflow-y:auto;padding:6px;background:#f8fafc;border-radius:12px;margin-bottom:10px}
.bubble{max-width:82%;padding:9px 12px;border-radius:14px;font-size:14px;line-height:1.4;word-break:break-word;white-space:pre-wrap}
.bubble.u{align-self:flex-end;background:#4f46e5;color:#fff;border-bottom-right-radius:4px}
.bubble.a{align-self:flex-start;background:#fff;color:#1e293b;border:1px solid #e2e8f0;border-bottom-left-radius:4px}
.bubble.s{align-self:center;background:#fef3c7;color:#92400e;font-size:12px;max-width:95%}
.bubble.e{align-self:flex-start;background:#ffe4e6;color:#9f1239}
.bubble.typing{opacity:.7;font-style:italic}
[hidden]{display:none!important}
.wrap{white-space:normal}
.hint{font-size:12px;color:#64748b;margin-top:6px;line-height:1.4}
.btn.wide{width:100%}
.hdr-r{display:flex;gap:8px;align-items:center}
.user-menu{display:flex;align-items:center;justify-content:space-between;gap:8px}
.user-menu .actions{margin-top:0}
/* Tabs */
.tabs{display:flex;gap:6px;overflow-x:auto;margin-bottom:14px;padding:4px;background:#fff;border-radius:14px;box-shadow:0 2px 8px rgba(15,23,42,.06);scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tab{flex:1;min-height:44px;min-width:72px;border-radius:10px;background:transparent;color:#475569;font-size:13px;font-weight:600;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:4px 6px;white-space:nowrap}
.tab span{font-size:16px}
.tab.on{background:#4f46e5;color:#fff;box-shadow:0 4px 10px rgba(79,70,229,.25)}
.scr{display:none}
.scr.on{display:block;animation:fade .18s ease}
@keyframes fade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
/* Chips */
.chips{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0}
.chip{min-height:36px;padding:0 12px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:14px;font-weight:600;border:1.5px solid transparent}
.chip.on{background:#eef2ff;color:#4338ca;border-color:#6366f1}
.chip:disabled{opacity:.45}
.check{display:flex;gap:8px;align-items:flex-start;font-weight:500;font-size:14px;color:#334155;margin:8px 0}
.check input{width:20px;height:20px;margin:0;flex-shrink:0;accent-color:#4f46e5}
/* Farben */
.swatches{display:flex;gap:8px;flex-wrap:wrap}
.sw{width:36px;height:36px;border-radius:10px;border:3px solid transparent}
.sw.on{border-color:#1e293b}
/* Overlay */
.ov{position:fixed;inset:0;background:rgba(15,23,42,.45);display:flex;align-items:flex-end;justify-content:center;z-index:50;animation:fade .15s}
.sheet{background:#f8fafc;width:100%;max-width:720px;max-height:92vh;overflow-y:auto;border-radius:20px 20px 0 0;padding:18px clamp(12px,4vw,24px) calc(18px + env(safe-area-inset-bottom))}
@media(min-width:760px){.ov{align-items:center}.sheet{border-radius:20px}}
.sheet-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.sec{font-size:13px;font-weight:700;color:#475569;margin:14px 0 6px;text-transform:uppercase;letter-spacing:.03em}
/* Anbieter */
.prov-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-bottom:12px}
.prov{background:#fff;border-radius:14px;padding:10px 12px;text-align:left;box-shadow:0 2px 8px rgba(15,23,42,.06);border:2px solid transparent;display:flex;flex-direction:column;gap:4px;min-height:64px}
.prov.on{border-color:#6366f1}
.prov b{font-size:14px;color:#1e293b}
.status{margin-top:10px;font-size:14px;line-height:1.4;word-break:break-word}
.status.ok{color:#15803d}.status.bad{color:#e11d48}
.out{background:#0f172a;color:#e2e8f0;border-radius:12px;padding:10px;font-size:12px;max-height:240px;overflow:auto;white-space:pre-wrap;word-break:break-word;margin-top:10px}
.ctx{display:flex;gap:8px;align-items:center;background:#eef2ff;border-radius:10px;padding:6px 10px;margin-top:8px;font-size:13px;color:#3730a3}
.ctx .txt{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.send input{min-width:0}
.import{border:2px dashed #a5b4fc}
/* Anmeldung */
.auth{min-height:100%;display:flex;align-items:center;justify-content:center;padding:20px}
.auth-box{width:100%;max-width:400px;text-align:center}
.auth-box .card{text-align:left;margin-top:12px}
.auth-box .card:active{transform:none}
.auth-logo{font-size:52px}
.sub{color:#64748b;margin:6px 0 16px}
.seg{display:flex;background:#fff;border-radius:12px;padding:4px;box-shadow:0 2px 8px rgba(15,23,42,.06)}
.seg-b{flex:1;min-height:40px;border-radius:9px;background:transparent;color:#475569;font-weight:600}
.seg-b.on{background:#4f46e5;color:#fff}
.toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom));transform:translateX(-50%);background:#1e293b;color:#fff;padding:10px 16px;border-radius:12px;font-size:14px;z-index:60;max-width:90vw;box-shadow:0 8px 20px rgba(15,23,42,.3)}
.skill-item .name{white-space:normal}
@media(max-width:480px){.tab{min-width:0;font-size:11px;padding:4px 2px}.tabs{gap:2px}h1{font-size:19px}}
