*,*::before,*::after{box-sizing:border-box}
html,body,h1,h2,h3,h4,p,figure,ul,ol,dl,dd{margin:0;padding:0}
ul,ol{list-style:none}
svg{display:block}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0}
:root{
  --bg:#EDF0F0;--surface:#FFFFFF;--surface-2:#F5F8F8;--surface-3:#E4EAEA;
  --ink:#12232A;--ink-2:#4A5F68;--ink-3:#7E9299;
  --line:#D5DEDE;--line-2:#BFCCCC;
  --accent:#0E5C63;--accent-ink:#FFFFFF;--accent-soft:#D8E9E9;
  --brass:#8F631C;--brass-soft:#F1E4C8;
  --over:#A93B2C;--over-soft:#F7DED8;
  --due:#8F6210;--due-soft:#F8E9C9;
  --ok:#33694A;--ok-soft:#DBEADF;
  --shadow:0 1px 2px rgba(18,35,42,.06),0 10px 26px -14px rgba(18,35,42,.28);
  --shadow-lg:0 20px 50px -18px rgba(18,35,42,.42);
  --r:14px;--r-sm:9px;--r-pill:999px;
  --serif:"Fraunces",Georgia,"Times New Roman",serif;
  --sans:"Instrument Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0D1618;--surface:#152124;--surface-2:#1B2A2E;--surface-3:#243639;
  --ink:#E4EDEC;--ink-2:#9FB3B5;--ink-3:#72878B;
  --line:#26383C;--line-2:#35494E;
  --accent:#4FBEC3;--accent-ink:#062629;--accent-soft:#14383B;
  --brass:#D6A052;--brass-soft:#382C16;
  --over:#E58374;--over-soft:#3B1F1A;
  --due:#DDAB58;--due-soft:#372A12;
  --ok:#6FBF8E;--ok-soft:#15301E;
  --shadow:0 1px 2px rgba(0,0,0,.45),0 10px 30px -16px rgba(0,0,0,.8);
  --shadow-lg:0 24px 60px -20px rgba(0,0,0,.85);
}}
:root[data-theme="dark"]{
  --bg:#0D1618;--surface:#152124;--surface-2:#1B2A2E;--surface-3:#243639;
  --ink:#E4EDEC;--ink-2:#9FB3B5;--ink-3:#72878B;
  --line:#26383C;--line-2:#35494E;
  --accent:#4FBEC3;--accent-ink:#062629;--accent-soft:#14383B;
  --brass:#D6A052;--brass-soft:#382C16;
  --over:#E58374;--over-soft:#3B1F1A;
  --due:#DDAB58;--due-soft:#372A12;
  --ok:#6FBF8E;--ok-soft:#15301E;
  --shadow:0 1px 2px rgba(0,0,0,.45),0 10px 30px -16px rgba(0,0,0,.8);
  --shadow-lg:0 24px 60px -20px rgba(0,0,0,.85);
}
body{
  background:var(--bg);color:var(--ink);font-family:var(--sans);
  font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased;
  min-height:100vh;overflow-x:hidden;
}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms !important;transition-duration:.01ms !important}}

/* ---------- shell ---------- */
.shell{display:flex;flex-direction:column;min-height:100vh}
.main{flex:1;width:100%;max-width:940px;margin:0 auto;padding:0 16px calc(96px + env(safe-area-inset-bottom)) 16px}
.topbar{
  position:sticky;top:0;z-index:30;background:var(--bg);
  padding:14px 16px 10px;border-bottom:1px solid transparent;
}
.topbar.scrolled{border-bottom-color:var(--line)}
.topbar-in{max-width:940px;margin:0 auto;display:flex;align-items:center;gap:12px}
.brand{display:flex;align-items:baseline;gap:9px;min-width:0}
.brand h1{font-family:var(--serif);font-size:21px;font-weight:600;letter-spacing:-.015em;white-space:nowrap}
.brand .tag{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-3);white-space:nowrap}
.spacer{flex:1}

/* ---------- nav ---------- */
.nav{
  position:fixed;left:0;right:0;bottom:0;z-index:40;
  display:flex;background:var(--surface);border-top:1px solid var(--line);
  padding:6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow:0 -6px 22px -18px rgba(0,0,0,.5);
}
.nav button{
  position:relative;flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;
  padding:7px 2px 5px;border-radius:var(--r-sm);color:var(--ink-3);
  font-size:11px;font-weight:600;letter-spacing:.01em;
}
.nav button svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.nav button[aria-current="page"]{color:var(--accent)}
.nav .badge{
  position:absolute;transform:translate(15px,-5px);
  background:var(--over);color:#fff;font-family:var(--mono);font-size:9px;font-weight:600;
  min-width:16px;height:16px;border-radius:var(--r-pill);display:grid;place-items:center;padding:0 4px;
}
.fab{
  position:fixed;right:16px;bottom:calc(74px + env(safe-area-inset-bottom));z-index:41;
  width:54px;height:54px;border-radius:var(--r-pill);background:var(--accent);color:var(--accent-ink);
  display:grid;place-items:center;box-shadow:var(--shadow-lg);
  transition:transform .15s ease;
}
.fab:active{transform:scale(.93)}
.fab svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round}

