/* ============================================================
   Kern — Design-Tokens
   ============================================================ */
:root{
  --paper:#F1F2ED;
  --surface:#FFFFFF;
  --surface-2:#F7F8F4;
  --ink:#16180F;
  --ink-2:#4A4D41;
  --muted:#868A79;
  --line:#E2E4DA;
  --line-strong:#CFD2C5;

  --accent:#C8F04A;
  --on-accent:#16180F;
  --accent-soft:#EDFBC8;

  --good:#3C9A66;
  --warn:#D1952A;
  --bad:#CE4A3C;

  --r-xs:10px; --r-sm:14px; --r-md:20px; --r-lg:28px; --r-pill:999px;
  --pad:16px;
  --tabh:72px;
  --shadow:0 1px 2px rgba(22,24,15,.05), 0 8px 24px -14px rgba(22,24,15,.18);

  --f: "Instrument Sans", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"]{
  --paper:#111309;
  --surface:#1C1F15;
  --surface-2:#23271B;
  --ink:#F1F3E9;
  --ink-2:#C3C8B6;
  --muted:#8D927F;
  --line:#2E3325;
  --line-strong:#3D432F;
  --accent-soft:#2C3A12;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 10px 26px -16px rgba(0,0,0,.7);
  color-scheme: dark;
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{
  margin:0; background:var(--paper); color:var(--ink);
  font-family:var(--f); font-size:15px; line-height:1.45;
  font-feature-settings:"ss01","cv05";
  -webkit-font-smoothing:antialiased;
  overscroll-behavior-y:none;
  padding-top:env(safe-area-inset-top);
}
button,input,select,textarea{font:inherit;color:inherit}
button{background:none;border:0;padding:0;cursor:pointer}
h1,h2,h3,p{margin:0}
svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
:focus-visible{outline:2.5px solid var(--accent);outline-offset:2px;border-radius:6px}

.num{font-variant-numeric:tabular-nums;letter-spacing:-.035em;font-weight:600}

/* ============================================================
   Kopfzeile
   ============================================================ */
.topbar{
  position:sticky; top:0; z-index:40;
  display:flex; align-items:flex-end; justify-content:space-between; gap:12px;
  padding:14px var(--pad) 12px;
  background:linear-gradient(var(--paper) 72%, rgba(0,0,0,0));
}
.greet{display:block;font-size:12.5px;color:var(--muted);line-height:1.2}
.viewtitle{font-size:26px;font-weight:600;letter-spacing:-.03em;line-height:1.1}
.topbar-actions{display:flex;gap:8px;padding-bottom:2px}
.iconbtn{
  position:relative;width:40px;height:40px;border-radius:var(--r-pill);
  display:grid;place-items:center;background:var(--surface);
  border:1px solid var(--line);color:var(--ink-2);
}
.iconbtn:active{transform:scale(.94)}
.dot{position:absolute;top:6px;right:6px;width:8px;height:8px;border-radius:50%;background:var(--bad);border:2px solid var(--paper)}

/* ============================================================
   Layout
   ============================================================ */
.view{
  padding:4px var(--pad) calc(var(--tabh) + 34px + env(safe-area-inset-bottom));
  max-width:620px; margin:0 auto;
}
.stack{display:flex;flex-direction:column;gap:12px}
.row{display:flex;align-items:center;gap:10px}
.spread{display:flex;align-items:center;justify-content:space-between;gap:10px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.sechead{display:flex;align-items:baseline;justify-content:space-between;margin:20px 2px 10px}
.sechead h2{font-size:17px;font-weight:600;letter-spacing:-.02em}
.sechead button{font-size:13px;color:var(--muted);font-weight:500}
.label{font-size:12.5px;color:var(--muted)}
.mono{font-variant-numeric:tabular-nums}

/* ============================================================
   Karten — bewusst drei Stufen statt einer
   ============================================================ */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-md);padding:16px}
.card.flush{padding:0;overflow:hidden}
.hero{
  background:var(--accent);color:var(--on-accent);
  border:0;border-radius:var(--r-lg);padding:20px;
  box-shadow:var(--shadow);
}
.hero .label{color:rgba(22,24,15,.62)}
.panel{background:var(--surface-2);border-radius:var(--r-md);padding:14px;border:1px solid transparent}

