/* AJ COCKPIT – Corporate Design AJ MARKETING: Primär Indigo #3331A3, Sekundär Blau #3662FF, Akzent #FDCB6E (sparsam), Überschriften Poppins, Pill-Buttons */
:root{
  --indigo:#3331A3; --indigo-2:#4644C4; --cyan:#3662FF; --amber:#FDCB6E; --ink:#191919;
  --bg:#F5F5FA; --surface:#FFFFFF; --surface-2:#F0F0F7; --hover:#EEEEF8; --line:#E4E4EE; --line-2:#D6D6E4;
  --text:#191919; --muted:#6B6B80; --faint:#9A9AAE;
  --primary:var(--indigo); --primary-ink:#FFFFFF; --primary-soft:#EBEBFA; --accent:var(--cyan); --accent-soft:#E8EDFF;
  --good:#1E9E6A; --good-soft:#E3F5EC; --warn:#C27A00; --warn-soft:#FFF3D9; --bad:#D83A3A; --bad-soft:#FDE8E8;
  --st-offen:#87879C; --st-arbeit:#3662FF; --st-review:#E08A1E; --st-erledigt:#1E9E6A;
  --shadow:0 1px 2px rgba(25,25,60,.05),0 4px 16px rgba(25,25,60,.06); --shadow-lg:0 20px 60px rgba(20,20,60,.22);
  --r:14px; --r-sm:10px; --pill:999px;
  --font:"Manrope",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif; --font-head:"Poppins",ui-sans-serif,system-ui,sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0F0F17; --surface:#17171F; --surface-2:#1E1E29; --hover:#23232F; --line:#2A2A38; --line-2:#363648;
  --text:#ECECF4; --muted:#A0A0B8; --faint:#73738A;
  --primary:#7C7AF0; --primary-ink:#0F0F17; --primary-soft:#24234A; --accent:#7D96FF; --accent-soft:#1C2550;
  --good:#4CC98F; --good-soft:#163428; --warn:#F2B347; --warn-soft:#3A2E14; --bad:#F27272; --bad-soft:#3D1C1C;
  --shadow:0 1px 2px rgba(0,0,0,.3); --shadow-lg:0 20px 60px rgba(0,0,0,.5); color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0F0F17; --surface:#17171F; --surface-2:#1E1E29; --hover:#23232F; --line:#2A2A38; --line-2:#363648;
  --text:#ECECF4; --muted:#A0A0B8; --faint:#73738A;
  --primary:#7C7AF0; --primary-ink:#0F0F17; --primary-soft:#24234A; --accent:#7D96FF; --accent-soft:#1C2550;
  --good:#4CC98F; --good-soft:#163428; --warn:#F2B347; --warn-soft:#3A2E14; --bad:#F27272; --bad-soft:#3D1C1C;
  --shadow:0 1px 2px rgba(0,0,0,.3); --shadow-lg:0 20px 60px rgba(0,0,0,.5); color-scheme:dark}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{background:var(--bg);color:var(--text);font-family:var(--font);font-size:13.5px;line-height:1.5;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
a{color:var(--primary)}
[hidden]{display:none!important}
.num{font-variant-numeric:tabular-nums}
.boot{height:100vh;display:grid;place-items:center}
.boot img{animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{50%{opacity:.4}}

/* Shell */
.shell{display:grid;grid-template-columns:248px minmax(0,1fr);height:100vh}
.side{background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0;padding-left:env(safe-area-inset-left,0px)}
.side-top{display:flex;align-items:center;gap:10px;padding:18px 18px 14px}
.side-top img{width:38px;height:34px;object-fit:contain}
.side-top b{font-weight:700;font-size:16px;letter-spacing:-.01em}
.side-top small{display:block;font-size:10.5px;color:var(--muted);letter-spacing:.14em;text-transform:uppercase;font-weight:500;margin-top:-2px}
.side-search{margin:0 12px 8px;display:flex;align-items:center;gap:8px;padding:7px 12px;border-radius:var(--pill);background:var(--surface-2);color:var(--muted);border:1px solid transparent;cursor:pointer;text-align:left;width:calc(100% - 24px)}
.side-search:hover{border-color:var(--line-2)}
.side-search kbd{margin-left:auto;font-family:inherit;font-size:11px;background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:0 6px}
.nav{flex:1;overflow-y:auto;padding:4px 10px 12px;display:flex;flex-direction:column;gap:1px}
.nav h4{font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--faint);font-weight:600;margin:14px 10px 4px}
.nav a{display:flex;align-items:center;gap:10px;padding:7px 10px;border-radius:9px;color:var(--text);text-decoration:none;font-weight:500;font-size:13.5px}
.nav a svg{width:18px;height:18px;flex:none;color:var(--muted)}
.nav a:hover{background:var(--hover)}
.nav a.on{background:var(--primary-soft);color:var(--primary)}
.nav a.on svg{color:var(--primary)}
.nav a .badge{margin-left:auto}
.side-user{border-top:1px solid var(--line);padding:12px 14px calc(12px + env(safe-area-inset-bottom,0px));display:flex;align-items:center;gap:10px}
.side-user div{min-width:0;flex:1}
.side-user b{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.side-user small{color:var(--muted);font-size:11.5px}
.main{display:flex;flex-direction:column;min-width:0;min-height:0}
.topbar{display:flex;align-items:center;gap:14px;padding:14px 28px;border-bottom:1px solid var(--line);background:var(--surface);position:relative;padding-right:max(28px,env(safe-area-inset-right,0px))}
.topbar::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:linear-gradient(90deg,var(--indigo),var(--cyan));opacity:.9}
.topbar h1{font-size:18px;font-weight:600;margin:0;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crumb{color:var(--muted);font-size:12.5px}
.crumb a{color:var(--muted);text-decoration:none}.crumb a:hover{color:var(--primary)}
.top-actions{margin-left:auto;display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.menu-btn{display:none}
.content{flex:1;overflow-y:auto;padding:24px 28px 60px;padding-right:max(28px,env(safe-area-inset-right,0px))}
.page{max-width:1320px;margin:0 auto;display:flex;flex-direction:column;gap:20px}

/* Grundelemente */
.btn{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line-2);background:var(--surface);padding:7px 16px;border-radius:var(--pill);cursor:pointer;font-weight:500;font-size:13px;white-space:nowrap;text-decoration:none;color:var(--text);transition:background .12s,border-color .12s,transform .06s}
.btn:hover{background:var(--hover)}
.btn:active{transform:translateY(1px)}
.btn svg{width:16px;height:16px}
.btn.pri{background:var(--primary);border-color:var(--primary);color:var(--primary-ink)}
.btn.pri:hover{background:var(--indigo-2);border-color:var(--indigo-2)}
.btn.cyan{background:var(--accent);border-color:var(--accent);color:#fff}
.btn.good{background:var(--good);border-color:var(--good);color:#fff}
.btn.danger{color:var(--bad);border-color:color-mix(in srgb,var(--bad) 35%,var(--line-2))}
.btn.ghost{border-color:transparent;background:transparent;color:var(--muted)}
.btn.ghost:hover{background:var(--hover);color:var(--text)}
.btn.sm{padding:4px 11px;font-size:12.5px}
.btn.icon{padding:6px;border-radius:50%}
.btn[disabled]{opacity:.5;pointer-events:none}
:where(.btn,a,input,select,textarea,button,[tabindex]):focus-visible{outline:2px solid var(--accent);outline-offset:2px}
input,select,textarea{background:var(--surface);border:1px solid var(--line-2);border-radius:10px;padding:8px 11px;min-width:0;font-size:13.5px}
input:focus,select:focus,textarea:focus{border-color:var(--primary);outline:none;box-shadow:0 0 0 3px var(--primary-soft)}
textarea{resize:vertical}
input[type=checkbox]{width:16px;height:16px;accent-color:var(--primary)}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}
.card-h{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.card-h h2,.card-h h3{margin:0;font-size:14.5px;font-weight:600}
.card-b{padding:16px 18px}
.muted{color:var(--muted)} .faint{color:var(--faint)} .small{font-size:12px}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.grow{flex:1;min-width:0}
.badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 7px;border-radius:var(--pill);background:var(--primary);color:var(--primary-ink);font-size:11px;font-weight:600}
.badge.cyan{background:var(--accent);color:#fff} .badge.bad{background:var(--bad);color:#fff}
.pill{display:inline-flex;align-items:center;gap:5px;padding:2px 10px;border-radius:var(--pill);font-size:11.5px;font-weight:500;background:var(--surface-2);color:var(--muted);white-space:nowrap}
.pill.good{background:var(--good-soft);color:var(--good)} .pill.warn{background:var(--warn-soft);color:var(--warn)} .pill.bad{background:var(--bad-soft);color:var(--bad)}
.pill.pri{background:var(--primary-soft);color:var(--primary)} .pill.cyan{background:var(--accent-soft);color:var(--accent)}
.status{display:inline-flex;align-items:center;gap:6px;padding:2px 10px 2px 8px;border-radius:6px;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#fff;white-space:nowrap;border:0;cursor:pointer}
.status.offen{background:var(--st-offen)} .status.arbeit{background:var(--st-arbeit)} .status.review{background:var(--st-review)} .status.erledigt{background:var(--st-erledigt)}
.dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}
.av{width:26px;height:26px;border-radius:50%;display:inline-grid;place-items:center;color:#fff;font-size:10.5px;font-weight:600;flex:none;letter-spacing:.02em}
.av.lg{width:36px;height:36px;font-size:13px}
.av.none{background:transparent;border:1.5px dashed var(--line-2);color:var(--faint)}
.flag{width:15px;height:15px;flex:none}
.empty{padding:36px 20px;text-align:center;color:var(--muted)}
.empty b{display:block;color:var(--text);font-weight:600;margin-bottom:4px}

/* Kennzahlen */
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px 18px;display:flex;flex-direction:column;gap:4px;box-shadow:var(--shadow);position:relative;overflow:hidden;text-decoration:none;color:inherit}
.kpi::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--kc,var(--primary))}
.kpi span{font-size:12px;color:var(--muted);font-weight:500}
.kpi b{font-size:22px;font-weight:600;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.kpi small{font-size:11.5px;color:var(--faint)}
.hero{border-radius:20px;padding:22px 26px;background:linear-gradient(120deg,var(--indigo) 0%,#2b2a8c 55%,#117e95 100%);color:#fff;display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}
.hero h2{margin:0;font-size:24px;font-weight:600;letter-spacing:-.015em}
.hero p{margin:2px 0 0;opacity:.8}
.hero .stats{display:flex;gap:26px;flex-wrap:wrap}
.hero .stats div{display:flex;flex-direction:column}
.hero .stats b{font-size:22px;font-weight:600;font-variant-numeric:tabular-nums}
.hero .stats span{font-size:11.5px;opacity:.75;text-transform:uppercase;letter-spacing:.08em}
.timer{display:flex;align-items:center;gap:12px;padding:12px 16px;border-radius:var(--r);background:var(--accent);color:#fff;flex-wrap:wrap}
.timer .t{font-size:20px;font-weight:600;font-variant-numeric:tabular-nums}
.timer .btn{background:#fff;color:var(--ink);border-color:#fff}
.rec{width:10px;height:10px;border-radius:50%;background:#fff;animation:pulse 1.4s infinite}
@media (prefers-reduced-motion:reduce){.rec,.boot img{animation:none}}

/* ClickUp-artige Liste */
.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.seg{display:inline-flex;background:var(--surface-2);border-radius:var(--pill);padding:3px;gap:2px}
.seg button{border:0;background:transparent;padding:5px 14px;border-radius:var(--pill);cursor:pointer;font-weight:500;color:var(--muted);font-size:12.5px;display:inline-flex;gap:6px;align-items:center}
.seg button.on{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}
.seg button svg{width:15px;height:15px}
.chipsel{border-radius:var(--pill);padding:5px 12px;font-size:12.5px;background:var(--surface)}
.search{position:relative}
.search input{padding-left:32px;border-radius:var(--pill);width:220px}
.search svg{position:absolute;left:11px;top:50%;transform:translateY(-50%);width:15px;height:15px;color:var(--faint)}
.group{display:flex;flex-direction:column}
.group-h{display:flex;align-items:center;gap:10px;padding:8px 4px;cursor:pointer;user-select:none}
.group-h .caret{width:14px;height:14px;color:var(--muted);transition:transform .15s}
.group.closed .caret{transform:rotate(-90deg)}
.group.closed .lst{display:none}
.group-h .cnt{color:var(--muted);font-size:12px}
.lst{background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:hidden}
.lst-head,.trow{display:grid;grid-template-columns:minmax(0,1fr) 150px 110px 100px 170px 70px;align-items:center;gap:12px;padding:0 14px}
.lst-head{height:34px;font-size:11px;color:var(--faint);font-weight:600;text-transform:uppercase;letter-spacing:.06em;border-bottom:1px solid var(--line)}
.trow{min-height:44px;border-bottom:1px solid var(--line);cursor:pointer}
.trow:last-child{border-bottom:0}
.trow:hover{background:var(--hover)}
.tname{display:flex;align-items:center;gap:10px;min-width:0}
.tname b{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.done .tname b{text-decoration:line-through;color:var(--faint)}
.chk{width:18px;height:18px;border-radius:50%;border:1.6px solid var(--line-2);background:transparent;cursor:pointer;flex:none;display:grid;place-items:center;padding:0}
.chk:hover{border-color:var(--good)}
.chk.on{background:var(--good);border-color:var(--good)}
.chk.on::after{content:"";width:5px;height:9px;border:solid #fff;border-width:0 2px 2px 0;transform:translateY(-1px) rotate(45deg)}
.cell{font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:6px}
.due-over{color:var(--bad);font-weight:500} .due-today{color:var(--warn);font-weight:500}
.addrow{display:flex;align-items:center;gap:8px;padding:9px 14px;color:var(--faint);cursor:pointer;font-size:12.5px;border-top:1px solid var(--line)}
.addrow:hover{color:var(--primary);background:var(--hover)}
.board{display:grid;grid-template-columns:repeat(4,minmax(240px,1fr));gap:14px;overflow-x:auto;padding-bottom:6px;align-items:start}
.bcol{background:var(--surface-2);border-radius:14px;padding:10px;display:flex;flex-direction:column;gap:8px;min-height:120px}
.bcol-h{display:flex;align-items:center;gap:8px;padding:2px 4px 4px}
.bcard{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:8px;cursor:pointer;box-shadow:var(--shadow)}
.bcard:hover{border-color:var(--line-2)}
.bcard .meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.bcol.drop{outline:2px dashed var(--accent);outline-offset:-2px}

/* Tabellen */
.tw{overflow-x:auto}
table.t{width:100%;border-collapse:collapse;font-size:13px}
.t th{text-align:left;font-size:11px;font-weight:600;color:var(--faint);text-transform:uppercase;letter-spacing:.06em;padding:10px 14px;border-bottom:1px solid var(--line);white-space:nowrap;background:var(--surface)}
.t td{padding:11px 14px;border-bottom:1px solid var(--line);vertical-align:middle}
.t tr:last-child td{border-bottom:0}
.t .r{text-align:right}
.t tr.click{cursor:pointer}.t tr.click:hover td{background:var(--hover)}
.t tfoot td{font-weight:600;border-top:1px solid var(--line-2)}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);overflow-x:auto}
.tabs button{border:0;background:none;padding:10px 14px;cursor:pointer;color:var(--muted);font-weight:500;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap;display:inline-flex;gap:6px;align-items:center}
.tabs button.on{color:var(--primary);border-bottom-color:var(--primary)}

/* Formulare */
.fg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.fg.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.f{display:flex;flex-direction:column;gap:5px;min-width:0}
.f.full{grid-column:1/-1}
.f>label{font-size:12px;color:var(--muted);font-weight:500}
.hint{font-size:12px;color:var(--muted)}
.section-t{font-size:11px;font-weight:600;color:var(--faint);text-transform:uppercase;letter-spacing:.1em;margin:6px 0 -4px}

/* Overlay: Modal & Drawer */
.ov{position:fixed;inset:0;background:rgba(15,15,40,.45);backdrop-filter:blur(2px);z-index:50;display:flex;justify-content:center;align-items:flex-start;padding:6vh 16px 16px;overflow-y:auto}
.modal{background:var(--surface);border-radius:18px;width:100%;max-width:560px;box-shadow:var(--shadow-lg);border:1px solid var(--line)}
.modal.wide{max-width:860px}
.m-h{display:flex;justify-content:space-between;align-items:center;padding:18px 22px 6px}
.m-h h2{margin:0;font-size:17px;font-weight:600}
.m-b{padding:12px 22px 18px;display:flex;flex-direction:column;gap:14px}
.m-f{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px 22px;border-top:1px solid var(--line);flex-wrap:wrap}
.ov.drawer{justify-content:flex-end;align-items:stretch;padding:0}
.drawer .panel{width:min(620px,100%);background:var(--surface);height:100%;display:flex;flex-direction:column;box-shadow:var(--shadow-lg);animation:slide .18s ease-out}
@keyframes slide{from{transform:translateX(30px);opacity:.6}}
.panel .m-b{flex:1;overflow-y:auto}
.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--ink);color:#fff;padding:11px 18px;border-radius:var(--pill);z-index:80;box-shadow:var(--shadow-lg);max-width:calc(100% - 32px);font-weight:500}
.toast.err{background:var(--bad)}
.cmdk{max-width:620px}
.cmdk input{width:100%;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:16px 20px;font-size:15px;box-shadow:none!important}
.cmdk .res{max-height:50vh;overflow-y:auto;padding:6px}
.cmdk .res a{display:flex;gap:10px;align-items:center;padding:9px 12px;border-radius:10px;text-decoration:none;color:var(--text)}
.cmdk .res a:hover,.cmdk .res a.sel{background:var(--hover)}

/* Login */
.auth{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}
.auth-art{background:linear-gradient(150deg,var(--indigo) 0%,#26258a 50%,#0b8ea6 100%);color:#fff;padding:48px;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}
.auth-art::after{content:"";position:absolute;right:-120px;bottom:-120px;width:420px;height:420px;border-radius:50%;border:2px solid rgba(255,255,255,.18)}
.auth-art h1{font-size:40px;line-height:1.1;font-weight:600;letter-spacing:-.02em;margin:0;max-width:12ch}
.auth-art p{opacity:.8;max-width:40ch}
.auth-form{display:grid;place-items:center;padding:32px 16px}
.auth-form form{width:100%;max-width:380px;display:flex;flex-direction:column;gap:14px}
.auth-form h2{font-size:24px;margin:0;font-weight:600}
.err{color:var(--bad);font-size:12.5px;min-height:1em}

/* Beleg-Editor */
.doc-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,440px);gap:20px;align-items:start}
.lines{width:100%;border-collapse:collapse}
.lines th{font-size:11px;color:var(--faint);text-transform:uppercase;letter-spacing:.06em;text-align:left;padding:6px 4px;font-weight:600}
.lines td{padding:4px}
.lines input,.lines textarea{width:100%;padding:6px 8px;font-size:13px}
.lines textarea{min-height:36px;resize:vertical}
.totals{display:grid;grid-template-columns:auto auto;justify-content:end;gap:4px 28px;font-variant-numeric:tabular-nums}
.totals .big{font-weight:700;font-size:16px}
.paper{background:#fff;color:#1d1d1d;border-radius:6px;box-shadow:var(--shadow-lg);aspect-ratio:210/297;padding:7% 8%;font-size:8.6px;line-height:1.45;position:sticky;top:0;overflow:hidden;display:flex;flex-direction:column;gap:12px;max-width:100%}
.paper .ph{display:flex;justify-content:space-between;align-items:flex-start}
.paper .ph img{width:52px;height:auto}
.paper .sender{font-size:6.5px;color:#888;border-bottom:1px solid #ddd;padding-bottom:2px;display:inline-block}
.paper .addr-meta{display:flex;justify-content:space-between;gap:20px}
.paper .meta{display:grid;grid-template-columns:auto auto;gap:1px 12px;font-size:8px}
.paper .meta span:nth-child(odd){color:#777}
.paper h3{font-size:14px;margin:6px 0 0;color:#3331A3;font-weight:600}
.paper table{width:100%;border-collapse:collapse}
.paper th{font-size:7px;text-transform:uppercase;letter-spacing:.06em;color:#3331A3;text-align:left;border-bottom:1.5px solid #3331A3;padding:3px 2px}
.paper td{padding:3px 2px;border-bottom:1px solid #eee;vertical-align:top}
.paper .r{text-align:right}
.paper .tot{margin-left:auto;display:grid;grid-template-columns:auto auto;gap:1px 18px}
.paper .tot b{font-size:10px}
.paper .foot{margin-top:auto;border-top:1px solid #ddd;padding-top:5px;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;font-size:6.2px;color:#777}

/* Bank */
.accts{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px}
.acct{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px 18px;display:flex;flex-direction:column;gap:6px;box-shadow:var(--shadow)}
.acct .bal{font-size:22px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.txrow{display:grid;grid-template-columns:92px minmax(0,1.5fr) 120px minmax(0,1.6fr);gap:14px;align-items:center;padding:12px 16px;border-bottom:1px solid var(--line)}
.txrow:last-child{border-bottom:0}
.txrow .who{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.txrow .purp{font-size:12px;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.amt{font-weight:600;font-variant-numeric:tabular-nums;text-align:right}
.amt.in{color:var(--good)} .amt.out{color:var(--text)}
.sugg{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.sugg .box{display:flex;flex-direction:column;align-items:flex-end;min-width:0}
.sugg .box b{font-size:12.5px}
.sugg .box small{color:var(--muted);font-size:11.5px;text-align:right}
.score{font-size:11px;font-weight:600;padding:1px 8px;border-radius:var(--pill)}
.chart{width:100%;height:auto;display:block}
.chart text{fill:var(--muted);font-size:10px;font-family:var(--font)}
.legend{display:flex;gap:16px;font-size:12px;color:var(--muted)}
.legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:6px;vertical-align:-1px}
.matrix td:not(:first-child),.matrix th:not(:first-child){text-align:center}
.yes{color:var(--good);font-weight:700}.no{color:var(--faint)}
.two{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:20px;align-items:start}
.list-plain{display:flex;flex-direction:column}
.list-plain>*{padding:11px 18px;border-bottom:1px solid var(--line);display:flex;gap:12px;align-items:center}
.list-plain>*:last-child{border-bottom:0}
.pcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.pcard{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px;display:flex;flex-direction:column;gap:10px;box-shadow:var(--shadow);cursor:pointer}
.pcard:hover{border-color:var(--line-2)}
.bar{height:6px;border-radius:var(--pill);background:var(--surface-2);overflow:hidden}
.bar i{display:block;height:100%;background:linear-gradient(90deg,var(--indigo),var(--cyan));border-radius:inherit}
.bar.over i{background:var(--bad)}

/* Responsiv */
@media (max-width:1100px){.two{grid-template-columns:1fr}}
@media (max-width:1380px){.doc-grid{grid-template-columns:1fr}.paper{position:static;max-width:640px;margin:0 auto}}
@media (max-width:900px){
  .lst-head{display:none}
  .trow{grid-template-columns:minmax(0,1fr) auto;padding:8px 14px;gap:4px 10px}
  .trow .cell.c-proj,.trow .cell.c-time{display:none}
  .trow .cell.c-due,.trow .cell.c-prio{grid-column:1;font-size:11.5px}
  .txrow{grid-template-columns:1fr auto}
  .txrow .sugg{grid-column:1/-1;justify-content:flex-start}
  .txrow .sugg .box{align-items:flex-start}
}
@media (max-width:820px){
  .shell{grid-template-columns:1fr}
  .side{position:fixed;inset:0 auto 0 0;width:270px;z-index:60;transform:translateX(-105%);transition:transform .2s;box-shadow:var(--shadow-lg)}
  .shell.nav-open .side{transform:none}
  .menu-btn{display:inline-flex}
  .topbar{padding:12px 16px;padding-top:calc(12px + env(safe-area-inset-top,0px))}
  .content{padding:18px 16px 60px}
  .fg,.fg.three{grid-template-columns:1fr}
  .auth{grid-template-columns:1fr}.auth-art{display:none}
  .search input{width:160px}
  .hero{padding:18px}
}

/* Stoppuhr oben rechts */
.clock{display:inline-flex;align-items:center;gap:8px;border:1.5px solid var(--primary);color:var(--primary);background:var(--surface);border-radius:var(--pill);padding:6px 14px;font-weight:600;cursor:pointer;white-space:nowrap;max-width:280px}
.clock svg{width:15px;height:15px}
.clock:hover{background:var(--primary-soft)}
.clock.on{background:var(--good);border-color:var(--good);color:#fff}
.clock.on .rec{width:8px;height:8px;border-radius:50%;background:#fff;display:inline-block;animation:pulse 1.4s infinite}
.clock.pause{border-color:var(--warn);color:var(--warn)}
.clock .clk-cat{font-weight:500;opacity:.9;overflow:hidden;text-overflow:ellipsis;max-width:120px}
.clock b{font-variant-numeric:tabular-nums}
.clock-big{display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 0 4px}
.clock-big b{font-size:40px;font-weight:600;letter-spacing:-.02em;color:var(--primary)}
.timer.idle{background:var(--surface);color:var(--text);border:1px solid var(--line)}
.timer.idle .btn{background:var(--primary);color:#fff;border-color:var(--primary)}
/* Wochenansicht */
.days{display:flex;flex-direction:column;gap:10px}
.day.today{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary)}
.day .card-h{padding:10px 16px}
.erow{display:flex;align-items:center;gap:10px;padding:9px 16px;border-top:1px solid var(--line);cursor:pointer}
.erow:hover{background:var(--hover)}
.etime{width:96px;flex:none;color:var(--muted);font-size:12.5px}
.ell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.warnline{display:flex;gap:6px;align-items:center;padding:6px 16px;background:var(--warn-soft);color:var(--warn);font-size:12px;border-top:1px solid var(--line)}
.warnline svg{width:14px;height:14px;flex:none}
/* Teamkalender */
.calt{border-collapse:collapse;font-size:11px;width:100%}
.calt th{font-weight:500;color:var(--muted);padding:4px 0;text-align:center;min-width:24px}
.calt th.who{text-align:left;padding:4px 10px;white-space:nowrap;position:sticky;left:0;background:var(--surface);display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text)}
.calt td.cal{height:30px;border-left:1px solid var(--line);border-top:1px solid var(--line);padding:3px 1px;position:relative}
.calt td.cal i{display:block;height:100%;border-radius:4px}
.calt .we{background:var(--surface-2)} .calt .hol{background:var(--accent-soft)} .calt th.td{color:var(--primary);font-weight:700} .calt td.td{box-shadow:inset 0 0 0 1px var(--primary)}
@media (max-width:820px){
  .clock{padding:6px 10px}.clock span:not(.clk-cat),.clock .clk-cat{display:none}.clock.pause span{display:inline}
  .top-actions .btn:not(.clock){display:none}
  .top-actions .btn.pri{display:inline-flex}
  .erow{flex-wrap:wrap}.etime{width:auto}
  .clock-modal{margin-top:auto}
}
@media (display-mode:standalone){.topbar{padding-top:calc(12px + env(safe-area-inset-top,0px))}}

/* Posting-Vorschau (Feed-Stil) */
.pv{background:#fff;color:#111;border:1px solid #dbdbdb;border-radius:10px;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:13.5px;max-width:470px;width:100%}
.pv-head{display:flex;align-items:center;gap:10px;padding:10px 12px}
.pv-head div{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.pv-head small{color:#737373;font-size:11.5px}
.pv-av{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:700;color:#fff;background:linear-gradient(135deg,#3331A3,#3662FF);box-shadow:0 0 0 2px #fff,0 0 0 3.5px #d62976;flex:none}
.pv-more{margin-left:auto;color:#111;letter-spacing:2px}
.pv-media{position:relative;overflow:hidden;background:#efefef;aspect-ratio:4/5}
.pv-media.tall{aspect-ratio:9/16;max-height:72vh}
.pv-track{display:flex;height:100%;transition:transform .25s ease}
.pv-slide{flex:0 0 100%;height:100%;display:grid;place-items:center;background:#000}
.pv-slide img,.pv-slide video{width:100%;height:100%;object-fit:cover;display:block}
.pv-media.tall .pv-slide video{object-fit:contain}
.pv-empty{display:grid;place-items:center;color:#8e8e8e;font-size:13px;border-bottom:1px solid #efefef}
.pv-nav{position:absolute;top:50%;transform:translateY(-50%);width:28px;height:28px;border-radius:50%;border:0;background:rgba(255,255,255,.85);color:#111;font-size:18px;line-height:1;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,.2)}
.pv-nav.prev{left:8px}.pv-nav.next{right:8px}
.pv-dots{position:absolute;bottom:8px;left:0;right:0;display:flex;justify-content:center;gap:4px}
.pv-dots i{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.55)}.pv-dots i.on{background:#0095f6}
.pv-count{position:absolute;top:10px;right:10px;background:rgba(0,0,0,.6);color:#fff;font-size:11px;padding:2px 8px;border-radius:999px}
.pv-badge{position:absolute;top:10px;left:10px;background:rgba(0,0,0,.6);color:#fff;font-size:11px;padding:2px 8px;border-radius:999px}
.pv-actions{display:flex;gap:14px;padding:10px 12px 4px}
.pv-actions svg{width:24px;height:24px;fill:none;stroke:#111;stroke-width:1.8;stroke-linejoin:round}
.pv-actions span{flex:1}
.pv-cap{padding:4px 12px 14px;line-height:1.45;overflow-wrap:anywhere}
.pv-tag{color:#00376b}
.pv.compact{border-radius:12px}
.pv.compact .pv-actions{padding-bottom:8px}
/* Feed-Raster im Cockpit */
.feed{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}
.feed-item{display:flex;flex-direction:column;gap:8px;cursor:pointer}
.feed-item .pv{max-width:none;transition:transform .12s,box-shadow .12s}
.feed-item:hover .pv{transform:translateY(-2px);box-shadow:var(--shadow-lg)}
.feed-meta{display:flex;gap:8px;align-items:center}
/* Editor */
.modal.pe-modal{max-width:1120px}
.pe-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,420px);gap:22px;align-items:start}
.pe-form{display:flex;flex-direction:column;gap:14px;min-width:0}
.pe-side{position:sticky;top:0;min-width:0}
.drop{border:2px dashed var(--line-2);border-radius:14px;padding:16px;display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;color:var(--muted);transition:border-color .12s,background .12s}
.drop svg{width:22px;height:22px}
.drop.over{border-color:var(--accent);background:var(--accent-soft)}
#pe_prog{width:100%;text-align:left}
.mthumbs{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px}
.mthumb{position:relative;width:96px;height:120px;border-radius:10px;overflow:hidden;flex:none;background:#000}
.mthumb img,.mthumb video{width:100%;height:100%;object-fit:cover}
.mt-v{position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:22px;text-shadow:0 1px 4px rgba(0,0,0,.6);pointer-events:none}
.mt-act{position:absolute;left:0;right:0;bottom:0;display:flex;justify-content:center;gap:2px;padding:4px;background:linear-gradient(transparent,rgba(0,0,0,.6))}
.mt-act .btn{background:rgba(255,255,255,.9);border:0;color:#111;padding:3px}
.mt-n{position:absolute;top:4px;left:4px;background:rgba(0,0,0,.6);color:#fff;font-size:10.5px;border-radius:999px;padding:0 6px}
.cmts{display:flex;flex-direction:column;gap:8px;max-height:280px;overflow-y:auto}
.cmt{background:var(--surface-2);border-radius:10px;padding:8px 10px;display:flex;flex-direction:column;gap:3px}
.cmt.kunde{background:var(--warn-soft);border-left:3px solid var(--warn)}
.cmt.done{opacity:.55}
/* Glocke */
.bell{position:relative}
.bdot{position:absolute;top:-2px;right:-2px;background:var(--bad);color:#fff;border-radius:999px;font-size:10px;font-weight:700;min-width:17px;height:17px;display:grid;place-items:center;padding:0 4px}
@media (max-width:900px){.pe-grid{grid-template-columns:1fr}.pe-side{position:static}}

/* Leads */
.ldboard{grid-template-columns:repeat(7,minmax(190px,1fr))}
.ldboard .bcard .meta{font-size:11.5px}

/* Dokument-Vorschau (Print / Sonstiges) */
.pv.doc .pv-media{aspect-ratio:1/1.3;background:#f2f2f5}
.pv.doc .pv-slide{background:#f2f2f5}
.pv.doc .pv-slide img{object-fit:contain}
.pv-slide iframe{width:100%;height:100%;border:0;background:#fff}
.pv-open{position:absolute;bottom:10px;right:10px;background:rgba(0,0,0,.65);color:#fff;font-size:11.5px;padding:3px 10px;border-radius:999px;text-decoration:none}
.doc-ico{background:var(--surface-2)!important;color:var(--text);box-shadow:none!important;font-size:15px}
.pv-av.img{object-fit:cover;background:#fff;padding:0}

/* Kunde: Material & Marke */
.mtiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;padding:12px}
.mt-file{display:flex;flex-direction:column;gap:2px;text-decoration:none;color:inherit;font-size:12px;min-width:0}
.mt-file img,.mt-file video,.mt-file span{width:100%;aspect-ratio:1;object-fit:cover;border-radius:10px;background:var(--surface-2);display:grid;place-items:center;font-weight:700;color:var(--primary)}
/* Content-Kalender im Cockpit */
.ccal{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.ccal-h,.ccal-g{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.ccal-h span{padding:8px;text-align:center;font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;border-bottom:1px solid var(--line)}
.ccal-c{min-height:120px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:6px;display:flex;flex-direction:column;gap:4px;min-width:0}
.ccal-c:nth-child(7n){border-right:0}.ccal-c.empty{background:var(--surface-2)}.ccal-c.today{background:var(--primary-soft)}
.ccal-p{position:relative;display:flex;gap:6px;align-items:center;border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:3px;cursor:pointer;text-align:left;min-width:0}
.ccal-p img,.ccal-p span{width:30px;height:36px;object-fit:cover;border-radius:5px;flex:none;display:grid;place-items:center;background:var(--surface-2)}
.ccal-p b{font-size:11px;font-weight:500;min-width:0}
.ccal-p i{position:absolute;top:3px;right:3px;width:7px;height:7px;border-radius:50%;background:var(--st-offen)}
.ccal-p i.st-zur_freigabe,.ccal-p i.st-ueberarbeitet{background:var(--cyan)}.ccal-p i.st-aenderung{background:var(--bad)}.ccal-p i.st-freigegeben,.ccal-p i.st-veroeffentlicht{background:var(--good)}
.actav{width:32px;height:32px;border-radius:50%;flex:none;display:inline-grid;place-items:center;background:var(--primary-soft,#ECEBFA);color:var(--primary);font-size:12px;font-weight:600;position:relative}
.actav.cy{background:#E8EDFF;color:#2A4FD6}
.actav.on::after{content:"";position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:50%;background:#22A06B;border:2px solid var(--surface)}
.acday{font-size:12px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;margin:16px 0 6px}.acday:first-child{margin-top:0}
.acrow{display:flex;gap:12px;align-items:flex-start;padding:9px 0;border-bottom:1px solid var(--line)}.acrow:last-child{border-bottom:0}
.acrow b{font-weight:600}.actgt{color:var(--primary)}
.ai-btn{background:linear-gradient(90deg,#3331A3,#3662FF);color:#fff;border:0}
.ai-btn:hover{filter:brightness(1.08)}
.ai-bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 6px}.ai-bar input{flex:1;min-width:180px}
.ai-preview{margin-top:14px;display:flex;flex-direction:column;gap:12px}

/* ---------- Dashboard-Kacheln ---------- */
.d-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:158px;grid-auto-flow:dense;gap:16px}
.d-tile{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden;min-width:0;transition:box-shadow .2s}
.d-s{grid-column:span 1;grid-row:span 1}.d-m{grid-column:span 2;grid-row:span 1}.d-l{grid-column:span 2;grid-row:span 2}.d-xl{grid-column:span 4;grid-row:span 1}
.d-tile.d-xl:not(.bare){grid-row:span 2}
.d-tile.bare{background:linear-gradient(120deg,#3331A3 0%,#2a2890 45%,#3662FF 140%);border:0;color:#fff}
.d-h{display:flex;align-items:center;gap:8px;padding:14px 18px 6px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.d-h svg{width:15px;height:15px;color:var(--primary)}
.d-b{flex:1;min-height:0;overflow:auto;padding:4px 18px 14px;display:flex;flex-direction:column}
.d-tile.bare .d-b{padding:20px 26px;justify-content:center}
.d-hello{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}.d-hello p{margin:0;opacity:.75;font-size:13px}.d-hello h2{margin:2px 0 0;font-size:26px;font-weight:600}
.d-stats{display:flex;gap:22px}.d-stats>*{display:flex;flex-direction:column;color:#fff;text-decoration:none}.d-stats b{font-size:26px;font-weight:600;line-height:1.1}.d-stats span{font-size:10.5px;text-transform:uppercase;letter-spacing:.08em;opacity:.75}
.dl-row{display:flex;align-items:center;gap:10px;padding:7px 0;border-bottom:1px solid var(--line);cursor:pointer;color:inherit;text-decoration:none;min-width:0}.dl-row:last-child{border-bottom:0}
.dl-t{display:flex;flex-direction:column;min-width:0;font-size:13.5px;font-weight:500}.dl-t small{font-weight:400;color:var(--muted);font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dl-t{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dl-due{font-size:12px;white-space:nowrap}.dl-sub{font-size:11px;color:var(--muted);font-weight:500;background:var(--surface-2);border-radius:999px;padding:1px 7px}
.d-more{font-size:12.5px;color:var(--primary);margin-top:6px;text-decoration:none}
.d-empty{margin:auto;text-align:center;color:var(--muted);font-size:13px;padding:8px}
.d-big{margin:auto 0 0;display:flex;flex-direction:column;text-decoration:none;color:var(--text)}.d-big b{font-size:40px;font-weight:600;line-height:1;color:var(--primary)}.d-big b.d-eur{font-size:22px}.d-big span{font-size:12.5px;color:var(--muted);margin-top:4px}.d-big em{font-style:normal;color:var(--bad);font-weight:500}
.d-kv{display:flex;gap:10px;height:100%;align-items:stretch}.d-kv a{flex:1;display:flex;flex-direction:column;justify-content:center;background:var(--surface-2);border-radius:16px;padding:10px 12px;text-decoration:none;color:var(--text);min-width:0}
.d-kv span{font-size:11.5px;color:var(--muted)}.d-kv b{font-size:17px;font-weight:600;white-space:nowrap}.d-kv small{font-size:11px;color:var(--muted)}.d-kv a.bad b{color:var(--bad)}
.d-clock{margin:auto;width:100%;height:100%;border:0;border-radius:18px;background:var(--surface-2);display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;font:inherit;color:var(--text)}
.d-clock b{font-size:28px;font-weight:600}.d-clock span{font-size:12px;color:var(--muted)}.d-clock.on{background:linear-gradient(135deg,#3662FF,#3331A3);color:#fff}.d-clock.on span{color:#fff;opacity:.85}
.d-clockm{display:flex;align-items:center;gap:12px;margin:auto 0}
.d-qgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:auto 0}.d-qgrid.s{grid-template-columns:1fr 1fr}
.d-q{border:0;background:var(--surface-2);border-radius:16px;padding:10px 4px;display:flex;flex-direction:column;align-items:center;gap:4px;cursor:pointer;font:inherit;font-size:11.5px;color:var(--text);text-decoration:none}
.d-q svg{width:20px;height:20px;color:var(--primary)}.d-q:hover{background:var(--primary-soft,#ECEBFA)}
.d-notes{flex:1;width:100%;border:0;resize:none;background:#FFF8E6;border-radius:14px;padding:10px 12px;font:inherit;font-size:13.5px;color:#4a3b12;min-height:60px}
.d-weekgrid{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;height:100%}.d-weekgrid>div{display:flex;flex-direction:column;gap:5px;min-width:0}.d-weekgrid b{font-size:12px;color:var(--muted);font-weight:600}
.d-chip{font-size:12px;background:var(--surface-2);border-radius:10px;padding:5px 8px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Bearbeiten wie am iPhone */
.d-edithint{font-size:12.5px;color:var(--muted);margin:-4px 0 12px}
.d-grid.editing .d-tile{cursor:grab;touch-action:none;animation:dwig .32s ease-in-out infinite alternate}
.d-grid.editing .d-tile:nth-child(2n){animation-delay:-.16s}
.d-grid.editing .d-tile .d-b{pointer-events:none}
@keyframes dwig{from{transform:rotate(-.6deg)}to{transform:rotate(.6deg)}}
.d-tile.dragging{animation:none!important;z-index:5;box-shadow:0 20px 40px rgba(20,20,60,.25);cursor:grabbing}
.d-tile.drop{outline:3px dashed var(--cyan,#3662FF);outline-offset:3px}
.d-del{position:absolute;top:8px;left:8px;z-index:3;width:24px;height:24px;border-radius:50%;border:0;background:#1f1f2e;color:#fff;font-size:18px;line-height:1;cursor:pointer}
.d-sizes{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);display:flex;gap:2px;background:rgba(31,31,46,.88);border-radius:999px;padding:3px;z-index:3}
.d-sizes button{border:0;background:transparent;color:#fff;font:inherit;font-size:11px;font-weight:600;padding:4px 9px;border-radius:999px;cursor:pointer}.d-sizes button.on{background:#fff;color:#1f1f2e}
.d-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.d-gal{border:1px solid var(--line);background:var(--surface);border-radius:18px;padding:16px 12px;display:flex;flex-direction:column;align-items:center;gap:6px;cursor:pointer;font:inherit;color:var(--text)}
.d-gal svg{width:26px;height:26px;color:var(--primary)}.d-gal small{color:var(--muted);font-size:11px;text-align:center}.d-gal:hover{border-color:var(--primary)}
@media (max-width:1100px){.d-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.d-xl{grid-column:span 2}}
@media (max-width:560px){.d-grid{grid-auto-rows:140px;gap:12px}.d-hello h2{font-size:21px}.d-stats{gap:14px}.d-stats b{font-size:20px}.d-weekgrid{grid-template-columns:repeat(3,1fr)}}

/* ---------- Aufgaben: Zuständige, Unteraufgaben, Fortschritt ---------- */
.av-stack{display:inline-flex;align-items:center}.av-stack>*{margin-left:-6px;box-shadow:0 0 0 2px var(--surface)}.av-stack>*:first-child{margin-left:0}
.av-more{font-size:10.5px;font-weight:600;background:var(--surface-2);border-radius:999px;padding:2px 6px;margin-left:-4px}
.tprog{display:inline-block;position:relative;width:46px;height:6px;border-radius:999px;background:var(--surface-2);overflow:hidden;margin-left:8px;vertical-align:middle;flex:none}
.tprog i{position:absolute;inset:0 auto 0 0;background:linear-gradient(90deg,#3331A3,#3662FF);border-radius:inherit}.tprog.full i{background:#22A06B}
.tprog.wide{width:100%;max-width:220px;margin-left:0}.tprog-n{font-size:11px;color:var(--muted);margin-left:5px;font-weight:500}
.subtog{border:0;background:none;padding:0;margin-right:2px;width:18px;height:18px;display:inline-grid;place-items:center;cursor:pointer;color:var(--muted);transform:rotate(-90deg);transition:transform .15s}
.subtog.open{transform:none}.subtog svg{width:14px;height:14px}
.subrows .trow{background:var(--surface-2)}.subrows .tname{padding-left:26px}.subdot{width:6px;height:6px;border-radius:50%;background:var(--cyan,#3662FF);margin-right:4px;flex:none}
.crumb{font-size:12.5px;color:var(--muted);margin-bottom:10px}.lnk{cursor:pointer;color:var(--primary);text-decoration:none}.lnk:hover{text-decoration:underline}
.who-pick{display:flex;flex-wrap:wrap;gap:6px}
.who-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:999px;padding:3px 10px 3px 3px;cursor:pointer;font-size:12.5px}
.who-chip input{display:none}.who-chip:has(input:checked){border-color:var(--primary);background:var(--primary-soft,#ECEBFA);color:var(--primary);font-weight:500}
.subs-h{display:flex;align-items:center;gap:10px}.subs-h span:first-child{flex:none}
.subs{flex:none;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.sub-row{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--line);font-size:13.5px}.sub-row.done a{text-decoration:line-through;color:var(--muted)}
.sub-row a{color:inherit;text-decoration:none;cursor:pointer}
.sub-add{display:flex;gap:6px;padding:8px;background:var(--surface-2);flex-wrap:wrap}.sub-add #sub_t{flex:1;min-width:160px}.sub-add select,.sub-add input[type=date]{max-width:150px}

/* ---------- Monatsempfehlungen ---------- */
.tips{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.tip{border:1px solid var(--line);border-radius:18px;padding:14px 16px;display:flex;flex-direction:column;gap:6px;background:var(--surface)}
.tip-top{display:flex;justify-content:space-between;align-items:center}.tip b{font-weight:600}.tip p{margin:0;font-size:13px;color:var(--muted);flex:1}.tip .btn{align-self:flex-start;margin-top:4px}
.tip-sum{margin:0 0 14px;padding:12px 16px;border-radius:14px;background:linear-gradient(90deg,rgba(51,49,163,.08),rgba(54,98,255,.08));font-size:13.5px}
.ubar{display:grid;grid-template-columns:140px 1fr 40px;align-items:center;gap:10px;font-size:12.5px;margin:5px 0}
.ubar i{height:8px;border-radius:999px;background:linear-gradient(90deg,#3331A3,#3662FF);display:block}.ubar b{text-align:right;font-weight:500}

/* ---------- Bereiche ein-/ausblenden ---------- */
.md-card{display:flex;flex-direction:column;gap:10px}
.md-sec{font-weight:600;font-size:13px;margin-top:4px}
.md-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:8px}
.md-row{display:flex;align-items:center;gap:12px;padding:10px 14px;border:1px solid var(--line);border-radius:var(--r-sm);cursor:pointer;background:var(--surface)}
.md-row:hover{border-color:var(--line-2)}
.md-row b{font-weight:500;display:block}.md-row small{display:block;color:var(--muted);font-size:12px;line-height:1.35}
.md-row.dis{opacity:.6;cursor:default}
.md-sw{appearance:none;-webkit-appearance:none;flex:none;width:40px!important;height:23px;border-radius:999px;background:var(--line-2);position:relative;cursor:pointer;transition:background .15s;border:0!important;padding:0!important;margin:0;box-shadow:none!important}
.md-sw::after{content:"";position:absolute;top:3px;left:3px;width:17px;height:17px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .15s}
.md-sw:checked{background:var(--primary)}.md-sw:checked::after{transform:translateX(17px)}
.md-sw:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.md-sw:disabled{cursor:default}
.md-cust .card-h a{color:inherit}

/* ---------- Globale Suche (⌘K) ---------- */
.top-search{display:none}
@media (max-width:820px){.top-actions .btn.top-search{display:inline-flex}}
.gs-in{display:flex;align-items:center;gap:10px;padding:0 18px;border-bottom:1px solid var(--line)}
.gs-in .gs-ic{width:18px;height:18px;color:var(--muted);flex:none}
.cmdk.gs .gs-in input{border:0;padding:16px 0;font-size:16px;flex:1;min-width:0;background:transparent}
.gs-res{max-height:min(60vh,520px)}
.gs-h{display:flex;justify-content:space-between;align-items:center;padding:10px 12px 4px;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--faint)}
.gs-clear{border:0;background:none;color:var(--muted);font:inherit;font-size:11px;cursor:pointer;text-transform:none;letter-spacing:0}
.cmdk .res a.gs-it{gap:12px;padding:8px 12px}
.gs-it .gs-ic{width:16px;height:16px;color:var(--muted);flex:none}
.gs-it .grow{display:flex;flex-direction:column;min-width:0}
.gs-it small{color:var(--muted);font-size:12px}
.gs-it.done .ell:first-child{text-decoration:line-through;color:var(--muted)}
.gs-it.sel .gs-ic{color:var(--primary)}
.gs-k{display:none}.gs-it.sel .gs-k{display:inline-block}
.gs kbd{font-family:inherit;font-size:11px;background:var(--surface-2);border:1px solid var(--line);border-radius:6px;padding:0 5px;margin-right:2px}
.gs-foot{display:flex;gap:16px;padding:8px 16px;border-top:1px solid var(--line)}
@media (max-width:820px){.gs-foot{display:none}.cmdk.gs{align-self:flex-start;margin-top:8vh}}
/* Nutzer & Rechte: Rechte-Matrix je Person */
.pm-sum{display:flex;flex-direction:column;gap:2px;padding:10px 14px;margin:12px 0 8px;border-radius:12px;background:var(--surface-2)}
.pm-grid{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.pm-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 14px;border-top:1px solid var(--line)}
.pm-row:first-child{border-top:0;background:var(--surface-2)}
.pm-row.dev{background:var(--warn-soft)}
.pm-l{display:flex;flex-direction:column;min-width:0}.pm-l b{font-weight:500}.pm-l small{color:var(--muted);font-size:11.5px}
@media (max-width:620px){.pm-row{flex-direction:column;align-items:flex-start}}

/* Arbeitszeitregeln: Live-Hinweise, Urlaubskonto, Dienstplan (public/js/worktime.js) */
#wtbar{position:fixed;right:16px;bottom:calc(76px + env(safe-area-inset-bottom,0px));z-index:70;display:flex;flex-direction:column;gap:8px;width:min(380px,calc(100% - 32px))}
.wtb{display:flex;gap:10px;align-items:center;background:var(--surface);border:1px solid var(--line);border-left:4px solid var(--cyan);border-radius:var(--r);padding:10px 12px;box-shadow:var(--shadow-lg);animation:wt-in .3s ease-out}
.wtb.warn{border-left-color:var(--amber)}.wtb.bad{border-left-color:var(--bad)}.wtb b{font-size:13px}.wtb .small{color:var(--muted)}
@keyframes wt-in{from{opacity:0;transform:translateY(8px)}}
@media (prefers-reduced-motion:reduce){.wtb{animation:none}}
.wtleave{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}
.wtleave>div{background:var(--surface-2);border-radius:var(--r-sm);padding:10px 12px;display:flex;flex-direction:column;gap:2px}
.wtleave span{font-size:12px;color:var(--muted)}.wtleave b{font-size:20px}.wtleave small{font-size:11.5px;color:var(--muted)}
.wtsched input{width:100%;min-width:0}.wtsched input[type=number]{min-width:58px}.wtsched td{padding:4px 6px}
@media (max-width:600px){#wtbar{right:16px;left:16px;width:auto}}
.rev-kpis{display:flex;gap:12px;flex-wrap:wrap;position:relative}.rev-kpis>div{flex:1;min-width:120px;background:var(--surface-2);border-radius:16px;padding:10px 14px;display:flex;flex-direction:column}
.rev-kpis span{font-size:11.5px;color:var(--muted)}.rev-kpis b{font-size:18px;font-weight:600;white-space:nowrap}.rev-kpis small{font-size:11px;color:var(--muted)}.rev-kpis .past b{font-size:15px;color:var(--muted)}
.rev-eye{position:absolute;top:-34px;right:0;border:0;background:none;cursor:pointer;font-size:16px;opacity:.7}.rev-eye:hover{opacity:1}
.rev-hid{letter-spacing:2px;color:var(--muted)}
.rev-chart{display:grid;grid-template-columns:repeat(12,1fr);gap:6px;align-items:end;height:120px;margin-top:14px}.rev-chart.blur{filter:blur(6px)}
.rev-col{position:relative;height:100%;display:flex;align-items:flex-end;justify-content:center;gap:2px;padding-bottom:16px}.rev-col i{width:40%;border-radius:4px 4px 0 0;background:linear-gradient(#3331A3,#3662FF);min-height:2px}.rev-col i.pv{background:var(--line)}
.rev-col small{position:absolute;bottom:0;font-size:10px;color:var(--muted)}.rev-leg{display:flex;gap:14px;font-size:11px;color:var(--muted);margin-top:4px}.rev-leg i{display:inline-block;width:10px;height:10px;border-radius:3px;background:#3331A3;margin-right:4px;vertical-align:-1px}.rev-leg i.pv{background:var(--line)}

/* CD: Überschriften Poppins (fett), Fließtext Manrope */
h1,h2,h3,h4,.brand,.topbar h1,.m-h h2,.card-h h3,.kpi b,.d-hello h2,.welcome h1,.hero h2,.d-big b,.btn{font-family:var(--font-head)}
h1,h2,.welcome h1,.hero h2,.d-hello h2{font-weight:700}
.rev-off{margin:auto;border:0;background:var(--surface-2);border-radius:16px;padding:14px 20px;font:inherit;color:var(--muted);cursor:pointer}.rev-off:hover{color:var(--text)}
.rev-head{font-size:17px}
/* Umsätze im Lexware-Stil */
.rev-top{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.rev-sum{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}
.rev-sum>div{background:var(--surface-2);border-radius:14px;padding:10px 14px;display:flex;flex-direction:column;min-width:0}
.rev-sum span{font-size:11.5px;color:var(--muted)}.rev-sum b{font-family:var(--font-head);font-size:19px;font-weight:600;white-space:nowrap}
.rev-sum small{font-size:11px;color:var(--muted)}.rev-sum small.up{color:var(--good)}.rev-sum small.down{color:var(--bad)}
.rev-sum .res{background:var(--primary-soft,#EBEBFA)}.rev-sum .res b{color:var(--primary)}
.rev-chart{display:grid;grid-template-columns:repeat(12,1fr);gap:6px;height:150px;margin-top:16px;align-items:end}
.rev-col{height:100%;display:flex;flex-direction:column;align-items:center;gap:4px}
.rev-bars{flex:1;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:3px;border-bottom:1px solid var(--line)}
.rev-bars i{width:38%;max-width:16px;border-radius:4px 4px 0 0;min-height:1px}.rev-bars i.in{background:var(--primary)}.rev-bars i.ex{background:#3662FF;opacity:.35}
.rev-col small{font-size:10.5px;color:var(--muted)}
.rev-leg{display:flex;gap:16px;font-size:11.5px;color:var(--muted);margin-top:8px}.rev-leg i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:-1px}.rev-leg i.in{background:var(--primary)}.rev-leg i.ex{background:#3662FF;opacity:.35}
/* Finanz-Übersicht im Lexware-Stil */
.fb-mask{letter-spacing:2px;color:var(--muted)}
.fb-eye{color:var(--muted)}.fb-eye:hover{color:var(--text)}
.fb-board{display:grid;grid-template-columns:minmax(240px,1fr) minmax(240px,1fr) minmax(320px,2fr);gap:16px;margin-bottom:18px;align-items:start}
.fb-mid{display:flex;flex-direction:column;gap:16px}.fb-card .card-b{padding-top:4px}
@media (max-width:1100px){.fb-board{grid-template-columns:1fr 1fr}.fb-card.fb-ovw{grid-column:1/-1}}
@media (max-width:640px){.fb-board{grid-template-columns:1fr}}
.fb-sec{padding:10px 0;border-bottom:1px solid var(--line)}.fb-sec:last-child{border-bottom:0}
.fb-sec h4{margin:0 0 4px;font-family:var(--font-head);font-size:14px;font-weight:600;color:var(--muted)}
.fb-row{display:flex;justify-content:space-between;gap:10px;padding:3px 0;font-size:13.5px;color:var(--text);text-decoration:none}.fb-row b{font-weight:600;white-space:nowrap}
.fb-row.warn span{color:#D9822B}.fb-row:hover span{text-decoration:underline}
.fb-acc{display:flex;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid var(--line);color:var(--text);text-decoration:none}
.fb-acc b{display:block;font-weight:500;font-size:13.5px}.fb-acc small{color:var(--muted);font-size:11.5px}
.fb-bank{width:34px;height:34px;border-radius:50%;background:var(--primary);color:#fff;display:grid;place-items:center;font-weight:700;flex:none}
.fb-bal{font-weight:600;white-space:nowrap}.fb-link{display:block;text-align:right;margin-top:10px;font-size:12.5px;font-weight:600;color:var(--primary);text-transform:uppercase;letter-spacing:.04em}
.fb-sel{width:100%;margin-bottom:10px}.fb-filters{display:flex;gap:10px;justify-content:center;margin-top:8px}.fb-filters .fb-sel{width:auto;margin:0}
.fb-info{display:grid;gap:6px}.fb-info div{display:flex;gap:10px;align-items:baseline}.fb-info b{min-width:36px;text-align:right;font-family:var(--font-head)}
.fb-tot{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.fb-tot>div{display:flex;flex-direction:column}.fb-tot .r{text-align:right}
.fb-tot span{font-size:13px;color:var(--muted)}.fb-tot b{font-family:var(--font-head);font-size:22px;font-weight:600;white-space:nowrap}
.dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px}.dot.in{background:#2E9E5B}.dot.ex{background:#D64545}
.fb-chart{width:100%;height:auto;margin-top:10px}.fb-chart.blur path,.fb-chart.blur circle{filter:blur(5px)}
.fb-chart text{font-size:10.5px;fill:var(--muted)}.fb-chart .g{stroke:var(--line);stroke-width:1}
.fb-chart .l-in{fill:none;stroke:#2E9E5B;stroke-width:2.2}.fb-chart .l-ex{fill:none;stroke:#D64545;stroke-width:2.2}
.fb-chart .a-in{fill:#2E9E5B;opacity:.08}.fb-chart .a-ex{fill:#D64545;opacity:.07}.fb-chart .hit{fill:transparent;cursor:default}
.fb-hide .num,.fb-hide .list-plain b,.fb-hide .kpi b,.fb-hide .d-kv b,.fb-hide .d-big b.d-eur,.fb-hide .rev-sum b,.fb-hide table.t td.num,.fb-hide table.t td.r,.fb-hide .chart{filter:blur(7px);user-select:none}
.fb-cw{position:relative}
.fb-chart .hov{fill:transparent;cursor:crosshair}
.fb-chart .gl{stroke:var(--muted);stroke-width:1;stroke-dasharray:3 3}.fb-chart .gi{fill:#2E9E5B;stroke:#fff;stroke-width:2}.fb-chart .ge{fill:#D64545;stroke:#fff;stroke-width:2}
.fb-tip{position:absolute;z-index:5;min-width:170px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 24px rgba(20,20,60,.15);padding:10px 12px;font-size:12.5px;pointer-events:none}
.fb-tip b{display:block;font-family:var(--font-head);margin-bottom:4px}.fb-tip div{display:flex;align-items:center;gap:4px}.fb-tip span{margin-left:auto;font-weight:600;padding-left:12px}
.fb-tip .d{border-top:1px solid var(--line);margin-top:4px;padding-top:4px}

/* Kacheln zeigen immer den ganzen Inhalt – kein Scrollen innerhalb einer Kachel.
   Die Größe (S/M/L/XL) legt Breite und Mindesthöhe fest; bei mehr Inhalt wächst die Kachel mit. */
.d-grid{grid-auto-rows:minmax(158px,auto)}
.d-tile{overflow:visible}
.d-b{overflow:visible;min-height:auto}
.d-tile.bare{overflow:hidden}
@media (max-width:560px){.d-grid{grid-auto-rows:minmax(140px,auto)}}