@media (min-width:860px){
  .shell{flex-direction:row}
  .nav{
    position:sticky;top:0;bottom:auto;height:100vh;width:196px;flex-direction:column;
    border-top:0;border-right:1px solid var(--line);padding:22px 12px;gap:2px;box-shadow:none;flex:0 0 196px;
  }
  .nav .nav-brand{display:flex;flex-direction:column;gap:2px;padding:0 10px 22px}
  .nav .nav-brand strong{font-family:var(--serif);font-size:20px;font-weight:600;letter-spacing:-.015em}
  .nav .nav-brand span{font-family:var(--mono);font-size:9.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-3)}
  .nav button{flex:0 0 auto;flex-direction:row;justify-content:flex-start;gap:11px;padding:10px 11px;font-size:14px}
  .nav button[aria-current="page"]{background:var(--accent-soft)}
  .nav .badge{position:static;transform:none;margin-left:auto}
  .main{padding:0 28px 80px;max-width:820px;margin:0 auto}
  .topbar{padding:22px 28px 12px}
  .topbar-in{max-width:820px}
  .fab{right:28px;bottom:28px}
}
@media (max-width:859px){.nav .nav-brand{display:none}}

/* ---------- primitives ---------- */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}
.eyebrow{font-family:var(--mono);font-size:10.5px;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-3)}
.view-head{display:flex;align-items:flex-end;gap:12px;padding:8px 2px 16px}
.view-head h2{font-family:var(--serif);font-size:27px;font-weight:600;letter-spacing:-.02em;line-height:1.15;text-wrap:balance}
.sec{display:flex;flex-direction:column;gap:9px;margin-bottom:26px}
.sec-head{display:flex;align-items:center;gap:9px;padding:0 2px}
.sec-head .dot{width:7px;height:7px;border-radius:var(--r-pill);flex:none}
.sec-head .n{font-family:var(--mono);font-size:11px;color:var(--ink-3);margin-left:auto}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  text-decoration:none;
  padding:9px 15px;border-radius:var(--r-sm);font-size:14.5px;font-weight:600;
  background:var(--surface-3);color:var(--ink);border:1px solid transparent;
  transition:background .13s ease,transform .1s ease;white-space:nowrap;
}
.btn:active{transform:scale(.97)}
.btn:disabled{opacity:.4;cursor:not-allowed;transform:none}
.btn:hover{background:var(--line)}
.btn-primary{background:var(--accent);color:var(--accent-ink)}
.btn-primary:hover{background:var(--accent);filter:brightness(1.1)}
.btn-ghost{background:transparent;border-color:var(--line-2);color:var(--ink-2)}
.btn-ghost:hover{background:var(--surface-2)}
.btn-danger{background:transparent;border-color:var(--over);color:var(--over)}
.btn-danger:hover{background:var(--over-soft)}
.btn-sm{padding:6px 11px;font-size:13px;border-radius:7px}
.btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.chip{
  display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:var(--r-pill);
  font-size:12.5px;font-weight:600;background:var(--surface-3);color:var(--ink-2);white-space:nowrap;
}
.chip-accent{background:var(--accent-soft);color:var(--accent)}
.chip-brass{background:var(--brass-soft);color:var(--brass)}
.chip-over{background:var(--over-soft);color:var(--over)}
.chip-due{background:var(--due-soft);color:var(--due)}
.chip-ok{background:var(--ok-soft);color:var(--ok)}
.chip button{display:grid;place-items:center;opacity:.55;margin:-2px -4px -2px 0;padding:2px}
.chip button:hover{opacity:1}
.chip svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2.4;stroke-linecap:round}

.field{display:flex;flex-direction:column;gap:5px}
.field label{font-size:12.5px;font-weight:600;color:var(--ink-2)}
.field .hint{font-size:11.5px;color:var(--ink-3);line-height:1.35}
input[type=text],input[type=email],input[type=tel],input[type=date],input[type=search],select,textarea{
  width:100%;padding:10px 12px;border-radius:var(--r-sm);border:1px solid var(--line-2);
  background:var(--surface);color:var(--ink);font-size:15.5px;
  transition:border-color .13s ease,box-shadow .13s ease;
}
textarea{resize:vertical;min-height:74px;line-height:1.5}
input:focus,select:focus,textarea:focus{outline:0;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 17px) 21px,calc(100% - 12px) 21px;background-size:5px 5px;background-repeat:no-repeat;padding-right:34px}