.kpi{display:flex;flex-direction:column;gap:2px}
.kpi .v{font-size:30px;line-height:1.05}
.kpi .u{font-size:12.5px;color:var(--muted);font-weight:400;letter-spacing:0}
.kpi.sm .v{font-size:22px}

/* ============================================================
   Listenzeilen
   ============================================================ */
.list{display:flex;flex-direction:column}
.item{
  display:flex;align-items:center;gap:12px;width:100%;text-align:left;
  padding:13px 16px;border-bottom:1px solid var(--line);background:none;
}
.item:last-child{border-bottom:0}
.item:active{background:var(--surface-2)}
.item-main{flex:1;min-width:0}
.item-t{font-size:15px;font-weight:500;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.item-s{font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.item-r{font-size:13px;color:var(--muted);flex-shrink:0;font-variant-numeric:tabular-nums}
.chev{color:var(--line-strong);flex-shrink:0}
.chev svg{width:18px;height:18px;stroke-width:2}

.avatar{
  width:38px;height:38px;border-radius:12px;flex-shrink:0;
  display:grid;place-items:center;font-size:13.5px;font-weight:600;
  background:var(--accent-soft);color:var(--ink);letter-spacing:-.02em;
}

/* ============================================================
   Steuerelemente
   ============================================================ */
.seg{
  display:flex;gap:4px;background:var(--surface-2);padding:4px;
  border-radius:var(--r-pill);overflow-x:auto;scrollbar-width:none;margin-bottom:14px;
}
.seg::-webkit-scrollbar{display:none}
.seg button{
  flex:1 0 auto;padding:7px 14px;border-radius:var(--r-pill);
  font-size:13.5px;font-weight:500;color:var(--muted);white-space:nowrap;
}
.seg button.is-on{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(22,24,15,.1)}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  padding:12px 18px;border-radius:var(--r-pill);font-size:14.5px;font-weight:600;
  background:var(--surface);border:1px solid var(--line);color:var(--ink);letter-spacing:-.01em;
}
.btn:active{transform:scale(.97)}
.btn.primary{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.btn.accent{background:var(--accent);color:var(--on-accent);border-color:transparent}
.btn.ghost{background:none;border-color:var(--line)}
.btn.danger{color:var(--bad);border-color:var(--line)}
.btn.block{width:100%}
.btn.sm{padding:8px 14px;font-size:13px}
.btn svg{width:18px;height:18px;stroke-width:2.1}

.chips{display:flex;gap:7px;flex-wrap:wrap}
.chip{
  padding:7px 13px;border-radius:var(--r-pill);font-size:13px;font-weight:500;
  background:var(--surface-2);color:var(--ink-2);border:1px solid transparent;
}
.chip.is-on{background:var(--ink);color:var(--paper)}
.chip.tint{background:var(--accent-soft);color:var(--ink)}

.tag{
  display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:var(--r-pill);
  font-size:11.5px;font-weight:600;background:var(--surface-2);color:var(--ink-2);
}
.tag .bullet{width:7px;height:7px;border-radius:50%;background:currentColor}

/* Ja/Nein-Schalter */
.yn{display:flex;gap:6px;flex-shrink:0}
.yn button{
  width:46px;height:38px;border-radius:12px;font-size:13px;font-weight:600;
  background:var(--surface-2);color:var(--muted);
}
.yn button.on-yes{background:var(--accent);color:var(--on-accent)}
.yn button.on-no{background:var(--ink);color:var(--paper)}
.stepper{display:flex;align-items:center;gap:4px;background:var(--surface-2);border-radius:12px;padding:3px;flex-shrink:0}
.stepper button{width:34px;height:32px;border-radius:9px;font-size:18px;font-weight:500;color:var(--ink-2);display:grid;place-items:center}
.stepper button:active{background:var(--surface)}
.stepper .val{min-width:42px;text-align:center;font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}

/* Checkbox-Kreis */
.tick{
  width:24px;height:24px;border-radius:50%;border:1.8px solid var(--line-strong);
  flex-shrink:0;display:grid;place-items:center;color:transparent;
}
.tick.on{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.tick svg{width:14px;height:14px;stroke-width:2.6}

/* Fortschritt */
.bar{height:7px;border-radius:var(--r-pill);background:var(--surface-2);overflow:hidden}
.bar>i{display:block;height:100%;border-radius:inherit;background:var(--accent);transition:width .5s cubic-bezier(.2,.8,.2,1)}
.hero .bar{background:rgba(22,24,15,.16)}
.hero .bar>i{background:var(--on-accent)}

/* ============================================================
   Tableiste
   ============================================================ */
.tabbar{
  position:fixed;left:0;right:0;bottom:0;z-index:45;
  display:flex;align-items:center;justify-content:space-around;
  height:calc(var(--tabh) + env(safe-area-inset-bottom));
  padding-bottom:env(safe-area-inset-bottom);
  background:color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter:saturate(1.6) blur(18px);
  -webkit-backdrop-filter:saturate(1.6) blur(18px);
  border-top:1px solid var(--line);
}
.tab{
  position:relative;flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;
  color:var(--muted);font-size:10.5px;font-weight:500;padding-top:4px;
}
.tab.is-on{color:var(--ink)}
.tab.is-on svg{stroke-width:2.1}
.tab .dot{top:0;right:50%;margin-right:-20px;border-color:var(--surface)}
.fab{
  width:56px;height:56px;flex-shrink:0;border-radius:20px;margin-top:-20px;
  background:var(--accent);color:var(--on-accent);display:grid;place-items:center;
  box-shadow:0 6px 18px -6px color-mix(in srgb, var(--accent) 70%, transparent);
}
.fab svg{width:26px;height:26px;stroke-width:2.2}
.fab:active{transform:scale(.92)}

/* ============================================================
   Bottom-Sheet
   ============================================================ */
.scrim{position:fixed;inset:0;z-index:60;background:rgba(14,16,10,.42);opacity:0;transition:opacity .22s}
.scrim.in{opacity:1}
.sheet{
  position:fixed;left:0;right:0;bottom:0;z-index:61;
  background:var(--surface);border-radius:26px 26px 0 0;
  max-height:92vh;display:flex;flex-direction:column;
  transform:translateY(100%);transition:transform .3s cubic-bezier(.2,.9,.25,1);
  padding-bottom:env(safe-area-inset-bottom);
  max-width:620px;margin:0 auto;
}
.sheet.in{transform:translateY(0)}
.sheet-grab{width:38px;height:4px;border-radius:2px;background:var(--line-strong);margin:9px auto 0}
.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px 8px}
.sheet-head h2{font-size:18px;font-weight:600;letter-spacing:-.025em}
.sheet-body{overflow-y:auto;padding:4px 18px 18px;-webkit-overflow-scrolling:touch}
.sheet-foot{padding:12px 18px 16px;border-top:1px solid var(--line);display:flex;gap:10px}
.sheet-foot .btn{flex:1}
.closex{width:32px;height:32px;border-radius:50%;background:var(--surface-2);display:grid;place-items:center;color:var(--ink-2);flex-shrink:0}
.closex svg{width:16px;height:16px;stroke-width:2.4}

@media (prefers-reduced-motion: reduce){
  .sheet,.scrim,.bar>i{transition:none}
}

/* ============================================================
   Formulare
   ============================================================ */
.field{margin-bottom:14px}
.field>label{display:block;font-size:12.5px;color:var(--muted);margin-bottom:6px}
.field input[type=text],.field input[type=number],.field input[type=date],
.field input[type=time],.field input[type=password],.field select,.field textarea{
  width:100%;padding:12px 14px;border-radius:var(--r-sm);
  background:var(--surface-2);border:1px solid transparent;color:var(--ink);
  font-size:16px; /* verhindert Zoom auf iOS */
}
.field textarea{min-height:92px;resize:vertical;line-height:1.5}
.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:var(--accent);background:var(--surface)}
.field .hint{font-size:11.5px;color:var(--muted);margin-top:5px}
.switchrow{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px solid var(--line)}
.switchrow:last-child{border-bottom:0}
.switchrow .t{font-size:14.5px}
.switchrow .s{font-size:12px;color:var(--muted)}
.switch{width:46px;height:28px;border-radius:999px;background:var(--line-strong);position:relative;transition:background .18s;flex-shrink:0}
.switch i{position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;transition:transform .18s;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.switch.on{background:var(--accent)}
.switch.on i{transform:translateX(18px)}

.swatches{display:flex;gap:10px;flex-wrap:wrap}
.swatch{width:36px;height:36px;border-radius:50%;border:2.5px solid transparent}
.swatch.on{border-color:var(--ink)}

/* ============================================================
   Diagramme
   ============================================================ */
.chart{width:100%;height:auto;display:block;overflow:visible}
svg text{stroke:none}
.chart rect,.chart .area{stroke:none}
.chart .track{fill:var(--surface-2)}
.chart .fillbar{fill:var(--accent)}
.chart .dim{fill:var(--line)}
.chart text{fill:var(--muted);font-size:10px;font-family:var(--f);font-variant-numeric:tabular-nums}
.chart .vlab{fill:var(--ink-2);font-size:9.5px;font-weight:600}
.chart .ln{fill:none;stroke:var(--accent);stroke-width:2.2}
.chart .area{fill:var(--accent);opacity:.13;stroke:none}
.chart .pt{fill:var(--accent);stroke:var(--surface);stroke-width:2}
.ring-track{stroke:rgba(22,24,15,.16);fill:none}
.ring-fill{stroke:var(--on-accent);fill:none;stroke-linecap:round;transition:stroke-dashoffset .7s cubic-bezier(.2,.8,.2,1)}

.heat{display:grid;grid-auto-flow:column;grid-template-rows:repeat(7,1fr);gap:3px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.heat::-webkit-scrollbar{display:none}
.heat i{width:11px;height:11px;border-radius:3px;background:var(--surface-2);display:block}
.heat i[data-l="1"]{background:color-mix(in srgb,var(--accent) 35%,var(--surface-2))}
.heat i[data-l="2"]{background:color-mix(in srgb,var(--accent) 65%,var(--surface-2))}
.heat i[data-l="3"]{background:var(--accent)}

/* ============================================================
   Pipeline
   ============================================================ */
.board{display:flex;gap:12px;overflow-x:auto;padding:2px 16px 8px;margin:0 -16px;scrollbar-width:none}
.board::-webkit-scrollbar{display:none}
.col{flex:0 0 232px;display:flex;flex-direction:column;gap:8px}
.col-head{display:flex;align-items:center;gap:7px;padding:0 4px 2px}
.col-head .n{font-size:13.5px;font-weight:600;letter-spacing:-.01em}
.col-head .c{font-size:11.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.lead{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-sm);
  padding:11px 12px;text-align:left;width:100%;
}
.lead:active{background:var(--surface-2)}
.lead .co{font-size:14px;font-weight:600;letter-spacing:-.01em}
.lead .pe{font-size:12px;color:var(--muted);margin-top:1px}
.lead .mt{display:flex;align-items:center;gap:6px;margin-top:8px;font-size:11px;color:var(--muted)}
.lead.due{border-color:var(--bad)}
.lead.due .mt{color:var(--bad);font-weight:600}
.colempty{font-size:12px;color:var(--muted);padding:12px;text-align:center;border:1px dashed var(--line);border-radius:var(--r-sm)}

/* Timeline */
.tl{position:relative;padding-left:20px;margin-top:4px}
.tl::before{content:"";position:absolute;left:4px;top:6px;bottom:6px;width:1.5px;background:var(--line)}
.tl .e{position:relative;padding:6px 0}
.tl .e::before{content:"";position:absolute;left:-20px;top:12px;width:9px;height:9px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px var(--surface)}
.tl .d{font-size:11px;color:var(--muted)}
.tl .x{font-size:13.5px}

/* ============================================================
   Kalender
   ============================================================ */
.cal{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.cal .wd{text-align:center;font-size:11px;color:var(--muted);padding-bottom:4px}
.cal .d{
  aspect-ratio:1/1;border-radius:11px;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:3px;font-size:13.5px;
  font-variant-numeric:tabular-nums;position:relative;
}
.cal .d.out{color:var(--line-strong)}
.cal .d.today{background:var(--accent-soft);font-weight:700}
.cal .d.sel{background:var(--ink);color:var(--paper)}
.cal .pips{display:flex;gap:2px;height:4px}
.cal .pips i{width:4px;height:4px;border-radius:50%;background:var(--accent)}
.cal .d.sel .pips i{background:var(--paper)}

/* Wochenstreifen */
.weekstrip{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.weekstrip button{border-radius:14px;padding:9px 0;display:flex;flex-direction:column;align-items:center;gap:3px;background:var(--surface-2)}
.weekstrip .w{font-size:10.5px;color:var(--muted)}
.weekstrip .n{font-size:14.5px;font-weight:600;font-variant-numeric:tabular-nums}
.weekstrip button.is-on{background:var(--accent);color:var(--on-accent)}
.weekstrip button.is-on .w{color:rgba(22,24,15,.6)}

/* ============================================================
   Diverses
   ============================================================ */
.empty{text-align:center;padding:38px 20px;color:var(--muted)}
.empty .em-t{font-size:15px;color:var(--ink);font-weight:500;margin-bottom:4px}
.empty .em-s{font-size:13px;margin-bottom:16px}

.note{
  background:var(--accent-soft);border-radius:var(--r-md);padding:14px 16px;
  font-size:13.5px;color:var(--ink);line-height:1.5;
}
.alert{display:flex;gap:11px;align-items:flex-start;padding:12px 14px;border-radius:var(--r-sm);background:var(--surface-2)}
.alert .ic{width:22px;height:22px;flex-shrink:0;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:700}
.alert.hot .ic{background:var(--bad);color:#fff}
.alert.warm .ic{background:var(--warn);color:#fff}
.alert.cool .ic{background:var(--accent);color:var(--on-accent)}
.alert .tx{font-size:13.5px;line-height:1.4}
.alert .sb{font-size:11.5px;color:var(--muted)}

.toastroot{position:fixed;left:0;right:0;bottom:calc(var(--tabh) + 16px + env(safe-area-inset-bottom));z-index:80;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none}
.toast{
  background:var(--ink);color:var(--paper);padding:11px 18px;border-radius:var(--r-pill);
  font-size:13.5px;font-weight:500;box-shadow:var(--shadow);
  animation:pop .25s cubic-bezier(.2,.9,.25,1);max-width:90vw;
}
@keyframes pop{from{opacity:0;transform:translateY(8px) scale(.96)}to{opacity:1;transform:none}}

.timerbar{
  position:fixed;left:16px;right:16px;bottom:calc(var(--tabh) + 10px + env(safe-area-inset-bottom));
  z-index:50;background:var(--ink);color:var(--paper);border-radius:var(--r-pill);
  padding:11px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;
  box-shadow:var(--shadow);max-width:588px;margin:0 auto;
}
.timerbar .t{font-size:16px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.timerbar .l{font-size:12px;opacity:.7}
.timerbar button{color:var(--paper);font-size:13px;font-weight:600;padding:6px 12px;border-radius:var(--r-pill);background:rgba(255,255,255,.14)}

/* Sperrbildschirm */
.lock{position:fixed;inset:0;z-index:100;background:var(--paper);display:grid;place-items:center}
.lock[hidden]{display:none}
.dot[hidden]{display:none}
.lock-inner{width:100%;max-width:300px;text-align:center;padding:20px}
.lock-mark{width:44px;height:44px;margin:0 auto 18px;border-radius:14px;background:var(--accent);
  box-shadow:inset 0 0 0 7px var(--paper), 0 0 0 1px var(--accent)}
.lock-title{font-size:15px;color:var(--ink-2);margin-bottom:18px}
.lock-dots{display:flex;gap:12px;justify-content:center;height:12px;margin-bottom:10px}
.lock-dots i{width:11px;height:11px;border-radius:50%;background:var(--line-strong)}
.lock-dots i.on{background:var(--ink)}
.lock-err{font-size:12.5px;color:var(--bad);height:18px;margin-bottom:12px}
.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.keypad button{height:62px;border-radius:20px;background:var(--surface);border:1px solid var(--line);font-size:22px;font-weight:500;font-variant-numeric:tabular-nums}
.keypad button:active{background:var(--surface-2)}
.keypad button.blank{background:none;border:0}

/* Widget-Verwaltung */
.wgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.wgrid>.w-full{grid-column:1 / -1}
.wrap-edit .widget{animation:wiggle 2.4s ease-in-out infinite}
@keyframes wiggle{0%,100%{transform:rotate(-.35deg)}50%{transform:rotate(.35deg)}}
@media (prefers-reduced-motion: reduce){.wrap-edit .widget{animation:none}}
.widget{position:relative;display:flex}
.widget>*:first-child{flex:1;min-width:0}
.wdel{position:absolute;top:-7px;left:-7px;width:24px;height:24px;border-radius:50%;background:var(--bad);color:#fff;display:grid;place-items:center;z-index:2;box-shadow:0 2px 6px rgba(0,0,0,.25)}
.wdel svg{width:13px;height:13px;stroke-width:3}
.wmove{position:absolute;top:-7px;right:-7px;display:flex;gap:4px;z-index:2}
.wmove button{width:24px;height:24px;border-radius:50%;background:var(--ink);color:var(--paper);display:grid;place-items:center}
.wmove svg{width:13px;height:13px;stroke-width:3}

.searchbox{display:flex;align-items:center;gap:9px;background:var(--surface-2);border-radius:var(--r-pill);padding:10px 15px;margin-bottom:14px}
.searchbox input{flex:1;background:none;border:0;outline:none;font-size:16px}
.searchbox svg{width:18px;height:18px;color:var(--muted)}

/* ============================================================
   App-Schublade
   ============================================================ */
.appgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.apptile{
  display:flex;flex-direction:column;align-items:center;gap:5px;
  padding:16px 8px 13px;border-radius:var(--r-md);
  background:var(--surface-2);text-align:center;
}
.apptile:active{transform:scale(.96)}
.apptile-ic{
  width:42px;height:42px;border-radius:14px;display:grid;place-items:center;
  background:var(--accent);color:var(--on-accent);margin-bottom:3px;
}
.apptile-ic svg{width:21px;height:21px;stroke-width:1.9}
.apptile-n{font-size:13px;font-weight:600;letter-spacing:-.01em}
.apptile-s{font-size:10.5px;color:var(--muted);line-height:1.3}

/* ============================================================
   Tagescheck-Tabelle
   ============================================================ */
.tablewrap{max-height:56vh;overflow:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.tablewrap::-webkit-scrollbar{display:none}
.dtable{border-collapse:collapse;width:100%;font-variant-numeric:tabular-nums;font-size:13px}
.dtable th,.dtable td{padding:9px 10px;text-align:center;white-space:nowrap}
.dtable thead th{
  font-size:11px;font-weight:600;color:var(--muted);
  border-bottom:1px solid var(--line);position:sticky;top:0;z-index:2;background:var(--surface);
}
.dtable thead th:first-child{left:0;z-index:3}
.dtable th.day{
  text-align:left;font-weight:500;color:var(--ink-2);font-size:12px;
  position:sticky;left:0;background:var(--surface);z-index:1;
}
.dtable tbody td{color:var(--line-strong);border-bottom:1px solid var(--line)}
.dtable tbody td.has{color:var(--ink);font-weight:600}
.dtable tbody tr.today th.day{color:var(--ink);font-weight:700}
.dtable tbody tr.today{background:var(--accent-soft)}
.dtable tbody tr.today th.day{background:var(--accent-soft)}
.dtable tfoot tr.sum th,.dtable tfoot tr.sum td{
  border-top:1px solid var(--line-strong);font-weight:700;color:var(--ink);
  background:var(--surface-2);
}
.dtable tfoot tr.sum th{text-align:left;position:sticky;left:0;background:var(--surface-2)}
.dtable tfoot td.rate{color:var(--muted);font-weight:600}

/* Kennzahlen-Raster im Hero */
.statgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px 10px}

/* ============================================================
   Ziehen und Ablegen
   ============================================================ */
.col-body{display:flex;flex-direction:column;gap:8px;min-height:78px;border-radius:var(--r-sm);padding:2px;transition:background .15s}
.col-body.over{background:var(--accent-soft);outline:2px dashed var(--accent);outline-offset:-2px}
.lead{cursor:grab;touch-action:manipulation}
.lead.dragging{opacity:.3}
.dragghost{
  position:fixed;z-index:70;pointer-events:none;left:0;top:0;
  transform:rotate(-2deg);box-shadow:0 14px 34px -10px rgba(0,0,0,.4);
  border-color:var(--accent);
}