/* ---------- search ---------- */
.searchbox{position:relative;display:flex;align-items:center}
.searchbox svg{position:absolute;left:12px;width:17px;height:17px;stroke:var(--ink-3);fill:none;stroke-width:2;stroke-linecap:round;pointer-events:none}
.searchbox input{padding-left:37px;background:var(--surface)}
.searchbox .clr{position:absolute;right:8px;padding:6px;color:var(--ink-3);display:grid;place-items:center}
.searchbox .clr svg{position:static;width:15px;height:15px;stroke:currentColor}

/* ---------- rows ---------- */
.row{
  display:flex;align-items:center;gap:12px;width:100%;text-align:left;
  padding:12px 14px;background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r);box-shadow:var(--shadow);transition:border-color .13s ease,transform .1s ease;
}
.row:hover{border-color:var(--line-2)}
.row:active{transform:scale(.995)}
.avatar{
  flex:none;width:40px;height:40px;border-radius:var(--r-pill);display:grid;place-items:center;
  background:var(--accent-soft);color:var(--accent);
  font-family:var(--mono);font-size:13.5px;font-weight:600;letter-spacing:.01em;
}
.avatar.s-over{background:var(--over-soft);color:var(--over)}
.avatar.s-due{background:var(--due-soft);color:var(--due)}
.row-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.row-name{font-family:var(--serif);font-size:17px;font-weight:600;letter-spacing:-.01em;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row-sub{font-size:13px;color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row-meta{font-family:var(--mono);font-size:11px;color:var(--ink-3);margin-top:3px;display:flex;gap:8px;flex-wrap:wrap}
.row-meta span+span::before,.tr-meta span+span::before{content:"·";margin-right:8px;opacity:.55}
.row-side{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.row-actions{display:flex;gap:6px;flex-wrap:wrap;padding:0 14px 12px;margin-top:-4px}
.row-wrap{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);overflow:hidden}
.row-wrap .row{border:0;box-shadow:none;border-radius:0;background:transparent}
.row-wrap.s-over{border-left:3px solid var(--over)}
.row-wrap.s-due{border-left:3px solid var(--due)}

/* ---------- stats ---------- */
.stats{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;margin-bottom:24px}
@media (min-width:560px){.stats{grid-template-columns:repeat(4,1fr)}}
.stat{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:12px 13px;display:flex;flex-direction:column;gap:2px;box-shadow:var(--shadow)}
.stat .v{font-family:var(--mono);font-size:23px;font-weight:600;letter-spacing:-.02em;font-variant-numeric:tabular-nums;line-height:1.1}
.stat .k{font-size:11.5px;color:var(--ink-3);font-weight:500;line-height:1.3}
.stat.is-over .v{color:var(--over)}
.stat.is-brass .v{color:var(--brass)}

/* ---------- detail ---------- */
.detail-head{display:flex;gap:14px;align-items:flex-start;padding:6px 2px 18px}
.detail-head .avatar{width:56px;height:56px;font-size:18px}
.detail-head h2{font-family:var(--serif);font-size:26px;font-weight:600;letter-spacing:-.02em;line-height:1.15;text-wrap:balance}
.detail-head .sub{font-size:14.5px;color:var(--ink-2);margin-top:2px}
.quickbar{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:20px}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);padding:15px 16px;margin-bottom:12px}
.panel > .eyebrow{display:block;margin-bottom:10px}
.panel p{font-size:14.5px;color:var(--ink-2);line-height:1.55}
.panel p.text{white-space:pre-wrap}
.tags{display:flex;gap:6px;flex-wrap:wrap}
.kv{display:grid;grid-template-columns:auto 1fr;gap:7px 14px;font-size:14px}
.kv dt{font-family:var(--mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3);padding-top:3px}
.kv dd{color:var(--ink)}
.kv a{color:var(--accent);text-decoration:none;border-bottom:1px solid var(--accent-soft)}
.kv a:hover{border-bottom-color:currentColor}

.timeline{display:flex;flex-direction:column}
.tl{display:flex;gap:12px;padding:11px 0;border-top:1px solid var(--line)}
.tl:first-child{border-top:0;padding-top:2px}
.tl-mark{flex:none;width:9px;display:flex;justify-content:center;padding-top:6px}
.tl-mark i{width:7px;height:7px;border-radius:var(--r-pill);background:var(--accent);display:block}
.tl-mark.give i{background:var(--brass)}
.tl-mark.get i{background:var(--ok)}
.tl-body{flex:1;min-width:0}
.tl-top{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
.tl-art{font-size:13.5px;font-weight:600}
.tl-date{font-family:var(--mono);font-size:11px;color:var(--ink-3);font-variant-numeric:tabular-nums}
.tl-note{font-size:14px;color:var(--ink-2);line-height:1.5;margin-top:2px;white-space:pre-wrap}
.tl-del{flex:none;color:var(--ink-3);padding:4px;align-self:flex-start;opacity:0;transition:opacity .12s}
.tl:hover .tl-del,.tl-del:focus-visible{opacity:1}
.tl-del svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}

/* ---------- match ---------- */
.match{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);padding:14px 16px;margin-bottom:10px}
.match-q{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:9px}
.match-q .who{font-family:var(--serif);font-size:16.5px;font-weight:600;letter-spacing:-.01em}
.match-q .verb{font-size:13px;color:var(--ink-3)}
.match-hits{display:flex;flex-direction:column;gap:7px}
.hit{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--r-sm);background:var(--surface-2);width:100%;text-align:left}
.hit:hover{background:var(--surface-3)}
.hit .avatar{width:31px;height:31px;font-size:11px}
.hit .n{font-family:var(--serif);font-size:15px;font-weight:600;line-height:1.2}
.hit .c{font-size:12.5px;color:var(--ink-3);line-height:1.3}
.match-none{font-size:13.5px;color:var(--ink-3);font-style:italic;padding:4px 0}

/* ---------- modal ---------- */
.overlay{
  position:fixed;inset:0;z-index:60;background:rgba(10,22,26,.5);backdrop-filter:blur(3px);
  display:flex;align-items:flex-end;justify-content:center;padding:0;
  animation:fade .16s ease;
}
@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes rise{from{transform:translateY(14px)}to{transform:none}}
.modal{
  background:var(--bg);width:100%;max-width:600px;max-height:92vh;overflow-y:auto;
  border-radius:20px 20px 0 0;box-shadow:var(--shadow-lg);animation:rise .2s ease;
  padding:0 16px calc(20px + env(safe-area-inset-bottom));
}
@media (min-width:640px){
  .overlay{align-items:center;padding:24px}
  .modal{border-radius:18px;padding-bottom:20px;max-height:88vh}
}
.modal-head{
  position:sticky;top:0;background:var(--bg);z-index:2;
  display:flex;align-items:center;gap:12px;padding:16px 0 12px;border-bottom:1px solid var(--line);margin-bottom:16px;
}
.modal-head h3{font-family:var(--serif);font-size:20px;font-weight:600;letter-spacing:-.015em}
.modal-head .x{margin-left:auto;color:var(--ink-3);padding:6px}
.modal-head .x svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
.form-grid{display:flex;flex-direction:column;gap:14px}
.form-row{display:grid;gap:14px}
@media (min-width:520px){.form-row.two{grid-template-columns:1fr 1fr}}
.modal-foot{display:flex;gap:9px;padding-top:18px;position:sticky;bottom:0;background:var(--bg);padding-bottom:4px}
.modal-foot .btn{flex:1}

/* ---------- misc ---------- */
.empty{text-align:center;padding:44px 20px;color:var(--ink-3);display:flex;flex-direction:column;align-items:center;gap:12px}
.empty h3{font-family:var(--serif);font-size:20px;font-weight:600;color:var(--ink);letter-spacing:-.015em}
.empty p{font-size:14.5px;max-width:38ch;line-height:1.55}
.toast{
  position:fixed;left:50%;transform:translateX(-50%);z-index:80;
  bottom:calc(88px + env(safe-area-inset-bottom));
  background:var(--ink);color:var(--bg);padding:9px 16px;border-radius:var(--r-pill);
  font-size:13.5px;font-weight:600;box-shadow:var(--shadow-lg);
  display:flex;align-items:center;gap:8px;animation:rise .2s ease;pointer-events:none;
}
@media (min-width:860px){.toast{bottom:28px}}
.toast.warn{background:var(--over);color:#fff}
.toast-aktion{
  margin:-4px -8px -4px 4px;padding:5px 11px;border-radius:var(--r-pill);
  font-size:13px;font-weight:700;color:var(--bg);
  background:rgba(255,255,255,.16);
}
.toast-aktion:hover{background:rgba(255,255,255,.28)}
.banner{
  display:flex;gap:11px;align-items:flex-start;padding:12px 14px;border-radius:var(--r);
  background:var(--due-soft);color:var(--due);font-size:13.5px;line-height:1.45;margin-bottom:16px;
}
.banner strong{display:block;font-size:14px;margin-bottom:2px}
.banner .btn{margin-left:auto;flex:none}
.filters{display:flex;gap:7px;flex-wrap:wrap;margin:11px 0 16px}
.filters button{padding:5px 11px;border-radius:var(--r-pill);font-size:12.5px;font-weight:600;background:var(--surface);border:1px solid var(--line);color:var(--ink-2)}
.filters button[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.list{display:flex;flex-direction:column;gap:9px}
.textarea-mono{font-family:var(--mono);font-size:12.5px;min-height:150px}

/* ================================================================ */
/*  Server-Version: Anmeldung, Produkte, Transkripte                */
/* ================================================================ */

/* ---------- Anmeldung ---------- */
.gate{min-height:100vh;display:grid;place-items:center;padding:24px}
.gate-card{
  background:var(--surface);border:1px solid var(--line);border-radius:18px;
  box-shadow:var(--shadow-lg);padding:34px 30px;max-width:400px;width:100%;
  display:flex;flex-direction:column;gap:16px;text-align:center;
}
.gate-card h1{font-family:var(--serif);font-size:28px;font-weight:600;letter-spacing:-.02em}
.gate-card .tag{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-3)}
.gate-card p{font-size:14.5px;color:var(--ink-2);line-height:1.55}
.gate-card .btn{width:100%;padding:12px 18px;font-size:15px}
.gate-err{background:var(--over-soft);color:var(--over);padding:10px 13px;border-radius:var(--r-sm);font-size:13.5px;line-height:1.45;text-align:left}

/* ---------- Produkte ---------- */
.firma-head{display:flex;align-items:center;gap:10px;margin:26px 0 10px;padding:0 2px}
.firma-head .swatch{width:11px;height:11px;border-radius:3px;flex:none}
.firma-head h3{font-family:var(--serif);font-size:18px;font-weight:600;letter-spacing:-.01em}
.firma-head .btn{margin-left:auto}
.produkt{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:var(--shadow);padding:14px 16px;margin-bottom:9px;
}
.produkt-top{display:flex;align-items:flex-start;gap:10px}
.produkt-top h4{font-family:var(--serif);font-size:16.5px;font-weight:600;flex:1;min-width:0}
.produkt p{font-size:14px;color:var(--ink-2);line-height:1.5;margin-top:4px}
.produkt .ziel{
  font-size:13px;color:var(--ink-2);margin-top:9px;padding:8px 11px;
  background:var(--surface-2);border-radius:var(--r-sm);border-left:2px solid var(--brass);
}
.produkt .ziel b{color:var(--brass);font-weight:600}
.produkt-stats{display:flex;gap:14px;margin-top:11px;flex-wrap:wrap}
.produkt-stats span{font-family:var(--mono);font-size:11.5px;color:var(--ink-3);font-variant-numeric:tabular-nums}
.produkt-stats b{color:var(--ink);font-weight:600}

.statuspicker{display:flex;gap:5px;flex-wrap:wrap;margin-top:9px}
.statuspicker button{
  padding:4px 10px;border-radius:var(--r-pill);font-size:12px;font-weight:600;
  background:var(--surface-2);border:1px solid var(--line);color:var(--ink-3);
}
.statuspicker button[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.statuspicker button svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2.4;stroke-linecap:round}

.st-passt{background:var(--surface-3);color:var(--ink-2)}
.st-angesprochen{background:var(--due-soft);color:var(--due)}
.st-gespraech{background:var(--accent-soft);color:var(--accent)}
.st-kunde{background:var(--ok-soft);color:var(--ok)}
.st-kein{background:var(--over-soft);color:var(--over)}

/* ---------- Transkripte ---------- */
.drop{
  border:2px dashed var(--line-2);border-radius:var(--r);padding:26px 20px;
  text-align:center;color:var(--ink-3);transition:border-color .15s,background .15s;
}
.drop.over{border-color:var(--accent);background:var(--accent-soft)}
.drop strong{display:block;color:var(--ink);font-size:15px;margin-bottom:4px}
.drop small{font-size:12.5px;line-height:1.5;display:block;margin-top:6px}

.tr-row{display:flex;align-items:center;gap:12px;width:100%;text-align:left;
  padding:12px 14px;background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r);box-shadow:var(--shadow)}
.tr-row:hover{border-color:var(--line-2)}
.tr-icon{flex:none;width:38px;height:38px;border-radius:var(--r-sm);display:grid;place-items:center;
  background:var(--surface-3);color:var(--ink-3);font-family:var(--mono);font-size:10px;font-weight:600}
.tr-body{flex:1;min-width:0}
.tr-title{font-family:var(--serif);font-size:16px;font-weight:600;line-height:1.3;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tr-meta{font-family:var(--mono);font-size:11px;color:var(--ink-3);margin-top:2px;
  display:flex;gap:9px;flex-wrap:wrap}
.tr-text{
  background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-sm);
  padding:14px 16px;font-size:14px;line-height:1.65;color:var(--ink-2);
  max-height:420px;overflow-y:auto;white-space:pre-wrap;
}
.tr-text mark{background:var(--due-soft);color:var(--due);padding:0 2px;border-radius:3px}

/* ---------- Review-Bildschirm ---------- */
.review-note{
  display:flex;gap:11px;padding:12px 14px;border-radius:var(--r);
  background:var(--accent-soft);color:var(--accent);font-size:13.5px;line-height:1.5;margin-bottom:18px;
}
.vorschlag{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:var(--shadow);margin-bottom:11px;overflow:hidden;
}
.vorschlag.aus{opacity:.5}
.vorschlag-head{display:flex;align-items:center;gap:11px;padding:13px 15px;border-bottom:1px solid var(--line)}
.vorschlag-head .avatar{width:36px;height:36px;font-size:12px}
.vorschlag-head .n{font-family:var(--serif);font-size:16.5px;font-weight:600;line-height:1.25}
.vorschlag-head .s{font-size:12.5px;color:var(--ink-3)}
.vorschlag-body{padding:13px 15px;display:flex;flex-direction:column;gap:11px}
.vorschlag-body .zeile{display:flex;gap:9px;align-items:flex-start}
.vorschlag-body .zeile .k{
  font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;
  color:var(--ink-3);flex:none;width:78px;padding-top:4px;
}
.vorschlag-body .zeile .v{flex:1;min-width:0;font-size:14px;line-height:1.5}
.beleg{
  font-size:12.5px;color:var(--ink-3);font-style:italic;line-height:1.5;
  border-left:2px solid var(--line-2);padding-left:10px;margin-top:3px;
}
.aktionwahl{display:flex;gap:5px;flex-wrap:wrap}
.aktionwahl button{
  padding:5px 11px;border-radius:var(--r-pill);font-size:12.5px;font-weight:600;
  background:var(--surface-2);border:1px solid var(--line);color:var(--ink-3);
}
.aktionwahl button[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.aktionwahl button[aria-pressed="true"][data-aktion="ignorieren"]{background:var(--ink-3);border-color:var(--ink-3);color:var(--bg)}

.pruef{display:flex;align-items:flex-start;gap:10px;padding:11px 13px;border-bottom:1px solid var(--line)}
.pruef:last-child{border-bottom:0}
.pruef input[type=checkbox]{width:19px;height:19px;margin-top:2px;flex:none;accent-color:var(--accent)}
.pruef .txt{flex:1;min-width:0;font-size:14px;line-height:1.5}
.pruef .txt small{display:block;font-size:12px;color:var(--ink-3);margin-top:2px}

.sticky-foot{
  position:sticky;bottom:calc(78px + env(safe-area-inset-bottom));z-index:20;
  background:var(--bg);padding:12px 0;border-top:1px solid var(--line);
  display:flex;gap:9px;margin-top:18px;
}
@media (min-width:860px){.sticky-foot{bottom:0}}
.sticky-foot .btn{flex:1}

.spinner{
  width:17px;height:17px;border:2px solid currentColor;border-right-color:transparent;
  border-radius:50%;animation:spin .7s linear infinite;flex:none;
}
@keyframes spin{to{transform:rotate(360deg)}}
.lade{display:flex;align-items:center;justify-content:center;gap:11px;padding:40px 20px;color:var(--ink-3);font-size:14.5px}

/* ================================================================ */
/*  Aufgaben, Termine, Assistent                                    */
/* ================================================================ */

/* ---------- Aufgabenzeile ---------- */
.auf{
  display:flex;align-items:flex-start;gap:11px;padding:12px 14px;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:var(--shadow);
}
.auf.s-over{border-left:3px solid var(--over)}
.auf.s-due{border-left:3px solid var(--due)}
.auf-check{
  flex:none;width:22px;height:22px;border-radius:7px;border:2px solid var(--line-2);
  background:var(--surface);display:grid;place-items:center;margin-top:1px;
  transition:background .12s,border-color .12s;
}
.auf-check:hover{border-color:var(--accent)}
.auf-check svg{width:13px;height:13px;stroke:var(--accent-ink);fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;opacity:0}
.auf-check[aria-pressed="true"]{background:var(--accent);border-color:var(--accent)}
.auf-check[aria-pressed="true"] svg{opacity:1}
.auf-body{flex:1;min-width:0;text-align:left}
.auf-titel{font-size:15px;font-weight:600;line-height:1.35;color:var(--ink)}
.auf.erledigt .auf-titel{text-decoration:line-through;color:var(--ink-3)}
.auf-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:3px;align-items:center}
.auf-meta span+span::before{content:"·";margin-right:8px;opacity:.55}
.auf-meta > span{font-family:var(--mono);font-size:11px;color:var(--ink-3)}
.auf-zeit{
  flex:none;font-family:var(--mono);font-size:13px;font-weight:600;
  color:var(--accent);font-variant-numeric:tabular-nums;padding-top:1px;
}
.auf-weg{flex:none;color:var(--ink-3);padding:4px;opacity:0;transition:opacity .12s}
.auf:hover .auf-weg,.auf-weg:focus-visible{opacity:1}
.auf-weg svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
.typ-pille{
  font-family:var(--mono);font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;
  padding:2px 7px;border-radius:var(--r-pill);flex:none;
}
.typ-termin{background:var(--accent-soft);color:var(--accent)}
.typ-todo{background:var(--surface-3);color:var(--ink-3)}
.typ-kontakt{background:var(--brass-soft);color:var(--brass)}

/* ---------- Aktionsmenü am Plus-Knopf ---------- */
.sheet{
  display:flex;flex-direction:column;gap:2px;padding:6px 0 4px;
}
.sheet button{
  display:flex;align-items:center;gap:13px;padding:14px 8px;border-radius:var(--r-sm);
  text-align:left;font-size:15.5px;font-weight:600;color:var(--ink);
}
.sheet button:hover{background:var(--surface-2)}
.sheet button svg{width:20px;height:20px;stroke:var(--accent);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.sheet button small{display:block;font-size:12.5px;font-weight:400;color:var(--ink-3);margin-top:1px}

/* ---------- Assistent ---------- */
.chat{display:flex;flex-direction:column;height:100%;min-height:0}
.chat-verlauf{
  flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:14px;
  padding:4px 0 14px;
}
.blase{max-width:88%;font-size:14.5px;line-height:1.55}
.blase.ich{
  align-self:flex-end;background:var(--accent);color:var(--accent-ink);
  padding:10px 14px;border-radius:16px 16px 4px 16px;white-space:pre-wrap;
}
.blase.es{
  align-self:flex-start;background:var(--surface);border:1px solid var(--line);
  color:var(--ink);padding:10px 14px;border-radius:16px 16px 16px 4px;white-space:pre-wrap;
}
.blase.denkt{display:flex;align-items:center;gap:10px;color:var(--ink-3)}
.chat-aktionen{align-self:flex-start;max-width:88%;display:flex;flex-direction:column;gap:6px}
.blase-kosten{
  align-self:flex-start;font-family:var(--mono);font-size:10.5px;color:var(--ink-3);
  margin-top:-8px;padding-left:4px;font-variant-numeric:tabular-nums;
}
.tat{
  display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:var(--r-sm);
  background:var(--ok-soft);border:1px solid transparent;font-size:13.5px;
}
.tat.zurueck{background:var(--surface-2);color:var(--ink-3)}
.tat .was{flex:1;min-width:0;color:var(--ok);font-weight:600}
.tat.zurueck .was{color:var(--ink-3);text-decoration:line-through;font-weight:400}
.tat svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.tat button{
  flex:none;font-size:12px;font-weight:600;color:var(--ink-2);
  padding:3px 9px;border-radius:var(--r-pill);background:var(--surface);border:1px solid var(--line);
}
.tat button:hover{background:var(--surface-3)}
.chat-eingabe{
  flex:none;display:flex;gap:8px;align-items:flex-end;padding-top:12px;
  border-top:1px solid var(--line);background:var(--bg);
}
.chat-eingabe textarea{
  flex:1;min-height:46px;max-height:160px;resize:none;padding:12px 14px;border-radius:14px;line-height:1.45;
}
.chat-eingabe .btn{height:46px;width:46px;padding:0;border-radius:var(--r-pill);flex:none}
.chat-eingabe .btn svg{width:19px;height:19px;stroke-width:2.2}
.chat-tipps{display:flex;gap:7px;flex-wrap:wrap;padding:2px 0 12px}
.chat-tipps button{
  padding:6px 12px;border-radius:var(--r-pill);font-size:12.5px;
  background:var(--surface);border:1px solid var(--line);color:var(--ink-2);text-align:left;
}
.chat-tipps button:hover{border-color:var(--accent);color:var(--accent)}
.modal.gross{height:min(88vh,760px);display:flex;flex-direction:column}
.modal.gross .modal-head{margin-bottom:8px}

/* ---------- Mehrfachauswahl in der Kontaktliste ---------- */
.row.waehlbar{cursor:pointer}
.row.gewaehlt{border-color:var(--accent);background:var(--accent-soft)}
.pick{
  flex:none;width:22px;height:22px;border-radius:7px;border:2px solid var(--line-2);
  background:var(--surface);display:grid;place-items:center;
}
.pick svg{width:13px;height:13px;stroke:var(--accent-ink);fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;opacity:0}
.row.gewaehlt .pick{background:var(--accent);border-color:var(--accent)}
.row.gewaehlt .pick svg{opacity:1}
.auswahl-leiste{
  position:sticky;bottom:calc(78px + env(safe-area-inset-bottom));z-index:25;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:var(--shadow-lg);padding:11px 13px;margin-top:14px;
  display:flex;align-items:center;gap:9px;flex-wrap:wrap;
}
@media (min-width:860px){.auswahl-leiste{bottom:12px}}
.auswahl-leiste .n{font-family:var(--mono);font-size:13px;font-weight:600;color:var(--accent)}
.auswahl-leiste .btn{margin-left:auto}

/* ---------- Aufgaben im Kontaktdetail ---------- */
.panel .auf{border:0;box-shadow:none;background:transparent;padding:9px 0;border-top:1px solid var(--line)}
.panel .auf:first-of-type{border-top:0;padding-top:2px}
.verknuepfen{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;margin-top:11px}
.verknuepfen .field{flex:1;min-width:180px}
.beteiligt{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:var(--r-sm);background:var(--surface-2)}
.beteiligt .n{flex:1;min-width:0;font-family:var(--serif);font-size:15px;font-weight:600}
.beteiligt button{flex:none;color:var(--ink-3);padding:4px}
.beteiligt button svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}

/* ---------- Visitenkarten-Inbox ---------- */
.karte{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:var(--shadow);margin-bottom:12px;overflow:hidden;
}
.karte.unklar{border-left:3px solid var(--due)}
.karte.problem{border-left:3px solid var(--over)}
.karte-oben{display:flex;gap:13px;padding:13px 15px;align-items:flex-start}
.karte-bild{
  flex:none;width:132px;border-radius:var(--r-sm);border:1px solid var(--line);
  background:var(--surface-2);cursor:zoom-in;overflow:hidden;
}
.karte-bild img{width:100%;height:auto;display:block}
@media (max-width:559px){
  .karte-oben{flex-direction:column}
  .karte-bild{width:100%;max-width:280px}
}
.karte-kopf{flex:1;min-width:0}
.karte-kopf h4{font-family:var(--serif);font-size:17px;font-weight:600;letter-spacing:-.01em;line-height:1.25}
.karte-kopf .sub{font-size:13.5px;color:var(--ink-2);margin-top:2px}
.karte-meta{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}
.karte-felder{padding:0 15px 13px;display:grid;gap:10px}
@media (min-width:620px){.karte-felder{grid-template-columns:1fr 1fr}}
.karte-felder .field label{font-size:11.5px}
.karte-felder input{padding:8px 11px;font-size:14.5px}
.karte-felder .breit{grid-column:1/-1}
.feld-unsicher input{border-color:var(--due);background:var(--due-soft)}
.feld-unsicher label::after{content:" — bitte prüfen";color:var(--due);font-weight:400}
.karte-fuss{
  display:flex;gap:8px;flex-wrap:wrap;padding:12px 15px;
  border-top:1px solid var(--line);background:var(--surface-2);
}
.karte-fuss .weg{margin-left:auto}
.dublette{
  display:flex;align-items:center;gap:9px;padding:9px 12px;margin:0 15px 12px;
  border-radius:var(--r-sm);background:var(--brass-soft);color:var(--brass);
  font-size:13px;line-height:1.45;flex-wrap:wrap;
}
.dublette b{font-weight:700}
.dublette .btn{margin-left:auto}
.lupe{
  position:fixed;inset:0;z-index:70;background:rgba(8,18,20,.92);
  display:grid;place-items:center;padding:20px;cursor:zoom-out;
}
.lupe img{max-width:100%;max-height:100%;border-radius:var(--r);box-shadow:var(--shadow-lg)}
.karte-fortschritt{
  display:flex;align-items:center;gap:11px;padding:12px 14px;border-radius:var(--r);
  background:var(--accent-soft);color:var(--accent);font-size:13.5px;margin-bottom:14px;
}
